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
Performs the specified action with context within the Swing Thread. If the action results in a modal dialog, waitForCompletion must be false.
public static void performAction(DockingActionIf action, ActionContext context, boolean wait) { doPerformAction(action, context, wait); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void performAction(DockingActionIf action, boolean waitForCompletion) {\n\n\t\tActionContext context = runSwing(() -> {\n\t\t\tActionContext actionContext = new DefaultActionContext();\n\t\t\tDockingWindowManager activeInstance = DockingWindowManager.getActiveInstance();\n\t\t\tif (activeInstance == null) {\n\t\t\t\treturn actionContext;\n\t\t\t}\n\n\t\t\tComponentProvider provider = activeInstance.getActiveComponentProvider();\n\t\t\tif (provider == null) {\n\t\t\t\treturn actionContext;\n\t\t\t}\n\n\t\t\tActionContext providerContext = provider.getActionContext(null);\n\t\t\tif (providerContext != null) {\n\t\t\t\treturn providerContext;\n\t\t\t}\n\n\t\t\treturn actionContext;\n\t\t});\n\n\t\tdoPerformAction(action, context, waitForCompletion);\n\t}", "public static void performDialogAction(DockingActionIf action, DialogComponentProvider provider,\n\t\t\tboolean wait) {\n\n\t\tActionContext context = runSwing(() -> {\n\t\t\tActionContext actionContext = provider.getActionContext(null);\n\t\t\tif (actionContext != null) {\n\t\t\t\tactionContext.setSourceObject(provider.getComponent());\n\t\t\t}\n\t\t\treturn actionContext;\n\t\t});\n\n\t\tdoPerformAction(action, context, wait);\n\t}", "public static void performAction(DockingActionIf action, ComponentProvider provider,\n\t\t\tboolean wait) {\n\n\t\tActionContext context = runSwing(() -> {\n\t\t\tActionContext actionContext = new DefaultActionContext();\n\t\t\tif (provider == null) {\n\t\t\t\treturn actionContext;\n\t\t\t}\n\n\t\t\tActionContext newContext = provider.getActionContext(null);\n\t\t\tif (newContext == null) {\n\t\t\t\treturn actionContext;\n\t\t\t}\n\n\t\t\tactionContext = newContext;\n\t\t\tactionContext.setSourceObject(provider.getComponent());\n\n\t\t\treturn actionContext;\n\t\t});\n\n\t\tdoPerformAction(action, context, wait);\n\t}", "public void runOnUiThread(Runnable action) {\n synchronized(action) {\n mActivity.runOnUiThread(action);\n try {\n action.wait();\n } catch (InterruptedException e) {\n Log.v(TAG, \"waiting for action running on UI thread is interrupted: \" +\n e.toString());\n }\n }\n }", "public void waitCursorForAction(JComponent comp, Thread thr) {\r\n waitCursorForAction(comp, thr, false);\r\n }", "abstract public boolean timedActionPerformed(ActionEvent e);", "@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\thelper_.start();\n\t\t\t}", "public void performAction() {\n\t\t// TODO Auto-generated method stub\n\t\t\n\t}", "@Override\n public void actionPerformed(final ActionEvent e)\n {\n new Thread(new Runnable()\n {\n @Override\n public void run()\n {\n\n SwingUtilities.invokeLater(new Runnable()\n {\n @Override\n public void run()\n {\n frame.blockGUI();\n navigate(e);\n frame.releaseGUI();\n }\n });\n }\n }).start();\n }", "private void bonusAction() throws InterruptedException {\n\n bonusActionPane.setVisible(true);\n PauseTransition delay = new PauseTransition(Duration.seconds(3));\n delay.setOnFinished( event -> bonusActionPane.setVisible(false) );\n delay.play();\n\n }", "public void actionPerformed(ActionEvent e)\n {\n // check thread is really finished\n if (testThread != null)\n logger.log(Level.INFO, \"testThread.isAlive()==\" + testThread.isAlive());\n else\n logger.log(Level.INFO, \"testThread==null\");\n\n // create Thread from Runnable (WorkTask)\n testThread = new Thread(new WorkerTask(null));\n // make sure thread will be killed if app is unexpectedly killed\n testThread.setDaemon(true);\n testThread.start();\n }", "protected boolean invokeAction( int action )\n {\n switch ( action )\n {\n case ACTION_INVOKE:\n {\n clickButton();\n return true;\n }\n }\n return super.invokeAction( action );\n }", "public void performAction();", "public void start(BundleContext context)\n {\n m_context = context;\n if (SwingUtilities.isEventDispatchThread())\n {\n run();\n }\n else\n {\n try\n {\n javax.swing.SwingUtilities.invokeAndWait(this);\n }\n catch (Exception ex)\n {\n ex.printStackTrace();\n }\n }\n }", "public void actionPerformed(ActionEvent evt) {\r\n if (evt.getActionCommand().equals(\"OK\")) {\r\n dispose();\r\n runRefactoring();\r\n } else if (evt.getActionCommand().equals(\"Cancel\")) {\r\n dispose();\r\n }\r\n\r\n if (currentPackage != null) {\r\n currentPackage.repaint();\r\n }\r\n }", "public void doAction(Action action) {\n\t\tif (!isMyTurn) {\n\t\t\treporter.log(Level.SEVERE, \"User did action but it's not his turn\");\n\t\t\treturn;\n\t\t}\n\t\ttry {\n\t\t\tconnection.send(action);\n\t\t} catch (IOException e) {\n\t\t\treporter.log(Level.SEVERE, \"Can't send action\", e);\n\t\t\treturn;\n\t\t}\n\t\tif (progress instanceof ProgressRounds) {\n\t\t\tprogress = ((ProgressRounds) progress).advance();\n\t\t}\n\t\tsetMyTurn(false);\n\t\t// notifyListeners(action);\n\t}", "public void waitCursorForAction(JComponent comp, Thread thr, boolean disable) {\r\n Cursor orig = comp.getCursor();\r\n boolean status = comp.isEnabled();\r\n if (disable) comp.setEnabled(false);\r\n comp.setCursor(waitCursor);\r\n thr.start();\r\n try {\r\n thr.join();\r\n } catch (InterruptedException ex) {\r\n Logger.getLogger(MousePointerManager.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n if (disable) comp.setEnabled(status);\r\n comp.setCursor(orig);\r\n }", "public void actionPerformed(ActionEvent e) {\n\t\t\t\tOpenABOXJDialog getStarted = new OpenABOXJDialog(frame, myst8);\n\t\t\t\tgetStarted.setModal(true);\n\t\t\t\tgetStarted.setVisible(true);\n\t\t\t\t\n\t\t\t\ttry {\n\t\t\t\t\tcontroller.initExisting(getStarted.getTBOXLocationTextField(), \n\t\t\t\t\t\t\t\tgetStarted.getTBOXIRI(), \n\t\t\t\t\t\t\t\tgetStarted.getABOXLocationTextField(),\n\t\t\t\t\t\t\t\tgetStarted.getABOXIRI());\n\t\t\t\t\tmodel.setState(ABOXBuilderGUIState.ABOXLoaded);\n\t\t\t\t} catch (OWLOntologyCreationException e1) {\n\t\t\t\t\tcontroller.logappend(new KIDSGUIAlertError(\"Uh-oh - an exception occurred when loading the ontology: \" + e1.getMessage()));\n\t\t\t\t}\n\t\t\t\tprocessMessageQueue();\n\t\t\t}", "public void doInteract()\r\n\t{\n\t}", "public void performSubmit(Action action) {\n performSubmit(action, true);\n }", "public void run(IAction action) {\n\t\tMessageDialog.openInformation(window.getShell(), \"AccTrace\",\n\t\t\t\t\"Hello, Eclipse world\");\n\t}", "public void run() {\n\t\t\tshowSystemDialog(ResultMsg);\r\n\t\t}", "void ShowWaitDialog(String title, String message);", "static boolean sendMessage(Component paramComponent, AWTEvent paramAWTEvent)\n/* */ {\n/* 237 */ paramAWTEvent.isPosted = true;\n/* 238 */ AppContext localAppContext1 = AppContext.getAppContext();\n/* 239 */ final AppContext localAppContext2 = paramComponent.appContext;\n/* 240 */ DefaultKeyboardFocusManagerSentEvent localDefaultKeyboardFocusManagerSentEvent = new DefaultKeyboardFocusManagerSentEvent(paramAWTEvent, localAppContext1);\n/* */ \n/* */ \n/* 243 */ if (localAppContext1 == localAppContext2) {\n/* 244 */ localDefaultKeyboardFocusManagerSentEvent.dispatch();\n/* */ } else {\n/* 246 */ if (localAppContext2.isDisposed()) {\n/* 247 */ return false;\n/* */ }\n/* 249 */ SunToolkit.postEvent(localAppContext2, localDefaultKeyboardFocusManagerSentEvent);\n/* 250 */ if (EventQueue.isDispatchThread())\n/* */ {\n/* 252 */ EventDispatchThread localEventDispatchThread = (EventDispatchThread)Thread.currentThread();\n/* 253 */ localEventDispatchThread.pumpEvents(1007, new Conditional() {\n/* */ public boolean evaluate() {\n/* 255 */ return (!this.val$se.dispatched) && (!localAppContext2.isDisposed());\n/* */ }\n/* */ });\n/* */ } else {\n/* 259 */ synchronized (localDefaultKeyboardFocusManagerSentEvent) {\n/* 260 */ for (;;) { if ((!localDefaultKeyboardFocusManagerSentEvent.dispatched) && (!localAppContext2.isDisposed())) {\n/* */ try {\n/* 262 */ localDefaultKeyboardFocusManagerSentEvent.wait(1000L);\n/* */ }\n/* */ catch (InterruptedException localInterruptedException) {}\n/* */ }\n/* */ }\n/* */ }\n/* */ }\n/* */ }\n/* 270 */ return localDefaultKeyboardFocusManagerSentEvent.dispatched;\n/* */ }", "public void exitingToRight() throws Exception\r\n\t{\r\n\t\t/*\r\n\t\tSwingWorker worker = new SwingWorker() {\r\n\t\t public Object construct() {\r\n\t\t \t//add the code for the background thread\r\n\t\t \t\r\n\t\t \t\r\n\t\t }\r\n\t\t public void finished() {\r\n\t\t \t//code that you add here will run in the UI thread\r\n\t\t \t\r\n\t\t }\r\n\t \r\n\t\t};\r\n\t\tworker.start(); //Start the background thread\r\n\r\n\r\n\t\t\r\n\t\r\n\t\t/*\r\n\t\tDoShowDialog doShowDialog = new DoShowDialog();\r\n\t\ttry {\r\n\t\t SwingUtilities.invokeAndWait(doShowDialog);\r\n\t\t}\r\n\t\tcatch \r\n\t\t (java.lang.reflect.\r\n\t\t InvocationTargetException e) {\r\n\t\t e.printStackTrace();\r\n\t\t}\r\n*/\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t//EPSG\r\n\t\tblackboard.put(\"selectedImportEPSG\", jComboEPSG.getSelectedItem());\r\n\t\tblackboard.put(\"mostrarError\", true);\r\n\t\t\r\n\t\tif (chkDelete.isSelected())\r\n\t\t{\r\n\t\t\t//JOptionPane.showMessageDialog(aplicacion.getMainFrame(), \r\n\t\t\t//\t\tI18N.get(\"ImportadorParcelas\", \"importar.informacion.referencia.borrar.aviso.parcial\"));\r\n\t\t\t\r\n\t\t\tint answer = JOptionPane.showConfirmDialog(aplicacion.getMainFrame(), I18N.get(\"ImportadorParcelas\", \"importar.informacion.referencia.borrar.aviso\"));\r\n\t\t if (answer == JOptionPane.YES_OPTION) {\t\t \r\n\t\t \tblackboard.put(\"borrarNoIncluidas\", true);\r\n\t\t \tJOptionPane.showMessageDialog(aplicacion.getMainFrame(), \r\n\t\t \t\t\tI18N.get(\"ImportadorParcelas\", \"importar.informacion.referencia.borrar.aviso.confirmarborrar\"));\r\n\t\t } \r\n\t\t else if (answer == JOptionPane.NO_OPTION || answer == JOptionPane.CANCEL_OPTION) {\r\n\t\t \tblackboard.put(\"borrarNoIncluidas\", false);\r\n\t\t \tJOptionPane.showMessageDialog(aplicacion.getMainFrame(), \r\n\t\t \t\t\tI18N.get(\"ImportadorParcelas\", \"importar.informacion.referencia.borrar.aviso.denegarborrar\"));\r\n\t\t }\t\t\t\t\t\t\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\tblackboard.put(\"borrarNoIncluidas\", false);\r\n\t\t}\r\n\t\t\t\t\r\n\t\tif (!rusticaValida || !urbanaValida)\r\n\t\t{\t\t\t\r\n\t\t\t/*String text = JOptionPane.showInputDialog(aplicacion.getMainFrame(), \r\n\t\t\t\t\tI18N.get(\"ImportadorParcelas\", \"importar.informacion.referencia.borrar.aviso.parcial\"));\r\n\t\t if (text == null) \r\n\t\t {\t\r\n\t\t \t//wizardContext.inputChanged();\r\n\t\t \treturn; //throw new Exception();\r\n\t\t }\t\t*/ \r\n\t\t\t\r\n\t\t\tJOptionPane.showMessageDialog(aplicacion.getMainFrame(), I18N.get(\"ImportadorParcelas\", \"importar.informacion.referencia.borrar.aviso.parcial\"));\r\n\t\t} \r\n\t\t\r\n\t}", "@Override\n\tpublic void doExecute(Runnable action) {\n\t\t\n\t}", "public void actionPerformed(ActionEvent e) {\n\n if (e.getSource() == m_StartBut) {\n if (m_RunThread == null) {\n\ttry {\n\t m_RunThread = new ExperimentRunner(m_Exp);\n\t m_RunThread.setPriority(Thread.MIN_PRIORITY); // UI has most priority\n\t m_RunThread.start();\n\t} catch (Exception ex) {\n ex.printStackTrace();\n\t logMessage(\"Problem creating experiment copy to run: \"\n\t\t + ex.getMessage());\n\t}\n }\n } else if (e.getSource() == m_StopBut) {\n m_StopBut.setEnabled(false);\n logMessage(\"User aborting experiment. \");\n if (m_Exp instanceof RemoteExperiment) {\n\tlogMessage(\"Waiting for remote tasks to \"\n\t\t +\"complete...\");\n }\n ((ExperimentRunner)m_RunThread).abortExperiment();\n // m_RunThread.stop() ??\n m_RunThread = null;\n }\n }", "public void actionPerformed(ActionEvent e)\n {\n testThread.interrupt();\n }", "@Override\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tint b = (int) combo.getSelectedItem();\r\n\t\t\t\t//JOptionPane.showMessageDialog(content, \"N'est Pas Complet\", \"A maintenance\",JOptionPane.INFORMATION_MESSAGE);\r\n\t\t\t\tSwingUtilities.invokeLater(new Runnable() {\r\n\t\t\t\t\t\r\n\t\t\t\t\t@Override\r\n\t\t\t\t\tpublic void run() {\r\n\t\t\t\t\t\t// TODO Auto-generated method stub\r\n\t\t\t\t\t\ttry {\r\n\t\t\t\t\t\t\tnew Verification(b);\r\n\t\t\t\t\t\t} catch (IOException e) {\r\n\t\t\t\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t});\r\n\t\t\t\t}", "@Override\r\n\r\n\tpublic void doAction(Object object, Object param, Object extParam,Object... args) {\n\t\tString match = \"\";\r\n\t\tString ks = \"\";\r\n\t\tint time = 3000; // Default wait 3 secs before and after the dialog shows.\r\n\r\n\t\ttry {\r\n\t\t\tThread.sleep(time);\r\n\t\t\tIWindow activeWindow = RationalTestScript.getScreen().getActiveWindow();\r\n\t\t\t// ITopWindow activeWindow = (ITopWindow)AutoObjectFactory.getHtmlDialog(\"ITopWindow\");\r\n\t\t\tif ( activeWindow != null ) {\r\n\t\t\t\tif ( activeWindow.getWindowClassName().equals(\"#32770\") ) {\r\n\t\t\t\t\tactiveWindow.inputKeys(param.toString());\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\t\r\n\t\t\t/*int hwnd = Win32IEHelper.getDialogTop();\r\n\t\t\tTopLevelTestObject too = null;\r\n\t\t\tTestObject[] foundTOs = RationalTestScript.find(RationalTestScript.atChild(\".hwnd\", (long)hwnd, \".domain\", \"Win\"));\r\n\t\t\tif ( foundTOs!=null ) {\r\n\t\t\t\t// Maximize it\r\n\t\t\t\tif ( foundTOs[0]!=null) {\r\n\t\t\t\t\ttoo = new TopLevelTestObject(foundTOs[0]);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tif (too!=null) {\r\n\t\t\t\ttoo.inputKeys(param.toString());\r\n\t\t\t}*/\r\n\t\t\tThread.sleep(time);\r\n\t\t} catch (NullPointerException e ) {\t\t\t\r\n\t\t} catch (ClassCastException e) {\r\n\t\t} catch (Exception e) {\r\n\t\t\tSystem.err.println(\"Error finding the HTML dialog.\");\r\n\t\t}\r\n\t}", "public void actionPerformed( ActionEvent event )\n {\n KalumetConsoleApplication.getApplication().getLogPane().addInfo(\n \"Software \" + name + \" command \" + commandName + \" execution in progress ...\",\n parent.getEnvironmentWindow().getEnvironmentName() );\n parent.getEnvironmentWindow().getChangeEvents().add(\n \"Software \" + name + \" command \" + commandName + \" execution requested.\" );\n // start the execute command thread\n final ExecuteCommandThread executeCommandThread = new ExecuteCommandThread();\n executeCommandThread.commandName = commandName;\n executeCommandThread.start();\n // sync with the client\n KalumetConsoleApplication.getApplication().enqueueTask(\n KalumetConsoleApplication.getApplication().getTaskQueue(), new Runnable()\n {\n public void run()\n {\n if ( executeCommandThread.ended )\n {\n if ( executeCommandThread.failure )\n {\n KalumetConsoleApplication.getApplication().getLogPane().addError(\n executeCommandThread.message,\n parent.getEnvironmentWindow().getEnvironmentName() );\n parent.getEnvironmentWindow().getChangeEvents().add(\n executeCommandThread.message );\n }\n else\n {\n KalumetConsoleApplication.getApplication().getLogPane().addConfirm(\n \"Software \" + name + \" command \" + commandName + \" executed.\",\n parent.getEnvironmentWindow().getEnvironmentName() );\n parent.getEnvironmentWindow().getChangeEvents().add(\n \"Software \" + name + \" command \" + commandName + \" executed.\" );\n }\n }\n else\n {\n KalumetConsoleApplication.getApplication().enqueueTask(\n KalumetConsoleApplication.getApplication().getTaskQueue(), this );\n }\n }\n } );\n }", "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}", "@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tSwingWorker<Void,Void> worker = new SwingWorker<Void,Void>()\n\t\t\t\t{\n\t\t\t\t\t@Override\n\t\t\t\t\tprotected Void doInBackground() {\n\t\t\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t//frmIpfs.getContentPane().add(infomation,BorderLayout.CENTER);\n\t\t\t\t\t\t//new Thread(infomation).start();\n\t\t\t\t\t\tinfomation.drawStart();\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tnew Thread(new Runnable() {\n\n\t\t\t\t\t\t\t\t@Override\n\t\t\t\t\t\t\t\tpublic void run() {\n\t\t\t\t\t\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\t\t\t\t\t\twait = new waittingDialog();\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t}}).start();\n\t\t\t\t\t\t\tcenter.start();\n\t\t\t\t\t\t\twait.startSucess();\n\t\t\t\t\t\t\tstartButton.setEnabled(false);\n\t\t\t\t\t\t\tcloseButton.setEnabled(true);\n\t\t\t\t\t\t} catch (IOException e) {\n\t\t\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\t\t\t//e.printStackTrace();\n\t\t\t\t\t\t\tnew IODialog();\n\t\t\t\t\t\t} catch (CipherException e) {\n\t\t\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\t\t\t//e.printStackTrace();\n\t\t\t\t\t\t\tnew BlockChainDialog();\n\t\t\t\t\t\t} catch (Exception e) {\n\t\t\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t\t\tnew ExceptionDialog();\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\treturn null;\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t};\n\t\t\t\tworker.execute();\n\t\t\t}", "public void dispatchCancel(Action action) {\n this.handler.sendMessage(this.handler.obtainMessage(2, action));\n }", "void actionCompleted(ActionLookupData actionLookupData);", "public void actionPerformed(ActionEvent e) {\n\n if(RUN_CC.equals(e.getActionCommand())) {\n\n try {\n int seed = ( new Integer(seed_f.getText()).intValue());\n double alpha = ( new Double(alpha_f.getText()).doubleValue());\n double delta = ( new Double(delta_f.getText()).doubleValue());\n int number_BCs = ( new Integer(number_BCs_f.getText()).intValue());\n\n cca.setSeed(seed);\n cca.setAlpha(alpha);\n cca.setDelta(delta);\n cca.setN(number_BCs); // number of output biclusters\n \n JOptionPane.showMessageDialog(null, \"CC algorithm is running... \\nThe calculations may take some time\");\n for (int i = 0; i < 500000000; i++) {} //wait\n owner.runMachine_CC.runBiclustering(cca);\n\n dialog.setVisible(false);\n dialog.dispose();\n \n }\n catch(NumberFormatException nfe) { nfe.printStackTrace(); }\n }\n\n else if(RUN_CC_DIALOG_CANCEL.equals(e.getActionCommand())) {\n dialog.setVisible(false);\n dialog.dispose();\n }\n\n }", "@Override\n public void afterActionPerformed(AnAction anAction, DataContext dataContext, AnActionEvent anActionEvent) {\n closeContentsCanceled = false;\n }", "@Override\n\t\t\t\t\t\tpublic void onClick(DialogInterface dialog, int which) {\n\t\t\t\t\t\t\tthread.start();\n\t\t\t\t\t\t}", "private void runContextMenuAction(Action a, Project p) {\n if (a instanceof ContextAwareAction) {\n Lookup l = Lookups.singleton(p);\n a = ((ContextAwareAction) a).createContextAwareInstance(l);\n }\n a.actionPerformed(null);\n }", "public void postActionEvent() {\n fireActionPerformed();\n }", "protected CommandResult doExecuteWithResult(IProgressMonitor progressMonitor, IAdaptable info) {\r\n\t\tif (!_isCapability) {\r\n\t\t\tnubEditPopUp = new RequirementsPopupDialog(_shell, (Unit) _dmo,\r\n\t\t\t\t\t_initialLocation != null ? _initialLocation : estimate(_editPart, TOP_RIGHT));\r\n\t\t} else if (_dmo instanceof Unit) {\r\n\t\t\tnubEditPopUp = new CapabilitiesPopupDialog(_shell, (Unit) _dmo,\r\n\t\t\t\t\t_initialLocation != null ? _initialLocation : estimate(_editPart, BOTTOM_LEFT));\r\n\t\t}\r\n\r\n\t\tif (nubEditPopUp != null) {\r\n\t\t\tnew UnitFlyOutPropertiesToggler((Unit) _dmo, _domain,\r\n\t\t\t\t\t(UnitFlyOutPropertiesTogglerDialog) nubEditPopUp);\r\n\t\t\tnubEditPopUp.open();\r\n\t\t\tif (initialSelectionProvider != null && nubEditPopUp instanceof ISetSelectionTarget) {\r\n\t\t\t\t((ISetSelectionTarget) nubEditPopUp).selectReveal(initialSelectionProvider\r\n\t\t\t\t\t\t.getSelection());\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn CommandResult.newOKCommandResult();\r\n\t}", "@Override\n\tpublic void actionPerformed (ActionEvent e)\n\t{\n\t\n\t\tif (mActionToPerform == \"showDialog\")\n\t\t{\n\t\t\tmDialog = new CartogramWizardOptionsWindow();\n\t\t\tmDialog.setVisible(true);\n\t\t}\n\t\t\n\t\telse if (mActionToPerform == \"closeDialogWithoutSaving\")\n\t\t{\n\t\t\tmDialog.setVisible(false);\n\t\t\tmDialog.dispose();\n\t\t}\n\t\t\n\t\telse if (mActionToPerform == \"closeDialogWithSaving\")\n\t\t{\n\t\t\tmDialog.saveChanges();\n\t\t\tmDialog.setVisible(false);\n\t\t\tmDialog.dispose();\n\t\t}\n\t\t\n\t\n\t}", "@Override\n\tpublic void doAction(String action) {\n\t\tthis.action = action;\n\t\t\n\t\tthis.gameController.pause();\n\t}", "public void dispatchSubmit(Action action) {\n this.handler.sendMessage(this.handler.obtainMessage(1, action));\n }", "@Override\n\tpublic boolean pickAndExecuteAnAction() {\n\t\treturn false;\n\t}", "@Override\n\tpublic boolean pickAndExecuteAnAction() {\n\t\treturn false;\n\t}", "boolean tryToPerform_with(Object anAction, Object anObject)\n {\n\treturn false;\n }", "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}", "DialogResult show();", "private void attemptTuiCommand(final TermuxSessionBridgeEnd bridgeEnd, final String command) {\n if(tuiCommandAttempt != null) tuiCommandAttempt.cancel(true);\n\n tuiCommandAttempt = workerThread.submit(new Runnable() {\n @Override\n public void run() {\n Runnable runnableCommand = tuiCore.createTuiRunnable(command);\n if (runnableCommand == null) Bridge.this.sendBackToTermux(bridgeEnd, command);\n else runnableCommand.run();\n }\n }, null);\n }", "protected void showDialog(final IJobChangeEvent event) {\r\n\t\tDisplay display = Display.getDefault();\r\n\t\tdisplay.asyncExec(new Runnable() {\r\n\t\t\t@Override\r\n\t\t\tpublic void run() {\r\n\t\t\t\tShell shell = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell();\r\n\t\t\t\tswitch (event.getResult().getSeverity()) {\r\n\t\t\t\tcase IStatus.ERROR:\r\n\t\t\t\t\tErrorDialog.openError(shell, \"Code Generation Error\", null, event.getResult());\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase IStatus.CANCEL:\r\n\t\t\t\t\tMessageDialog.openInformation(shell, \"Code Generation Canceled\", event.getJob().getName() + \"Code generation canceled!\");\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tdefault:\r\n\t\t\t\t\tMessageDialog.openInformation(shell, \"Code generation finished!\", event.getJob().getName()+\" finished without errors!\");\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t});\r\n\t}", "@Override\n public void onClick(DialogInterface dialog, int which) {\n dialog.cancel();\n dialog.dismiss();\n if (operatingDialog != null) {\n if (operatingDialog.isShowing()) {\n return;\n }\n if (thread != null && thread.isAlive()) {\n return;\n }\n thread.start();\n operatingDialog.show();\n }\n }", "public void doInteract(int interactionId)\r\n\t{\r\n\t\tif (interactionId == PlayerCharacter.MAIN_INTERACTION)\r\n\t\t{\r\n\t\t\tdialog.showDialog();\r\n\t\t}\r\n\t}", "private String performTheAction(HttpServletRequest request, HttpServletResponse response) {\r\n\t\tString servletPath = request.getServletPath();\r\n\t\tString action = getActionName(servletPath);\r\n\t\t// Let the logged in user run his chosen action\r\n\t\treturn Action.perform(action, request);\r\n\t}", "private boolean performAction(int action) {\n TagEditorFragment tagEditorFragment = (TagEditorFragment) caller;\n final int size = rows.getChildCount();\n List<TagEditRow> selected = new ArrayList<>();\n for (int i = 0; i < size; ++i) {\n View view = rows.getChildAt(i);\n TagEditRow row = (TagEditRow) view;\n if (row.isSelected()) {\n selected.add(row);\n }\n }\n switch (action) {\n case MENU_ITEM_DELETE:\n if (!selected.isEmpty()) {\n for (TagEditRow r : selected) {\n r.delete();\n }\n tagEditorFragment.updateAutocompletePresetItem(null);\n }\n if (currentAction != null) {\n currentAction.finish();\n }\n break;\n case MENU_ITEM_COPY:\n copyTags(selected, false);\n tagEditorFragment.updateAutocompletePresetItem(null);\n if (currentAction != null) {\n currentAction.finish();\n }\n break;\n case MENU_ITEM_CUT:\n copyTags(selected, true);\n if (currentAction != null) {\n currentAction.finish();\n }\n break;\n case MENU_ITEM_CREATE_PRESET:\n CustomPreset.create(tagEditorFragment, selected);\n tagEditorFragment.presetFilterUpdate.update(null);\n break;\n case MENU_ITEM_SELECT_ALL:\n ((PropertyRows) caller).selectAllRows();\n return true;\n case MENU_ITEM_DESELECT_ALL:\n ((PropertyRows) caller).deselectAllRows();\n return true;\n case MENU_ITEM_HELP:\n HelpViewer.start(caller.getActivity(), R.string.help_propertyeditor);\n return true;\n default:\n return false;\n }\n return true;\n }", "@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\tinput_from_user.requestFocusInWindow(); //gets focus back on the field\n\t\t\t\t}\n\t\t\t}", "public void actionPerformed(ActionEvent e)\r\n\t\t\t{\n\t\t\t\t\r\n\t\t\t\tcatch_up_thread.runCatchUp();\r\n\t\t\t}", "@Override\n\tpublic void actionPerformed (ActionEvent e)\n\t{\n\t\n\t\tif (mActionToPerform == \"showDialog\")\n\t\t{\n\t\t\tmDialog = new CartogramWizardSimulaneousLayerWindow();\n\t\t\tmDialog.setVisible(true);\n\t\t}\n\t\t\n\t\telse if (mActionToPerform == \"closeDialogWithoutSaving\")\n\t\t{\n\t\t\tmDialog.setVisible(false);\n\t\t\tmDialog.dispose();\n\t\t}\n\t\t\n\t\telse if (mActionToPerform == \"closeDialogWithSaving\")\n\t\t{\n\t\t\tmDialog.saveChanges();\n\t\t\tmDialog.setVisible(false);\n\t\t\tmDialog.dispose();\n\t\t}\n\t\t\n\t\n\t}", "public void clickFailure(ActionEvent actionEvent) {\n current.getSelector().update(Selector.AnswerType.FAILURE);\n nextCard();\n }", "public void run(IAction action) {\n\t\tSaveAsDialog saveAsDialog = new SaveAsDialog(shell);\r\n\t\tsaveAsDialog.open();\r\n\t}", "public void clickAction() throws InterruptedException{\n\t\tThread.sleep(1000);\n\t\tlibManhattanCommonFunctions.clickAnyElement(getPageElement(\"actionsbtn\"), \"Actions Button\");\n\t\tThread.sleep(1000);\n\t}", "abstract public void performAction();", "@Override\n\tpublic void actionPerformed (ActionEvent e)\n\t{\n\t\n\t\tif (mActionToPerform == \"showDialog\")\n\t\t{\n\t\t\tmDialog = new CartogramWizardConstrainedLayerWindow();\n\t\t\tmDialog.setVisible(true);\n\t\t}\n\t\t\n\t\telse if (mActionToPerform == \"closeDialogWithoutSaving\")\n\t\t{\n\t\t\tmDialog.setVisible(false);\n\t\t\tmDialog.dispose();\n\t\t}\n\t\t\n\t\telse if (mActionToPerform == \"closeDialogWithSaving\")\n\t\t{\n\t\t\tmDialog.saveChanges();\n\t\t\tmDialog.setVisible(false);\n\t\t\tmDialog.dispose();\n\t\t}\n\t\t\n\t\n\t}", "public void buttonShowComplete(ActionEvent actionEvent) {\n }", "public void doAction(){}", "@Override\n public void click() {\n SwingUtilities.invokeLater(new Runnable() {\n public void run() {\n int result = fileChooser.showOpenDialog(TurtleFileOpen.this);\n\n if (result == JFileChooser.APPROVE_OPTION) {\n final File selFile = fileChooser.getSelectedFile();\n //the user selects the file\n execute(new Runnable() {\n public void run() {\n openFile(selFile);\n }\n });\n }\n }\n });\n }", "private ActionStepOrResult executeAction(ExtendedEventHandler eventHandler, Action action)\n throws LostInputsActionExecutionException, InterruptedException {\n ActionResult result;\n try (SilentCloseable c = profiler.profile(ProfilerTask.INFO, \"Action.execute\")) {\n checkForUnsoundDirectoryInputs(action, actionExecutionContext.getInputMetadataProvider());\n\n result = action.execute(actionExecutionContext);\n\n // An action's result (or intermediate state) may have been affected by lost inputs. If an\n // action filesystem is used, it may know whether inputs were lost. We should fail fast if\n // any were; rewinding may be able to fix it.\n checkActionFileSystemForLostInputs(\n actionExecutionContext.getActionFileSystem(), action, outputService);\n } catch (ActionExecutionException e) {\n Path primaryOutputPath = actionExecutionContext.getInputPath(action.getPrimaryOutput());\n maybeSignalLostInputs(e, primaryOutputPath);\n return ActionStepOrResult.of(\n processAndGetExceptionToThrow(\n eventHandler,\n primaryOutputPath,\n action,\n e,\n actionExecutionContext.getFileOutErr(),\n ErrorTiming.AFTER_EXECUTION));\n } catch (InterruptedException e) {\n return ActionStepOrResult.of(e);\n }\n\n try {\n ActionExecutionValue actionExecutionValue;\n try (SilentCloseable c =\n profiler.profile(ProfilerTask.ACTION_COMPLETE, \"actuallyCompleteAction\")) {\n actionExecutionValue = actuallyCompleteAction(eventHandler, result);\n }\n return new ActionPostprocessingStep(actionExecutionValue);\n } catch (ActionExecutionException e) {\n return ActionStepOrResult.of(e);\n }\n }", "public JCACommandThread(final Context jca_context)\n {\n super(\"JCA Command Thread\");\n this.jca_context = jca_context;\n }", "@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tComicInfo comic = (ComicInfo)list.getSelectedValue();\n\t\t\t\tThread getContent = new SearchGetContent(comic.getTitle(),comic.getURL(),theview);\n\t\t\t\tgetContent.start();\n\t\t\t}", "public void actionPerformed( ActionEvent event )\n {\n KalumetConsoleApplication.getApplication().getLogPane().addInfo(\n \"Software \" + name + \" update in progress ...\",\n parent.getEnvironmentWindow().getEnvironmentName() );\n parent.getEnvironmentWindow().getChangeEvents().add(\n \"Software \" + name + \" update requested.\" );\n // start the update thread\n final UpdateThread updateThread = new UpdateThread();\n updateThread.start();\n // sync with the client\n KalumetConsoleApplication.getApplication().enqueueTask(\n KalumetConsoleApplication.getApplication().getTaskQueue(), new Runnable()\n {\n public void run()\n {\n if ( updateThread.ended )\n {\n if ( updateThread.failure )\n {\n KalumetConsoleApplication.getApplication().getLogPane().addError(\n updateThread.message, parent.getEnvironmentWindow().getEnvironmentName() );\n parent.getEnvironmentWindow().getChangeEvents().add( updateThread.message );\n }\n else\n {\n KalumetConsoleApplication.getApplication().getLogPane().addConfirm(\n \"Software \" + name + \" updated.\",\n parent.getEnvironmentWindow().getEnvironmentName() );\n parent.getEnvironmentWindow().getChangeEvents().add(\n \"Software \" + name + \" updated.\" );\n }\n }\n else\n {\n KalumetConsoleApplication.getApplication().enqueueTask(\n KalumetConsoleApplication.getApplication().getTaskQueue(), this );\n }\n }\n } );\n }", "public void actionPerformed(ActionEvent e) {\n\t\t\t\tNewABOXJDialog getStarted = new NewABOXJDialog(frame, myst8);\n\t\t\t\tgetStarted.setModal(true);\n\t\t\t\tgetStarted.setVisible(true);\n\t\t\t\t\n\t\t\t\ttry {\n\t\t\t\t\tcontroller.initNew(getStarted.getTBOXLocationTextField(), \n\t\t\t\t\t\t\t\tgetStarted.getTBOXIRI(), \n\t\t\t\t\t\t\t\tgetStarted.getABOXLocationTextField(),\n\t\t\t\t\t\t\t\tgetStarted.getABOXIRI());\n\t\t\t\t\tmodel.setState(ABOXBuilderGUIState.ABOXLoaded);\n\t\t\t\t} catch (OWLOntologyCreationException e1) {\n\t\t\t\t\tcontroller.logappend(new KIDSGUIAlertError(\"Uh-oh - an exception occurred when loading the ontology: \" + e1.getMessage()));\n\t\t\t\t\tlogme.error(\"Could not load ontology: \", e1);\n\t\t\t\t} catch (OWLOntologyStorageException e1) {\n\t\t\t\t\tcontroller.logappendError(\"Uh-oh - an exception occurred when writing the ontology: \" + e1.getMessage());\n\t\t\t\t\tlogme.error(\"Could not write ontology: \", e1);\n\t\t\t\t}\n\t\t\t\tprocessMessageQueue();\n\t\t\t}", "public void proceedOnPopUp() {\n Controllers.button.click(proceedToCheckOutPopUp);\n }", "public void runModalTool(final VTool tool, final DialogType dt);", "public void run(IAction action) {\n\t\tInstaSearchUI.getWorkbenchWindow().getActivePage().activate( InstaSearchUI.getActiveEditor() );\n\t\tNewSearchUI.openSearchDialog(InstaSearchUI.getWorkbenchWindow(), InstaSearchPage.ID);\n\t}", "private JDialog createBlockingDialog()\r\n/* */ {\r\n/* 121 */ JOptionPane optionPane = new JOptionPane();\r\n/* */ \r\n/* */ \r\n/* */ \r\n/* 125 */ if (getTask().getUserCanCancel()) {\r\n/* 126 */ JButton cancelButton = new JButton();\r\n/* 127 */ cancelButton.setName(\"BlockingDialog.cancelButton\");\r\n/* 128 */ ActionListener doCancelTask = new ActionListener() {\r\n/* */ public void actionPerformed(ActionEvent ignore) {\r\n/* 130 */ DefaultInputBlocker.this.getTask().cancel(true);\r\n/* */ }\r\n/* 132 */ };\r\n/* 133 */ cancelButton.addActionListener(doCancelTask);\r\n/* 134 */ optionPane.setOptions(new Object[] { cancelButton });\r\n/* */ }\r\n/* */ else {\r\n/* 137 */ optionPane.setOptions(new Object[0]);\r\n/* */ }\r\n/* */ \r\n/* */ \r\n/* */ \r\n/* 142 */ Component dialogOwner = (Component)getTarget();\r\n/* 143 */ String taskTitle = getTask().getTitle();\r\n/* 144 */ String dialogTitle = taskTitle == null ? \"BlockingDialog\" : taskTitle;\r\n/* 145 */ final JDialog dialog = optionPane.createDialog(dialogOwner, dialogTitle);\r\n/* 146 */ dialog.setModal(true);\r\n/* 147 */ dialog.setName(\"BlockingDialog\");\r\n/* 148 */ dialog.setDefaultCloseOperation(0);\r\n/* 149 */ WindowListener dialogCloseListener = new WindowAdapter() {\r\n/* */ public void windowClosing(WindowEvent e) {\r\n/* 151 */ if (DefaultInputBlocker.this.getTask().getUserCanCancel()) {\r\n/* 152 */ DefaultInputBlocker.this.getTask().cancel(true);\r\n/* 153 */ dialog.setVisible(false);\r\n/* */ }\r\n/* */ }\r\n/* 156 */ };\r\n/* 157 */ dialog.addWindowListener(dialogCloseListener);\r\n/* 158 */ optionPane.setName(\"BlockingDialog.optionPane\");\r\n/* 159 */ injectBlockingDialogComponents(dialog);\r\n/* */ \r\n/* */ \r\n/* */ \r\n/* 163 */ recreateOptionPaneMessage(optionPane);\r\n/* 164 */ dialog.pack();\r\n/* 165 */ return dialog;\r\n/* */ }", "void onCompleteActionWithError(SmartEvent smartEvent);", "private void tellTheUserToWait() {\n\t\tfinal JDialog warningDialog = new JDialog(descriptionDialog, ejsRes.getString(\"Simulation.Opening\"));\r\n\t\tfinal JLabel label = new JLabel(ejsRes.getString(\"Simulation.Opening\"));\r\n\t\tlabel.setBorder(new javax.swing.border.EmptyBorder(5, 5, 5, 5));\r\n\t\tSwingUtilities.invokeLater(new Runnable() {\r\n\t\t\t@Override\r\n\t\t\tpublic void run() {\r\n\t\t\t\twarningDialog.getContentPane().setLayout(new java.awt.BorderLayout());\r\n\t\t\t\twarningDialog.getContentPane().add(label, java.awt.BorderLayout.CENTER);\r\n\t\t\t\twarningDialog.validate();\r\n\t\t\t\twarningDialog.pack();\r\n\t\t\t\twarningDialog.setLocationRelativeTo(descriptionDialog);\r\n\t\t\t\twarningDialog.setModal(false);\r\n\t\t\t\twarningDialog.setVisible(true);\r\n\t\t\t}\r\n\t\t});\r\n\t\tjavax.swing.Timer timer = new javax.swing.Timer(3000, new ActionListener() {\r\n\t\t\t@Override\r\n\t\t\tpublic void actionPerformed(ActionEvent _actionEvent) {\r\n\t\t\t\twarningDialog.setVisible(false);\r\n\t\t\t\twarningDialog.dispose();\r\n\t\t\t}\r\n\t\t});\r\n\t\ttimer.setRepeats(false);\r\n\t\ttimer.start();\r\n\t}", "public interface AutofillAssistantActionHandler {\n /**\n * Returns the names of available AA actions.\n *\n * <p>This method starts AA on the current tab, if necessary, and waits for the first results.\n * Once AA is started, the results are reported immediately.\n *\n * @param userName name of the user to use when sending RPCs. Might be empty.\n * @param experimentIds comma-separated set of experiment ids. Might be empty\n * @param arguments extra arguments to include into the RPC. Might be empty.\n * @param callback callback to report the result to\n */\n void listActions(String userName, String experimentIds, Bundle arguments,\n Callback<Set<String>> callback);\n\n /**\n * Returns the available AA actions to be reported to the direct actions framework.\n *\n * <p>This method simply returns the list of actions known to AA. An empty string array means\n * either that the controller has not yet been started or there are no actions available for the\n * current website.\n *\n * @return Array of strings with the names of known actions.\n */\n String[] getActions();\n\n /** Performs onboarding and returns the result to the callback. */\n void performOnboarding(String experimentIds, Callback<Boolean> callback);\n\n /**\n * Performs an AA action.\n *\n * <p>If this method returns {@code true}, a definition for the action was successfully started.\n * It can still fail later, and the failure will be reported to the UI.\n *\n * @param name action name, might be empty to autostart\n * @param experimentIds comma-separated set of experiment ids. Might be empty.\n * @param arguments extra arguments to pass to the action. Might be empty.\n * @param callback to report the result to\n */\n void performAction(\n String name, String experimentIds, Bundle arguments, Callback<Boolean> callback);\n}", "public void executeAction( String actionInfo );", "@Override\n\tpublic void succeed(int taskId, JSONObject jObject) {\n\t\tdimissDialog();\n\t}", "public void action() {\n MessageTemplate template = MessageTemplate.MatchPerformative(CommunicationHelper.GUI_MESSAGE);\n ACLMessage msg = myAgent.receive(template);\n\n if (msg != null) {\n\n /*-------- DISPLAYING MESSAGE -------*/\n try {\n\n String message = (String) msg.getContentObject();\n\n // TODO temporary\n if (message.equals(\"DistributorAgent - NEXT_SIMSTEP\")) {\n \tguiAgent.nextAutoSimStep();\n // wykorzystywane do sim GOD\n // startuje timer, zeby ten zrobil nextSimstep i statystyki\n // zaraz potem timer trzeba zatrzymac\n }\n\n guiAgent.displayMessage(message);\n\n } catch (UnreadableException e) {\n logger.error(this.guiAgent.getLocalName() + \" - UnreadableException \" + e.getMessage());\n }\n } else {\n\n block();\n }\n }", "public void actionPerformed (ActionEvent e)\n\t\t\t\t{\n\t\t\t\talertOK();\n\t\t\t\t}", "public void actionPerformed(ActionEvent event) {\t\n\t\tif (event.getActionCommand().equals(\"comboBoxChanged\")) {\n\t\t\tthis.setBoxes((String) select.getSelectedItem());\n\t\t} else if (event.getActionCommand().equals(\"Start\")) {\t\t\t\n\t\t\tt = new Thread(this);\n\t\t\tt.start();\n\t\t}\n\t}", "@SuppressWarnings(\"unused\")\n public void handleTestEvent(int result) {\n ApplicationManager.getApplication().invokeLater(() -> {\n checkInProgress = false;\n setStatusAndShowResults(result);\n com.intellij.openapi.progress.Task.Backgroundable task = getAfterCheckTask(result);\n ProgressManager.getInstance().run(task);\n });\n }", "public void actionPerformed(ActionEvent e) {\r\n String ac = e.getActionCommand();\r\n if (Constants.CMD_RUN.equals(ac)) {\r\n try {\r\n stopOps = false;\r\n installAndRun(this, cfg);\r\n } catch (Exception ex) {\r\n // assume SecurityEx or some other problem...\r\n setStatus(\"Encountered problem:\\n\" + ex.toString()\r\n + \"\\n\\nPlease insure that all components are installed properly.\");\r\n } // endtry\r\n } // endif\r\n }", "public void actionPerformed(ActionEvent ae){\n if(waitingForRepaint){\n repaint();\n }\n }", "public void actionPerformed(ActionEvent e) {\n action.actionPerformed(e);\n }", "@Override\n\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\tJOptionPane.showConfirmDialog(null, \"BOTAO CLICADO\", \"VALOR\", JOptionPane.PLAIN_MESSAGE);\n\n\t\t}", "@Override\n\tpublic void runOnUiThread( final Runnable action ) {\n\t\tif ( mContext != null ) ( (Activity) mContext ).runOnUiThread( action );\n\t}", "@Override\n protected void performActionResults(Action targetingAction) {\n PhysicalCard cardToCancel = targetingAction.getPrimaryTargetCard(targetGroupId);\n PhysicalCard captiveToRelease = Filters.findFirstActive(game, self,\n SpotOverride.INCLUDE_CAPTIVE, Filters.and(Filters.captive, Filters.targetedByCardOnTable(cardToCancel)));\n\n // Perform result(s)\n action.appendEffect(\n new CancelCardOnTableEffect(action, cardToCancel));\n if (captiveToRelease != null) {\n action.appendEffect(\n new ReleaseCaptiveEffect(action, captiveToRelease));\n }\n }", "@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}", "void onCompleteActionWithSuccess(SmartEvent smartEvent);", "public void actionPerformed( ActionEvent actionEvent )\n {\n if ( _currentEntries == null || _core == null )\n return;\n\n _core.load( _currentEntries[ _comboBox.getSelectedIndex() ] );\n\n _main.requestFocus();\n // Workaround for focus handling bug in jdk1.4. BugParade 4478706.\n // TODO retest if needed on jdk1.4 -> defect is marked as fixed.\n //Window w = (Window)\n //SwingUtilities.getWindowAncestor( (JComponent)actionEvent.getSource() );\n //if ( w != null )\n //w.requestFocus();\n }", "public void actionPerformed(ActionEvent e)\n { /* actionPerformed */\n String\n cmd= e.getActionCommand();\n \n /* [1] see which button was pushed and do the right thing,\n * hide window and return default/altered data */\n if (cmd.equals(\" Cancel\") || cmd.equals(\"Continue\"))\n { /* send default data back - data is already stored into this.data */\n this.setVisible(false); /* hide frame which can be shown later */\n } /* send default data back */\n else\n if(cmd.equals(\"Ok\"))\n { /* hide window and return data back entered by user */\n data= textField.getText(); /* altered data returned */\n this.setVisible(false); /* hide frame which can be shown later*/\n }\n alertDone= true;\n }", "public void performAction(HandlerData actionInfo) throws ActionException;", "public static void asyncClick( final SWTWorkbenchBot bot, final SWTBotMenu menu, final ICondition waitCondition )\n throws TimeoutException\n {\n UIThreadRunnable.asyncExec( bot.getDisplay(), new VoidResult()\n {\n public void run()\n {\n menu.click();\n }\n } );\n\n if ( waitCondition != null )\n {\n bot.waitUntil( waitCondition );\n }\n }", "@Test\n public void testSuccess() throws ComponentInitializationException {\n final Event event = action.execute(requestCtx);\n ActionTestingSupport.assertProceedEvent(event);\n }", "@Override\n\tpublic void run(IAction action) {\n\t\n\t\twindow = PlatformUI.getWorkbench().getActiveWorkbenchWindow();\n\t\tif (window != null)\n\t\t{\n\t\t\ttry {\n\t\t\t\tIStructuredSelection selection = (IStructuredSelection) window.getSelectionService().getSelection();\n\t\t Object firstElement = selection.getFirstElement();\n \t\tinit();\n \t\t\n \t\tIProject project = (IProject)((IAdaptable)firstElement).getAdapter(IProject.class);\n\t ProjectAnalyzer.firstElement = (IAdaptable)firstElement;\n\t ProjectAnalyzer.url = project.getLocationURI().getPath().toString().substring(1);\n\t File dbFile = new File(ProjectAnalyzer.url + \"\\\\\" + project.getName() + \".db\");\n\t \n\t if(dbFile.exists()){\n\t \tMessageBox dialog = new MessageBox(window.getShell(), SWT.ICON_QUESTION | SWT.OK| SWT.CANCEL);\n\t \t\tdialog.setText(\"Select\");\n\t \t\tdialog.setMessage(\"The DB file of the project exists. \\n Do you want to rebuild the project?\");\n\t \t\tint returnCode = dialog.open();\n\t \t\t\n\t \t\tif(returnCode==SWT.OK){\n\t \t\t\tdbFile.delete();\n\t \t\t\tthis.analysis(project);\n\t \t\t\tthis.showMessage(\"Complete\",\"Rebuild has been complete!\");\n\t \t\t\t//do something\n\t \t\t\tthis.doTask();\n\t \t\t}else{\n\t \t\t\t//do something\n\t \t\t\tthis.doTask();\n\t \t\t}\n\t }else{\n\t \tthis.analysis(project);\n\t \tthis.showMessage(\"Complete\",\"Rebuild has been complete!\");\n\t \t//do something\n\t \tthis.doTask();\n\t }\n \t\t\n\t \n\t\t\t}catch(java.lang.NullPointerException e){\n\t\t\t\te.printStackTrace();\n\t\t\t}catch (java.lang.ClassCastException e2){\n\t\t\t\te2.printStackTrace();\n\t\t\t}\n\t\t}\n\t}", "@SuppressWarnings(\"deprecation\")\n @Override\n protected void execute()\n {\n // Display the dialog and wait for the close action (the user\n // selects the Okay button or the script execution completes\n // and a Cancel button is issued)\n int option = cancelDialog.showMessageDialog(dialog,\n \"<html><b>Script execution in progress...<br><br>\"\n + CcddUtilities.colorHTMLText(\"*** Press </i>Halt<i> \"\n + \"to terminate script execution ***\",\n Color.RED),\n \"Script Executing\",\n JOptionPane.ERROR_MESSAGE,\n DialogOption.HALT_OPTION);\n\n // Check if the script execution was terminated by the user and\n // that the script is still executing\n if (option == OK_BUTTON && scriptThread.isAlive())\n {\n // Forcibly stop script execution. Note: this method is\n // deprecated due to inherent issues that can occur when a\n // thread is abruptly stopped. However, the stop method is\n // the only manner in which the script can be terminated\n // (without additional code within the script itself, which\n // cannot be assumed since the scripts are user-generated).\n // There shouldn't be a potential for object corruption in\n // the application since it doesn't reference any objects\n // created by a script\n scriptThread.stop();\n\n // Set the execution status(es) to indicate the scripts\n // didn't complete\n isBad = new boolean[associations.size()];\n Arrays.fill(isBad, true);\n }\n }", "public void actionPerformed(ActionEvent oEvent) {\n if (oEvent.getActionCommand().equals(\"OK\")) {\n try {\n addFinishedData();\n } catch (ModelException e) {\n ErrorGUI oHandler = new ErrorGUI(this);\n oHandler.writeErrorMessage(e);\n return;\n }\n\n //Close this window\n this.setVisible(false);\n this.dispose();\n }\n else if (oEvent.getActionCommand().equals(\"Cancel\")) {\n //Close this window\n this.setVisible(false);\n this.dispose();\n } \n }" ]
[ "0.6784211", "0.62206274", "0.58423084", "0.5760163", "0.5709899", "0.54291934", "0.54109293", "0.5366085", "0.52580166", "0.52505577", "0.52419305", "0.5229553", "0.51848084", "0.51830775", "0.514673", "0.51263857", "0.5125597", "0.51028115", "0.5051561", "0.5037893", "0.5035784", "0.50347835", "0.5027505", "0.5027145", "0.5026533", "0.50227094", "0.5007125", "0.49940747", "0.4970926", "0.49628606", "0.4953115", "0.49449024", "0.49292427", "0.49088177", "0.49044824", "0.48953336", "0.48810366", "0.48799747", "0.4854765", "0.48504713", "0.48342228", "0.48259833", "0.48222715", "0.4814754", "0.48110843", "0.48110843", "0.4807107", "0.4805463", "0.47969127", "0.4791354", "0.47903007", "0.47863087", "0.4785267", "0.47847623", "0.4779327", "0.4776234", "0.4775755", "0.4774803", "0.47727895", "0.47667357", "0.47645754", "0.4763503", "0.47612295", "0.47560555", "0.47496516", "0.47457176", "0.47453123", "0.4744294", "0.47437382", "0.474227", "0.47394392", "0.47370714", "0.47319943", "0.47283876", "0.4728155", "0.47269714", "0.47264308", "0.4725179", "0.47233582", "0.47214016", "0.47205794", "0.47197056", "0.4718247", "0.47161353", "0.47122666", "0.47078222", "0.47066802", "0.4704576", "0.47044072", "0.4700333", "0.47002834", "0.46969438", "0.46797222", "0.46785587", "0.4663696", "0.4663545", "0.46613234", "0.46604276", "0.46523935", "0.46500972" ]
0.58401895
3
Ensures the given toggle action is in the given selected state. If it is not, then the action will be performed. This call will wait for the action to finish.
public static void setToggleActionSelected(ToggleDockingActionIf toggleAction, ActionContext context, boolean selected) { setToggleActionSelected(toggleAction, context, selected, true); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void setToggleActionSelected(ToggleDockingActionIf toggleAction,\n\t\t\tActionContext context, boolean selected, boolean wait) {\n\n\t\tboolean shouldPerformAction = runSwing(() -> {\n\t\t\treturn toggleAction.isSelected() != selected;\n\t\t});\n\n\t\tif (shouldPerformAction) {\n\t\t\tperformAction(toggleAction, context, wait);\n\t\t}\n\t}", "@Test\n public void testToggle() {\n // Toggle on test.\n boolean before = plug.getCondition();\n clickOn(\"ON\");\n assertNotEquals(before, plug.getCondition());\n\n // Toggle off test which also implies that the ON/OFF status is displayed.\n before = plug.getCondition();\n clickOn(\"OFF\");\n assertNotEquals(before, plug.getCondition());\n }", "public void selected(String action);", "@Override\r\n\t\t\tpublic void actionPerformed(ActionEvent actionevent) {\n\t\t\t\tif (select.isSelected()) {\r\n\t\t\t\t\tservice.selectTask(row);\r\n\t\t\t\t\t// service.getTask(row).setSelected(true);\r\n\t\t\t\t} else {\r\n\t\t\t\t\tservice.cancleTask(row);\r\n\t\t\t\t\t// service.getTask(row).setSelected(false);\r\n\t\t\t\t}\r\n\t\t\t\t// System.out.println(\"after: \" + service.getSelectedSet());\r\n\r\n\t\t\t}", "public void select(int action) {\n\t\tselected = true;\n\t\tthis.action = action;\n\t}", "public void setActionTrackSelected(GralUserAction action){ actionSelectTrack = action; }", "public void actionPerformed(ActionEvent arg0)\n {\n userAlert = chkAlert.getState();\n }", "public void ButtonStatusToOneWay() throws InterruptedException {\n\n Thread.sleep(10000);\n //action=new Actions(this.driver);\n if (oneWayButton.isSelected()) {\n System.out.println(\"One way Button is already selected\");\n } else {\n wait.until(ExpectedConditions.elementSelectionStateToBe(oneWayButton,false));\n oneWayButton.click();\n System.out.println(\"one way button is clicked\");\n }\n\n\n }", "private void actionSwitchSelect()\r\n\t{\r\n\t\tif (FormMainMouse.isSampleSelectOn)\r\n\t\t{\r\n\t\t\thelperSwitchSelectOff();\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\thelperSwitchSelectOn();\r\n\r\n\t\t\t//---- If we can select sample, we can not move it\r\n\t\t\thelperSwitchMoveOff();\r\n\t\t}\r\n\t}", "public void setButtonSelection(String action);", "private boolean performAction(int action) {\n TagEditorFragment tagEditorFragment = (TagEditorFragment) caller;\n final int size = rows.getChildCount();\n List<TagEditRow> selected = new ArrayList<>();\n for (int i = 0; i < size; ++i) {\n View view = rows.getChildAt(i);\n TagEditRow row = (TagEditRow) view;\n if (row.isSelected()) {\n selected.add(row);\n }\n }\n switch (action) {\n case MENU_ITEM_DELETE:\n if (!selected.isEmpty()) {\n for (TagEditRow r : selected) {\n r.delete();\n }\n tagEditorFragment.updateAutocompletePresetItem(null);\n }\n if (currentAction != null) {\n currentAction.finish();\n }\n break;\n case MENU_ITEM_COPY:\n copyTags(selected, false);\n tagEditorFragment.updateAutocompletePresetItem(null);\n if (currentAction != null) {\n currentAction.finish();\n }\n break;\n case MENU_ITEM_CUT:\n copyTags(selected, true);\n if (currentAction != null) {\n currentAction.finish();\n }\n break;\n case MENU_ITEM_CREATE_PRESET:\n CustomPreset.create(tagEditorFragment, selected);\n tagEditorFragment.presetFilterUpdate.update(null);\n break;\n case MENU_ITEM_SELECT_ALL:\n ((PropertyRows) caller).selectAllRows();\n return true;\n case MENU_ITEM_DESELECT_ALL:\n ((PropertyRows) caller).deselectAllRows();\n return true;\n case MENU_ITEM_HELP:\n HelpViewer.start(caller.getActivity(), R.string.help_propertyeditor);\n return true;\n default:\n return false;\n }\n return true;\n }", "@FXML\n public void toggle(ActionEvent actionEvent) {\n if (isToggled) {\n cardText.setText(current.getQuestion());\n isToggled = false;\n } else {\n cardText.setText(current.getAnswer());\n isToggled = true;\n }\n }", "public boolean isSelectingAction() {\n return false;\n }", "public void act() \n {\n super.checkClick();\n active(isActive);\n }", "@Test\n public void testToggle() {\n // collapse and check the status\n rootPage.menu().collapse();\n Assert.assertTrue(rootPage.menu().isCollapsed());\n // expand and check the status\n rootPage.menu().expand();\n Assert.assertFalse(rootPage.menu().isCollapsed());\n }", "@Override public void toggled(SbToggleSelection handler, Class<?> c) throws JeeslLockingException, JeeslConstraintViolationException\n\t{\n\t}", "void stateSelected(State state);", "boolean hasAction();", "boolean hasAction();", "public void actionPerformed(ActionEvent e) {\n\t\t\t\ttoggle = 2;\r\n\t\t\t\ttoggle(toggle);\r\n\t\t\t}", "boolean hasCurrentAction();", "public void actionPerformed(ActionEvent e) {\n\t\t\t\ttoggle = 3;\r\n\t\t\t\ttoggle(toggle);\r\n\t\t\t}", "private boolean runAction(Canvas cv, SUT system, State state, Taggable fragment){\n\t\tActionStatus actionStatus = new ActionStatus();\n\t\twaitUserActionLoop(cv,system,state,actionStatus);\n\n\t\tcv.begin(); Util.clear(cv);\n\t\t//visualizeState(cv, state);\n\t\tvisualizeState(cv, state,system); // by urueda \n\t\tLogSerialiser.log(\"Building action set...\\n\", LogSerialiser.LogLevel.Debug);\n\t\t\t\t\t\n\t\t// begin by urueda\n\t\tif (actionStatus.isUserEventAction()){ // user action\n\t\t\tCodingManager.buildIDs(state, actionStatus.getAction());\n\t\t} else if (mode() == Modes.AdhocTest){ // adhoc-test action\n\t\t\tif (waitAdhocTestEventLoop(state,actionStatus)){\n\t\t\t\tcv.end(); // by urueda\n\t\t\t\treturn true; // problems\n\t\t\t}\n\t\t} else{ // automatically derived action\n\t\t\tif (waitAutomaticAction(system,state,fragment,actionStatus)){\n\t\t\t\tcv.end(); // by urueda\n\t\t\t\treturn true; // problems\n\t\t\t} else if (actionStatus.getAction() == null && mode() == Modes.Spy){\n\t\t\t\tcv.end(); // by urueda\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\t// begin by urueda\n\t\tcv.end();\n\t\t\n\t\tif (actionStatus.getAction() == null)\n\t\t\treturn true; // problems\n\t\t// end by urueda\n\t\t\n\t\tif (actionCount == 1 && isESC(actionStatus.getAction())){ // first action in the sequence an ESC?\n\t\t\tSystem.out.println(\"First action ESC? Switching to NOP to wait for SUT UI ... \" + this.timeElapsed());\n\t\t\tUtil.pauseMs(NOP_WAIT_WINDOW); // hold-on for UI to react (e.g. scenario: SUT loading ... logo)\n\t\t\tactionStatus.setAction(new NOP());\n\t\t\tCodingManager.buildIDs(state, actionStatus.getAction());\n\t\t\tnopAttempts++; escAttempts = 0;\n\t\t} else\n\t\t\tnopAttempts = 0;\n\t\t//System.out.println(\"Selected action: \" + action.toShortString() + \" ... count of ESC/NOP = \" + escAttempts + \"/\" + nopAttempts);;\n\t\t// end by urueda\n\t\t\n\t\tLogSerialiser.log(\"Selected action '\" + actionStatus.getAction() + \"'.\\n\", LogSerialiser.LogLevel.Debug);\n\t\t\t\t\n\t\tvisualizeSelectedAction(cv, state, actionStatus.getAction());\n\t\t\n\t\tif(mode() == Modes.Quit) return actionStatus.isProblems();\n\t\t\n\t\tboolean isTestAction = nopAttempts >= MAX_NOP_ATTEMPTS || !isNOP(actionStatus.getAction()); // by urueda\n\t\t\t\n\t\tif(mode() != Modes.Spy){\n\t\t\t// begin by urueda\n\t\t\tString[] actionRepresentation = Action.getActionRepresentation(state,actionStatus.getAction(),\"\\t\");\n\t\t\tint memUsage = NativeLinker.getMemUsage(system);\n\t\t\tif (memUsage < sutRAMbase)\n\t\t\t\tsutRAMbase = memUsage;\n\t\t\tif (memUsage - sutRAMbase > sutRAMpeak)\n\t\t\t\tsutRAMpeak = memUsage - sutRAMbase;\n\t\t\tlong currentCPU[] = NativeLinker.getCPUsage(system),\n\t\t\t\t userms = currentCPU[0] - lastCPU[0],\n\t\t\t\t sysms = currentCPU[1] - lastCPU[1],\n\t\t\t\t cpuUsage[] = new long[]{ userms, sysms, currentCPU[2]}; // [2] = CPU frame\n\t\t\tlastCPU = currentCPU;\n\t\t\tif (isTestAction)\n\t\t\t\tGrapher.notify(state,state.get(Tags.ScreenshotPath, null),\n\t\t\t\t\t\t\t actionStatus.getAction(),protocolUtil.getActionshot(state,actionStatus.getAction()),actionRepresentation[1],\n\t\t\t\t\t\t \t memUsage, cpuUsage);\n\t\t\t// end by urueda\n\t\t\tLogSerialiser.log(String.format(\"Executing (%d): %s...\", actionCount,\n\t\t\t\tactionStatus.getAction().get(Desc, actionStatus.getAction().toString())) + \"\\n\", LogSerialiser.LogLevel.Debug);\n\t\t\t//if((actionSucceeded = executeAction(system, state, action))){\n\t\t\tif (actionStatus.isUserEventAction() ||\n\t\t\t\t(actionStatus.setActionSucceeded(executeAction(system, state, actionStatus.getAction())))){ // by urueda\t\t\t\t\t\n\t\t\t\t//logln(String.format(\"Executed (%d): %s...\", actionCount, action.get(Desc, action.toString())), LogLevel.Info);\n\t\t\t\t// begin by urueda\n\t\t\t\tcv.begin(); Util.clear(cv); cv.end(); // by urueda (overlay is invalid until new state/actions scan)\n\t\t\t\tstampLastExecutedAction = System.currentTimeMillis();\t\t\t\t\t\n\t\t\t\tactionExecuted(system,state,actionStatus.getAction()); // notification\n\t\t\t\tif (actionStatus.isUserEventAction())\n\t\t\t\t\tUtil.pause(settings.get(ConfigTags.TimeToWaitAfterAction)); // wait between actions\n\t\t\t\tdouble sutCPU = ((cpuUsage[0] + cpuUsage[1]) / (double)cpuUsage[2] * 100);\n\t\t\t\tif (sutCPU > sutCPUpeak)\n\t\t\t\t\tsutCPUpeak = sutCPU;\n\t\t\t\tString cpuPercent = String.format(\"%.2f\", sutCPU) + \"%\";\n\t\t\t\tLogSerialiser.log(String.format(\"Executed [%d]: %s\\n%s\",\n\t\t\t\t\t\tactionCount,\n\t\t\t\t\t\t\"action = \" + actionStatus.getAction().get(Tags.ConcreteID) +\n\t\t\t\t\t\t\" (\" + actionStatus.getAction().get(Tags.AbstractID) + \") @state = \" +\n\t\t\t\t\t\tstate.get(Tags.ConcreteID) + \" (\" + state.get(Tags.Abstract_R_ID) + \")\\n\\tSUT_KB = \" +\n\t\t\t\t\t\tmemUsage + \", SUT_ms = \" + cpuUsage[0] + \" x \" + cpuUsage[1] + \" x \" + cpuPercent,\n\t\t\t\t\t\tactionRepresentation[0]) + \"\\n\",\n\t\t\t\t\t\tLogSerialiser.LogLevel.Info);\n\t\t\t\tSystem.out.print(String.format(\n\t\t\t\t\t\t\"S[%1$\" + (1 + (int)Math.log10((double)settings.get(ConfigTags.Sequences))) + \"d=%2$\" + (1 + (int)Math.log10((double)generatedSequenceNumber)) + \"d]-\" + // S = test Sequence\n\t\t\t\t\t\t\"A[%3$\" + (1 + (int)Math.log10((double)settings().get(ConfigTags.SequenceLength))) + // A = Action\n\t\t\t\t\t\t\"d] <%4$3s@%5$3s KCVG>... SR = %6$8d KB / SC = %7$7s ... \", // KCVG = % CVG of Known UI space @ known UI space scale; SR = SUT_RAM; SC = SUT_CPU\n\t\t\t\t\t\tsequenceCount, generatedSequenceNumber, actionCount,\n\t\t\t\t\t\tGrapher.GRAPHS_ACTIVATED ? Grapher.getEnvironment().getExplorationCurveSampleCvg() : -1,\n\t\t\t\t\t\tGrapher.GRAPHS_ACTIVATED ? Grapher.getEnvironment().convertKCVG(Grapher.getEnvironment().getExplorationCurveSampleScale()) : -1,\n\t\t\t\t\t\tmemUsage, cpuPercent)); debugResources();\n\t\t\t\tSystem.out.print(\" ... L/S/T: \" + LogSerialiser.queueLength() + \"/\" + ScreenshotSerialiser.queueLength() + \"/\" + TestSerialiser.queueLength()); // L/S/T = Log/Scr/Test queues\n\t\t\t\t//Example: Seq[1]-Action[1] < 0 KCVG>... SUT_RAM = 17292 KB / SUT_CPU = 17.42% ... TESTAR_CPU: 1.550 s / TESTAR_RAM: 491.0 MB ... Log/Scr/Test queues: 2/2/0\t\t\t\t\n// temp begin\n/*if (Grapher.getEnvironment() != null){\n\tint totalWidgets = 0,\n\t totalUnxActions = 0;\n\tfor (IGraphState gs : Grapher.getEnvironment().getGraphStates()){\n\t\ttotalWidgets += gs.getStateWidgets().size();\n\t\ttotalUnxActions += gs.getUnexploredActions().size();\n\t}\n\tSystem.out.print(\"\\n\\t\" + String.format(\"%7d\",totalWidgets) + \" x \" + String.format(\"%7d\",totalUnxActions) + \"\\t(widgets x unexplored actions)\");\n}*/\n// temp end\n\t\t\t\tif (settings().get(ConfigTags.PrologActivated))\n\t\t\t\t\tSystem.out.println(\" ... prolog: \" + jipWrapper.debugPrologBase());\n\t\t\t\telse\n\t\t\t\t\tSystem.out.print(\"\\n\");\n\t\t\t\t//logln(Grapher.getExplorationCurveSample(),LogLevel.Info);\n\t\t\t\t//logln(Grapher.getLongestPath() + \"\\n\",LogLevel.Info);\n\t\t\t\tif (mode() == Modes.AdhocTest){\n\t\t\t\t\ttry {\n\t\t\t\t\t\tprotocolUtil.adhocTestServerWriter.write(\"OK\\r\\n\"); // adhoc action executed\n\t\t\t\t\t\tprotocolUtil.adhocTestServerWriter.flush();\n\t\t\t\t\t} catch (Exception e){} // AdhocTest client disconnected?\n\t\t\t\t}\n\t\t\t\t// end by urueda\n\n\t\t\t\tif (isTestAction && actionStatus.isActionSucceeded()) // by urueda\n\t\t\t\t\tactionCount++;\n\t\t\t\tfragment.set(ExecutedAction, actionStatus.getAction());\n\t\t\t\tfragment.set(ActionDuration, settings().get(ConfigTags.ActionDuration));\n\t\t\t\tfragment.set(ActionDelay, settings().get(ConfigTags.TimeToWaitAfterAction));\n\t\t\t\tLogSerialiser.log(\"Writing fragment to sequence file...\\n\", LogSerialiser.LogLevel.Debug);\n\t\t\t\t//oos.writeObject(fragment);\n\t\t\t\tTestSerialiser.write(fragment); // by urueda\n\t\n\t\t\t\tLogSerialiser.log(\"Wrote fragment to sequence file!\\n\", LogSerialiser.LogLevel.Debug);\n\t\t\t}else{\n\t\t\t\tLogSerialiser.log(\"Execution of action failed!\\n\");\n\t\t\t\ttry {\n\t\t\t\t\tprotocolUtil.adhocTestServerWriter.write(\"FAIL\\r\\n\"); // action execution failed\n\t\t\t\t\tprotocolUtil.adhocTestServerWriter.flush();\n\t\t\t\t} catch (Exception e) {} // AdhocTest client disconnected?\n\t\t\t}\t\t\t\t\n\t\t}\n\t\t\n\t\tlastExecutedAction = actionStatus.getAction(); // by urueda\n\t\t\n\t\tif(mode() == Modes.Quit) return actionStatus.isProblems();\n\t\tif(!actionStatus.isActionSucceeded()){\n\t\t\treturn true;\n\t\t}\n\t\t\n\t\treturn actionStatus.isProblems();\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 waitAutomaticAction(SUT system, State state, Taggable fragment, ActionStatus actionStatus){\n\t\tSet<Action> actions = deriveActions(system, state);\n\t\tCodingManager.buildIDs(state,actions);\n\t\t\n\t\tif(actions.isEmpty()){\n\t\t\tif (mode() != Modes.Spy && escAttempts >= MAX_ESC_ATTEMPTS){ // by urueda\n\t\t\t\tLogSerialiser.log(\"No available actions to execute! Tryed ESC <\" + MAX_ESC_ATTEMPTS + \"> times. Stopping sequence generation!\\n\", LogSerialiser.LogLevel.Critical);\n\t\t\t\tactionStatus.setProblems(true); // problems found\n\t\t\t}\n\t\t\t//----------------------------------\n\t\t\t// THERE MUST ALMOST BE ONE ACTION!\n\t\t\t//----------------------------------\n\t\t\t// if we did not find any actions, then we just hit escape, maybe that works ;-)\n\t\t\tAction escAction = new AnnotatingActionCompiler().hitKey(KBKeys.VK_ESCAPE);\n\t\t\tCodingManager.buildIDs(state, escAction);\n\t\t\tactions.add(escAction);\n\t\t\tescAttempts++;\n\t\t} else\n\t\t\tescAttempts = 0;\n\t\t// end by urueda\n\t\t\n\t\tfragment.set(ActionSet, actions);\n\t\tLogSerialiser.log(\"Built action set!\\n\", LogSerialiser.LogLevel.Debug);\n\t\tvisualizeActions(cv, state, actions);\n\n\t\tif(mode() == Modes.Quit) return actionStatus.isProblems();\n\t\tLogSerialiser.log(\"Selecting action...\\n\", LogSerialiser.LogLevel.Debug);\n\t\tif(mode() == Modes.Spy) return false; // by urueda\n\t\tactionStatus.setAction(selectAction(state, actions));\n\t\t\n\t\tif (actionStatus.getAction() == null){ // by urueda (no suitable actions?)\n\t\t\tnonSuitableAction = true;\n\t\t\treturn true; // force test sequence end\n\t\t}\n\n\t\tactionStatus.setUserEventAction(false); // by urueda\n\t\t\n\t\treturn false;\n\t}", "public static void assertToggleButtonSelected(JToggleButton button, boolean selected) {\n\t\tAtomicBoolean ref = new AtomicBoolean();\n\t\trunSwing(() -> ref.set(button.isSelected()));\n\t\tAssert.assertEquals(\"Button not in expected selected state\", selected, ref.get());\n\t}", "public void actionPerformed(ActionEvent e) {\n\t\t\t\ttoggle = 1;\r\n\t\t\t\ttoggle(toggle);\r\n\t\t\t}", "public void act() \n {\n checkClicked();\n }", "@SuppressWarnings(\"unchecked\")\n\tpublic void chooseAction(String actionSet, String action) {\n\t\topen();\n\n\t\tnew DefaultCombo().setSelection(actionSet);\n\t\tnew DefaultTreeItem(new TreeItemRegexMatcher(action + \".*\")).doubleClick();\n\t}", "@Override\n public void onClick(View v) {\n\n holder.routineCompletedButton.setSelected(!holder.routineCompletedButton.isSelected());\n\n }", "public void setSelectedAction(Action action) { \n // Make sure the selected action is in the list\n if (actions.contains(action)) {\n selectedAction = action;\n repaint();\n } \n }", "public void toSelectingAction() {\n }", "abstract public boolean cabOnMenuItemClicked(ActionMode mode, MenuItem item);", "private void hookSingleClickAction() {\n\t\tthis.addSelectionChangedListener(new ISelectionChangedListener() {\n\t\t\tpublic void selectionChanged(SelectionChangedEvent event) {\n\t\t\t\tsingleClickAction.run();\n\t\t\t}\n\t\t});\n\t}", "public void buttonChangeStatus(ActionEvent actionEvent) {\n }", "private void checkAction() {\n if (action == Consts.CREATE_ACTION) {\n createAction();\n } else {\n updateAction(getArguments().getString(\"taskId\"));\n }\n }", "public abstract boolean isSelected();", "public void invSelected()\n {\n\t\t//informaPreUpdate();\n \tisSelected = !isSelected;\n\t\t//informaPostUpdate();\n }", "public void setIsChosen(boolean isChosen);", "@Override\n\tpublic void actionPerformed(ActionEvent e) {\n\t\tvMdtr.stateClick(e);\n\t}", "@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tgsv.startSelectState();\n\t\t\t}", "public void toggleChecked(boolean b) {\n for (int i = 0; i < itemsDigested.size(); i++) {\n ListItem item = itemsDigested.get(i);\n if (b && item.getChecked() != ListItem.CHECKED) {\n item.setChecked(true);\n notifyItemChanged(i);\n } else if (!b && item.getChecked() == ListItem.CHECKED) {\n item.setChecked(false);\n notifyItemChanged(i);\n }\n }\n\n if (mainFrag.mActionMode != null) {\n mainFrag.mActionMode.invalidate();\n }\n\n if (getCheckedItems().size() == 0) {\n mainFrag.selection = false;\n if (mainFrag.mActionMode != null) mainFrag.mActionMode.finish();\n mainFrag.mActionMode = null;\n }\n }", "public void selectionChanged(IAction action, ISelection selection) {\n }", "@Override\n\tpublic void toggle() {\n\t\tsetChecked(!checked);\n\t}", "public void click() {\n\t\tif(toggles) {\n\t\t\tvalue = (value == 0) ? 1 : 0;\t// flip toggle value\n\t\t}\n\t\tupdateStore();\n\t\tif(delegate != null) delegate.uiButtonClicked(this);\t// deprecated\n\t}", "@Override\n\tpublic TurnAction selectAction() {\n\t\tJSONObject message = new JSONObject();\n\t\tmessage.put(\"function\", \"select\");\n\t\tmessage.put(\"type\", \"action\");\n\n\t\tthis.sendInstruction(message);\n\t\tString selected = this.getResponse();\n\t\treturn TurnAction.valueOf(selected);\n\t}", "@Test\n public void onKgsRBTNClicked(){\n onView(withId(R.id.kgsRBTN)).perform(click()).check(matches(isChecked()));\n onView(withId(R.id.lbsRBTN)).check(matches(isNotChecked()));\n }", "public void selectionChanged(IAction action, ISelection selection) {\n\t\t\r\n\t}", "@Override\n public void switchActionMode(boolean isOn) {\n if (isOn) {\n mActionMode = getActivity().startActionMode(mActionModeCallback);\n } else {\n if (mActionMode != null) {\n\n mActionMode.finish();\n }\n }\n }", "public void selectionChanged(IAction action, ISelection selection) {\n\r\n\t}", "public void selectionChanged(IAction action, ISelection selection) {\n\r\n\t}", "State takeAction(State state);", "@Test\n public void onFemaleRBTNClicked(){\n onView(withId(R.id.femaleRBTN)).perform(click()).check(matches(isChecked()));\n onView(withId(R.id.maleRBTN)).check(matches(isNotChecked()));\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}", "boolean isSelected();", "boolean isSelected();", "boolean isSelected();", "private void switchBtnActionPerformed(ActionEvent evt) {\r\n if(switchBtn.isSelected()) {\r\n switchBtn.setText(\"MIPS -> C\");\r\n switchBtnState = 1;\r\n }\r\n else {\r\n switchBtn.setText(\"C -> MIPS\");\r\n switchBtnState = -1;\r\n }\r\n }", "@Override\n public boolean onClick(View view) {\n updateToggle(view, !mChecked);\n// updateText(view); // automatically\n return true;\n }", "protected abstract boolean takeAction (Shape selected, int x, int y);", "void toggled(ToggledEvent event);", "public void selectionChanged(IAction action, ISelection selection) {\n\t}", "boolean hasActionCommand();", "@Override\n public void actionPerformed(ActionEvent e) {\n if (runButton_.isSelected()) {\n runButton_.setText(\"Abort Acquisition\");\n runAcquisition();\n } else {\n runButton_.setText(\"Run Acquisition\");\n }\n }", "@Test\n public void onLbsRBTNClicked(){\n onView(withId(R.id.lbsRBTN)).perform(click()).check(matches(isChecked()));\n onView(withId(R.id.kgsRBTN)).check(matches(isNotChecked()));\n }", "protected boolean invokeAction( int action )\n {\n switch ( action )\n {\n case ACTION_INVOKE:\n {\n clickButton();\n return true;\n }\n }\n return super.invokeAction( action );\n }", "@Override\r\n\t\t\t public void onClick(View v) {\n\t\t\t\t bFlagZhaopin = !bFlagZhaopin;\r\n\t\t\t\t zhaopin_btn.setChecked(bFlagZhaopin);\r\n\t\t\t }", "public void inState(T expected, Runnable action) {\n Thread previousOwner = takeOwnership();\n try {\n assertNotFailed();\n if (currentTarget != null) {\n throw new IllegalStateException(\"Expected to be in state \" + expected + \" but is in state \" + state + \" and transitioning to \" + currentTarget + \".\");\n }\n if (state != expected) {\n throw new IllegalStateException(\"Expected to be in state \" + expected + \" but is in state \" + state + \".\");\n }\n try {\n action.run();\n } catch (Throwable t) {\n failure = ExecutionResult.failed(t);\n failure.rethrow();\n }\n } finally {\n releaseOwnership(previousOwner);\n }\n }", "@Override\n\tpublic boolean doAction() {\n\t\tfield.setValue(value);\n\n\t\tif (checkBox != null)\n\t\t\tcheckBox.setSelected(value);\n\n\t\treturn true;\n\t}", "@SmallTest\n\tpublic void testFavoriteToggleButton() {\n\t\tassertNotNull(\"Favorite button not allowed to be null\", mFavButton);\n\t\tassertTrue(\"Favorite toggle button should not be checked\", !mFavButton.isChecked());\n\t}", "private void optionSelected(MenuActionDataItem action){\n \t\tString systemAction = action.getSystemAction();\n \t\tif(!systemAction.equals(\"\")){\n \t\t\t\n \t\t\tif(systemAction.equals(\"back\")){\n \t\t\t\tonBackPressed();\n \t\t\t}else if(systemAction.equals(\"home\")){\n \t\t\t\tIntent launchHome = new Intent(this, CoverActivity.class);\t\n \t\t\t\tstartActivity(launchHome);\n \t\t\t}else if(systemAction.equals(\"tts\")){\n \t\t\t\ttextToSearch();\n \t\t\t}else if(systemAction.equals(\"search\")){\n \t\t\t\tshowSearch();\n \t\t\t}else if(systemAction.equals(\"share\")){\n \t\t\t\tshowShare();\n \t\t\t}else if(systemAction.equals(\"map\")){\n \t\t\t\tshowMap();\n \t\t\t}else\n \t\t\t\tLog.e(\"CreateMenus\", \"No se encuentra el el tipo de menu: \" + systemAction);\n \t\t\t\n \t\t}else{\n \t\t\tNextLevel nextLevel = action.getNextLevel();\n \t\t\tshowNextLevel(this, nextLevel);\n \t\t\t\n \t\t}\n \t\t\n \t}", "public boolean isSetAction() {\n return this.action != null;\n }", "public boolean isSelected();", "public boolean isSelected();", "@Override\n protected Action selectAction(State state, Set<Action> actions){\n //Call the preSelectAction method from the DefaultProtocol so that, if necessary,\n //unwanted processes are killed and SUT is put into foreground.\n Action retAction = preSelectAction(state, actions);\n if (retAction == null)\n //if no preSelected actions are needed, then implement your own strategy\n retAction = RandomActionSelector.selectAction(actions);\n return retAction;\n }", "@Override\r\n\t\t\t public void onClick(View v) {\n\t\t\t\t bFlagHehuo = !bFlagHehuo;\r\n\t\t\t\t hehuo_btn.setChecked(bFlagHehuo);\r\n\t\t\t }", "public void actionPerformed(java.awt.event.ActionEvent evt) {\n\t\t\t\tif (lights_onoff_button.isSelected()) {\n\t\t\t\t\tSystem.out.println(\"down Lights ON\");\n\t\t\t\t} else {\n\t\t\t\t\tSystem.out.println(\"down Lights OFF\");\n\t\t\t\t}\n\t\t\t}", "boolean getUserChooseTrigger();", "@Test\n public void onMaleRBTNClicked(){\n onView(withId(R.id.maleRBTN)).perform(click()).check(matches(isChecked()));\n onView(withId(R.id.femaleRBTN)).check(matches(isNotChecked()));\n }", "public boolean getIsChosen();", "@Override\n\tpublic boolean setUp(Action action) {\n\t\tif (action == null)\n\t\t\treturn false;\n\t\t\n\t\t// ACTIONS THAT LEAD TO THIS STATE\n\t\tif (action.ID == StateActionRegistry.A.GO)\n\t\t{\n\t\t\tGo g = (Go) action;\n\t\t\tif (g.owner == null || (g.loc == null && g.locationOf == null))\n\t\t\t\t\treturn false;\n\t\t\towner = g.owner;\n\t\t\tif (g.loc != null)\n\t\t\t{\n\t\t\t\tloc = g.loc;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tlocationOf = g.locationOf;\n\t\t\t}\n\t\t\treturn true;\n\t\t}\n\t\t\n\t\t\n\t\t// ACTIONS WHOSE PRECOND INCLUDES THIS STATE\n\t\tif (action.ID == StateActionRegistry.A.TAKE)\n\t\t{\n\t\t\tTake t = (Take) action;\n\t\t\tif (t.owner == null || t.taken == null)\n\t\t\t\treturn false;\n\t\t\towner = t.owner;\n\t\t\tlocationOf = t.taken;\n\t\t\treturn true;\n\t\t} else if (action.ID == StateActionRegistry.A.STEAL)\n\t\t{\n\t\t\t\n\t\t\tSteal s = (Steal) action;\n\t\t\tif (s.owner == null || s.stolen == null)\n\t\t\t\treturn false;\n\t\t\towner = s.owner;\n\t\t\tlocationOf = s.stolen;\n\t\t\treturn true;\n\t\t} else if (action.ID == StateActionRegistry.A.ASKTO)\n\t\t{\n\t\t\tAskTo a = (AskTo) action;\n\t\t\tif (a.asker == null || a.askee == null)\n\t\t\t\treturn false;\n\t\t\towner = a.asker;\n\t\t\tlocationOf = a.askee;\n\t\t\treturn true;\n\t\t} else if (action.ID == StateActionRegistry.A.GIVE)\n\t\t{\n\t\t\tGive g = (Give) action;\n\t\t\tif (g.giver == null || g.givee == null || g.obj == null || g.obj.owner != g.giver)\n\t\t\t\treturn false;\n\t\t\towner = g.giver;\n\t\t\tlocationOf = g.givee;\n\t\t\treturn true;\n\t\t}\n\t\t\n\t\t\n\t\treturn false;\n\t}", "boolean hasHas_action();", "@Override\n public void onClick(View v) {\n if (v == btnSelectMenu) {\n isSelectShop = false;\n updateMenuShopButton();\n return;\n }\n if (v == btnSelectShop) {\n isSelectShop = true;\n updateMenuShopButton();\n return;\n }\n if (v == btnSelectOpen) {\n ALL_OR_OPEN = SettingPreferences.OPEN;\n isOpen = true;\n updateAllOpenButton();\n return;\n }\n if (v == btnSelectAll) {\n ALL_OR_OPEN = SettingPreferences.ALL;\n isOpen = false;\n updateAllOpenButton();\n return;\n }\n if (v == btnSearch) {\n if (NetworkUtil.checkNetworkAvailable(self))\n onClickSearch();\n else {\n Toast.makeText(self, R.string.message_network_is_unavailable,\n Toast.LENGTH_SHORT).show();\n }\n }\n }", "@Action(selectedProperty = SENTENCE_PAINTING)\r\n public void toggleSentences (ActionEvent e)\r\n {\r\n }", "void toggleVisible (ActionEvent actionEvent) {\n element.visible = this.isSelected();\n }", "@Override\n\tpublic void actionPerformed(ActionEvent e) {\n\t\t// Toggles the active square and updates the boundary\n\t\tMove m = new ToggleSquareMove(level.getBoard().getActiveSquare(),level);\n\t\tif(m.doMove()) {\n\t\t\tbuilder.pushMove(m, false);\t\n\t\t}\n\t\t\n\t\tboardView.repaint();\n\t}", "public void actionPerformed(ActionEvent e) {\n String action = e.getActionCommand();\n \n System.out.println(action);\n if (action.equals(\"Grid\")) {\n JToggleButton button = (JToggleButton)e.getSource();\n showGrid = button.isSelected();\n frame.repaint();\n }\n }", "public void toggle() {\n setChecked(!checked);\n }", "public boolean elementSelectionStateToBe(final By by, final boolean selected) {\n return (new WebDriverWait(webDriver, DRIVER_WAIT_TIME))\n .until(ExpectedConditions.elementSelectionStateToBe(by, selected));\n }", "@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tiv_operate.setSelected(!iv_operate.isSelected());\n\t\t\t\tiv_shuohua.setSelected(!iv_shuohua.isSelected());\n\t\t\t}", "public void actionPerformed(ActionEvent ae) {\n rb_selection = ae.getActionCommand(); \t \n }", "public void buttonSelected(boolean action) {\n\t\tLog.d(TAG, \"hit button neutral\");\n\t\tif(action) {\n\t\t\tLog.d(TAG, \"should close the activity\");\n\t\t\tparentActivity.onBackPressed();\n\t\t}\n\t\tdismiss();\n\t}", "@Override\n public void onToggle(String id, int position, boolean toggleState) {\n Log.d(TAG, String.format(\"onToggle: Id:%s, Position:%d, ToggleState:%s\", id, position, toggleState));\n if (selectedIdsMap.containsKey(id) && !toggleState) {\n //if the item is in the map AND resulting toggle state is false (not selected), we remove it\n Log.d(TAG, \"onToggle: Item is in the map, so removing:\" + id);\n selectedIdsMap.remove(id);\n }\n else if (!selectedIdsMap.containsKey(id) && toggleState) {\n //if the item is not in the map AND resulting toggle state is true, we add it\n Log.d(TAG, \"onToggle: Item is not in the map, so adding:\" + id);\n selectedIdsMap.put(id, position);\n }\n }", "@Override\n public void onSuggestionToggle(String id, int position, boolean toggleState) {\n if (selectedIdsMap.containsKey(id) && !toggleState) {\n //if the item is in the map AND resulting toggle state is false (not selected), we remove it\n Log.d(TAG, \"onSuggestionToggle: Item is in the map, so removing:\" + id);\n selectedIdsMap.remove(id);\n }\n else if (!selectedIdsMap.containsKey(id) && toggleState) {\n //if the item is not in the map AND resulting toggle state is true, we add it\n Log.d(TAG, \"onSuggestionToggle: Item is not in the map, so adding:\" + id);\n selectedIdsMap.put(id, position);\n }\n\n //notify all the fragments that a selection has changed\n if (fragments[MAP] != null) {\n Log.d(TAG, \"onSuggestionToggle: Notifying map fragment that a selection has changed\");\n ((SuggestionsClusterMapFragment) fragments[MAP]).onSelectionChanged(id, toggleState);\n }\n\n if (fragments[LIST] != null) {\n Log.d(TAG, \"onSuggestionToggle: Notifying list fragment that a selection has changed\");\n ((SuggestionsListFragment) fragments[LIST]).onSelectionChanged(id, toggleState);\n }\n }", "public boolean testSelected() {\n // test if set\n boolean set = Card.isSet(\n selectedCards.get(0).getCard(),\n selectedCards.get(1).getCard(),\n selectedCards.get(2).getCard()\n );\n\n // set currentlySelected to false and replace with new Cards (if applicable)\n for (BoardSquare bs : selectedCards)\n bs.setCurrentlySelected(false);\n\n // handle if set\n if (set) {\n if (!deck.isEmpty() && this.numCardsOnBoard() == 12) {\n for (BoardSquare bs : selectedCards)\n bs.setCard(deck.getTopCard());\n }\n else if (!deck.isEmpty() && this.numCardsOnBoard() < 12) {\n board.compressBoard(selectedCards);\n this.add3();\n }\n else {\n board.compressBoard(selectedCards);\n }\n }\n\n // clear ArrayList\n selectedCards.clear();\n\n // return bool\n return set;\n }", "public void waitForDecision(){\n if(gameOver) {\n return;\n }\n if(!decisionActive) {\n try {\n uiWaiting = true;\n synchronized(uiWait) {\n uiWait.wait();\n }\n } catch (Exception e) { logger.log(\"\"+e); }\n }\n }", "@Override\n public boolean onActionItemClicked(ActionMode mode, MenuItem item) {\n switch (item.getItemId()) {\n case R.id.action_check_all:\n toogleCheckAll();\n return true;\n case R.id.action_backup:\n new FileSaveTask(bAdapter.getSelected()).execute();\n new BackupAppsTask().execute(bAdapter.getSelected());\n return true;\n case R.id.action_uninstall:\n uninstallApp(bAdapter.getSelected());\n return true;\n\n default:\n return false;\n }\n }", "public String chooseAction(JSONObject context, boolean initializing)\r\n {\r\n if(initializing)\r\n {\r\n \r\n //Take a decision\r\n }\r\n \r\n else\r\n {\r\n //Take a decision\r\n }\r\n \r\n }", "public void selectAction(){\r\n\t\t\r\n\t\t//Switch on the action to be taken i.e referral made by health care professional\r\n\t\tswitch(this.referredTo){\r\n\t\tcase DECEASED:\r\n\t\t\tisDeceased();\r\n\t\t\tbreak;\r\n\t\tcase GP:\r\n\t\t\treferToGP();\r\n\t\t\tbreak;\r\n\t\tcase OUTPATIENT:\r\n\t\t\tsendToOutpatients();\r\n\t\t\tbreak;\r\n\t\tcase SOCIALSERVICES:\r\n\t\t\treferToSocialServices();\r\n\t\t\tbreak;\r\n\t\tcase SPECIALIST:\r\n\t\t\treferToSpecialist();\r\n\t\t\tbreak;\r\n\t\tcase WARD:\r\n\t\t\tsendToWard();\r\n\t\t\tbreak;\r\n\t\tcase DISCHARGED:\r\n\t\t\tdischarge();\r\n\t\tdefault:\r\n\t\t\tbreak;\r\n\t\t\r\n\t\t}//end switch\r\n\t}" ]
[ "0.6863955", "0.5616588", "0.56105375", "0.55198044", "0.540354", "0.53439856", "0.53306144", "0.53117603", "0.53076166", "0.5295569", "0.52929866", "0.5286976", "0.528189", "0.5281436", "0.5255206", "0.5247682", "0.52353907", "0.52200747", "0.52200747", "0.52113134", "0.5165808", "0.5145991", "0.51377594", "0.5132565", "0.5132565", "0.51167095", "0.51123387", "0.50912684", "0.5087025", "0.5071439", "0.5065985", "0.50316507", "0.50315756", "0.5022887", "0.49973404", "0.49968094", "0.49959406", "0.4991478", "0.49899164", "0.498632", "0.49776456", "0.49735633", "0.495946", "0.4956691", "0.4947766", "0.49461383", "0.4932435", "0.4927354", "0.49232268", "0.49225864", "0.4919399", "0.4919399", "0.4912701", "0.490849", "0.48995632", "0.48964456", "0.48964456", "0.48964456", "0.48954776", "0.48808143", "0.4879861", "0.4879491", "0.48780125", "0.48703873", "0.48600018", "0.48569676", "0.4856954", "0.48569512", "0.48447743", "0.48353058", "0.4834193", "0.48314038", "0.4819015", "0.48172376", "0.48172376", "0.480015", "0.47939017", "0.47916943", "0.4768203", "0.47675335", "0.4764019", "0.47366795", "0.473389", "0.47338128", "0.47308874", "0.47302002", "0.47274983", "0.47254163", "0.4724564", "0.47201493", "0.47147593", "0.47146598", "0.4712925", "0.47095183", "0.47073832", "0.46959522", "0.46888646", "0.46850818", "0.46792224", "0.46776477" ]
0.6099956
1
Ensures the given toggle action is in the given selected state. If it is not, then the action will be performed. This call will wait for the action to finish.
public static void setToggleActionSelected(ToggleDockingActionIf toggleAction, ActionContext context, boolean selected, boolean wait) { boolean shouldPerformAction = runSwing(() -> { return toggleAction.isSelected() != selected; }); if (shouldPerformAction) { performAction(toggleAction, context, wait); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void setToggleActionSelected(ToggleDockingActionIf toggleAction,\n\t\t\tActionContext context, boolean selected) {\n\t\tsetToggleActionSelected(toggleAction, context, selected, true);\n\t}", "@Test\n public void testToggle() {\n // Toggle on test.\n boolean before = plug.getCondition();\n clickOn(\"ON\");\n assertNotEquals(before, plug.getCondition());\n\n // Toggle off test which also implies that the ON/OFF status is displayed.\n before = plug.getCondition();\n clickOn(\"OFF\");\n assertNotEquals(before, plug.getCondition());\n }", "public void selected(String action);", "@Override\r\n\t\t\tpublic void actionPerformed(ActionEvent actionevent) {\n\t\t\t\tif (select.isSelected()) {\r\n\t\t\t\t\tservice.selectTask(row);\r\n\t\t\t\t\t// service.getTask(row).setSelected(true);\r\n\t\t\t\t} else {\r\n\t\t\t\t\tservice.cancleTask(row);\r\n\t\t\t\t\t// service.getTask(row).setSelected(false);\r\n\t\t\t\t}\r\n\t\t\t\t// System.out.println(\"after: \" + service.getSelectedSet());\r\n\r\n\t\t\t}", "public void select(int action) {\n\t\tselected = true;\n\t\tthis.action = action;\n\t}", "public void setActionTrackSelected(GralUserAction action){ actionSelectTrack = action; }", "public void actionPerformed(ActionEvent arg0)\n {\n userAlert = chkAlert.getState();\n }", "public void ButtonStatusToOneWay() throws InterruptedException {\n\n Thread.sleep(10000);\n //action=new Actions(this.driver);\n if (oneWayButton.isSelected()) {\n System.out.println(\"One way Button is already selected\");\n } else {\n wait.until(ExpectedConditions.elementSelectionStateToBe(oneWayButton,false));\n oneWayButton.click();\n System.out.println(\"one way button is clicked\");\n }\n\n\n }", "private void actionSwitchSelect()\r\n\t{\r\n\t\tif (FormMainMouse.isSampleSelectOn)\r\n\t\t{\r\n\t\t\thelperSwitchSelectOff();\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\thelperSwitchSelectOn();\r\n\r\n\t\t\t//---- If we can select sample, we can not move it\r\n\t\t\thelperSwitchMoveOff();\r\n\t\t}\r\n\t}", "public void setButtonSelection(String action);", "private boolean performAction(int action) {\n TagEditorFragment tagEditorFragment = (TagEditorFragment) caller;\n final int size = rows.getChildCount();\n List<TagEditRow> selected = new ArrayList<>();\n for (int i = 0; i < size; ++i) {\n View view = rows.getChildAt(i);\n TagEditRow row = (TagEditRow) view;\n if (row.isSelected()) {\n selected.add(row);\n }\n }\n switch (action) {\n case MENU_ITEM_DELETE:\n if (!selected.isEmpty()) {\n for (TagEditRow r : selected) {\n r.delete();\n }\n tagEditorFragment.updateAutocompletePresetItem(null);\n }\n if (currentAction != null) {\n currentAction.finish();\n }\n break;\n case MENU_ITEM_COPY:\n copyTags(selected, false);\n tagEditorFragment.updateAutocompletePresetItem(null);\n if (currentAction != null) {\n currentAction.finish();\n }\n break;\n case MENU_ITEM_CUT:\n copyTags(selected, true);\n if (currentAction != null) {\n currentAction.finish();\n }\n break;\n case MENU_ITEM_CREATE_PRESET:\n CustomPreset.create(tagEditorFragment, selected);\n tagEditorFragment.presetFilterUpdate.update(null);\n break;\n case MENU_ITEM_SELECT_ALL:\n ((PropertyRows) caller).selectAllRows();\n return true;\n case MENU_ITEM_DESELECT_ALL:\n ((PropertyRows) caller).deselectAllRows();\n return true;\n case MENU_ITEM_HELP:\n HelpViewer.start(caller.getActivity(), R.string.help_propertyeditor);\n return true;\n default:\n return false;\n }\n return true;\n }", "@FXML\n public void toggle(ActionEvent actionEvent) {\n if (isToggled) {\n cardText.setText(current.getQuestion());\n isToggled = false;\n } else {\n cardText.setText(current.getAnswer());\n isToggled = true;\n }\n }", "public void act() \n {\n super.checkClick();\n active(isActive);\n }", "public boolean isSelectingAction() {\n return false;\n }", "@Test\n public void testToggle() {\n // collapse and check the status\n rootPage.menu().collapse();\n Assert.assertTrue(rootPage.menu().isCollapsed());\n // expand and check the status\n rootPage.menu().expand();\n Assert.assertFalse(rootPage.menu().isCollapsed());\n }", "@Override public void toggled(SbToggleSelection handler, Class<?> c) throws JeeslLockingException, JeeslConstraintViolationException\n\t{\n\t}", "void stateSelected(State state);", "boolean hasAction();", "boolean hasAction();", "public void actionPerformed(ActionEvent e) {\n\t\t\t\ttoggle = 2;\r\n\t\t\t\ttoggle(toggle);\r\n\t\t\t}", "boolean hasCurrentAction();", "public void actionPerformed(ActionEvent e) {\n\t\t\t\ttoggle = 3;\r\n\t\t\t\ttoggle(toggle);\r\n\t\t\t}", "private boolean runAction(Canvas cv, SUT system, State state, Taggable fragment){\n\t\tActionStatus actionStatus = new ActionStatus();\n\t\twaitUserActionLoop(cv,system,state,actionStatus);\n\n\t\tcv.begin(); Util.clear(cv);\n\t\t//visualizeState(cv, state);\n\t\tvisualizeState(cv, state,system); // by urueda \n\t\tLogSerialiser.log(\"Building action set...\\n\", LogSerialiser.LogLevel.Debug);\n\t\t\t\t\t\n\t\t// begin by urueda\n\t\tif (actionStatus.isUserEventAction()){ // user action\n\t\t\tCodingManager.buildIDs(state, actionStatus.getAction());\n\t\t} else if (mode() == Modes.AdhocTest){ // adhoc-test action\n\t\t\tif (waitAdhocTestEventLoop(state,actionStatus)){\n\t\t\t\tcv.end(); // by urueda\n\t\t\t\treturn true; // problems\n\t\t\t}\n\t\t} else{ // automatically derived action\n\t\t\tif (waitAutomaticAction(system,state,fragment,actionStatus)){\n\t\t\t\tcv.end(); // by urueda\n\t\t\t\treturn true; // problems\n\t\t\t} else if (actionStatus.getAction() == null && mode() == Modes.Spy){\n\t\t\t\tcv.end(); // by urueda\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\t// begin by urueda\n\t\tcv.end();\n\t\t\n\t\tif (actionStatus.getAction() == null)\n\t\t\treturn true; // problems\n\t\t// end by urueda\n\t\t\n\t\tif (actionCount == 1 && isESC(actionStatus.getAction())){ // first action in the sequence an ESC?\n\t\t\tSystem.out.println(\"First action ESC? Switching to NOP to wait for SUT UI ... \" + this.timeElapsed());\n\t\t\tUtil.pauseMs(NOP_WAIT_WINDOW); // hold-on for UI to react (e.g. scenario: SUT loading ... logo)\n\t\t\tactionStatus.setAction(new NOP());\n\t\t\tCodingManager.buildIDs(state, actionStatus.getAction());\n\t\t\tnopAttempts++; escAttempts = 0;\n\t\t} else\n\t\t\tnopAttempts = 0;\n\t\t//System.out.println(\"Selected action: \" + action.toShortString() + \" ... count of ESC/NOP = \" + escAttempts + \"/\" + nopAttempts);;\n\t\t// end by urueda\n\t\t\n\t\tLogSerialiser.log(\"Selected action '\" + actionStatus.getAction() + \"'.\\n\", LogSerialiser.LogLevel.Debug);\n\t\t\t\t\n\t\tvisualizeSelectedAction(cv, state, actionStatus.getAction());\n\t\t\n\t\tif(mode() == Modes.Quit) return actionStatus.isProblems();\n\t\t\n\t\tboolean isTestAction = nopAttempts >= MAX_NOP_ATTEMPTS || !isNOP(actionStatus.getAction()); // by urueda\n\t\t\t\n\t\tif(mode() != Modes.Spy){\n\t\t\t// begin by urueda\n\t\t\tString[] actionRepresentation = Action.getActionRepresentation(state,actionStatus.getAction(),\"\\t\");\n\t\t\tint memUsage = NativeLinker.getMemUsage(system);\n\t\t\tif (memUsage < sutRAMbase)\n\t\t\t\tsutRAMbase = memUsage;\n\t\t\tif (memUsage - sutRAMbase > sutRAMpeak)\n\t\t\t\tsutRAMpeak = memUsage - sutRAMbase;\n\t\t\tlong currentCPU[] = NativeLinker.getCPUsage(system),\n\t\t\t\t userms = currentCPU[0] - lastCPU[0],\n\t\t\t\t sysms = currentCPU[1] - lastCPU[1],\n\t\t\t\t cpuUsage[] = new long[]{ userms, sysms, currentCPU[2]}; // [2] = CPU frame\n\t\t\tlastCPU = currentCPU;\n\t\t\tif (isTestAction)\n\t\t\t\tGrapher.notify(state,state.get(Tags.ScreenshotPath, null),\n\t\t\t\t\t\t\t actionStatus.getAction(),protocolUtil.getActionshot(state,actionStatus.getAction()),actionRepresentation[1],\n\t\t\t\t\t\t \t memUsage, cpuUsage);\n\t\t\t// end by urueda\n\t\t\tLogSerialiser.log(String.format(\"Executing (%d): %s...\", actionCount,\n\t\t\t\tactionStatus.getAction().get(Desc, actionStatus.getAction().toString())) + \"\\n\", LogSerialiser.LogLevel.Debug);\n\t\t\t//if((actionSucceeded = executeAction(system, state, action))){\n\t\t\tif (actionStatus.isUserEventAction() ||\n\t\t\t\t(actionStatus.setActionSucceeded(executeAction(system, state, actionStatus.getAction())))){ // by urueda\t\t\t\t\t\n\t\t\t\t//logln(String.format(\"Executed (%d): %s...\", actionCount, action.get(Desc, action.toString())), LogLevel.Info);\n\t\t\t\t// begin by urueda\n\t\t\t\tcv.begin(); Util.clear(cv); cv.end(); // by urueda (overlay is invalid until new state/actions scan)\n\t\t\t\tstampLastExecutedAction = System.currentTimeMillis();\t\t\t\t\t\n\t\t\t\tactionExecuted(system,state,actionStatus.getAction()); // notification\n\t\t\t\tif (actionStatus.isUserEventAction())\n\t\t\t\t\tUtil.pause(settings.get(ConfigTags.TimeToWaitAfterAction)); // wait between actions\n\t\t\t\tdouble sutCPU = ((cpuUsage[0] + cpuUsage[1]) / (double)cpuUsage[2] * 100);\n\t\t\t\tif (sutCPU > sutCPUpeak)\n\t\t\t\t\tsutCPUpeak = sutCPU;\n\t\t\t\tString cpuPercent = String.format(\"%.2f\", sutCPU) + \"%\";\n\t\t\t\tLogSerialiser.log(String.format(\"Executed [%d]: %s\\n%s\",\n\t\t\t\t\t\tactionCount,\n\t\t\t\t\t\t\"action = \" + actionStatus.getAction().get(Tags.ConcreteID) +\n\t\t\t\t\t\t\" (\" + actionStatus.getAction().get(Tags.AbstractID) + \") @state = \" +\n\t\t\t\t\t\tstate.get(Tags.ConcreteID) + \" (\" + state.get(Tags.Abstract_R_ID) + \")\\n\\tSUT_KB = \" +\n\t\t\t\t\t\tmemUsage + \", SUT_ms = \" + cpuUsage[0] + \" x \" + cpuUsage[1] + \" x \" + cpuPercent,\n\t\t\t\t\t\tactionRepresentation[0]) + \"\\n\",\n\t\t\t\t\t\tLogSerialiser.LogLevel.Info);\n\t\t\t\tSystem.out.print(String.format(\n\t\t\t\t\t\t\"S[%1$\" + (1 + (int)Math.log10((double)settings.get(ConfigTags.Sequences))) + \"d=%2$\" + (1 + (int)Math.log10((double)generatedSequenceNumber)) + \"d]-\" + // S = test Sequence\n\t\t\t\t\t\t\"A[%3$\" + (1 + (int)Math.log10((double)settings().get(ConfigTags.SequenceLength))) + // A = Action\n\t\t\t\t\t\t\"d] <%4$3s@%5$3s KCVG>... SR = %6$8d KB / SC = %7$7s ... \", // KCVG = % CVG of Known UI space @ known UI space scale; SR = SUT_RAM; SC = SUT_CPU\n\t\t\t\t\t\tsequenceCount, generatedSequenceNumber, actionCount,\n\t\t\t\t\t\tGrapher.GRAPHS_ACTIVATED ? Grapher.getEnvironment().getExplorationCurveSampleCvg() : -1,\n\t\t\t\t\t\tGrapher.GRAPHS_ACTIVATED ? Grapher.getEnvironment().convertKCVG(Grapher.getEnvironment().getExplorationCurveSampleScale()) : -1,\n\t\t\t\t\t\tmemUsage, cpuPercent)); debugResources();\n\t\t\t\tSystem.out.print(\" ... L/S/T: \" + LogSerialiser.queueLength() + \"/\" + ScreenshotSerialiser.queueLength() + \"/\" + TestSerialiser.queueLength()); // L/S/T = Log/Scr/Test queues\n\t\t\t\t//Example: Seq[1]-Action[1] < 0 KCVG>... SUT_RAM = 17292 KB / SUT_CPU = 17.42% ... TESTAR_CPU: 1.550 s / TESTAR_RAM: 491.0 MB ... Log/Scr/Test queues: 2/2/0\t\t\t\t\n// temp begin\n/*if (Grapher.getEnvironment() != null){\n\tint totalWidgets = 0,\n\t totalUnxActions = 0;\n\tfor (IGraphState gs : Grapher.getEnvironment().getGraphStates()){\n\t\ttotalWidgets += gs.getStateWidgets().size();\n\t\ttotalUnxActions += gs.getUnexploredActions().size();\n\t}\n\tSystem.out.print(\"\\n\\t\" + String.format(\"%7d\",totalWidgets) + \" x \" + String.format(\"%7d\",totalUnxActions) + \"\\t(widgets x unexplored actions)\");\n}*/\n// temp end\n\t\t\t\tif (settings().get(ConfigTags.PrologActivated))\n\t\t\t\t\tSystem.out.println(\" ... prolog: \" + jipWrapper.debugPrologBase());\n\t\t\t\telse\n\t\t\t\t\tSystem.out.print(\"\\n\");\n\t\t\t\t//logln(Grapher.getExplorationCurveSample(),LogLevel.Info);\n\t\t\t\t//logln(Grapher.getLongestPath() + \"\\n\",LogLevel.Info);\n\t\t\t\tif (mode() == Modes.AdhocTest){\n\t\t\t\t\ttry {\n\t\t\t\t\t\tprotocolUtil.adhocTestServerWriter.write(\"OK\\r\\n\"); // adhoc action executed\n\t\t\t\t\t\tprotocolUtil.adhocTestServerWriter.flush();\n\t\t\t\t\t} catch (Exception e){} // AdhocTest client disconnected?\n\t\t\t\t}\n\t\t\t\t// end by urueda\n\n\t\t\t\tif (isTestAction && actionStatus.isActionSucceeded()) // by urueda\n\t\t\t\t\tactionCount++;\n\t\t\t\tfragment.set(ExecutedAction, actionStatus.getAction());\n\t\t\t\tfragment.set(ActionDuration, settings().get(ConfigTags.ActionDuration));\n\t\t\t\tfragment.set(ActionDelay, settings().get(ConfigTags.TimeToWaitAfterAction));\n\t\t\t\tLogSerialiser.log(\"Writing fragment to sequence file...\\n\", LogSerialiser.LogLevel.Debug);\n\t\t\t\t//oos.writeObject(fragment);\n\t\t\t\tTestSerialiser.write(fragment); // by urueda\n\t\n\t\t\t\tLogSerialiser.log(\"Wrote fragment to sequence file!\\n\", LogSerialiser.LogLevel.Debug);\n\t\t\t}else{\n\t\t\t\tLogSerialiser.log(\"Execution of action failed!\\n\");\n\t\t\t\ttry {\n\t\t\t\t\tprotocolUtil.adhocTestServerWriter.write(\"FAIL\\r\\n\"); // action execution failed\n\t\t\t\t\tprotocolUtil.adhocTestServerWriter.flush();\n\t\t\t\t} catch (Exception e) {} // AdhocTest client disconnected?\n\t\t\t}\t\t\t\t\n\t\t}\n\t\t\n\t\tlastExecutedAction = actionStatus.getAction(); // by urueda\n\t\t\n\t\tif(mode() == Modes.Quit) return actionStatus.isProblems();\n\t\tif(!actionStatus.isActionSucceeded()){\n\t\t\treturn true;\n\t\t}\n\t\t\n\t\treturn actionStatus.isProblems();\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 waitAutomaticAction(SUT system, State state, Taggable fragment, ActionStatus actionStatus){\n\t\tSet<Action> actions = deriveActions(system, state);\n\t\tCodingManager.buildIDs(state,actions);\n\t\t\n\t\tif(actions.isEmpty()){\n\t\t\tif (mode() != Modes.Spy && escAttempts >= MAX_ESC_ATTEMPTS){ // by urueda\n\t\t\t\tLogSerialiser.log(\"No available actions to execute! Tryed ESC <\" + MAX_ESC_ATTEMPTS + \"> times. Stopping sequence generation!\\n\", LogSerialiser.LogLevel.Critical);\n\t\t\t\tactionStatus.setProblems(true); // problems found\n\t\t\t}\n\t\t\t//----------------------------------\n\t\t\t// THERE MUST ALMOST BE ONE ACTION!\n\t\t\t//----------------------------------\n\t\t\t// if we did not find any actions, then we just hit escape, maybe that works ;-)\n\t\t\tAction escAction = new AnnotatingActionCompiler().hitKey(KBKeys.VK_ESCAPE);\n\t\t\tCodingManager.buildIDs(state, escAction);\n\t\t\tactions.add(escAction);\n\t\t\tescAttempts++;\n\t\t} else\n\t\t\tescAttempts = 0;\n\t\t// end by urueda\n\t\t\n\t\tfragment.set(ActionSet, actions);\n\t\tLogSerialiser.log(\"Built action set!\\n\", LogSerialiser.LogLevel.Debug);\n\t\tvisualizeActions(cv, state, actions);\n\n\t\tif(mode() == Modes.Quit) return actionStatus.isProblems();\n\t\tLogSerialiser.log(\"Selecting action...\\n\", LogSerialiser.LogLevel.Debug);\n\t\tif(mode() == Modes.Spy) return false; // by urueda\n\t\tactionStatus.setAction(selectAction(state, actions));\n\t\t\n\t\tif (actionStatus.getAction() == null){ // by urueda (no suitable actions?)\n\t\t\tnonSuitableAction = true;\n\t\t\treturn true; // force test sequence end\n\t\t}\n\n\t\tactionStatus.setUserEventAction(false); // by urueda\n\t\t\n\t\treturn false;\n\t}", "public static void assertToggleButtonSelected(JToggleButton button, boolean selected) {\n\t\tAtomicBoolean ref = new AtomicBoolean();\n\t\trunSwing(() -> ref.set(button.isSelected()));\n\t\tAssert.assertEquals(\"Button not in expected selected state\", selected, ref.get());\n\t}", "public void actionPerformed(ActionEvent e) {\n\t\t\t\ttoggle = 1;\r\n\t\t\t\ttoggle(toggle);\r\n\t\t\t}", "public void act() \n {\n checkClicked();\n }", "@SuppressWarnings(\"unchecked\")\n\tpublic void chooseAction(String actionSet, String action) {\n\t\topen();\n\n\t\tnew DefaultCombo().setSelection(actionSet);\n\t\tnew DefaultTreeItem(new TreeItemRegexMatcher(action + \".*\")).doubleClick();\n\t}", "@Override\n public void onClick(View v) {\n\n holder.routineCompletedButton.setSelected(!holder.routineCompletedButton.isSelected());\n\n }", "public void setSelectedAction(Action action) { \n // Make sure the selected action is in the list\n if (actions.contains(action)) {\n selectedAction = action;\n repaint();\n } \n }", "public void toSelectingAction() {\n }", "abstract public boolean cabOnMenuItemClicked(ActionMode mode, MenuItem item);", "private void checkAction() {\n if (action == Consts.CREATE_ACTION) {\n createAction();\n } else {\n updateAction(getArguments().getString(\"taskId\"));\n }\n }", "private void hookSingleClickAction() {\n\t\tthis.addSelectionChangedListener(new ISelectionChangedListener() {\n\t\t\tpublic void selectionChanged(SelectionChangedEvent event) {\n\t\t\t\tsingleClickAction.run();\n\t\t\t}\n\t\t});\n\t}", "public void buttonChangeStatus(ActionEvent actionEvent) {\n }", "public abstract boolean isSelected();", "public void invSelected()\n {\n\t\t//informaPreUpdate();\n \tisSelected = !isSelected;\n\t\t//informaPostUpdate();\n }", "public void setIsChosen(boolean isChosen);", "@Override\n\tpublic void actionPerformed(ActionEvent e) {\n\t\tvMdtr.stateClick(e);\n\t}", "@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tgsv.startSelectState();\n\t\t\t}", "public void toggleChecked(boolean b) {\n for (int i = 0; i < itemsDigested.size(); i++) {\n ListItem item = itemsDigested.get(i);\n if (b && item.getChecked() != ListItem.CHECKED) {\n item.setChecked(true);\n notifyItemChanged(i);\n } else if (!b && item.getChecked() == ListItem.CHECKED) {\n item.setChecked(false);\n notifyItemChanged(i);\n }\n }\n\n if (mainFrag.mActionMode != null) {\n mainFrag.mActionMode.invalidate();\n }\n\n if (getCheckedItems().size() == 0) {\n mainFrag.selection = false;\n if (mainFrag.mActionMode != null) mainFrag.mActionMode.finish();\n mainFrag.mActionMode = null;\n }\n }", "public void selectionChanged(IAction action, ISelection selection) {\n }", "public void click() {\n\t\tif(toggles) {\n\t\t\tvalue = (value == 0) ? 1 : 0;\t// flip toggle value\n\t\t}\n\t\tupdateStore();\n\t\tif(delegate != null) delegate.uiButtonClicked(this);\t// deprecated\n\t}", "@Override\n\tpublic void toggle() {\n\t\tsetChecked(!checked);\n\t}", "@Override\n\tpublic TurnAction selectAction() {\n\t\tJSONObject message = new JSONObject();\n\t\tmessage.put(\"function\", \"select\");\n\t\tmessage.put(\"type\", \"action\");\n\n\t\tthis.sendInstruction(message);\n\t\tString selected = this.getResponse();\n\t\treturn TurnAction.valueOf(selected);\n\t}", "@Test\n public void onKgsRBTNClicked(){\n onView(withId(R.id.kgsRBTN)).perform(click()).check(matches(isChecked()));\n onView(withId(R.id.lbsRBTN)).check(matches(isNotChecked()));\n }", "public void selectionChanged(IAction action, ISelection selection) {\n\t\t\r\n\t}", "@Override\n public void switchActionMode(boolean isOn) {\n if (isOn) {\n mActionMode = getActivity().startActionMode(mActionModeCallback);\n } else {\n if (mActionMode != null) {\n\n mActionMode.finish();\n }\n }\n }", "public void selectionChanged(IAction action, ISelection selection) {\n\r\n\t}", "public void selectionChanged(IAction action, ISelection selection) {\n\r\n\t}", "State takeAction(State state);", "@Test\n public void onFemaleRBTNClicked(){\n onView(withId(R.id.femaleRBTN)).perform(click()).check(matches(isChecked()));\n onView(withId(R.id.maleRBTN)).check(matches(isNotChecked()));\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}", "private void switchBtnActionPerformed(ActionEvent evt) {\r\n if(switchBtn.isSelected()) {\r\n switchBtn.setText(\"MIPS -> C\");\r\n switchBtnState = 1;\r\n }\r\n else {\r\n switchBtn.setText(\"C -> MIPS\");\r\n switchBtnState = -1;\r\n }\r\n }", "boolean isSelected();", "boolean isSelected();", "boolean isSelected();", "@Override\n public boolean onClick(View view) {\n updateToggle(view, !mChecked);\n// updateText(view); // automatically\n return true;\n }", "protected abstract boolean takeAction (Shape selected, int x, int y);", "void toggled(ToggledEvent event);", "public void selectionChanged(IAction action, ISelection selection) {\n\t}", "boolean hasActionCommand();", "@Override\n public void actionPerformed(ActionEvent e) {\n if (runButton_.isSelected()) {\n runButton_.setText(\"Abort Acquisition\");\n runAcquisition();\n } else {\n runButton_.setText(\"Run Acquisition\");\n }\n }", "protected boolean invokeAction( int action )\n {\n switch ( action )\n {\n case ACTION_INVOKE:\n {\n clickButton();\n return true;\n }\n }\n return super.invokeAction( action );\n }", "@Test\n public void onLbsRBTNClicked(){\n onView(withId(R.id.lbsRBTN)).perform(click()).check(matches(isChecked()));\n onView(withId(R.id.kgsRBTN)).check(matches(isNotChecked()));\n }", "@Override\r\n\t\t\t public void onClick(View v) {\n\t\t\t\t bFlagZhaopin = !bFlagZhaopin;\r\n\t\t\t\t zhaopin_btn.setChecked(bFlagZhaopin);\r\n\t\t\t }", "public void inState(T expected, Runnable action) {\n Thread previousOwner = takeOwnership();\n try {\n assertNotFailed();\n if (currentTarget != null) {\n throw new IllegalStateException(\"Expected to be in state \" + expected + \" but is in state \" + state + \" and transitioning to \" + currentTarget + \".\");\n }\n if (state != expected) {\n throw new IllegalStateException(\"Expected to be in state \" + expected + \" but is in state \" + state + \".\");\n }\n try {\n action.run();\n } catch (Throwable t) {\n failure = ExecutionResult.failed(t);\n failure.rethrow();\n }\n } finally {\n releaseOwnership(previousOwner);\n }\n }", "@Override\n\tpublic boolean doAction() {\n\t\tfield.setValue(value);\n\n\t\tif (checkBox != null)\n\t\t\tcheckBox.setSelected(value);\n\n\t\treturn true;\n\t}", "@SmallTest\n\tpublic void testFavoriteToggleButton() {\n\t\tassertNotNull(\"Favorite button not allowed to be null\", mFavButton);\n\t\tassertTrue(\"Favorite toggle button should not be checked\", !mFavButton.isChecked());\n\t}", "private void optionSelected(MenuActionDataItem action){\n \t\tString systemAction = action.getSystemAction();\n \t\tif(!systemAction.equals(\"\")){\n \t\t\t\n \t\t\tif(systemAction.equals(\"back\")){\n \t\t\t\tonBackPressed();\n \t\t\t}else if(systemAction.equals(\"home\")){\n \t\t\t\tIntent launchHome = new Intent(this, CoverActivity.class);\t\n \t\t\t\tstartActivity(launchHome);\n \t\t\t}else if(systemAction.equals(\"tts\")){\n \t\t\t\ttextToSearch();\n \t\t\t}else if(systemAction.equals(\"search\")){\n \t\t\t\tshowSearch();\n \t\t\t}else if(systemAction.equals(\"share\")){\n \t\t\t\tshowShare();\n \t\t\t}else if(systemAction.equals(\"map\")){\n \t\t\t\tshowMap();\n \t\t\t}else\n \t\t\t\tLog.e(\"CreateMenus\", \"No se encuentra el el tipo de menu: \" + systemAction);\n \t\t\t\n \t\t}else{\n \t\t\tNextLevel nextLevel = action.getNextLevel();\n \t\t\tshowNextLevel(this, nextLevel);\n \t\t\t\n \t\t}\n \t\t\n \t}", "public boolean isSetAction() {\n return this.action != null;\n }", "public boolean isSelected();", "public boolean isSelected();", "@Override\n protected Action selectAction(State state, Set<Action> actions){\n //Call the preSelectAction method from the DefaultProtocol so that, if necessary,\n //unwanted processes are killed and SUT is put into foreground.\n Action retAction = preSelectAction(state, actions);\n if (retAction == null)\n //if no preSelected actions are needed, then implement your own strategy\n retAction = RandomActionSelector.selectAction(actions);\n return retAction;\n }", "@Override\r\n\t\t\t public void onClick(View v) {\n\t\t\t\t bFlagHehuo = !bFlagHehuo;\r\n\t\t\t\t hehuo_btn.setChecked(bFlagHehuo);\r\n\t\t\t }", "public void actionPerformed(java.awt.event.ActionEvent evt) {\n\t\t\t\tif (lights_onoff_button.isSelected()) {\n\t\t\t\t\tSystem.out.println(\"down Lights ON\");\n\t\t\t\t} else {\n\t\t\t\t\tSystem.out.println(\"down Lights OFF\");\n\t\t\t\t}\n\t\t\t}", "@Test\n public void onMaleRBTNClicked(){\n onView(withId(R.id.maleRBTN)).perform(click()).check(matches(isChecked()));\n onView(withId(R.id.femaleRBTN)).check(matches(isNotChecked()));\n }", "boolean getUserChooseTrigger();", "public boolean getIsChosen();", "@Override\n\tpublic boolean setUp(Action action) {\n\t\tif (action == null)\n\t\t\treturn false;\n\t\t\n\t\t// ACTIONS THAT LEAD TO THIS STATE\n\t\tif (action.ID == StateActionRegistry.A.GO)\n\t\t{\n\t\t\tGo g = (Go) action;\n\t\t\tif (g.owner == null || (g.loc == null && g.locationOf == null))\n\t\t\t\t\treturn false;\n\t\t\towner = g.owner;\n\t\t\tif (g.loc != null)\n\t\t\t{\n\t\t\t\tloc = g.loc;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tlocationOf = g.locationOf;\n\t\t\t}\n\t\t\treturn true;\n\t\t}\n\t\t\n\t\t\n\t\t// ACTIONS WHOSE PRECOND INCLUDES THIS STATE\n\t\tif (action.ID == StateActionRegistry.A.TAKE)\n\t\t{\n\t\t\tTake t = (Take) action;\n\t\t\tif (t.owner == null || t.taken == null)\n\t\t\t\treturn false;\n\t\t\towner = t.owner;\n\t\t\tlocationOf = t.taken;\n\t\t\treturn true;\n\t\t} else if (action.ID == StateActionRegistry.A.STEAL)\n\t\t{\n\t\t\t\n\t\t\tSteal s = (Steal) action;\n\t\t\tif (s.owner == null || s.stolen == null)\n\t\t\t\treturn false;\n\t\t\towner = s.owner;\n\t\t\tlocationOf = s.stolen;\n\t\t\treturn true;\n\t\t} else if (action.ID == StateActionRegistry.A.ASKTO)\n\t\t{\n\t\t\tAskTo a = (AskTo) action;\n\t\t\tif (a.asker == null || a.askee == null)\n\t\t\t\treturn false;\n\t\t\towner = a.asker;\n\t\t\tlocationOf = a.askee;\n\t\t\treturn true;\n\t\t} else if (action.ID == StateActionRegistry.A.GIVE)\n\t\t{\n\t\t\tGive g = (Give) action;\n\t\t\tif (g.giver == null || g.givee == null || g.obj == null || g.obj.owner != g.giver)\n\t\t\t\treturn false;\n\t\t\towner = g.giver;\n\t\t\tlocationOf = g.givee;\n\t\t\treturn true;\n\t\t}\n\t\t\n\t\t\n\t\treturn false;\n\t}", "@Override\n public void onClick(View v) {\n if (v == btnSelectMenu) {\n isSelectShop = false;\n updateMenuShopButton();\n return;\n }\n if (v == btnSelectShop) {\n isSelectShop = true;\n updateMenuShopButton();\n return;\n }\n if (v == btnSelectOpen) {\n ALL_OR_OPEN = SettingPreferences.OPEN;\n isOpen = true;\n updateAllOpenButton();\n return;\n }\n if (v == btnSelectAll) {\n ALL_OR_OPEN = SettingPreferences.ALL;\n isOpen = false;\n updateAllOpenButton();\n return;\n }\n if (v == btnSearch) {\n if (NetworkUtil.checkNetworkAvailable(self))\n onClickSearch();\n else {\n Toast.makeText(self, R.string.message_network_is_unavailable,\n Toast.LENGTH_SHORT).show();\n }\n }\n }", "boolean hasHas_action();", "@Action(selectedProperty = SENTENCE_PAINTING)\r\n public void toggleSentences (ActionEvent e)\r\n {\r\n }", "void toggleVisible (ActionEvent actionEvent) {\n element.visible = this.isSelected();\n }", "@Override\n\tpublic void actionPerformed(ActionEvent e) {\n\t\t// Toggles the active square and updates the boundary\n\t\tMove m = new ToggleSquareMove(level.getBoard().getActiveSquare(),level);\n\t\tif(m.doMove()) {\n\t\t\tbuilder.pushMove(m, false);\t\n\t\t}\n\t\t\n\t\tboardView.repaint();\n\t}", "public void actionPerformed(ActionEvent e) {\n String action = e.getActionCommand();\n \n System.out.println(action);\n if (action.equals(\"Grid\")) {\n JToggleButton button = (JToggleButton)e.getSource();\n showGrid = button.isSelected();\n frame.repaint();\n }\n }", "public void toggle() {\n setChecked(!checked);\n }", "public boolean elementSelectionStateToBe(final By by, final boolean selected) {\n return (new WebDriverWait(webDriver, DRIVER_WAIT_TIME))\n .until(ExpectedConditions.elementSelectionStateToBe(by, selected));\n }", "public void buttonSelected(boolean action) {\n\t\tLog.d(TAG, \"hit button neutral\");\n\t\tif(action) {\n\t\t\tLog.d(TAG, \"should close the activity\");\n\t\t\tparentActivity.onBackPressed();\n\t\t}\n\t\tdismiss();\n\t}", "@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tiv_operate.setSelected(!iv_operate.isSelected());\n\t\t\t\tiv_shuohua.setSelected(!iv_shuohua.isSelected());\n\t\t\t}", "public void actionPerformed(ActionEvent ae) {\n rb_selection = ae.getActionCommand(); \t \n }", "@Override\n public void onToggle(String id, int position, boolean toggleState) {\n Log.d(TAG, String.format(\"onToggle: Id:%s, Position:%d, ToggleState:%s\", id, position, toggleState));\n if (selectedIdsMap.containsKey(id) && !toggleState) {\n //if the item is in the map AND resulting toggle state is false (not selected), we remove it\n Log.d(TAG, \"onToggle: Item is in the map, so removing:\" + id);\n selectedIdsMap.remove(id);\n }\n else if (!selectedIdsMap.containsKey(id) && toggleState) {\n //if the item is not in the map AND resulting toggle state is true, we add it\n Log.d(TAG, \"onToggle: Item is not in the map, so adding:\" + id);\n selectedIdsMap.put(id, position);\n }\n }", "@Override\n public void onSuggestionToggle(String id, int position, boolean toggleState) {\n if (selectedIdsMap.containsKey(id) && !toggleState) {\n //if the item is in the map AND resulting toggle state is false (not selected), we remove it\n Log.d(TAG, \"onSuggestionToggle: Item is in the map, so removing:\" + id);\n selectedIdsMap.remove(id);\n }\n else if (!selectedIdsMap.containsKey(id) && toggleState) {\n //if the item is not in the map AND resulting toggle state is true, we add it\n Log.d(TAG, \"onSuggestionToggle: Item is not in the map, so adding:\" + id);\n selectedIdsMap.put(id, position);\n }\n\n //notify all the fragments that a selection has changed\n if (fragments[MAP] != null) {\n Log.d(TAG, \"onSuggestionToggle: Notifying map fragment that a selection has changed\");\n ((SuggestionsClusterMapFragment) fragments[MAP]).onSelectionChanged(id, toggleState);\n }\n\n if (fragments[LIST] != null) {\n Log.d(TAG, \"onSuggestionToggle: Notifying list fragment that a selection has changed\");\n ((SuggestionsListFragment) fragments[LIST]).onSelectionChanged(id, toggleState);\n }\n }", "public boolean testSelected() {\n // test if set\n boolean set = Card.isSet(\n selectedCards.get(0).getCard(),\n selectedCards.get(1).getCard(),\n selectedCards.get(2).getCard()\n );\n\n // set currentlySelected to false and replace with new Cards (if applicable)\n for (BoardSquare bs : selectedCards)\n bs.setCurrentlySelected(false);\n\n // handle if set\n if (set) {\n if (!deck.isEmpty() && this.numCardsOnBoard() == 12) {\n for (BoardSquare bs : selectedCards)\n bs.setCard(deck.getTopCard());\n }\n else if (!deck.isEmpty() && this.numCardsOnBoard() < 12) {\n board.compressBoard(selectedCards);\n this.add3();\n }\n else {\n board.compressBoard(selectedCards);\n }\n }\n\n // clear ArrayList\n selectedCards.clear();\n\n // return bool\n return set;\n }", "public void waitForDecision(){\n if(gameOver) {\n return;\n }\n if(!decisionActive) {\n try {\n uiWaiting = true;\n synchronized(uiWait) {\n uiWait.wait();\n }\n } catch (Exception e) { logger.log(\"\"+e); }\n }\n }", "@Override\n public boolean onActionItemClicked(ActionMode mode, MenuItem item) {\n switch (item.getItemId()) {\n case R.id.action_check_all:\n toogleCheckAll();\n return true;\n case R.id.action_backup:\n new FileSaveTask(bAdapter.getSelected()).execute();\n new BackupAppsTask().execute(bAdapter.getSelected());\n return true;\n case R.id.action_uninstall:\n uninstallApp(bAdapter.getSelected());\n return true;\n\n default:\n return false;\n }\n }", "public String chooseAction(JSONObject context, boolean initializing)\r\n {\r\n if(initializing)\r\n {\r\n \r\n //Take a decision\r\n }\r\n \r\n else\r\n {\r\n //Take a decision\r\n }\r\n \r\n }", "public void selectAction(){\r\n\t\t\r\n\t\t//Switch on the action to be taken i.e referral made by health care professional\r\n\t\tswitch(this.referredTo){\r\n\t\tcase DECEASED:\r\n\t\t\tisDeceased();\r\n\t\t\tbreak;\r\n\t\tcase GP:\r\n\t\t\treferToGP();\r\n\t\t\tbreak;\r\n\t\tcase OUTPATIENT:\r\n\t\t\tsendToOutpatients();\r\n\t\t\tbreak;\r\n\t\tcase SOCIALSERVICES:\r\n\t\t\treferToSocialServices();\r\n\t\t\tbreak;\r\n\t\tcase SPECIALIST:\r\n\t\t\treferToSpecialist();\r\n\t\t\tbreak;\r\n\t\tcase WARD:\r\n\t\t\tsendToWard();\r\n\t\t\tbreak;\r\n\t\tcase DISCHARGED:\r\n\t\t\tdischarge();\r\n\t\tdefault:\r\n\t\t\tbreak;\r\n\t\t\r\n\t\t}//end switch\r\n\t}" ]
[ "0.6100761", "0.56145513", "0.5611466", "0.55207986", "0.54056233", "0.5344764", "0.53302306", "0.5310022", "0.530778", "0.52954656", "0.5294674", "0.528705", "0.5281782", "0.528093", "0.5254522", "0.5247784", "0.5234946", "0.52191186", "0.52191186", "0.5211525", "0.5164627", "0.51463646", "0.5137784", "0.51333624", "0.51333624", "0.51175976", "0.51108694", "0.5091306", "0.5087455", "0.5073566", "0.5065568", "0.5033434", "0.5032319", "0.5023366", "0.49976605", "0.49971175", "0.49959022", "0.49896953", "0.49888745", "0.4984305", "0.49789613", "0.4973936", "0.49595332", "0.49565187", "0.49467745", "0.49466813", "0.49335626", "0.49268365", "0.492369", "0.49229237", "0.49194497", "0.49194497", "0.49134025", "0.49081698", "0.48983562", "0.4894341", "0.4893814", "0.4893814", "0.4893814", "0.4881032", "0.48806572", "0.48784786", "0.48782977", "0.4869365", "0.48604482", "0.48589948", "0.4856082", "0.48555064", "0.48465952", "0.48367244", "0.48336196", "0.48325098", "0.48197386", "0.48147193", "0.48147193", "0.48016664", "0.47928774", "0.4790441", "0.47669098", "0.4765227", "0.4761283", "0.47374904", "0.47334683", "0.47334057", "0.4730839", "0.47302586", "0.4727511", "0.47243157", "0.4723181", "0.47174233", "0.47147155", "0.47142652", "0.4713682", "0.47082555", "0.47061455", "0.4695552", "0.46877357", "0.46859995", "0.46803966", "0.46789655" ]
0.686502
0
Searches the component and subcomponents of the indicated provider and returns the component with the specified name.
public static Component findComponentByName(DialogComponentProvider provider, String componentName) { return findComponentByName(provider.getComponent(), componentName, false); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Component getComponent(String name) {\n Optional<Component> component = elements.getComponent(name);\n\n if(component.isPresent()) {\n return component.get();\n } else {\n Assert.fail(\"Missing component \" + name);\n return null;\n }\n\n }", "public abstract Component getComponentByName(String name);", "public ServiceResultInterface getComponentByName(String name) {\n\t\tfor (ServiceResultInterface res : components) {\n\t\t\tif (res.getName().equals(name)) {\n\t\t\t\treturn res;\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t}", "private static ComponentProvider getComponentProviderFromNode(Object node,\n\t\t\tClass<? extends ComponentProvider> providerClass) {\n\t\tClass<?> nodeClass = node.getClass();\n\t\tString className = nodeClass.getName();\n\n\t\tif (className.indexOf(\"ComponentNode\") != -1) {\n\t\t\tList<ComponentPlaceholder> infoList = CollectionUtils.asList(\n\t\t\t\t(List<?>) getInstanceField(\"windowPlaceholders\", node), ComponentPlaceholder.class);\n\t\t\tfor (ComponentPlaceholder info : infoList) {\n\t\t\t\tComponentProvider provider = info.getProvider();\n\t\t\t\tif ((provider != null) && providerClass.isAssignableFrom(provider.getClass())) {\n\t\t\t\t\treturn provider;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\telse if (className.indexOf(\"WindowNode\") != -1) {\n\t\t\tObject childNode = getInstanceField(\"child\", node);\n\t\t\treturn getComponentProviderFromNode(childNode, providerClass);// recurse\n\t\t}\n\t\telse if (className.indexOf(\"SplitNode\") != -1) {\n\t\t\tObject leftNode = getInstanceField(\"child1\", node);\n\t\t\tComponentProvider leftProvider = getComponentProviderFromNode(leftNode, providerClass);// recurse\n\t\t\tif (leftProvider != null) {\n\t\t\t\treturn leftProvider;\n\t\t\t}\n\n\t\t\tObject rightNode = getInstanceField(\"child2\", node);\n\t\t\treturn getComponentProviderFromNode(rightNode, providerClass);// recurse\n\t\t}\n\n\t\treturn null;\n\t}", "public abstract List<Component> getComponentsByName(String name);", "public JPanel getComponentAt( String name) {\n Component comp = null;\n for (Component child : this.getContentPane().getComponents()) {\n if (child.getName().equals(name)) {\n comp = child;\n }\n }\n return (JPanel)comp;\n }", "public static Component clickComponentProvider(ComponentProvider provider) {\n\n\t\tJComponent component = provider.getComponent();\n\t\tDockableComponent dockableComponent = getDockableComponent(component);\n\t\tselectTabIfAvailable(dockableComponent);\n\t\tRectangle bounds = component.getBounds();\n\t\tint centerX = (bounds.x + bounds.width) >> 1;\n\t\tint centerY = (bounds.y + bounds.height) >> 1;\n\n\t\treturn clickComponentProvider(provider, MouseEvent.BUTTON1, centerX, centerY, 1, 0, false);\n\t}", "@Override\n public Component find(String name) throws ItemNotFoundException {\n if(this.getName().equals(name))\n return this;\n\n for(Component c : children)\n try {\n return c.find(name);\n } catch (ItemNotFoundException e) {\n continue;\n }\n\n throw new ItemNotFoundException(\"\\\"\" + name + \" not found in \" + this.getName());\n }", "@SuppressWarnings(\"unchecked\")\n\n\tprivate <T extends Component> T findComponent(Container root, String name) {\n\n\t\tfor (Component child : root.getComponents()) {\n\n\t\t\tif (name.equals(child.getName())) {\n\n\t\t\t\treturn (T) child;\n\n\t\t\t}\n\n\t\t\tif (child instanceof Container) {\n\n\t\t\t\tT subChild = findComponent((Container) child, name);\n\n\t\t\t\tif (subChild != null) {\n\n\t\t\t\t\treturn subChild;\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t}\n\n\t\treturn null;\n\n\t}", "public ComponentProvider showProvider(Tool tool, String name) {\n\t\tComponentProvider provider = tool.getComponentProvider(name);\n\t\ttool.showComponentProvider(provider, true);\n\t\treturn provider;\n\t}", "public static Object getComponentInstance(String name, ServletContext sc) {\r\n\t\tContainerWrapper containerWrapper = scf.findContainer(new ServletContextWrapper(sc));\r\n\t\tif (!containerWrapper.isStart()) {\r\n\t\t\tDebug.logError(\"JdonFramework not yet started, please try later \", module);\r\n\t\t\treturn null;\r\n\t\t}\r\n\t\treturn containerWrapper.lookup(name);\r\n\t}", "public ComponentReferenceModelConnection getComponent( String name, ICancellationMonitor monitor ){\n for( ModelConnection connection : getConnections() ){\n if( connection.getTags().contains( ASTModel.IMPLEMENTATION )){\n ModelNode implementation = getDeclarationResolver().resolve( connection, monitor.getProgressMonitor() );\n monitor.checkCancellation();\n if( implementation != null ){\n for( ModelConnection implementationConnection : implementation.getConnections() ){\n if( implementationConnection.getTags().contains( ASTModel.COMPONENTS )){\n ModelNode components = getDeclarationResolver().resolve( implementationConnection, monitor.getProgressMonitor() );\n monitor.checkCancellation();\n if( components != null ){\n for( ModelConnection component : components.getConnections() ){\n if( component instanceof ComponentReferenceModelConnection ){\n ComponentReferenceModelConnection ref = (ComponentReferenceModelConnection)component;\n if( name.equals( ref.getName() ))\n return ref;\n }\n }\n }\n }\n }\n }\n \n return null;\n }\n }\n return null;\n }", "public static Object getComponentInstance(String name, HttpServletRequest request) {\r\n\t\tServletContext sc = request.getSession().getServletContext();\r\n\t\tContainerWrapper containerWrapper = scf.findContainer(new ServletContextWrapper(sc));\r\n\t\tif (!containerWrapper.isStart()) {\r\n\t\t\tDebug.logError(\"JdonFramework not yet started, please try later \", module);\r\n\t\t\treturn null;\r\n\t\t}\r\n\t\treturn containerWrapper.lookup(name);\r\n\t}", "private MarketDataProvider getMarketDataProviderForName(String inProviderName)\n {\n populateProviderList();\n return activeProvidersByName.get(inProviderName);\n }", "public Component select( Object hint )\n throws ComponentException\n {\n final Component component = (Component)m_components.get( hint );\n\n if( null != component )\n {\n return component;\n }\n else\n {\n throw new ComponentException( hint.toString(), \"Unable to provide implementation.\" );\n }\n }", "java.lang.String getProvider();", "public IProvider lookupProvider(Class<? extends IProvider> providerType);", "public abstract ServiceLocator find(String name);", "public CurrencyXRateProvider findByName(String name) {\n\t\treturn (CurrencyXRateProvider) this\n\t\t\t\t.getEntityManager()\n\t\t\t\t.createNamedQuery(CurrencyXRateProvider.NQ_FIND_BY_NAME)\n\t\t\t\t.setParameter(\"clientId\",\n\t\t\t\t\t\tSession.user.get().getClient().getId())\n\t\t\t\t.setParameter(\"name\", name).getSingleResult();\n\t}", "@Override\n public AbstractProcess getComponent(String name)\n {\n return components.get(name);\n }", "String getComponentName();", "String getComponentName();", "@Override\n public Object getFieldByProvider(String provider, String key) {\n PeopleDataProvider[] dataProviders = (PeopleDataProvider[])getService().getResourceDataProviders();\n for(int i=0; i<dataProviders.length; i++) {\n PeopleDataProvider pd = dataProviders[i];\n if(StringUtil.equals(pd.getName(),provider)) {\n if(pd instanceof AbstractPeopleDataProvider) {\n Object value = ((AbstractPeopleDataProvider)pd).getValue(this, key);\n return value;\n }\n }\n }\n return null; \n }", "public List<Component> searchComponent(String name) {\n\t\treturn sessionFactory.getCurrentSession().createQuery(\"from Component c where c.name like '%\"+name+\"%'\")\n\t\t.setMaxResults(10)\n\t\t.list();\n\t}", "public Component getComponent(String path)\r\n {\r\n Class<? extends Component> componentClass = components.get(path);\r\n if (componentClass == null)\r\n {\r\n return null;\r\n }\r\n Constructor<?>[] constructors = componentClass.getConstructors();\r\n for (Constructor<?> constructor : constructors)\r\n {\r\n if ((constructor.getParameterTypes().length == 1) \r\n && (constructor.getParameterTypes()[0] == Component.class))\r\n {\r\n Component instance;\r\n try\r\n {\r\n instance = (Component) constructor.newInstance(new Object[] {null});\r\n } catch (InstantiationException | IllegalAccessException\r\n | IllegalArgumentException | InvocationTargetException e)\r\n {\r\n throw new RuntimeException(e);\r\n }\r\n postConstruct(instance);\r\n return instance;\r\n }\r\n }\r\n throw new IllegalStateException(\"Component of class \" + componentClass.getName() \r\n + \" has no constructor with a single Component parameter\");\r\n }", "public Component getComponent(Class type) {\n for (Component component : components) {\n if (component.getClass().equals(type)) {\n return component;\n }\n }\n return null;\n }", "private Composite seekLocalName(Composite composite, String name) {\n Optional<Composite> find = composite.find(childComposite -> {\n if (childComposite == null) {\n return false;\n }\n\n return childComposite.getName() != null && childComposite.getName().equals(name);\n }, FindMode.childrenOnly).stream().findFirst();\n\n if (find.isPresent()) {\n return find.get();\n } else {\n return null;\n }\n }", "public final CompositeType findCompositeType(String name)\n {\n\tfor(int i=0; i<allTypes.size(); i++) {\n\t if(allTypes.elementAt(i) instanceof CompositeType) {\n\t\tCompositeType ctype = (CompositeType) allTypes.elementAt(i);\n\t\tif(ctype.getName().equals(name)) {\n\t\t return ctype;\n\t\t}\n\t }\n\t}\n\treturn null;\n }", "public Optional<ComponentSymbol> getComponent() {\r\n if (!this.getEnclosingScope().getSpanningSymbol().isPresent()) {\r\n return Optional.empty();\r\n }\r\n if (!(this.getEnclosingScope().getSpanningSymbol().get() instanceof ComponentSymbol)) {\r\n return Optional.empty();\r\n }\r\n return Optional.of((ComponentSymbol) this.getEnclosingScope().getSpanningSymbol().get());\r\n }", "@Override\n\tpublic Course searchCourse(String course_name) {\n\t\tconn = DBUtils.connectToDb();\n\t\tString query = \"select * from course where course_name = ?;\";\n\t\tpst = DBUtils.getPreparedStatement(conn, query);\n\t\tCourse course = null;\n\t\ttry {\n\t\t\tpst.setString(1, course_name);\n\t\t\trs = pst.executeQuery();\n\t\t\tif (rs != null)\n\t\t\t\tif (rs.next()) {\n\t\t\t\t\tcourse = new Course();\n\t\t\t\t\tcourse.setCourse_id(rs.getInt(1));\n\t\t\t\t\tcourse.setCourse_name(rs.getString(2));\n\t\t\t\t\tcourse.setStart_date(rs.getString(3));\n\t\t\t\t\tcourse.setEnd_date(rs.getString(4));\n\t\t\t\t\tcourse.setCapacity(rs.getInt(5));\n\t\t\t\t}\n\t\t\tDBUtils.closeConnections();\n\t\t} catch (SQLException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\n\t\treturn course;\n\t}", "protected Object lookup(String roleName) throws ComponentException \n\t{\n\t\tif (container == null) {\n\t\t\tif (containerType.equals(CONTAINER_ECM)) \n\t\t\t{\n\t\t\t\tcontainer = new ECMContainer();\n\t\t\t} \n\t\t\telse \n\t\t\t{\n\t\t\t\tcontainer = new YAAFIContainer(logLevel);\n\t\t\t}\n\t\t\tcontainer.startup(getConfigurationFileName(), getRoleFileName(), getParameterFileName());\n\t\t}\n\t\treturn container.lookup(roleName);\n\t}", "public <T extends Component> T getComponent(Class<T> componentType);", "public IComponent getNamedStructure(String name) throws JiBXException {\n\n // check for named component defined at this level\n IComponent comp = null;\n if (m_namedStructureMap != null) {\n comp = (IComponent)m_namedStructureMap.get(name);\n }\n if (comp == null) {\n if (m_context == null) {\n throw new JiBXException(\"Referenced label \\\"\" + name +\n \"\\\" not defined\"); \n } else {\n comp = m_context.getNamedStructure(name);\n }\n }\n return comp;\n }", "public String getProviderClassName();", "<T extends Component> Optional<T> getComponent(Class<T> type);", "private GComponent getComponentAt(Point point)\n {\n // Create a reverse list iterator\n ListIterator<GComponent> it = this.components.listIterator(this.components.size());\n while (it.hasPrevious())\n {\n GComponent component = it.previous();\n \n // If this component is a the specified position, then return it\n if (component.getBounds().contains(point))\n return component;\n }\n \n // Nothing found, so return null\n return null;\n }", "public abstract UIComponent getFacet(String name);", "private ChangableProductContainer getChangableProductContainer(String name)\r\n {\r\n assert(true);\r\n \tChangableProductContainer foundContainer = null;\r\n for (ChangableProductContainer groupImLookingAt : groups)\r\n {\r\n if (groupImLookingAt.getName().equals(name))\r\n {\r\n foundContainer = groupImLookingAt;\r\n }\r\n }\r\n return foundContainer;\r\n }", "<T> T getComponent(Object key);", "public org.omg.CORBA.Object resolve(String name)\n {\n NameComponent nc = new NameComponent(name, \"Object\");\n NameComponent path[] = {nc};\n org.omg.CORBA.Object objRef = null;\n try\n {\n objRef = namingContext.resolve(path);\n }\n catch (Exception e)\n {\n fatalError(\"Cound not get object with name \\\"\" + name +\n \"\\\" from NameService\", e);\n }\n return objRef;\n }", "public CourseComponent find(Filter<CourseComponent> matcher) {\n if (matcher.apply(this))\n return this;\n if (!isContainer())\n return null;\n CourseComponent found = null;\n for (CourseComponent c : children) {\n found = c.find(matcher);\n if (found != null)\n return found;\n }\n return null;\n }", "public String getComponent() {\r\n\t\treturn component;\r\n\t}", "private <T> T getComponent(Class<T> clazz) {\n List<T> list = Context.getRegisteredComponents(clazz);\n if (list == null || list.size() == 0)\n throw new RuntimeException(\"Cannot find component of \" + clazz);\n return list.get(0);\n }", "public Object load(String compName) {\n\t\tif (this.preLoaded) {\n\t\t\treturn this.cachedOnes.get(compName);\n\t\t}\n\t\tString fileName = componentFolder + this.folder\n\t\t\t\t+ compName.replace(DELIMITER, FOLDER_CHAR) + EXTN;\n\t\tException exp = null;\n\t\tObject obj = null;\n\t\ttry {\n\t\t\tobj = this.cls.newInstance();\n\t\t\tif (XmlUtil.xmlToObject(fileName, obj) == false) {\n\t\t\t\t/*\n\t\t\t\t * load failed. obj is not valid any more.\n\t\t\t\t */\n\t\t\t\tobj = null;\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\texp = e;\n\t\t}\n\n\t\tif (exp != null) {\n\t\t\tTracer.trace(exp, \"error while loading component \" + compName);\n\t\t\treturn null;\n\t\t}\n\t\tif (obj == null) {\n\t\t\tTracer.trace(\"error while loading component \" + compName);\n\t\t\treturn null;\n\t\t}\n\t\t/*\n\t\t * we insist that components be stored with the right naming convention\n\t\t */\n\t\tComponent comp = (Component) obj;\n\t\tString fullName = comp.getQualifiedName();\n\n\t\tif (compName.equalsIgnoreCase(fullName) == false) {\n\t\t\tTracer.trace(\"Component has a qualified name of \" + fullName\n\t\t\t\t\t+ \" that is different from its storage name \" + compName);\n\t\t\treturn null;\n\t\t}\n\t\treturn comp;\n\t}", "public Course searchCourse(String courseName) {\n\t\tCourse result = null;\n\t\ttry{\n\t\t\tsendMessage(\"search\");\n\t\t\n\t\t\tsendMessage(courseName);\n\t\t\tresult = (Course)socketObjectIn.readObject();\n\t\t}catch (ClassNotFoundException e) {\n\t\t\tSystem.err.println(e.getStackTrace());\n\t\t}catch (IOException e) {\n\t\t\tSystem.err.println(e.getStackTrace());\n\t\t}\n\t\t\n\t\treturn result;\n\t}", "BaseComponent getComponentName();", "public String componentName(int index) {\n\treturn(comp[index]);\n }", "<T extends Component> Optional<T> getExactComponent(Class<T> type);", "@Implementation\n public SearchableInfo getSearchableInfo(ComponentName componentName) {\n return null;\n }", "public ProductContainer getProductContainer(String name);", "@GET\n\t@Path(\"/component/{componentName}\")\n\t@Produces( MediaType.APPLICATION_JSON )\n\tList<String> findPossibleParentInstances( @PathParam(\"name\") String applicationName, @PathParam(\"componentName\") String componentName );", "private ExportPkg pickProvider(ImportPkg ip) {\n if (Debug.packages) {\n Debug.println(\"pickProvider: for - \" + ip);\n }\n ExportPkg provider = null;\n for (Iterator i = ip.pkg.exporters.iterator(); i.hasNext(); ) {\n ExportPkg ep = (ExportPkg)i.next();\n tempBlackListChecks++;\n if (tempBlackList.contains(ep)) {\n tempBlackListHits++;\n continue;\n }\n if (!checkAttributes(ep, ip)) {\n if (Debug.packages) {\n Debug.println(\"pickProvider: attribute match failed for - \" + ep);\n }\n continue;\n }\n if (tempResolved.contains(ep.bpkgs.bundle)) {\n provider = ep;\n break;\n }\n if ((ep.bpkgs.bundle.state & BundleImpl.RESOLVED_FLAGS) != 0) {\n HashMap oldTempProvider = (HashMap)tempProvider.clone();\n if (checkUses(ep)) {\n provider = ep;\n break;\n } else {\n tempProvider = oldTempProvider;\n tempBlackList.add(ep);\n continue;\n }\n }\n if (ep.bpkgs.bundle.state == Bundle.INSTALLED && checkResolve(ep.bpkgs.bundle)) { \n provider = ep;\n break;\n }\n }\n if (Debug.packages) {\n if (provider != null) {\n Debug.println(\"pickProvider: \" + ip + \" - got provider - \" + provider);\n } else {\n Debug.println(\"pickProvider: \" + ip + \" - found no provider\");\n }\n }\n return provider;\n }", "Object getComponent(WebElement element);", "public ProcessProvider getComponent() {\n return component;\n }", "private static Provider findProviderFor(String receiver) {\n\t\tfor (Provider provider : providers) {\n\t\t\tif (provider.canSendTo(receiver)) {\n\t\t\t\treturn provider;\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t}", "public long checkComponent(String name) {\n\t\tif(sessionFactory.getCurrentSession().createQuery(\"from Component c where c.name = ?\").setParameter(0, name).list().size()>0){\n\t\t\treturn ((Component)(sessionFactory.getCurrentSession().createQuery(\"from Component c where c.name = ?\").setParameter(0, name).list().get(0))).getId();\n\t\t}\n\t\treturn -1;\n\t}", "public static RADComponent findEntityManager(FormModel model, String puName) {\n for (RADComponent metacomp : model.getAllComponents()) {\n if (\"javax.persistence.EntityManager\".equals(metacomp.getBeanClass().getName())) { // NOI18N\n try {\n FormProperty prop = (FormProperty)metacomp.getPropertyByName(\"persistenceUnit\"); // NOI18N\n Object name = prop.getRealValue();\n if (puName.equals(name)) {\n return metacomp;\n }\n } catch (Exception ex) {\n Logger.getLogger(J2EEUtils.class.getName()).log(Level.INFO, ex.getMessage(), ex);\n }\n }\n }\n return null;\n }", "public Product getProductWithName(String name) {\n for (Product s : products) {\n if (s.getName() == name) { return s;}\n }\n return null;\n }", "public String getComponent() {\n return this.component;\n }", "public abstract Map<String,List<Component>> getNamedComponents();", "public Course findCourseByName(String n) {\n for (int i = 0; i < numOfCourses; i++) {\n if (this.getCourse(i).getCourseNum().equals(n)) { //get the course number of the course at index i and then compare it with the specified string\n return this.getCourse(i);\n }\n }\n return null;\n }", "public Class<?> getComponentType();", "public static Component clickComponentProvider(ComponentProvider provider, int button, int x,\n\t\t\tint y, int clickCount, int modifiers, boolean popupTrigger) {\n\n\t\tJComponent component = provider.getComponent();\n\t\tfinal Component clickComponent = SwingUtilities.getDeepestComponentAt(component, x, y);\n\t\tclickMouse(clickComponent, MouseEvent.BUTTON1, x, y, clickCount, modifiers, popupTrigger);\n\t\treturn clickComponent;\n\t}", "@Override\n public <T extends ParsedComponent> Optional<T> find(String exactName, Class<T> clazz) {\n\n if (exactName.equals(name) && clazz.equals(this.getClass())) {\n //noinspection unchecked\n return Optional.of((T) this);\n }\n\n return findInChildren(exactName, clazz);\n }", "public static Object lookupBean(String name) {\n BeanManager manager = lookupBeanManager();\n Set<Bean<?>> beans = manager.getBeans(name);\n if (beans != null && !beans.isEmpty()) {\n Bean<?> bean = beans.iterator().next();\n CreationalContext<?> context = manager.createCreationalContext(bean);\n return manager.getReference(bean, Object.class, context);\n }\n return null;\n }", "protected Object resolve(String roleName) throws ComponentException \n\t{\n\t\treturn lookup(roleName);\n\t}", "public SearchableInfo getSearchableInfo(ComponentName componentName) {\n try {\n return mService.getSearchableInfo(componentName);\n } catch (RemoteException ex) {\n throw ex.rethrowFromSystemServer();\n }\n }", "public Component getComponent(int componentId) {\r\n if (opened != null && opened.getId() == componentId) {\r\n return opened;\r\n }\r\n if (chatbox != null && chatbox.getId() == componentId) {\r\n return chatbox;\r\n }\r\n if (singleTab != null && singleTab.getId() == componentId) {\r\n return singleTab;\r\n }\r\n if (overlay != null && overlay.getId() == componentId) {\r\n return overlay;\r\n }\r\n for (Component c : tabs) {\r\n if (c != null && c.getId() == componentId) {\r\n return c;\r\n }\r\n }\r\n return null;\r\n }", "public static Provider provider() {\n try {\n Object provider = getProviderUsingServiceLoader();\n if (provider == null) {\n provider = FactoryFinder.find(JAXWSPROVIDER_PROPERTY, DEFAULT_JAXWSPROVIDER);\n }\n if (!(provider instanceof Provider)) {\n Class pClass = Provider.class;\n String classnameAsResource = pClass.getName().replace('.', '/') + \".class\";\n ClassLoader loader = pClass.getClassLoader();\n if (loader == null) {\n loader = ClassLoader.getSystemClassLoader();\n }\n URL targetTypeURL = loader.getResource(classnameAsResource);\n throw new LinkageError(\"ClassCastException: attempting to cast\" + provider.getClass()\n .getClassLoader().getResource(classnameAsResource) + \"to\" + targetTypeURL.toString());\n }\n return (Provider) provider;\n } catch (WebServiceException ex) {\n throw ex;\n } catch (Exception ex) {\n throw new WebServiceException(\"Unable to createEndpointReference Provider\", ex);\n }\n }", "@Override\n public abstract String getComponentType();", "public Object findBean(String beanName) {\n\t\tFacesContext context = FacesContext.getCurrentInstance();\n\t\treturn context.getApplication().evaluateExpressionGet(context, \"#{\" + beanName + \"}\", Object.class);\n\t}", "protected String getComponentName() {\n return (component == null) ? \"*No Name*\" : component.toString();\n }", "public Component getOrCreateComponent(String componentName, Callable<Component> factory) {\n synchronized (components) {\n Component component = components.get(componentName);\n if (component == null) {\n try {\n component = factory.call();\n if (component == null) {\n throw new RuntimeCamelException(\"Factory failed to create the \" + componentName\n + \" component, it returned null.\");\n }\n components.put(componentName, component);\n component.setCamelContext(this);\n } catch (Exception e) {\n throw new RuntimeCamelException(\"Factory failed to create the \" + componentName\n + \" component\", e);\n }\n }\n return component;\n }\n }", "public <S> ComponentInstance<S> getComponentInstance();", "public Product getProductFromName(String prodName) throws BackendException;", "@GET\n\t@Path( \"/components\" )\n\t@Produces( MediaType.APPLICATION_JSON )\n\tList<Component> listComponents( @PathParam(\"name\") String applicationName );", "public Part lookupPart(String partName) {\n for(Part part : allParts) {\n if(part.getName().equals(partName)) {\n return part;\n }\n }\n \n return null;\n }", "public ComponentResult getSubcomponentResult(String targetName)\n\t{\n\t\tfor(ComponentResult subcomponentResult: subcomponentResultList)\n\t\t{\n\t\t\tif(subcomponentResult.getName() == targetName)\n\t\t\t{\n\t\t\t\treturn subcomponentResult;\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn null;\n\t}", "String getProviderString();", "<T> T resolve(String name, Class<T> type);", "public String getComponentName() {\n\t\treturn componentName;\n\t}", "public CourseRegInstance getInstance(String name) throws IOException;", "private TreeObject find(String name, int type) {\n\t return widgetRoots[type - 1].find(name);\n\t}", "@Override\n\tpublic ILiteComponent getBestMatch() {\n\t\tILiteComponent bestComponent = null;\n\t\t//EEvaluationResult bestResult = EEvaluationResult.MISSING;\n\t\tfor(Entry<ILiteComponent, ILiteDependencyItem> e : fComponentEntries.entrySet()) {\n\t\t\tILiteComponent c = e.getKey();\n\t\t\tEEvaluationResult r = e.getValue().getEvaluationResult();\n\t\t\tif(r == EEvaluationResult.FULFILLED) {\n\t\t\t\treturn c;\n\t\t\t} else if(r == EEvaluationResult.SELECTABLE) {\n\t\t\t\tif(bestComponent == null)\n\t\t\t\t\tbestComponent = c;\n\t\t\t\telse\n\t\t\t\t\treturn null;\n\t\t\t}\n\t\t}\n\t\treturn bestComponent;\n\t}", "@HTTP(\n method = \"GET\",\n path = \"/apis/dapr.io/v1alpha1/namespaces/{namespace}/components/{name}\"\n )\n @Headers({ \n \"Accept: */*\"\n })\n KubernetesCall<Component> readNamespacedComponent(\n @Path(\"name\") String name,\n @Path(\"namespace\") String namespace);", "private boolean findClassInComponents(String name) {\n // we need to search the components of the path to see if we can find the\n // class we want.\n final String classname = name.replace('.', '/') + \".class\";\n final String[] list = classpath.list();\n boolean found = false;\n int i = 0;\n while (i < list.length && found == false) {\n final File pathComponent = (File)project.resolveFile(list[i]);\n found = this.contains(pathComponent, classname);\n i++;\n }\n return found;\n }", "Class<?> getComponentType();", "public abstract SmartObject findIndividualName(String individualName);", "Component duplicateComponentFound(Component component, String name, String type, String description, String technology);", "public QName getComponentName() {\n return _componentName;\n }", "@VisibleForTesting\n ComponentName getComponentName() {\n return mComponentName;\n }", "Object find(String name);", "public Component getComponent() {\n if (getUserObject() instanceof Component)\n return (Component)getUserObject();\n return null;\n }", "Component getComponent() {\n/* 224 */ return this.component;\n/* */ }", "@Override\r\n\tpublic Provider findProvider(Long providerId) {\n\t\treturn providerRepository.findOne(providerId);\r\n\t}", "@ProviderType\npublic interface ComponentContext {\n\t/**\n\t * Returns the component properties for this Component Context.\n\t * \n\t * @return The properties for this Component Context. The Dictionary is read\n\t * only and cannot be modified.\n\t */\n\tpublic Dictionary<String, Object> getProperties();\n\n\t/**\n\t * Returns the service object for the specified reference name.\n\t * <p>\n\t * If the cardinality of the reference is {@code 0..n} or {@code 1..n} and\n\t * multiple services are bound to the reference, the service whose\n\t * {@code ServiceReference} is first in the ranking order is returned. See\n\t * {@code ServiceReference.compareTo(Object)}.\n\t * \n\t * @param name The name of a reference as specified in a {@code reference}\n\t * element in this component's description.\n\t * @return A service object for the referenced service or {@code null} if\n\t * the reference cardinality is {@code 0..1} or {@code 0..n} and no\n\t * bound service is available.\n\t * @throws ComponentException If Service Component Runtime catches an\n\t * exception while activating the bound service.\n\t */\n\tpublic <S> S locateService(String name);\n\n\t/**\n\t * Returns the service object for the specified reference name and\n\t * {@code ServiceReference}.\n\t * \n\t * @param <S> Type of Service.\n\t * @param name The name of a reference as specified in a {@code reference}\n\t * element in this component's description.\n\t * @param reference The {@code ServiceReference} to a bound service. This\n\t * must be a {@code ServiceReference} provided to the component via\n\t * the bind or unbind method for the specified reference name.\n\t * @return A service object for the referenced service or {@code null} if\n\t * the specified {@code ServiceReference} is not a bound service for\n\t * the specified reference name.\n\t * @throws ComponentException If Service Component Runtime catches an\n\t * exception while activating the bound service.\n\t */\n\tpublic <S> S locateService(String name, ServiceReference<S> reference);\n\n\t/**\n\t * Returns the service objects for the specified reference name.\n\t * \n\t * @param name The name of a reference as specified in a {@code reference}\n\t * element in this component's description.\n\t * @return An array of service objects for the referenced service or\n\t * {@code null} if the reference cardinality is {@code 0..1} or\n\t * {@code 0..n} and no bound service is available. If the reference\n\t * cardinality is {@code 0..1} or {@code 1..1} and a bound service\n\t * is available, the array will have exactly one element. There is\n\t * no guarantee that the service objects in the array will be in any\n\t * specific order.\n\t * @throws ComponentException If Service Component Runtime catches an\n\t * exception while activating a bound service.\n\t */\n\tpublic Object[] locateServices(String name);\n\n\t/**\n\t * Returns the {@code BundleContext} of the bundle which declares this\n\t * component.\n\t * \n\t * @return The {@code BundleContext} of the bundle declares this component.\n\t */\n\tpublic BundleContext getBundleContext();\n\n\t/**\n\t * If the component instance is registered as a service using the\n\t * {@code servicescope=\"bundle\"} or {@code servicescope=\"prototype\"}\n\t * attribute, then this method returns the bundle using the service provided\n\t * by the component instance.\n\t * <p>\n\t * This method will return {@code null} if:\n\t * <ul>\n\t * <li>The component instance is not a service, then no bundle can be using\n\t * it as a service.</li>\n\t * <li>The component instance is a service but did not specify the\n\t * {@code servicescope=\"bundle\"} or {@code servicescope=\"prototype\"}\n\t * attribute, then all bundles using the service provided by the component\n\t * instance will share the same component instance.</li>\n\t * <li>The service provided by the component instance is not currently being\n\t * used by any bundle.</li>\n\t * </ul>\n\t * \n\t * @return The bundle using the component instance as a service or\n\t * {@code null}.\n\t */\n\tpublic Bundle getUsingBundle();\n\n\t/**\n\t * Returns the Component Instance object for the component instance\n\t * associated with this Component Context.\n\t * \n\t * @return The Component Instance object for the component instance.\n\t */\n\tpublic <S> ComponentInstance<S> getComponentInstance();\n\n\t/**\n\t * Enables the specified component name. The specified component name must\n\t * be in the same bundle as this component.\n\t * \n\t * <p>\n\t * This method must return after changing the enabled state of the specified\n\t * component name. Any actions that result from this, such as activating or\n\t * deactivating a component configuration, must occur asynchronously to this\n\t * method call.\n\t * \n\t * @param name The name of a component or {@code null} to indicate all\n\t * components in the bundle.\n\t */\n\tpublic void enableComponent(String name);\n\n\t/**\n\t * Disables the specified component name. The specified component name must\n\t * be in the same bundle as this component.\n\t * \n\t * <p>\n\t * This method must return after changing the enabled state of the specified\n\t * component name. Any actions that result from this, such as activating or\n\t * deactivating a component configuration, must occur asynchronously to this\n\t * method call.\n\t * \n\t * @param name The name of a component.\n\t */\n\tpublic void disableComponent(String name);\n\n\t/**\n\t * If the component instance is registered as a service using the\n\t * {@code service} element, then this method returns the service reference\n\t * of the service provided by this component instance.\n\t * <p>\n\t * This method will return {@code null} if the component instance is not\n\t * registered as a service.\n\t * \n\t * @return The {@code ServiceReference} object for the component instance or\n\t * {@code null} if the component instance is not registered as a\n\t * service.\n\t */\n\tpublic ServiceReference<?> getServiceReference();\n}", "private JPanel getPanelForList(){\n String listName = ((JComboBox)header.getComponent(1)).getSelectedItem().toString();\n for(Component c:window.getComponents()){\n if(c.getName().equals(listName)){\n return (JPanel)c;\n }\n }\n return null;\n }", "String componentTypeName();", "public ImageComponent fetchImageComponent(String filename)\n throws IOException\n {\n ImageComponent ret_val = (ImageComponent)componentMap.get(filename);\n \n if(ret_val == null)\n {\n ret_val = load2DImage(filename);\n componentMap.put(filename, ret_val);\n }\n \n return ret_val;\n }", "@Override\n\tpublic Campus fetchByname(String name, boolean retrieveFromCache) {\n\t\tObject[] finderArgs = new Object[] { name };\n\n\t\tObject result = null;\n\n\t\tif (retrieveFromCache) {\n\t\t\tresult = finderCache.getResult(FINDER_PATH_FETCH_BY_NAME,\n\t\t\t\t\tfinderArgs, this);\n\t\t}\n\n\t\tif (result instanceof Campus) {\n\t\t\tCampus campus = (Campus)result;\n\n\t\t\tif (!Objects.equals(name, campus.getName())) {\n\t\t\t\tresult = null;\n\t\t\t}\n\t\t}\n\n\t\tif (result == null) {\n\t\t\tStringBundler query = new StringBundler(3);\n\n\t\t\tquery.append(_SQL_SELECT_CAMPUS_WHERE);\n\n\t\t\tboolean bindName = false;\n\n\t\t\tif (name == null) {\n\t\t\t\tquery.append(_FINDER_COLUMN_NAME_NAME_1);\n\t\t\t}\n\t\t\telse if (name.equals(StringPool.BLANK)) {\n\t\t\t\tquery.append(_FINDER_COLUMN_NAME_NAME_3);\n\t\t\t}\n\t\t\telse {\n\t\t\t\tbindName = true;\n\n\t\t\t\tquery.append(_FINDER_COLUMN_NAME_NAME_2);\n\t\t\t}\n\n\t\t\tString sql = query.toString();\n\n\t\t\tSession session = null;\n\n\t\t\ttry {\n\t\t\t\tsession = openSession();\n\n\t\t\t\tQuery q = session.createQuery(sql);\n\n\t\t\t\tQueryPos qPos = QueryPos.getInstance(q);\n\n\t\t\t\tif (bindName) {\n\t\t\t\t\tqPos.add(name);\n\t\t\t\t}\n\n\t\t\t\tList<Campus> list = q.list();\n\n\t\t\t\tif (list.isEmpty()) {\n\t\t\t\t\tfinderCache.putResult(FINDER_PATH_FETCH_BY_NAME,\n\t\t\t\t\t\tfinderArgs, list);\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tif ((list.size() > 1) && _log.isWarnEnabled()) {\n\t\t\t\t\t\t_log.warn(\n\t\t\t\t\t\t\t\"CampusPersistenceImpl.fetchByname(String, boolean) with parameters (\" +\n\t\t\t\t\t\t\tStringUtil.merge(finderArgs) +\n\t\t\t\t\t\t\t\") yields a result set with more than 1 result. This violates the logical unique restriction. There is no order guarantee on which result is returned by this finder.\");\n\t\t\t\t\t}\n\n\t\t\t\t\tCampus campus = list.get(0);\n\n\t\t\t\t\tresult = campus;\n\n\t\t\t\t\tcacheResult(campus);\n\n\t\t\t\t\tif ((campus.getName() == null) ||\n\t\t\t\t\t\t\t!campus.getName().equals(name)) {\n\t\t\t\t\t\tfinderCache.putResult(FINDER_PATH_FETCH_BY_NAME,\n\t\t\t\t\t\t\tfinderArgs, campus);\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\tfinderCache.removeResult(FINDER_PATH_FETCH_BY_NAME, finderArgs);\n\n\t\t\t\tthrow processException(e);\n\t\t\t}\n\t\t\tfinally {\n\t\t\t\tcloseSession(session);\n\t\t\t}\n\t\t}\n\n\t\tif (result instanceof List<?>) {\n\t\t\treturn null;\n\t\t}\n\t\telse {\n\t\t\treturn (Campus)result;\n\t\t}\n\t}" ]
[ "0.6827663", "0.649735", "0.63537526", "0.6240117", "0.6027556", "0.5883563", "0.5882219", "0.58273286", "0.5786872", "0.5771183", "0.559719", "0.5595729", "0.5577144", "0.55730253", "0.55699545", "0.5564257", "0.554818", "0.5542023", "0.5533197", "0.55321467", "0.5501902", "0.5501902", "0.54719895", "0.53848064", "0.53731835", "0.52848876", "0.528179", "0.5278411", "0.5235601", "0.52243", "0.52185464", "0.5212061", "0.5207711", "0.5207033", "0.52023464", "0.519496", "0.5188389", "0.5167639", "0.5166256", "0.51653105", "0.51551056", "0.5108204", "0.5107721", "0.51004803", "0.50987417", "0.50854725", "0.5085157", "0.504898", "0.5036636", "0.50355566", "0.5024822", "0.5011913", "0.49992093", "0.49955562", "0.49914843", "0.4989444", "0.49879006", "0.49820662", "0.49696407", "0.49648118", "0.49598032", "0.4947843", "0.4936964", "0.4932719", "0.4928295", "0.49267516", "0.4924757", "0.4922426", "0.49101964", "0.48696652", "0.4866935", "0.48558727", "0.48493108", "0.48233268", "0.48170134", "0.48142123", "0.48130614", "0.479796", "0.47933355", "0.47855124", "0.4784437", "0.47782654", "0.47759187", "0.47758412", "0.4769811", "0.47655678", "0.47590423", "0.4751412", "0.4746705", "0.47443885", "0.47436887", "0.47386175", "0.4708205", "0.47056752", "0.4704576", "0.47036567", "0.4703167", "0.46981978", "0.46932766", "0.46887854" ]
0.72383827
0
Simulates a user typing a single key. This method should used for the special keyboard keys (ARROW, F1, END, etc) and alpha keys when associated with actions.
public static void triggerActionKey(Component c, int modifiers, int keyCode) { triggerKey(c, modifiers, keyCode, KeyEvent.CHAR_UNDEFINED); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void keyTyped (KeyEvent e){\n switch (e.getKeyChar()){\n case '1':\n one.doClick(); break;\n case '2':\n two.doClick(); break;\n case '3':\n three.doClick(); break;\n case '4':\n four.doClick(); break;\n case '5':\n five.doClick(); break;\n case '6':\n six.doClick(); break;\n case '7':\n seven.doClick(); break;\n case '8':\n eight.doClick(); break;\n case '9':\n nine.doClick(); break;\n case '0':\n zero.doClick(); break;\n case 'c':\n case 'C':\n case KeyEvent.VK_ESCAPE:\n clear.doClick(); break;\n case '+':\n add.doClick(); break;\n case '-':\n subtract.doClick(); break;\n case '*':\n multiply.doClick(); break;\n case '/':\n divide.doClick(); break;\n case '=':\n equals.doClick(); break;\n }\n }", "void keyPress(int key);", "@Override\r\n\tpublic void keyTyped(KeyEvent key) {\r\n\t\t/** Gets the typed character. If it's not typed on the text field, \r\n\t\t * this method will not be invoked. */\r\n\t\tchar typedKey = key.getKeyChar();\r\n\t\tkeyLabel.setText(\"You pressed \" + typedKey + \". \");\r\n\t}", "protected void keyTyped(char par1, int par2) {}", "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 }", "default void interactWith(Key key) {\n\t}", "@Override\n\tpublic void keyTyped(char p_73869_1_, int p_73869_2_) {\n\t\tfield_154330_a.keyPressed(p_73869_1_, p_73869_2_);\n\t}", "public abstract void keycommand(long ms);", "public abstract void keyPressed(int key);", "public void keyTyped(KeyEvent e) {\n // System.out.println(\"typed\");\n }", "protected void keyTyped(char typedChar, int keyCode) throws IOException {}", "public abstract void keyPressed(int k);", "public boolean keyInput(int code, int action);", "void keyPressed(String code);", "public void keyPressed(KeyEvent e){\n atomas.keyboardTyped(e.getKeyCode());\n }", "void keyPressed(int keycode);", "public void keyTyped(KeyEvent e) {}", "public void keyTyped(KeyEvent arg0) {\n\n }", "public void keyTyped(KeyEvent arg0) {\n\t\t\t\t\n\t\t\t}", "public void keyTyped(KeyEvent arg0) {\n\t\t\t\t\n\t\t\t}", "public void keyTyped(KeyEvent arg0) {\n\t\t\t\t\n\t\t\t}", "public void keyTyped(KeyEvent arg0) {\n\t\t\t\t\n\t\t\t}", "@Override\n public void keyTyped(KeyEvent key) {\n gsm.keyTyped(key.getKeyCode());\n }", "public void keyTyped(KeyEvent e){}", "public void keyTyped(KeyEvent arg0) {\n\t\n}", "void correctKeyPress();", "public void keyTyped( KeyEvent event )\n {}", "protected void keyTyped(char par1, int par2)\n {\n if (par2 == 15)\n {\n completePlayerName();\n }\n else\n {\n field_50060_d = false;\n }\n\n if (par2 == 1)\n {\n mc.displayGuiScreen(null);\n }\n else if (par2 == 28)\n {\n String s = field_50064_a.getText().trim();\n\n if (s.length() > 0 && !mc.lineIsCommand(s))\n {\n mc.thePlayer.sendChatMessage(s);\n }\n\n mc.displayGuiScreen(null);\n }\n else if (par2 == 200)\n {\n func_50058_a(-1);\n }\n else if (par2 == 208)\n {\n func_50058_a(1);\n }\n else if (par2 == 201)\n {\n mc.ingameGUI.func_50011_a(19);\n }\n else if (par2 == 209)\n {\n mc.ingameGUI.func_50011_a(-19);\n }\n else\n {\n field_50064_a.func_50037_a(par1, par2);\n }\n }", "public void keyTyped(KeyEvent e) { }", "public void keyTyped(KeyEvent e) { }", "public void keyTyped(KeyEvent arg0) {\r\n\r\n\t}", "void keyPressed(int keyCode);", "public void hitKey() {\n }", "public void keyTyped(KeyEvent arg0) {\n\t}", "public void keyTyped (KeyEvent e) { }", "@Override\n public void keyboardAction( KeyEvent ke )\n {\n \n }", "protected void keyHit(int keyCode) {\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 }", "public void keyTyped(KeyEvent e)\n {\n \n }", "public void keyTyped(KeyEvent e) {\r\n \r\n }", "public void keyTyped(KeyEvent arg0)\n\t{\n\t}", "public void keyTyped (KeyEvent arg0) {\n\t}", "public void interactWithKeyboard() {\n renderMenu();\n Interaction interact = null;\n // open from the menu\n boolean wait = true;\n while (wait) {\n if (!StdDraw.hasNextKeyTyped()) {\n continue;\n }\n String c = (\"\" + StdDraw.nextKeyTyped()).toUpperCase();\n System.out.println(c);\n switch (c) {\n case \"N\":\n // get the seed\n renderTypeString();\n long seed = getSeed();\n TETile[][] WorldFrame = null;\n WorldFrame = WorldGenerator.generate(seed, WorldFrame, WIDTH, HEIGHT);\n interact = new Interaction(WorldFrame, seed);\n wait = false;\n break;\n case \"L\":\n interact = loadInteraction();\n wait = false;\n break;\n case \"Q\":\n System.exit(0);\n break;\n default:\n System.exit(0);\n break;\n }\n }\n // start to play\n interact.initialize();\n char preKey = ',';\n while (true) {\n if (StdDraw.hasNextKeyTyped()) {\n char key = StdDraw.nextKeyTyped();\n // if a user enter ':' then 'Q', then save and exit the game\n if ((\"\" + preKey + key).toUpperCase().equals(\":Q\")) {\n saveInteraction(interact);\n System.exit(0);\n }\n // in case the player enter something else\n if (\"WSAD\".contains((\"\" + key).toUpperCase())) {\n interact.move((\"\" + key).toUpperCase());\n }\n preKey = key;\n }\n interact.show();\n }\n }", "public void keyTyped(KeyEvent e) {\r\n\t\t// user code begin {1}\r\n\t\tswitch (e.getKeyChar()) {\r\n\t\tcase KeyEvent.VK_ENTER:\r\n\t\t\tbreak;\r\n\t\tcase KeyEvent.VK_BACK_SPACE:\r\n\t\t\tbreak;\r\n\t\tcase KeyEvent.VK_TAB:\r\n\t\t\tbreak;\r\n\t\tcase KeyEvent.VK_SHIFT:\r\n\t\t\tbreak;\r\n\t\tcase KeyEvent.VK_CONTROL:\r\n\t\t\tbreak;\r\n\t\tcase KeyEvent.VK_ALT:\r\n\t\t\tbreak;\r\n\t\tcase KeyEvent.VK_CAPS_LOCK:\r\n\t\t\tbreak;\r\n\t\tcase KeyEvent.VK_END:\r\n\t\t\tbreak;\r\n\t\tcase KeyEvent.VK_HOME:\r\n\t\t\tbreak;\r\n\t\tcase KeyEvent.VK_LEFT:\r\n\t\t\tbreak;\r\n\t\tcase KeyEvent.VK_UP:\r\n\t\t\tbreak;\r\n\t\tcase KeyEvent.VK_RIGHT:\r\n\t\t\tbreak;\r\n\t\tcase KeyEvent.VK_DOWN:\r\n\t\t\tbreak;\r\n\t\tcase KeyEvent.VK_DELETE:\r\n\t\t\tbreak;\r\n\t\tcase KeyEvent.VK_NUM_LOCK:\r\n\t\t\tbreak;\r\n\t\tdefault:\r\n\t\t\tif (getAllowedKey() == TextFieldExt.AllowedKey.AK_ALFANUMERICOS) {\r\n\t\t\t\tif (getMaxLength() == 0) {\r\n\t\t\t\t\tvalidaKeyMask(e);\r\n\t\t\t\t} else {\r\n\t\t\t\t\tif (getJTextField().getSelectedText() != null || getJTextField().getText().length() < getMaxLength()) {\r\n\t\t\t\t\t\tvalidaKeyMask(e);\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\te.setKeyChar('\\0');\r\n\t\t\t\t\t\te.setKeyCode(0);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\tvalidaAllowedKey(e);\r\n\t\t\t\tif (getMaxLength() == 0) {\r\n\t\t\t\t\te.setKeyChar('\\0');\r\n\t\t\t\t\te.setKeyCode(0);\r\n\t\t\t\t} else {\r\n\t\t\t\t\tif (getJTextField().getSelectedText() != null || getJTextField().getText().length() < getMaxLength()) {\r\n\t\t\t\t\t\tvalidaKeyMask(e);\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\te.setKeyChar('\\0');\r\n\t\t\t\t\t\te.setKeyCode(0);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tbreak;\r\n\t\t}\r\n\t\trestorePainter();\r\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 void keyTyped(KeyEvent e) \r\n {\r\n \t\r\n }", "public void keyTyped(KeyEvent e) {\n \n }", "public void keyTyped(KeyEvent e) {\n \n }", "public void keyTyped(KeyEvent e) {\n \n }", "public void keyPressed() { \n\t\twantsFrameBreak = true;\n\t\t//key = e.getKeyChar();\n\t\tkeyPressed = true;\n\t\tif (System.nanoTime() - acted > .033e9f) {\n\t\t\t_keyPressed();\n\t\t}\n\t}", "@Override\n\tpublic void keyTyped(final KeyEvent arg0) {\n\t\t\n\t}", "@Override\n\t\tpublic void keyTyped(KeyEvent arg0) {\n\t\t\t\n\t\t}", "@Override\n\t\tpublic void keyTyped(KeyEvent arg0) {\n\t\t\t\n\t\t}", "@Override\n\t\tpublic void keyTyped(KeyEvent arg0) {\n\t\t\t\n\t\t}", "public void keyTyped(KeyEvent e) {\n\r\n }", "@Override\n \t\t\tpublic void keyTyped(KeyEvent arg0) {\n \t\t\t\t\n \t\t\t}", "public void keyPressed(KeyEvent arg0) {\n\t\t\t\t\n\t\t\t}", "public void keyPressed(KeyEvent arg0) {\n\t\t\t\t\n\t\t\t}", "public void keyPressed(KeyEvent arg0) {\n\t\t\t\t\n\t\t\t}", "public void keyPressed(KeyEvent arg0) {\n\t\t\t\t\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 }", "public native void onKeyDown( KeyEvent event, long time, int keyCode, int metaState, int unicodeChar, int repeatCount );", "public void keyTyped(KeyEvent e)\n {\n }", "char getKeyPressChar();", "@Override\n\tpublic void keyTyped(KeyEvent arg0) {\n\t\tswitch(arg0.getExtendedKeyCode()){\n\t\t\tcase KeyEvent.VK_KP_DOWN:\n\t\t\t\tlast = new AgentAction(Maze.SOUTH);\n\t\t\t\tbreak;\n\t\t\tcase KeyEvent.VK_KP_UP:\n\t\t\t\tlast = new AgentAction(Maze.NORTH);\n\t\t\t\tbreak;\n\t\t\tcase KeyEvent.VK_KP_LEFT:\n\t\t\t\tlast = new AgentAction(Maze.WEST);\n\t\t\t\tbreak;\n\t\t\tcase KeyEvent.VK_KP_RIGHT:\n\t\t\t\tlast = new AgentAction(Maze.EAST);\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tbreak;\t\t\t\n\t\t}\t\t\n\t}", "@Override\n public boolean keyTyped(char arg0) {\n return false;\n }", "@Override\r\n\tpublic void keyPressed(KeyEvent key) {\r\n\t\t// Invoke method if the key is pressed. \r\n\t\t// Do nothing, not all three methods need to be used. \r\n\t}", "@Override\r\n\tpublic void keyTyped(KeyEvent arg0) {\n\t\t\r\n\t}", "@Override\r\n\tpublic void keyTyped(KeyEvent arg0) {\n\t\t\r\n\t}", "@Override\r\n\tpublic void keyTyped(KeyEvent arg0) {\n\t\t\r\n\t}", "@Override\r\n\tpublic void keyTyped(KeyEvent arg0) {\n\t\t\r\n\t}", "@Override\r\n\tpublic void keyTyped(KeyEvent arg0) {\n\t\t\r\n\t}", "@Override\r\n\tpublic void keyTyped(KeyEvent arg0) {\n\t\t\r\n\t}", "@Override\r\n\tpublic void keyTyped(KeyEvent arg0) {\n\t\t\r\n\t}", "@Override\r\n\tpublic void keyTyped(KeyEvent arg0) {\n\t\t\r\n\t}", "@Override\r\n\tpublic void keyTyped(KeyEvent arg0) {\n\t\t\r\n\t}", "@Override\r\n\tpublic void keyTyped(KeyEvent arg0) {\n\t\t\r\n\t}", "public void keyPressed(KeyEvent e) {}", "public interface KeyboardDriver {\n\n void type(char key);\n\n}", "public void keyPressed( KeyEvent e ) { }", "@Override\r\n\t\t\tpublic void keyTyped(KeyEvent arg0)\r\n\t\t\t{\n\t\t\t\t\r\n\t\t\t}", "@Override\n\t\t\tpublic void keyTyped(KeyEvent arg0) {\n\t\t\t\t\n\t\t\t}", "@Override\n\t\t\tpublic void keyTyped(KeyEvent arg0) {\n\t\t\t\t\n\t\t\t}", "@Override\n\t\t\tpublic void keyTyped(KeyEvent arg0) {\n\t\t\t\t\n\t\t\t}", "@Override\n\t\t\tpublic void keyTyped(KeyEvent arg0) {\n\t\t\t\t\n\t\t\t}", "@Override\n\t\t\tpublic void keyTyped(KeyEvent arg0) {\n\t\t\t\t\n\t\t\t}", "@Override\n\t\t\tpublic void keyTyped(KeyEvent arg0) {\n\t\t\t\t\n\t\t\t}", "@Override\r\n\t\t\tpublic void keyTyped(KeyEvent arg0) {\n\t\t\t\t\r\n\t\t\t}", "public abstract void keyTyped(KeyTypedEvent keyTypedEvent);", "protected void keyTyped(char typedChar, int keyCode) throws IOException\r\n\t{\r\n\t}", "public void keyTyped(KeyEvent e) \r\n\t{\n\t}", "public void keyTyped(KeyEvent e) {\n\t\t\t\t\n\t\t\t}", "public void keyTyped(KeyEvent e) {\n\t\t\t\t\n\t\t\t}", "public void keyTyped(KeyEvent e) {\n\t\t\t\t\n\t\t\t}", "public void keyTyped(KeyEvent e) {\n\t\t\t\t\n\t\t\t}", "public void keyTyped(KeyEvent e)\n {\n \t//System.out.println(\"Key Typed!\");\n }", "public abstract void keyboardInput();", "@Override\n\t\t\t\tpublic void keyTyped(KeyEvent arg0)\n\t\t\t\t{\n\t\t\t\t\t\n\t\t\t\t}", "@Override\n\tpublic void keyTyped(KeyEvent arg0) {\n\t\tSystem.out.println(\"keyTyped\");\n\t}", "@Override\r\n public void keyTyped(KeyEvent ke) {\r\n }", "@Override\n\t\tpublic void keyPressed(KeyEvent arg0) {\n\t\t\t\n\t\t}" ]
[ "0.7074093", "0.7000244", "0.69791263", "0.6918998", "0.69171584", "0.69168144", "0.6886256", "0.68469894", "0.680367", "0.67568994", "0.6727472", "0.6727434", "0.67178035", "0.6702769", "0.6694923", "0.66917646", "0.6686181", "0.6682441", "0.6679945", "0.6679945", "0.6679945", "0.6679945", "0.6659157", "0.66480947", "0.66461027", "0.66434634", "0.66280645", "0.6624825", "0.6611434", "0.6611434", "0.6600698", "0.6600219", "0.6583213", "0.65765035", "0.6565062", "0.6563114", "0.6559631", "0.6556116", "0.65396535", "0.6535246", "0.6525865", "0.6508141", "0.64936185", "0.64846706", "0.6476221", "0.64728475", "0.6469918", "0.6469918", "0.6469918", "0.6450283", "0.64499265", "0.64495695", "0.64495695", "0.64495695", "0.6434982", "0.64219326", "0.6421082", "0.6421082", "0.6421082", "0.6421082", "0.64046395", "0.6402778", "0.64007485", "0.63880324", "0.6383071", "0.6381959", "0.6378284", "0.63666505", "0.63666505", "0.63666505", "0.63666505", "0.63666505", "0.63666505", "0.63666505", "0.63666505", "0.63666505", "0.63666505", "0.636606", "0.63653433", "0.6360812", "0.63587075", "0.6358468", "0.6358468", "0.6358468", "0.6358468", "0.6358468", "0.6358468", "0.6357107", "0.63547707", "0.6351033", "0.6349069", "0.63435906", "0.63435906", "0.63435906", "0.63435906", "0.6343585", "0.6340362", "0.6339604", "0.63386697", "0.63342077", "0.63306326" ]
0.0
-1
Really unusual method to call nonpublic libraries to force the text components to focus on what we want and not what Java thinks the focus should be.
private static void forceTextComponentFocus(JTextComponent tc) { Object contextKey = getInstanceField("FOCUSED_COMPONENT", tc); AppContext context = AppContext.getAppContext(); context.put(contextKey, tc); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void setFocus() {\r\n\t}", "@Override\n\tpublic void setFocus() {\n\t\t\n\t}", "@Override\n\tpublic void setFocus() {\n\t\t\n\t}", "@Override\n\tpublic void setFocus() {\n\t\t\n\t}", "@Override\n\tpublic void setFocus() {\n\t\t\n\t}", "@Override\n\tpublic void setFocus() {\n\t\t\n\t}", "@Override\n\tpublic void setFocus() {\n\t}", "@Override\n public void setFocus()\n {\n this.textInput.setFocus();\n }", "@Override\n\tpublic void setFocus() {\n\n\t}", "@Override\n\tpublic void setFocus() {\n\n\t}", "@Override\n\tpublic void setFocus() {\n\n\t}", "@Override\n\tpublic void setFocus() {\n\n\t}", "protected void doSetFocus() {\n\t\t// Ignore\n\t}", "@Override\r\n\tpublic void setFocus() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void setFocus() {\n\r\n\t}", "@Override\r\n\tpublic void setFocus() {\n\r\n\t}", "@Override\r\n\tpublic void setFocus() {\n\r\n\t}", "@Override\r\n\tpublic void setFocus() {\n\r\n\t}", "@Override\r\n\tpublic void setFocus() {\n\r\n\t}", "@Override\r\n\tpublic void setFocus() {\n\r\n\t}", "@Override\r\n\tpublic void setFocus() {\n\r\n\t}", "@Override\n public void setFocus() {\n }", "public void setFocus() {\n\t}", "public void focus() {}", "public void setFocus();", "public void setFocus() {\n }", "@Override\n public void requestFocus() {\n\tif (term != null) {\n\t //term.requestActive(); // Not implemented yet\n\t // TEMPORARY\n\t // boolean result = term.requestFocusInWindow();\n\t term.requestFocus();\n\t}\n }", "public void setFocus() {\n \t\tex.setFocus();\n \t}", "void setFocus();", "public void requestFocus() {\n // Not supported for MenuComponents\n }", "public void setFocus(){\n\t\ttxtText.setFocus(true);\n\t\ttxtText.selectAll();\n\t}", "void focus();", "void focus();", "protected void doSetFocus() {\n \t\tif (getText() != null) {\n \t\t\tgetText().selectAll();\n \t\t\tgetText().setFocus();\n \t\t\tcheckSelection();\n \t\t\tcheckDeleteable();\n \t\t\tcheckSelectable();\n \t\t}\n \t}", "public void focusGained(FocusEvent e)\r\n/* 21: */ {\r\n/* 22: 64 */ JTextComponent c = getComponent();\r\n/* 23: 65 */ if (c.isEnabled())\r\n/* 24: */ {\r\n/* 25: 66 */ setVisible(true);\r\n/* 26: 67 */ setSelectionVisible(true);\r\n/* 27: */ }\r\n/* 28: 69 */ if ((!c.isEnabled()) || (!this.isKeyboardFocusEvent) || (!Options.isSelectOnFocusGainActive(c))) {\r\n/* 29: 72 */ return;\r\n/* 30: */ }\r\n/* 31: 74 */ if ((c instanceof JFormattedTextField)) {\r\n/* 32: 75 */ EventQueue.invokeLater(new Runnable()\r\n/* 33: */ {\r\n/* 34: */ public void run()\r\n/* 35: */ {\r\n/* 36: 77 */ PlasticFieldCaret.this.selectAll();\r\n/* 37: */ }\r\n/* 38: */ });\r\n/* 39: */ } else {\r\n/* 40: 81 */ selectAll();\r\n/* 41: */ }\r\n/* 42: */ }", "public void Focus() {\n }", "public void setFocus() {\n\t\tui.setFocus();\n\t}", "@Override\r\n\tpublic void focus() {\r\n\t\tactivate();\r\n\t\ttoFront();\r\n\t}", "@Override\r\n\tpublic void setFocus() {\r\n\t\tif (getControl() != null)\r\n\t\t\tgetControl().setFocus();\r\n\t}", "@Override\n public void setFocus() {\n if (!modes.get(BCOConstants.F_SHOW_ANALYZER)) {\n if (textViewer != null) {\n textViewer.getTextWidget().setFocus();\n }\n } else {\n if (tableControl != null) {\n tableControl.setFocus();\n }\n }\n }", "public void setFocus() {\n \t\tviewer.getControl().setFocus();\n \t}", "private void jtxtreferenceFocusGained(java.awt.event.FocusEvent evt) {\n jtxtreference.setSelectionStart(0);\n jtxtreference.setSelectionEnd(jtxtreference.getText().length());\n}", "public void tryLockFocus() {\n }", "private void jtxtemployeeFocusGained(java.awt.event.FocusEvent evt) {\n jtxtemployee.setSelectionStart(0);\n jtxtemployee.setSelectionEnd(jtxtemployee.getText().length());\n}", "private void jtxtbrand_code_toFocusGained(java.awt.event.FocusEvent evt) {\n jtxtbrand_code_to.setSelectionStart(0);\n jtxtbrand_code_to.setSelectionEnd(jtxtbrand_code_to.getText().length());\n}", "public void setFocus() {\n\t\tviewer.getControl().setFocus();\n\t}", "public void setFocus() {\n\t\tviewer.getControl().setFocus();\n\t}", "public void setFocus() {\n\t\tviewer.getControl().setFocus();\n\t}", "public void focus() {\n\t\tJWLC.nativeHandler().wlc_output_focus(this.to());\n\t}", "public void setFocus() {\n\t\tthis.viewer.getControl().setFocus();\n\t}", "public void requestFocus() {\n\n if (MyTextArea != null)\n MyTextArea.requestFocus();\n\n }", "private void jtxtwarehouse_codeFocusGained(java.awt.event.FocusEvent evt) {\n jtxtwarehouse_code.setSelectionStart(0);\n jtxtwarehouse_code.setSelectionEnd(jtxtwarehouse_code.getText().length());\n}", "private void jtxtbrand_code_frFocusGained(java.awt.event.FocusEvent evt) {\n jtxtbrand_code_fr.setSelectionStart(0);\n jtxtbrand_code_fr.setSelectionEnd(jtxtbrand_code_fr.getText().length());\n}", "void addFocus();", "public void setFocused(boolean focused) {\n/* 822 */ throw new RuntimeException(\"Stub!\");\n/* */ }", "public void requestFocus()\n {\n super.requestFocus();\n field.requestFocus();\n }", "public void requestFocus(){\n\t\tusername.requestFocusInWindow();\n\t}", "public void setFocus() {\n \t\t// set initial focus to the URL text combo\n \t\turlCombo.setFocus();\n \t}", "public void requestInputFocus(){\n\t\tuserInput.requestFocus();\n\t}", "public void setAccessibilityFocused(boolean focused) {\n/* 868 */ throw new RuntimeException(\"Stub!\");\n/* */ }", "public void setFocus() {\n\t\tcompositeQueryTree.setFocus();\n\t}", "@Override\n public boolean isFocusable() {\n return false;\n }", "void setFocus( ChatTarget focus );", "public void focus() {\n if (toSetFocus != null) {\n toSetFocus.requestFocus();\n } else {\n root.requestFocus();\n toSetFocus = null;\n }\n }", "public void setFocus() {\r\n\t\tIFormPart part = _parts.get(0);\r\n\t\tif ( part != null ) part.setFocus();\r\n\t}", "private void changeFocus() {\n focusChange(etTitle, llTitle, mActivity);\n focusChange(etOriginalPrice, llOriginalPrice, mActivity);\n focusChange(etTotalItems, llTotalItems, mActivity);\n focusChange(etDescription, llDescription, mActivity);\n }", "public void setGlobalPermanentFocusOwner(Component focusOwner)\n {\n }", "private void setRequestFocusInThread() {\r\n SwingUtilities.invokeLater( new Runnable() {\r\n public void run() {\r\n sponsorHierarchyTree.requestFocusInWindow();\r\n }\r\n });\r\n }", "public void setFocusable(boolean focusable) {\n/* 799 */ throw new RuntimeException(\"Stub!\");\n/* */ }", "private void initComponents() {\n\n setFocusLostBehavior(javax.swing.JFormattedTextField.COMMIT);\n }", "public abstract void requestFocusToTernaryPhone();", "public void requestFocusToSpecialDate() {\n SwingUtilities.invokeLater(new Runnable() {\n\n /**\n * put your documentation comment here\n */\n public void run() {\n SwingUtilities.invokeLater(new Runnable() {\n\n /**\n * put your documentation comment here\n */\n public void run() {\n txtSpclDate.requestFocus();\n }\n });\n }\n });\n }", "@Override\r\n\tpublic boolean isFocused() {\n\t\treturn false;\r\n\t}", "private void requestDefaultFocus() {\r\n if( getFunctionType() == TypeConstants.DISPLAY_MODE ){\r\n ratesBaseWindow.btnCancel.requestFocus();\r\n }else {\r\n ratesBaseWindow.btnOK.requestFocus();\r\n }\r\n }", "private void jtxtdscriptionFocusGained(java.awt.event.FocusEvent evt) {\n jtxtdscription.setSelectionStart(0);\n jtxtdscription.setSelectionEnd(jtxtdscription.getText().length());\n}", "public void setFocus() {\r\n System.out.println(\"TN5250JPart: calling SetSessionFocus.run(): \" + tn5250jPart.getClass().getSimpleName());\r\n SetSessionFocus.run(tabFolderSessions.getSelectionIndex(), -1, tn5250jPart);\r\n }", "private void m16568d() {\n if (this.f14721d && !this.f14719b && !this.f14720c) {\n try {\n this.f14722e.autoFocus(this.f14726j);\n this.f14720c = true;\n } catch (Throwable e) {\n Log.w(f14717a, \"Unexpected exception while focusing\", e);\n m16565c();\n }\n }\n }", "private void unfocusedAll() {\n this.nameTextField.setFocusTraversable(false);\n this.surnameTextField.setFocusTraversable(false);\n this.addressTextField.setFocusTraversable(false);\n this.postalCodeTextField.setFocusTraversable(false);\n }", "public FocusMode getOverrideFocusMode() {\n return null;\n }", "B disableTextInput();", "public void resetFocus() {\n toSetFocus = null;\n focusOn = null;\n }", "private void jtxtdocument_statusFocusGained(java.awt.event.FocusEvent evt) {\n jtxtdocument_status.setSelectionStart(0);\n jtxtdocument_status.setSelectionEnd(jtxtdocument_status.getText().length());\n}", "public void requestFocusOnFirstField() {\n btnLookup.requestFocus();\n SwingUtilities.invokeLater(new Runnable() {\n\n /**\n * put your documentation comment here\n */\n public void run() {\n SwingUtilities.invokeLater(new Runnable() {\n\n /**\n * put your documentation comment here\n */\n public void run() {\n //txtReferredBy.requestFocus(); (commented because the lookup should always be through btnLookup\n btnLookup.requestFocus();\n }\n });\n }\n });\n }", "void updateFocusAcceleratorBinding(boolean changed) {\n char accelerator = editor.getFocusAccelerator();\n\n if (changed || accelerator != '\\0') {\n InputMap km = SwingUtilities.getUIInputMap\n (editor, JComponent.WHEN_IN_FOCUSED_WINDOW);\n\n if (km == null && accelerator != '\\0') {\n km = new ComponentInputMapUIResource(editor);\n SwingUtilities.replaceUIInputMap(editor, JComponent.\n WHEN_IN_FOCUSED_WINDOW, km);\n ActionMap am = getActionMap();\n SwingUtilities.replaceUIActionMap(editor, am);\n }\n if (km != null) {\n km.clear();\n if (accelerator != '\\0') {\n km.put(KeyStroke.getKeyStroke(accelerator, BasicLookAndFeel.getFocusAcceleratorKeyMask()), \"requestFocus\");\n km.put(KeyStroke.getKeyStroke(accelerator,\n SwingUtilities2.setAltGraphMask(\n BasicLookAndFeel.getFocusAcceleratorKeyMask())),\n \"requestFocus\");\n }\n }\n }\n }", "void requestSearchViewFocus();", "void resetFocus();", "void resetFocus();", "public void focusPreviousComponent(Component paramComponent)\n/* */ {\n/* 1365 */ if (paramComponent != null) {\n/* 1366 */ paramComponent.transferFocusBackward();\n/* */ }\n/* */ }", "@Override\n\t\t\tpublic void mouseClicked(MouseEvent me) {\n\t\t\t\trequestFocusInWindow();\n\t\t\t}", "private void jtxttotal_adm_qtyFocusGained(java.awt.event.FocusEvent evt) {\n jtxttotal_adm_qty.setSelectionStart(0);\n jtxttotal_adm_qty.setSelectionEnd(jtxttotal_adm_qty.getText().length());\n}", "public void focusLost(FocusEvent e)\r\n/* 61: */ {\r\n/* 62:100 */ super.focusLost(e);\r\n/* 63:101 */ if (!e.isTemporary())\r\n/* 64: */ {\r\n/* 65:102 */ this.isKeyboardFocusEvent = true;\r\n/* 66:103 */ if (Boolean.TRUE.equals(getComponent().getClientProperty(\"JGoodies.setCaretToStartOnFocusLost\"))) {\r\n/* 67:104 */ setDot(0);\r\n/* 68: */ }\r\n/* 69: */ }\r\n/* 70: */ }", "public void mo3285a() {\n if (StringUtils.m10803a(this.f7348a.getText().toString())) {\n this.f7348a.requestFocus();\n } else if (StringUtils.m10803a(this.f7349b.getText().toString())) {\n this.f7349b.requestFocus();\n }\n this.f7348a.requestFocus();\n }", "protected void onFocusGained()\n {\n ; // do nothing. \n }", "public abstract void requestFocusToSecondaryPhone();", "public void setDefaultFocus()\n {\n _nameField.requestFocus();\n }", "public void setFocus() {\n startButton.setFocus();\n }", "@Override\r\n\tpublic boolean forceSelection() {\r\n\t\treturn false;\r\n\t}", "public void setFormFocus() {\n\t\tint column = dm.getColSelected();\n\t\tif (rowElements.size() > column) {\n\t\t\tSystem.out.println(\"FormEntryTab.setFormFocus()\");\n\t\t\trowElements.get(column).requestFocusInWindow();\n\t\t}\n\t}", "public void setTextPanelFocused(boolean focused)\r\n\t{\r\n\t\t\r\n\t}", "@Override\n\tprotected void handleFocus (Context context, boolean focus) {\n\t\tif (focus) context.requestFocus();\n\t}" ]
[ "0.7508117", "0.749886", "0.749886", "0.749886", "0.749886", "0.749886", "0.74722874", "0.7464193", "0.741226", "0.741226", "0.741226", "0.741226", "0.74108034", "0.7397448", "0.7395279", "0.7395279", "0.7395279", "0.7395279", "0.7395279", "0.7395279", "0.7395279", "0.7390202", "0.7371612", "0.73258805", "0.73043734", "0.7248847", "0.7218761", "0.72109437", "0.71858835", "0.70604974", "0.7056624", "0.7038185", "0.7038185", "0.70029473", "0.6905583", "0.6835576", "0.683456", "0.67871743", "0.6777692", "0.6770349", "0.6731035", "0.6691051", "0.66575", "0.660418", "0.65995353", "0.6582319", "0.6582319", "0.6582319", "0.6580846", "0.6577428", "0.6565679", "0.6533478", "0.6529788", "0.65175647", "0.6514613", "0.65116674", "0.64917874", "0.6459274", "0.64340264", "0.64114845", "0.6406111", "0.6383398", "0.635778", "0.63545585", "0.63520527", "0.6349135", "0.6323669", "0.6307354", "0.6290683", "0.62900114", "0.6263317", "0.62355363", "0.6233328", "0.6214626", "0.62116504", "0.6201166", "0.61843854", "0.6173878", "0.6132988", "0.61301726", "0.6128323", "0.6118693", "0.6082514", "0.60758406", "0.6069026", "0.6063092", "0.6063092", "0.60478806", "0.60375243", "0.60284084", "0.60160506", "0.60135955", "0.60114455", "0.59910303", "0.5985406", "0.59808874", "0.5980407", "0.59783447", "0.59721166", "0.5965187" ]
0.75544524
0
Simulates a user initiated keystroke using the keybinding of the given action
public static void triggerActionKey(Component destination, DockingActionIf action) { Objects.requireNonNull(destination); KeyStroke keyStroke = action.getKeyBinding(); if (keyStroke == null) { throw new IllegalArgumentException("No KeyStroke assigned for the given action"); } int modifiers = keyStroke.getModifiers(); int keyCode = keyStroke.getKeyCode(); char keyChar = keyStroke.getKeyChar(); boolean isDefined = Character.isDefined(keyChar); if (!isDefined) { keyChar = KeyEvent.VK_UNDEFINED; } triggerKey(destination, modifiers, keyCode, keyChar); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "default void interactWith(Key key) {\n\t}", "public boolean keyInput(int code, int action);", "@Override\n public void keyboardAction( KeyEvent ke )\n {\n \n }", "void keyPress(int key);", "@Override\n public void nativeKeyAction(int keyCode) {\n getProgramController().nativeKeyAction(keyCode);\n }", "private void KeyActionPerformed(java.awt.event.ActionEvent evt) {\n }", "public abstract void keyPressed(int k);", "@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}", "@Override\n public final void actionPerformed(ActionEvent e) {\n if (!isKeyPressed) {\n isKeyPressed = true;\n keyPressed();\n }\n }", "public abstract void keyPressed(int key);", "public void hitKey() {\n }", "void bindKeys() {\n // ahh, the succinctness of java\n KeyboardFocusManager kfm = KeyboardFocusManager.getCurrentKeyboardFocusManager();\n\n kfm.addKeyEventDispatcher( new KeyEventDispatcher() {\n public boolean dispatchKeyEvent(KeyEvent e) {\n String action=null;\n if(e.getID() != KeyEvent.KEY_PRESSED) \n return false;\n if(e.getModifiers() != 0)\n return false;\n switch(e.getKeyCode()) {\n case KeyEvent.VK_UP:\n action = \"forward\";\n movingForward=true;\n turnval = 0;\n break;\n case KeyEvent.VK_DOWN:\n action=\"backward\";\n movingForward=false;\n turnval = 0;\n break;\n case KeyEvent.VK_LEFT:\n if(movingForward) {\n turnval = (turnval==0) ? 100 : turnval-turnval/2;\n if(turnval<10) { action=\"spinleft\"; turnval=0; }\n else action = \"turn\"+turnval;\n }\n else action = \"spinleft\";\n //action = (movingForward) ? \"turn100\" : \"spinleft\";\n break;\n case KeyEvent.VK_RIGHT:\n if(movingForward) {\n turnval = (turnval==0) ? -100 : turnval-turnval/2;\n if(turnval>-10) { action=\"spinright\"; turnval=0; }\n else action = \"turn\"+turnval;\n }\n else action = \"spinright\";\n //action = (movingForward) ? \"turn-100\" : \"spinright\";\n break;\n case KeyEvent.VK_SPACE:\n action=\"stop\";\n movingForward=false;\n turnval = 0;\n break;\n case KeyEvent.VK_L:\n action=\"blink-leds\";\n break;\n case KeyEvent.VK_R:\n action=\"reset\";\n break;\n case KeyEvent.VK_T:\n action=\"test\";\n break;\n case KeyEvent.VK_V:\n vacuuming = !vacuuming;\n action = (vacuuming) ? \"vacuum-on\":\"vacuum-off\";\n break;\n case KeyEvent.VK_1:\n action=\"50\";\n break;\n case KeyEvent.VK_2:\n action=\"100\";\n break;\n case KeyEvent.VK_3:\n action=\"150\";\n break;\n case KeyEvent.VK_4:\n action=\"250\";\n break;\n case KeyEvent.VK_5:\n action=\"400\";\n break;\n case KeyEvent.VK_6:\n action=\"500\";\n break;\n }\n\n if(action!=null)\n getCurrentTab().actionPerformed(new ActionEvent(this,0,action));\n //System.out.println(\"process '\"+e.getKeyCode()+\"' \"+e);\n return true;\n } \n });\n }", "void keyPressed(String code);", "@FXML\n private void keypadAction(ActionEvent event)\n {\n // Get Button text\n Button button = (Button)event.getSource();\n String buttonText = button.getText();\n \n pressKey(buttonText);\n \n }", "public void keyPressed() { \n\t\twantsFrameBreak = true;\n\t\t//key = e.getKeyChar();\n\t\tkeyPressed = true;\n\t\tif (System.nanoTime() - acted > .033e9f) {\n\t\t\t_keyPressed();\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}", "void keyPressed(int keycode);", "public void pressKey(final char c) {\n\t\tmethods.inputManager.pressKey(c);\n\t}", "public abstract void keycommand(long ms);", "@Override\n public void actionPerformed(ActionEvent e) {\n String action = e.getActionCommand();\n\n\n if (action.equals(keys[2])){\n //用户按下C\n handleC();\n }else if (action.equals(keys[3])){\n //用户按下退格\n handleBackspace();\n }else if (action.equals(keys[18])){\n //用户按下=\n handleCalc();\n }else{\n //用户输入表达式\n handleExpression(action);\n }\n }", "@Override\n public void triggerKeyRelease(KeyEvent e) {\n\n }", "public void keyPressed(KeyEvent e) {}", "@Override\n\tpublic void keyPressed(KeyEvent arg0) {\n\t\tswitch(arg0.getExtendedKeyCode()){\n\t\t\tcase KeyEvent.VK_DOWN:\n\t\t\t\tlast = new AgentAction(Maze.SOUTH);\n\t\t\t\tbreak;\n\t\t\tcase KeyEvent.VK_UP:\n\t\t\t\tlast = new AgentAction(Maze.NORTH);\n\t\t\t\tbreak;\n\t\t\tcase KeyEvent.VK_LEFT:\n\t\t\t\tlast = new AgentAction(Maze.WEST);\n\t\t\t\tbreak;\n\t\t\tcase KeyEvent.VK_RIGHT:\n\t\t\t\tlast = new AgentAction(Maze.EAST);\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tbreak;\t\t\t\n\t\t}\t\n\t\ttest.setText(Integer.toString(arg0.getExtendedKeyCode()));\n\t}", "public void keyPressed(KeyEvent e){\n atomas.keyboardTyped(e.getKeyCode());\n }", "@Override\n\tpublic void doAction(String action) {\n\t\tthis.action = action;\n\t\t\n\t\tthis.gameController.pause();\n\t}", "public void keyTyped (KeyEvent e){\n switch (e.getKeyChar()){\n case '1':\n one.doClick(); break;\n case '2':\n two.doClick(); break;\n case '3':\n three.doClick(); break;\n case '4':\n four.doClick(); break;\n case '5':\n five.doClick(); break;\n case '6':\n six.doClick(); break;\n case '7':\n seven.doClick(); break;\n case '8':\n eight.doClick(); break;\n case '9':\n nine.doClick(); break;\n case '0':\n zero.doClick(); break;\n case 'c':\n case 'C':\n case KeyEvent.VK_ESCAPE:\n clear.doClick(); break;\n case '+':\n add.doClick(); break;\n case '-':\n subtract.doClick(); break;\n case '*':\n multiply.doClick(); break;\n case '/':\n divide.doClick(); break;\n case '=':\n equals.doClick(); break;\n }\n }", "public void keyPressed(KeyEvent arg0) {\n\t\t\t\t\n\t\t\t}", "public void keyPressed(KeyEvent arg0) {\n\t\t\t\t\n\t\t\t}", "public void keyPressed(KeyEvent arg0) {\n\t\t\t\t\n\t\t\t}", "public void keyPressed(KeyEvent arg0) {\n\t\t\t\t\n\t\t\t}", "public void keyPressed( KeyEvent e ) { }", "void keyPressed(int keyCode);", "@Override\n public native void keyPress(int keycode);", "@Override\n public void keyPressed(KeyEvent key) {\n gsm.keyPressed(key.getKeyCode());\n }", "void correctKeyPress();", "public abstract void keyPressed(KeyPressedEvent keyPressedEvent);", "public void keyPressed(KeyEvent event){\r\n\t\t\tchar input = event.getKeyChar();\r\n\t\t\tSystem.out.println(event.getExtendedKeyCode());\r\n\t\t\tif(event.getExtendedKeyCode()== 10){\r\n\t\t\t equals.doClick();\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tswitch(input){\r\n\t\t\t\tcase '0': button0.doClick();\r\n\t\t\t\tbreak;\r\n\t\t\t\tcase '1': button1.doClick();\r\n\t\t\t\tbreak;\r\n\t\t\t\tcase '2': button2.doClick();\r\n\t\t\t\tbreak;\r\n\t\t\t\tcase '3': button3.doClick();\r\n\t\t\t\tbreak;\r\n\t\t\t\tcase '4': button4.doClick();\r\n\t\t\t\tbreak;\r\n\t\t\t\tcase '5': button5.doClick();\r\n\t\t\t\tbreak;\r\n\t\t\t\tcase '6': button6.doClick();\r\n\t\t\t\tbreak;\r\n\t\t\t\tcase '7': button7.doClick();\r\n\t\t\t\tbreak;\r\n\t\t\t\tcase '8': button8.doClick();\r\n\t\t\t\tbreak;\r\n\t\t\t\tcase '9': button9.doClick();\r\n\t\t\t\tbreak;\r\n\t\t\t\tcase '.': dot.doClick();\r\n\t\t\t\tbreak;\r\n\t\t\t\tcase '+': plus.doClick();\r\n\t\t\t\tbreak;\r\n\t\t\t\tcase '-': minus.doClick();\r\n\t\t\t\tbreak;\r\n\t\t\t\tcase '/': divide.doClick();\r\n\t\t\t\tbreak;\r\n\t\t\t\tcase '*': multiply.doClick();\r\n\t\t\t\tbreak;\r\n\t\t\t\tcase '=': equals.doClick();\r\n\t\t\t\tbreak;\r\n\t\t\t\tcase '\b': del.doClick();\r\n\t\t\t\tbreak;\r\n\t\t\t\tcase '\u001b': clear.doClick();\r\n\t\t\t\tbreak;\r\n\t\t\t\tcase 'c': clear.doClick();\r\n\t\t\t\tbreak;\r\n\t\t\t\t\r\n\t\t\t\tdefault: break;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t\t\r\n\t\t\t\r\n\t\t}", "@Override\n\tpublic void keyTyped(char p_73869_1_, int p_73869_2_) {\n\t\tfield_154330_a.keyPressed(p_73869_1_, p_73869_2_);\n\t}", "protected void keyHit(int keyCode) {\n }", "@Override\n\tpublic void keyTyped(KeyEvent arg0) {\n\t\tswitch(arg0.getExtendedKeyCode()){\n\t\t\tcase KeyEvent.VK_KP_DOWN:\n\t\t\t\tlast = new AgentAction(Maze.SOUTH);\n\t\t\t\tbreak;\n\t\t\tcase KeyEvent.VK_KP_UP:\n\t\t\t\tlast = new AgentAction(Maze.NORTH);\n\t\t\t\tbreak;\n\t\t\tcase KeyEvent.VK_KP_LEFT:\n\t\t\t\tlast = new AgentAction(Maze.WEST);\n\t\t\t\tbreak;\n\t\t\tcase KeyEvent.VK_KP_RIGHT:\n\t\t\t\tlast = new AgentAction(Maze.EAST);\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tbreak;\t\t\t\n\t\t}\t\t\n\t}", "public static void triggerActionKey(Component c, int modifiers, int keyCode) {\n\t\ttriggerKey(c, modifiers, keyCode, KeyEvent.CHAR_UNDEFINED);\n\t}", "private void registerKeyboardActions() {\n InputMap inputMap = getInputMap(WHEN_IN_FOCUSED_WINDOW);\r\n ActionMap actionMap = getActionMap();\r\n\r\n // F1\r\n Integer key = new Integer(KeyEvent.VK_F1);\r\n inputMap.put(KeyStroke.getKeyStroke(KeyEvent.VK_F1, 0), key);\r\n actionMap.put(key, new KeyAction(key));\r\n\r\n // F2\r\n key = new Integer(KeyEvent.VK_F2);\r\n inputMap.put(KeyStroke.getKeyStroke(KeyEvent.VK_F2, 0), key);\r\n actionMap.put(key, new KeyAction(key));\r\n\r\n // F3\r\n key = new Integer(KeyEvent.VK_F3);\r\n inputMap.put(KeyStroke.getKeyStroke(KeyEvent.VK_F3, 0), key);\r\n actionMap.put(key, new KeyAction(key));\r\n // F4\r\n key = new Integer(KeyEvent.VK_F4);\r\n inputMap.put(KeyStroke.getKeyStroke(KeyEvent.VK_F4, 0), key);\r\n actionMap.put(key, new KeyAction(key));\r\n // F12\r\n key = new Integer(KeyEvent.VK_F12);\r\n inputMap.put(KeyStroke.getKeyStroke(KeyEvent.VK_F12, 0), key);\r\n actionMap.put(key, new KeyAction(key));\r\n\r\n // ESCAPE\r\n key = new Integer(KeyEvent.VK_ESCAPE);\r\n inputMap.put(KeyStroke.getKeyStroke(KeyEvent.VK_ESCAPE, 0), key);\r\n actionMap.put(key, new KeyAction(key));\r\n}", "public native void onKeyDown( KeyEvent event, long time, int keyCode, int metaState, int unicodeChar, int repeatCount );", "public void pressed(String key) {\n\t\tkeyTarget.pressed(key);\n\t\t\n\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 }", "@Override\r\n\tpublic void keyPressed(KeyEvent key) {\r\n\t\t// Invoke method if the key is pressed. \r\n\t\t// Do nothing, not all three methods need to be used. \r\n\t}", "public void bindKeys()\n {\n window.btnFurther.getInputMap(JButton.WHEN_IN_FOCUSED_WINDOW).put(KeyStroke.getKeyStroke(away), \"away\");\n window.btnFurther.getInputMap(JButton.WHEN_IN_FOCUSED_WINDOW).put(KeyStroke.getKeyStroke(Character.toUpperCase(away)), \"away\");\n window.btnFurther.getActionMap().put(\"away\", putAway);\n\n window.btnCloser.getInputMap(JButton.WHEN_IN_FOCUSED_WINDOW).put(KeyStroke.getKeyStroke(close), \"close\");\n window.btnCloser.getInputMap(JButton.WHEN_IN_FOCUSED_WINDOW).put(KeyStroke.getKeyStroke(Character.toUpperCase(close)), \"close\");\n }", "public void putInput(final KeyStroke keyStroke,\r\n final String actionDesc) {\r\n\r\n this.field.getInputMap().put(keyStroke, actionDesc);\r\n\r\n }", "@Inject(at = @At(\"HEAD\"), method = \"onKey(JIIII)I\")\n public void onKey(long window, int key, int scancode, int action, int mods, CallbackInfo info){\n if(action == GLFW.GLFW_PRESS) {\n EventManager.call(new KeyEvent(key, scancode, action, mods));\n }\n }", "public void keyPressed(KeyEvent e) { }", "void redirectToEnterKey();", "protected void keyPressedImpl()\n {\n if (key == 'g') {\n trigger = true;\n triggerCount = 1;\n }\n else if (key == 'h') {\n trigger = !trigger;\n }\n }", "@Override\n\tpublic void execute(InputKeyEvent event)\n\t{\n\t\tif(event.keyCode() == this.keyCode)\n\t\t\tkeyPressed = event.pressed();\n\t\t\n\t\t// Execute related event\n\t\tif(keyPressed)\n\t\t\tstrategy.execute(event);\n\t\t\t\n\t}", "public KeyboardActionRegister(RichDialogGridBagPanel panel, KeyStroke keyStroke, String methodName) {\r\n this.panel = panel;\r\n this.methodName = methodName;\r\n this.keyStroke = keyStroke;\r\n }", "@Test\n public void testNonStringActionKeys() {\n JXTable table = new JXTable();\n Action l = new AbstractAction(\"dummy\") {\n\n @Override\n public void actionPerformed(ActionEvent e) {\n // TODO Auto-generated method stub\n \n }\n \n };\n table.registerKeyboardAction(l , KeyStroke.getKeyStroke(\"ESCAPE\"), JComponent.WHEN_FOCUSED);\n table.setColumnControlVisible(true);\n table.getColumnControl();\n }", "@Override\r\n\t\t\tpublic void keyPressed(KeyEvent arg0) {\n\t\t\t\tif((int)arg0.getKeyChar() == 10)\r\n\t\t\t\t{\r\n\t\t\t\t\tsaveAction();\r\n\t\t\t\t}\r\n\t\t\t}", "@Override\n\tpublic void invoke(long window, int key, int scancode, int action, int mods) {\n\n\t\t\n\t\tint vk = GLFWInput.keyGlfwToVk(key);\n\t\tint vkAction = GLFWInput.stateGlfwToInput(action);\n\t\tint vbMods = GLFWInput.modGlfwToInput(mods);\n\t\tint vbScanCode = scancode; // scancodeGlfwToInput not needed because there is no known scancodes\n\t\t\n\t\tKeyInputEvent event = eventPool.getObject();\n\t\ttry {\n\t\t\tinputProducer.postKeyInput(event.set(window, vk, vbScanCode, vkAction, vbMods));\t\n\t\t}\n\t\tfinally {\n\t\t\teventPool.returnObject(event);\n\t\t}\n\t}", "@Override\n\t\tpublic void keyPressed(KeyEvent arg0) {\n\t\t\t\n\t\t}", "@Override\n public void keyTyped(KeyEvent key) {\n gsm.keyTyped(key.getKeyCode());\n }", "public void keyPressed(KeyEvent arg0) {\n\r\n\t}", "protected void keyTyped(char c, int code)\r\n\t{\r\n\t\tif (customBindingTickStart > 0)\r\n\t\t{\r\n\t\t\tthis.lastKeyCode = code;\r\n\t\t\treturn;\r\n\t\t}\r\n\t\t\r\n\t\tif (JoypadControlList.textInputName != null \r\n\t\t\t\t&& JoypadControlList.textInputName.getVisible())\r\n\t\t{\r\n\t\t\tthis.lastKeyCode = code;\r\n\t\t\tJoypadControlList.textInputName.textboxKeyTyped(c, code);\r\n\t\t\treturn;\r\n\t\t}\r\n\t\t\r\n\t\tif (c == ' ' && controllers.size() > 0)\r\n\t\t{\r\n\t\t\ttoggleController();\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\ttry{\r\n\t\t\t\tsuper.keyTyped(c, code);}\r\n\t\t\tcatch(java.io.IOException e){}\r\n\t\t}\r\n\t}", "public void sendKey(final char c) {\n\t\tmethods.inputManager.sendKey(c);\n\t}", "public void keyTyped( KeyEvent event )\n {}", "@Override\r\n\t\t\tpublic void keyPressed(KeyEvent e) {\n\t\t\t\tevent(e, vt.get(3));\r\n\t\t\t}", "public void keyTyped(KeyEvent e) {}", "@DISPID(-2147412105)\n @PropGet\n java.lang.Object onkeypress();", "public void keyPressed(KeyEvent e) {\n \n }", "public void keyPressed(KeyEvent e) {\n \n }", "public void keyPressed(KeyEvent e) {\n \n }", "public boolean performShortcut(int keyCode, KeyEvent event, int flags);", "@DISPID(-2147412105)\n @PropPut\n void onkeypress(\n java.lang.Object rhs);", "public void onKeyPress(Widget sender, char keyCode, int modifiers) {\n }", "@Override\r\n\tpublic void keyPressed(KeyEvent arg0) {\r\n\t}", "@Override\r\n\t\t\tpublic void keyPressed(KeyEvent e) {\n\t\t\t\tevent(e, vt.get(2));\r\n\t\t\t}", "@Override\r\n\t\t\tpublic void keyPressed(KeyEvent arg0) {\n\t\t\t}", "@Override\r\n\tpublic void keyPressed() {\n\t\tl.key();\r\n\t\t\r\n\t}", "@Override\n\tpublic void keyPressed() {\n\t\t\n\t}", "@Override\n\t\t\tpublic void keyPressed(KeyEvent arg0) {\n\t\t\t\t\n\t\t\t}", "@Override\r\n public void keyPressed(KeyEvent e) {\r\n switchKey(e.getKeyCode(), true);\r\n }", "void dispatchEvent(DeferredKeyEvent event);", "public void handleKeyPressed(KeyEvent event) {\n keyInput.set(String.valueOf(event.getCode()));\n }", "protected void keyTyped(char par1, int par2) {}", "@DISPID(-2147412107)\n @PropGet\n java.lang.Object onkeydown();", "public void keyTyped(KeyEvent e){}", "public void keyPressed(KeyEvent e) {\n\t\t\t\tgetCmdNXT().commandPressedTerrorist(e.getKeyChar());\r\n\t\t\t}", "public void keyTyped(KeyEvent arg0) {\n\n }", "public static void addHotKey(final int key, final JComponent to,\n\t\tfinal String actionName, final Action action)\n\t{\n\t\tfinal KeyStroke keystroke =\n\t\t\tKeyStroke.getKeyStroke(key, java.awt.event.InputEvent.CTRL_MASK);\n\t\tfinal InputMap map = to.getInputMap(JComponent.WHEN_IN_FOCUSED_WINDOW);\n\t\tmap.put(keystroke, actionName);\n\t\tto.getActionMap().put(actionName, action);\n\t\tif (to instanceof JMenuItem) {\n\t\t\t((JMenuItem) to).setAccelerator(keystroke);\n\t\t}\n\t\tif (to instanceof AbstractButton) // / includes JMenuItem/\n\t\t{\n\t\t\t((AbstractButton) to).addActionListener(action);\n\t\t}\n\t}", "public void keyTyped(KeyEvent arg0) {\n\t\n}", "public void act() \r\n {\r\n key();\r\n win();\r\n fall();\r\n lunch();\r\n }", "public void keyPressed() {\n\t\tif(key == CODED) {\n\t\t\tif(keyCode == RIGHT) {\n\t\t\t\tc.jumpP1();\n\t\t\t}\n\t\t\tif(keyCode == LEFT) {\n\t\t\t\tc.jumpP2();\n\t\t\t}\n\t\t}\n\t}", "public void keyPressed(KeyEvent e) {\n System.out.println(\"keyPressed\");\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\n\tpublic void onKeyInput(long window, int key, int scancode, int action,\n\t\t\tint mods) {\n\n\t}", "@Override\r\n\t\t\tpublic void keyPressed(KeyEvent e) {\n\t\t\t\tevent(e, vt.get(1));\r\n\t\t\t}", "public void handleKeyEvent(int id, int keyCode, char keyChar, int modifier) { }", "public abstract void keyboardInput();", "public void onKeyPress(int key, char c);", "public void interactWithKeyboard() {\n renderMenu();\n Interaction interact = null;\n // open from the menu\n boolean wait = true;\n while (wait) {\n if (!StdDraw.hasNextKeyTyped()) {\n continue;\n }\n String c = (\"\" + StdDraw.nextKeyTyped()).toUpperCase();\n System.out.println(c);\n switch (c) {\n case \"N\":\n // get the seed\n renderTypeString();\n long seed = getSeed();\n TETile[][] WorldFrame = null;\n WorldFrame = WorldGenerator.generate(seed, WorldFrame, WIDTH, HEIGHT);\n interact = new Interaction(WorldFrame, seed);\n wait = false;\n break;\n case \"L\":\n interact = loadInteraction();\n wait = false;\n break;\n case \"Q\":\n System.exit(0);\n break;\n default:\n System.exit(0);\n break;\n }\n }\n // start to play\n interact.initialize();\n char preKey = ',';\n while (true) {\n if (StdDraw.hasNextKeyTyped()) {\n char key = StdDraw.nextKeyTyped();\n // if a user enter ':' then 'Q', then save and exit the game\n if ((\"\" + preKey + key).toUpperCase().equals(\":Q\")) {\n saveInteraction(interact);\n System.exit(0);\n }\n // in case the player enter something else\n if (\"WSAD\".contains((\"\" + key).toUpperCase())) {\n interact.move((\"\" + key).toUpperCase());\n }\n preKey = key;\n }\n interact.show();\n }\n }", "@Override\n\tpublic void actionPerformed(ActionEvent arg0) {\n\t\tButtonPress();\n\t}", "@Override\r\n\tpublic void keyPressed(KeyEvent keyPressed)\r\n\t{\r\n\t\t\r\n\t}" ]
[ "0.69642127", "0.67589223", "0.66752195", "0.654239", "0.6412469", "0.64030594", "0.6391532", "0.63813114", "0.63805556", "0.6375148", "0.63623595", "0.6342358", "0.630584", "0.63057566", "0.6294083", "0.6284715", "0.6277102", "0.6211106", "0.6193055", "0.6177804", "0.61724293", "0.6157878", "0.6154865", "0.61474633", "0.61428404", "0.61133665", "0.60805887", "0.60805887", "0.60805887", "0.60805887", "0.60793334", "0.60782737", "0.6052266", "0.6049415", "0.6045018", "0.6041272", "0.6034438", "0.60084176", "0.6003127", "0.6002834", "0.60013556", "0.600088", "0.5991554", "0.595709", "0.595465", "0.59308934", "0.59193116", "0.5919232", "0.59015846", "0.5896637", "0.5888116", "0.5881971", "0.588035", "0.58757925", "0.58679134", "0.58654886", "0.5865297", "0.5857972", "0.58560926", "0.58542573", "0.5851959", "0.5848859", "0.5846131", "0.5818483", "0.58138406", "0.58110875", "0.58048564", "0.58048564", "0.58048564", "0.5804796", "0.57931775", "0.5789694", "0.5785994", "0.5785793", "0.57852435", "0.5782193", "0.5781566", "0.57796663", "0.5773303", "0.5769959", "0.5768295", "0.5767679", "0.5766594", "0.57665765", "0.5766567", "0.57638955", "0.57622975", "0.5759966", "0.5759866", "0.57504076", "0.57444865", "0.57425594", "0.57338995", "0.573331", "0.57328665", "0.57265955", "0.572593", "0.5724037", "0.57137406", "0.5713595" ]
0.6209777
18
text components will not perform builtin actions if they are not focused
public static void triggerEscapeKey(Component c) { if (c instanceof JTextComponent) { triggerFocusGained(c); } triggerText(c, "\033"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "B disableTextInput();", "public void textBoxAction( TextBoxWidgetExt tbwe ){}", "public void focus() {}", "@Override\r\n\tpublic boolean isFocused() {\n\t\treturn false;\r\n\t}", "@Override\n public boolean isFocusable() {\n return false;\n }", "@Override \n\tpublic void focusGained(FocusEvent e){\n\t\tif(this.getText().equals(this.texto)){\n\t\t\tthis.setText(\"\");\n\t\t\tthis.setForeground(Color.BLACK);\n\t\t}\n\t}", "protected boolean affectsTextPresentation(PropertyChangeEvent event)\n {\n return true;\n }", "void focus();", "void focus();", "void addFocus();", "@DISPID(-2147417078)\n @PropGet\n boolean isTextEdit();", "@Override\r\n public boolean onEditorAction(TextView v, int actionId, KeyEvent event) {\n sendFocusToJail();\r\n\r\n return false;\r\n }", "@Override\n public void focusGained(FocusEvent e) {\n JTextField source = (JTextField) e.getComponent();\n if (source.getText().equals(defaultText))//if default text is there, our program clearing it.\n source.setText(\"\");\n source.removeFocusListener(this);\n }", "public void mouseReleased(MouseEvent e)\r\n/* 81: */ {\r\n/* 82:120 */ super.mouseReleased(e);\r\n/* 83:121 */ if (e.isPopupTrigger())\r\n/* 84: */ {\r\n/* 85:122 */ this.isKeyboardFocusEvent = false;\r\n/* 86:123 */ if ((getComponent() != null) && (getComponent().isEnabled()) && (getComponent().isRequestFocusEnabled())) {\r\n/* 87:125 */ getComponent().requestFocus();\r\n/* 88: */ }\r\n/* 89: */ }\r\n/* 90: */ }", "public void focusGained(FocusEvent e)\r\n/* 21: */ {\r\n/* 22: 64 */ JTextComponent c = getComponent();\r\n/* 23: 65 */ if (c.isEnabled())\r\n/* 24: */ {\r\n/* 25: 66 */ setVisible(true);\r\n/* 26: 67 */ setSelectionVisible(true);\r\n/* 27: */ }\r\n/* 28: 69 */ if ((!c.isEnabled()) || (!this.isKeyboardFocusEvent) || (!Options.isSelectOnFocusGainActive(c))) {\r\n/* 29: 72 */ return;\r\n/* 30: */ }\r\n/* 31: 74 */ if ((c instanceof JFormattedTextField)) {\r\n/* 32: 75 */ EventQueue.invokeLater(new Runnable()\r\n/* 33: */ {\r\n/* 34: */ public void run()\r\n/* 35: */ {\r\n/* 36: 77 */ PlasticFieldCaret.this.selectAll();\r\n/* 37: */ }\r\n/* 38: */ });\r\n/* 39: */ } else {\r\n/* 40: 81 */ selectAll();\r\n/* 41: */ }\r\n/* 42: */ }", "public void setTextPanelFocused(boolean focused)\r\n\t{\r\n\t\t\r\n\t}", "private void txtDisplayActionPerformed(java.awt.event.ActionEvent evt) {\n \n }", "boolean hasFocus() {\n\t\t\tif (text == null || text.isDisposed()) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\treturn text.getShell().isFocusControl() || text.isFocusControl();\n\t\t}", "@Override\n\tpublic void textValueChanged(TextEvent e) {\n\t\t\n\t}", "public void mousePressed(MouseEvent e)\r\n/* 73: */ {\r\n/* 74:111 */ if ((SwingUtilities.isLeftMouseButton(e)) || (e.isPopupTrigger())) {\r\n/* 75:112 */ this.isKeyboardFocusEvent = false;\r\n/* 76: */ }\r\n/* 77:114 */ super.mousePressed(e);\r\n/* 78: */ }", "private static void OnSpace(Object sender, ExecutedRoutedEventArgs e)\r\n {\r\n TextEditor This = TextEditor._GetTextEditor(sender);\r\n\r\n if (This == null || !This._IsEnabled || This.IsReadOnly || !This._IsSourceInScope(e.OriginalSource))\r\n { \r\n return; \r\n }\r\n\r\n // If this event is our Cicero TextStore composition, we always handles through ITextStore::SetText.\r\n if (This.TextStore != null && This.TextStore.IsComposing)\r\n {\r\n return; \r\n }\r\n\r\n if (This.ImmComposition != null && This.ImmComposition.IsComposition) \r\n {\r\n return; \r\n }\r\n\r\n // Consider event handled\r\n e.Handled = true; \r\n\r\n if (This.TextView != null) \r\n { \r\n This.TextView.ThrottleBackgroundTasksForUserInput();\r\n } \r\n\r\n ScheduleInput(This, new TextInputItem(This, \" \", /*isInsertKeyToggled:*/!This._OvertypeMode));\r\n }", "protected void onFocusGained()\n {\n ; // do nothing. \n }", "public override void Do()\r\n { \r\n if (TextEditor.UiScope == null)\r\n { \r\n // We dont want to process the input item if the editor has already been detached from its UiScope. \r\n return;\r\n } \r\n\r\n DoTextInput(TextEditor, _text, _isInsertKeyToggled, /*acceptControlCharacters:*/false);\r\n }", "public void Focus() {\n }", "@Override\n public void focusGained(FocusEvent arg0) {\n if(jtxt_username.getText().contains(\"Type in your username...\")){\n jtxt_username.setText(\"\");\n }\n }", "@Override\n public boolean onEditorAction(TextView v, int actionId, KeyEvent event) {\n return false;\n }", "@Override\n public boolean onEditorAction(TextView v, int actionId, KeyEvent event) {\n return false;\n }", "@Override\n public boolean onEditorAction(TextView v, int actionId, KeyEvent event) {\n return false;\n }", "@Override\n public boolean onEditorAction(TextView v, int actionId, KeyEvent event) {\n return false;\n }", "public void showFeedback() {\r\n\t\tsuper.showFeedback();\r\n\t\tif (initialKeyEvent != null) {\r\n\t\t\tText text = (Text) getCellEditor().getControl(); /* @see createCellEditorOn */\r\n\t\t\tString string = text.getText();\r\n\t\t\tString selectionText = text.getSelectionText();\r\n\t\t\ttext.setSelection(text.getText().length());\r\n\t\t\tif (selectionText.equals(string))\r\n\t\t\t\tinitialKeyEvent = null;\r\n\t\t}\r\n\t}", "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 }", "private void nombretxtActionPerformed(java.awt.event.ActionEvent evt) {\n }", "private void jTextField1KeyPressed(java.awt.event.KeyEvent evt) {\n \n }", "@Override\n public void caretUpdate(CaretEvent e) {\n if (!text.getText().isEmpty()) {\n find.setEnabled(true);\n }\n //check if any text is selected\n if (text.getSelectedText() != null) {\n cut.setEnabled(true);\n copy.setEnabled(true);\n } else {\n cut.setEnabled(false);\n copy.setEnabled(false);\n }\n //check if can undo or not\n if (undoManager.canUndo()) {\n undo.setEnabled(true);\n } else {\n undo.setEnabled(false);\n }\n //check if can redo or not\n if (undoManager.canRedo()) {\n redo.setEnabled(true);\n } else {\n redo.setEnabled(false);\n }\n }", "@Override\n\t\tpublic void focusGained(FocusEvent arg0) {\n\t\t\tSystem.out.println(\"Btn F gaing\");\t\n\t\t}", "@FXML\n public void handleKeyRelease() {\n String text = nameField.getText();\n boolean disableButtons = text.isEmpty() || text.trim().isEmpty(); //.trim() is used to set the button disable for space input\n helloButton.setDisable(disableButtons);\n byeButton.setDisable(disableButtons);\n }", "public void txtFoco(org.edisoncor.gui.textField.TextFieldRectBackground txt){\n txt.requestFocus();\n }", "@Override\n public void setFocus()\n {\n this.textInput.setFocus();\n }", "@Override\n public void mouseExited(MouseEvent e) {\n SearchBox source = (SearchBox) e.getComponent();\n if (source.getText().equals(\"\"))//if user didn't write anything, we set the default search box text.\n source.setText(defaultText);\n source.setFocusable(false);\n }", "protected void paintFocus(Graphics g, AbstractButton b, Rectangle viewRect, Rectangle textRect, Rectangle iconRect){\n }", "public boolean isFocused() {\n/* 807 */ throw new RuntimeException(\"Stub!\");\n/* */ }", "@Override\n\tpublic void setFocus() {\n\t\t\n\t}", "@Override\n\tpublic void setFocus() {\n\t\t\n\t}", "@Override\n\tpublic void setFocus() {\n\t\t\n\t}", "@Override\n\tpublic void setFocus() {\n\t\t\n\t}", "@Override\n\tpublic void setFocus() {\n\t\t\n\t}", "public interface MultiActionTextviewClickListener {\n /**\n * @param inputObject : Object which we had sent in request getting back when click\n * operation occur basically use to identify which part of Text\n * clicked. User operation type variable to identify for which\n * section of text clicked.\n */\n void onTextClick(InputObject inputObject);\n\n\n}", "public void requestFocus() {\n // Not supported for MenuComponents\n }", "protected void stopEnterText()\n\t{ if (text.getText().length() > 0) text.setText(text.getText().substring(0, text.getText().length() - 1)); }", "@Override\n public void focusGained(FocusEvent arg0) {\n if(jtxt_userName.getText().contains(\"xxx\")){\n jtxt_userName.setText(\"\");\n }\n }", "@Override\r\n\tpublic void setFocus() {\r\n\t}", "@Override\n public void setFocus() {\n }", "private void installKeyboardActions() {\n InputMap iMap = getInputMap(JComponent.\n WHEN_ANCESTOR_OF_FOCUSED_COMPONENT);\n SwingUtilities.replaceUIInputMap(spinner, JComponent.\n WHEN_ANCESTOR_OF_FOCUSED_COMPONENT,\n iMap); }", "@Override\r\n\t\tpublic void focusLost(FocusEvent e) {\n\t\t\tString content = tt.wordTextPane.getText();\r\n\t\t\ttt.setContent(content);\r\n\t\t\ttt.dealWith(content);\r\n\t\t}", "public void setFocus();", "@Override\r\n\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\tif(\"colorButton\".equals(e.getActionCommand())){//使颜色按钮\r\n\t\t\t\tString ct = tt.resultTextPane.getSelectedText();\r\n\t\t\t\tif(ct != null&&!\"\".equals(ct.trim())){//判断是否已经选取了文字\r\n\t\t\t\t\tFontColor fc = new FontColor(\"0\",this.tt);\r\n\t\t\t\t\tfc.setResizable(false);\r\n\t\t\t\t\tfc.setTitle(\"颜色编辑器\");\r\n\t\t\t\t\tint end = tt.resultTextPane.getSelectionEnd();\r\n\t\t\t\t\tint begin = tt.resultTextPane.getSelectionStart();\r\n\t\t\t\t\tMap<Integer,Integer> map = tt.numberIndex;\r\n\t\t\t\t\tfc.setBegin(map.get(begin));//选中区域的开始位置\r\n\t\t\t\t\tfc.setEnd(map.get(end));//选中区域的结束位置\r\n\t\t\t\t\tfc.setBounds(250, 200, 255, 265);\r\n\t\t\t\t\t\r\n\t\t\t\t\tDimension d=fc.getSize();\r\n\t\t\t\t\tPoint loc = basePanel.getLocationOnScreen();\r\n\t\t \tloc.translate(d.width/3,0);\r\n\t\t \tfc.setLocation(loc);\r\n\t\t \t\r\n\t\t\t\t\t\r\n\t\t\t\t\tfc.setModal(true);\r\n\t\t\t\t\tfc.setVisible(true);\r\n\t\t\t\t\t\r\n\t\t\t\t} else {//没有选取文字\r\n\t\t\t\t\t\r\n\t\t\t\t\tJOptionPane.showMessageDialog(null,\"请选择要编辑的文字\",\"提示\",1);\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\tif(\"linkButton\".equals(e.getActionCommand())){//是超链接按钮\r\n\t\t\t\tString ct = tt.resultTextPane.getSelectedText();\r\n\t\t\t\tif(ct != null&&!\"\".equals(ct.trim())){//判断是否已经选取了文字\r\n\t\t\t\t\tint end = tt.resultTextPane.getSelectionEnd();\r\n\t\t\t\t\tint begin = tt.resultTextPane.getSelectionStart();\r\n\t\t\t\t\tMap<Integer,Integer> map = tt.numberIndex;\r\n\t\r\n\t\t\t\t\tUnderLine ul = new UnderLine(map.get(begin),map.get(end),tt);\r\n\t\t\t\t\tul.setResizable(false);\r\n\t\t\t\t\tul.setTitle(\"超链接编辑\");\r\n\t\t\t\t\tul.setContentPane(ul.getTotalPanel());\r\n\t\t\t\t\tul.setBounds(250, 200, 255, 265);\r\n\t\t\t\t\t\r\n\t\t\t\t\tDimension d=ul.getSize();\r\n\t\t\t\t\tPoint loc = basePanel.getLocationOnScreen();\r\n\t\t \tloc.translate(d.width/3,0);\r\n\t\t \tul.setLocation(loc);\r\n\t\t\t\t\t\r\n\t\t\t\t\tul.setModal(true);\r\n\t\t\t\t\tul.setVisible(true);\r\n\t\t\t\t\t\r\n\t\t\t\t} else {//没有选择编辑的文字\r\n\t\t\t\t\t\r\n\t\t\t\t\tJOptionPane.showMessageDialog(null,\"请选择要编辑的文字\",\"提示\",1);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif(\"icoButton\".equals(e.getActionCommand())){//点击了图片选择按钮\r\n//\t\t\t\tSystem.out.println(resultTextPane.get);\r\n\t\t\t\t\r\n\t\t\t\tint end = tt.resultTextPane.getSelectionEnd();\r\n\t\t\t\tint begin = tt.resultTextPane.getSelectionStart();\r\n\t\t\t\tMap<Integer,Integer> map = tt.numberIndex;\r\n\t\t\t\t\r\n\t\t\t\tIco ico = new Ico(tt,map.get(begin));\r\n\t\t\t\tico.setTitle(\"图标编辑\");\r\n\t\t\t\tico.setResizable(false);\r\n\t\t\t\tico.setContentPane(ico.getTotalPanel());\r\n\t\t\t\tico.setBounds(250, 200, 255, 265);\r\n\r\n\t\t\t\tDimension d=ico.getSize();\r\n\t\t\t\tPoint loc = basePanel.getLocationOnScreen();\r\n\t \tloc.translate(d.width/3,0);\r\n\t \tico.setLocation(loc);\r\n\t \t\r\n\t \tico.setModal(true);\r\n\t\t\t\tico.setVisible(true);\r\n\t\t\t}\r\n\r\n\t\t}", "@Override\r\n\tpublic void setFocus() {\n\r\n\t}", "@Override\r\n\tpublic void setFocus() {\n\r\n\t}", "@Override\r\n\tpublic void setFocus() {\n\r\n\t}", "@Override\r\n\tpublic void setFocus() {\n\r\n\t}", "@Override\r\n\tpublic void setFocus() {\n\r\n\t}", "@Override\r\n\tpublic void setFocus() {\n\r\n\t}", "@Override\r\n\tpublic void setFocus() {\n\r\n\t}", "void showOtherUserTyping();", "public void clickOnText(String text);", "@Override\n public void focusGained(FocusEvent arg0) {\n if(jtxt_createCurrentAccPIN.getText().contains(\"xxx\")){\n jtxt_createCurrentAccPIN.setText(\"\");\n }\n }", "@Override\n\tpublic void setFocus() {\n\t}", "void setFocus();", "@Override\r\n public void activate() {\n getControl().setFont(getControl().getParent().getFont());\r\n }", "private static void forceTextComponentFocus(JTextComponent tc) {\n\n\t\tObject contextKey = getInstanceField(\"FOCUSED_COMPONENT\", tc);\n\t\tAppContext context = AppContext.getAppContext();\n\t\tcontext.put(contextKey, tc);\n\t}", "@Override\n\tpublic void setFocus() {\n\n\t}", "@Override\n\tpublic void setFocus() {\n\n\t}", "@Override\n\tpublic void setFocus() {\n\n\t}", "@Override\n\tpublic void setFocus() {\n\n\t}", "public void focusGained(FocusEvent e) {\n highlightText(0);\n }", "@Override\n public boolean onEditorAction(TextView v, int arg1, KeyEvent arg2) {\n \n return false;\n }", "@Override\n\tpublic boolean onTextContextMenuItem(int id)\n\t{\n\t\t// Do your thing:\n\t\tboolean consumed = super.onTextContextMenuItem(id);\n\t\t// React:\n\t\tswitch (id)\n\t\t{\n\t\t\tcase android.R.id.cut:\n\t\t\t\tonTextCut();\n\t\t\t\tbreak;\n\t\t\tcase android.R.id.paste:\n\t\t\t\tonTextPaste();\n\t\t\t\tbreak;\n\t\t\tcase android.R.id.copy:\n\t\t\t\tonTextCopy();\n\t\t}\n\t\treturn consumed;\n\t}", "@Override\r\n\tpublic void setFocus() {\n\t\t\r\n\t}", "@Override\n public void startEdit() {\n super.startEdit();\n\n if (text_field == null) {\n createTextField();\n }\n setText(null);\n setGraphic(text_field);\n text_field.selectAll();\n }", "@Override\n\t\t\t\t\tpublic boolean onEditorAction(TextView v, int actionId,\n\t\t\t\t\t\t\tKeyEvent event) {\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t}", "public void focusGained(FocusEvent e) {\n\t\t\tarea = (JTextArea) e.getSource();\n\t\t\tif( area.getText().equals(EditorGUI.PROMPT_DESCRIPTION) ){\n\t\t\t\tarea.setForeground(Color.BLACK);\n\t\t\t\tarea.setText(null);\n\t\t\t}\n\t\t}", "@Override\n public void focusGained(FocusEvent arg0) {\n if(jtxt_accno.getText().contains(\"xxx\")){\n jtxt_accno.setText(\"\");\n }\n }", "private void unfocusedAll() {\n this.nameTextField.setFocusTraversable(false);\n this.surnameTextField.setFocusTraversable(false);\n this.addressTextField.setFocusTraversable(false);\n this.postalCodeTextField.setFocusTraversable(false);\n }", "@Override\n public void focusGained(FocusEvent arg0) {\n if(jtxt_holderName.getText().contains(\"xxx\")){\n jtxt_holderName.setText(\"\");\n }\n }", "protected TextComposePanel getTextActionPanel() {\n return mTextActionPanel;\n }", "public boolean isFocusTraversable() {\n return true; // Not supported for MenuComponents\n }", "@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tif (typeCombox.getSelectedIndex() == 0) {\n\t\t\t\t\tunitText.setText(\"s\");\n\t\t\t\t\tunitText.setEnabled(false);\n\t\t\t\t} else {\n\t\t\t\t\tunitText.setText(\"\");\n\t\t\t\t\tunitText.setEnabled(true);\n\t\t\t\t}\n\t\t\t}", "public static void OnPreviewKeyDown(Object sender, KeyEventArgs e) \r\n { \r\n if (e.Key != Key.ImeProcessed)\r\n { \r\n return;\r\n }\r\n\r\n RichTextBox richTextBox = sender as RichTextBox; \r\n\r\n if (richTextBox == null) \r\n { \r\n return;\r\n } \r\n\r\n TextEditor This = richTextBox.TextEditor;\r\n\r\n if (This == null || !This._IsEnabled || This.IsReadOnly || !This._IsSourceInScope(e.OriginalSource)) \r\n {\r\n return; \r\n } \r\n\r\n // Ignore repeated events generated when the key is hold down for long time \r\n if (e.IsRepeat)\r\n {\r\n return;\r\n } \r\n\r\n if (This.TextStore == null || \r\n This.TextStore.IsComposing) \r\n {\r\n return; \r\n }\r\n\r\n if (richTextBox.Selection.IsEmpty)\r\n { \r\n return;\r\n } \r\n\r\n This.SetText(This.Selection, String.Empty, InputLanguageManager.Current.CurrentInputLanguage);\r\n\r\n // NB: we do not handle the event. We want the IME to handle it.\r\n }", "public boolean isFocusTraversable()\n {\n return false;\n }", "public void actionPerformed(ActionEvent e){\n repaint();\n requestFocus();\n }", "@Override\n\t\t\tpublic boolean onEditorAction(TextView v, int actionId, KeyEvent event) {\n\t\t\t\t\n\t\t\t\treturn false;\n\t\t\t}", "private void jtxtdscriptionFocusGained(java.awt.event.FocusEvent evt) {\n jtxtdscription.setSelectionStart(0);\n jtxtdscription.setSelectionEnd(jtxtdscription.getText().length());\n}", "@MediumTest\n @Feature({ \"TextSelection\" })\n public void testNoneditableSelectionActionBar() throws Throwable {\n doSelectionActionBarTest(TestPageType.NONEDITABLE);\n }", "ChatTarget getFocus();", "@Override\n public void keyboardAction( KeyEvent ke )\n {\n \n }", "public void installUI(JComponent c)\n/* */ {\n/* 162 */ this.delegate.installUI(c);\n/* */ \n/* 164 */ JTextComponent txt = (JTextComponent)c;\n/* */ \n/* */ \n/* */ \n/* 168 */ txt.addFocusListener(focusHandler);\n/* */ }", "@Override\r\n\tpublic void setText() {\n\t\t\r\n\t}", "@Override\n public void mousePressed(MouseEvent e) {\n// textFieldModifierNom_Match.setText(selectedMatch.getCodeMatch());\n\t }", "public void setupFocusable(){\n setFocusable(true);\n setFocusTraversalKeysEnabled(false);\n fwdButton.setFocusable(false);\n revButton.setFocusable(false);\n leftButton.setFocusable(false);\n rightButton.setFocusable(false);\n this.powerIcon.setFocusable(false);\n lServoWarn.setFocusable(false);\n startToggle.setFocusable(false);\n modeToggleButton.setFocusable(false);\n sensSlider.setFocusable(false);\n }", "private void setText() {\n throw new UnsupportedOperationException(\"Not supported yet.\"); //To change body of generated methods, choose Tools | Templates.\n }", "public void focusLost(FocusEvent e)\r\n/* 61: */ {\r\n/* 62:100 */ super.focusLost(e);\r\n/* 63:101 */ if (!e.isTemporary())\r\n/* 64: */ {\r\n/* 65:102 */ this.isKeyboardFocusEvent = true;\r\n/* 66:103 */ if (Boolean.TRUE.equals(getComponent().getClientProperty(\"JGoodies.setCaretToStartOnFocusLost\"))) {\r\n/* 67:104 */ setDot(0);\r\n/* 68: */ }\r\n/* 69: */ }\r\n/* 70: */ }" ]
[ "0.6574352", "0.6515615", "0.6442601", "0.639964", "0.63772655", "0.63670576", "0.6318644", "0.6268089", "0.6268089", "0.62240934", "0.62145156", "0.6212194", "0.6191877", "0.6183002", "0.6178807", "0.61607873", "0.6151147", "0.61493236", "0.6110675", "0.60957843", "0.60913855", "0.60528433", "0.6037504", "0.60331553", "0.6030001", "0.60285413", "0.60285413", "0.60285413", "0.60285413", "0.60156476", "0.59849167", "0.59641117", "0.59534544", "0.5948085", "0.59391785", "0.59209645", "0.5917431", "0.5914042", "0.5898934", "0.5894285", "0.58942026", "0.58921725", "0.58921725", "0.58921725", "0.58921725", "0.58921725", "0.5891472", "0.58883023", "0.5868333", "0.5862358", "0.58577156", "0.58384395", "0.5826447", "0.58211774", "0.58192056", "0.5815323", "0.5807378", "0.5807378", "0.5807378", "0.5807378", "0.5807378", "0.5807378", "0.5807378", "0.5804915", "0.57995796", "0.5799129", "0.5795055", "0.57938987", "0.5793173", "0.579084", "0.57874036", "0.57874036", "0.57874036", "0.57874036", "0.5783384", "0.5779908", "0.57668865", "0.57645476", "0.5764253", "0.57631934", "0.5757194", "0.575504", "0.57539034", "0.57532215", "0.5751357", "0.57463384", "0.57437533", "0.57421345", "0.57406694", "0.5736968", "0.5736318", "0.5733183", "0.57318115", "0.57302105", "0.57289755", "0.5726463", "0.57244563", "0.5723241", "0.57206845", "0.5717127", "0.5706349" ]
0.0
-1
Simulates the user pressing the 'Enter' key on the given text field
public static void triggerEnter(Component c) { // text components will not perform built-in actions if they are not focused triggerFocusGained(c); triggerActionKey(c, 0, KeyEvent.VK_ENTER); waitForSwing(); }
{ "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}", "public static void pressEnterKey() {\n\t\tActions act = new Actions(Browser.Driver);\n\t\tact.sendKeys(Keys.ENTER).perform();\n\t}", "@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}", "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 }", "public void keyPressed(KeyEvent e) {\n if (e.getKeyCode()==KeyEvent.VK_ENTER){\n enter();\n } \n }", "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\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}", "protected void enterText(InputHandler input)\n\t{\n\t\tif (clearCharBuffer)\n\t\t{\n\t\t\tinput.consumeLastTypedChar();\n\t\t\tclearCharBuffer = false;\n\t\t}\n\t\tchar c = input.consumeLastTypedChar();\n\t\tif (c == '\\b')\n\t\t{\n\t\t\t// Remove a character if the key was backspace\n\t\t\tremoveChar();\n\t\t}\n\t\telse if (c == '\\n')\n\t\t{\n\t\t\t// Call the enter method if the enter key was pressed\n\t\t\tenterPressed();\n\t\t}\n\t\telse if (c != 0)\n\t\t{\n\t\t\t// Add a character to the text field\n\t\t\tputChar(c);\n\t\t}\n\t}", "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}", "void redirectToEnterKey();", "public void keyPressed(KeyEvent e) {\n if(e.getKeyCode()==KeyEvent.VK_ENTER){\n\n }\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}", "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}", "@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}", "public String enterPressed();", "@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}", "@Override\r\npublic void keyTyped(KeyEvent e) {\n\tif(e.getKeyCode()==KeyEvent.VK_ENTER) {\r\n\t\tinput.setEditable(true);\r\n\t}\r\n}", "@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}", "@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}", "private void txt_montoKeyReleased(java.awt.event.KeyEvent evt) {\n if (evt.getKeyCode()==KeyEvent.VK_ENTER){\n insertarRubro();\n } \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}", "@Test\n\tpublic void testEnterOnInputElement() {\n\n\t\tvar prompt = openPrompt();\n\t\tprompt.getInputElement().sendEvent(DomEventType.ENTER);\n\t\tassertNoDisplayedModalDialog();\n\t\tassertPromptInputApplied();\n\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 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}", "@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}", "public String pressEnterFromKeyboard(String object, String data) {\n logger.debug(\"entered into pressEnterFromKeyboard\");\n try {\n Actions act = new Actions(driver);\n Action pressEnterKey = act.sendKeys(wait.until(explicitWaitForElement(By.xpath(OR.getProperty(object)))), Keys.ENTER).build();\n pressEnterKey.perform();\n return Constants.KEYWORD_PASS;\n } \ncatch(TimeoutException ex)\n\t\t\n\t\t{\n\t\t\treturn Constants.KEYWORD_FAIL +\"Cause: \"+ ex.getCause();\n\t\t}\n catch (Exception e) {\n \n return Constants.KEYWORD_FAIL + e.getMessage();\n }\n }", "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 }", "@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 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 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}", "public static void enterWithKey(WebElement element, String value) {\r\n\t\ttry {\r\n\t\t\telement.sendKeys(value + Keys.ENTER);\r\n\t\t} catch (Exception e) {\r\n\t\t\tSystem.out.println(\"WebElement not found \" + e);\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t}", "public void setEnterAction(OnEnter et){\n this.enterText = et;\n }", "@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 }", "public void enterAnswer(String text) {\n\t\ttextBox.clear();\n\t\ttextBox.sendKeys(text);\n\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 }", "@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 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}", "@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}", "@FXML\n\tvoid inputPass(KeyEvent event) {\n\t\tif (event.getCode().equals(KeyCode.ENTER))\n\t\t\tbtnLogin.fire();\n\t}", "void urlFieldEnterKeyPressed();", "private void pressAnyKey() {\n Scanner myScanner = new Scanner(System.in);\n System.out.println(\"Press Enter key to continue...\");\n myScanner.nextLine();\n }", "@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}", "@Override\n public void keyPressed(KeyEvent ke) {\n if (ke.getSource().equals(frmMain.getMessageBox()) && ke.getKeyCode() == KeyEvent.VK_ENTER) {\n sendContent();\n }\n }", "@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}", "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}", "public void sendText(final String text, final boolean pressEnter) {\n\t\tmethods.inputManager.sendKeys(text, pressEnter);\n\t}", "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}", "public String writeInInputHitEnter(String object, String data) {\n\t\tlogger.debug(\"Writing in text box\");\n\n\t\ttry {\n\n\t\tWebElement ele=\twait.until(explicitWaitForElement(By.xpath(OR.getProperty(object))));\n\t\tele.clear();\n ((JavascriptExecutor) driver).executeScript(\"arguments[0].value = arguments[1]\", ele, data);\n\t\tele.sendKeys(Keys.RETURN);\n\t\t\t\t\n\t\t}catch(TimeoutException ex)\n\t\t\n\t\t{\n\t\t\treturn Constants.KEYWORD_FAIL +\"Cause: \"+ ex.getCause();\n\t\t} catch (Exception e) {\n\t\t\n\t\t\treturn Constants.KEYWORD_FAIL + \" Unable to write \" + e.getLocalizedMessage();\n\t\t}\n\t\treturn Constants.KEYWORD_PASS;\n\n\t}", "public void loginByHittingEnterInPasswordBox(String username, String password) {\n\t\t\n\t\tusernameBox.sendKeys(username);\n\t\tpasswordBox.sendKeys(password, Keys.ENTER);\n\t}", "@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 static void enter() throws CheetahException {\n\t\ttry {\n\t\t\tRobot robot = new Robot();\n\t\t\trobot.keyPress(KeyEvent.VK_ENTER);\n\t\t\trobot.keyRelease(KeyEvent.VK_ENTER);\n\t\t} catch (Exception e) {\n\t\t\tthrow new CheetahException(e);\n\n\t\t}\n\n\t}", "private static void WaitForEnter(Scanner scn ){\n scn.nextLine();\n System.out.println(\"\\n\\nPress Enter key to continue . . .\");\n scn.nextLine();\n }", "private View.OnKeyListener onEnterPerformSearch() {\n return new View.OnKeyListener() {\n\n @Override\n public boolean onKey(View v, int keyCode, KeyEvent event) {\n try {\n if (event.getAction() == KeyEvent.ACTION_DOWN\n && keyCode == KeyEvent.KEYCODE_ENTER) {\n performSearch();\n return true;\n }\n if (event.getAction() == KeyEvent.ACTION_DOWN\n && keyCode == KEYCODE_SCAN_HARDWARE_BUTTON) {\n mSearchField.setText(\"\");\n return true;\n }\n return false;\n }\n catch (final Exception e) {\n showSearchErrorDialog();\n logError(e);\n return false;\n }\n }\n };\n }", "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}", "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}", "@FXML\n\tprivate void onKeyReleased(KeyEvent e) {\n\t\tif (e.getCode() == KeyCode.ENTER)\n\t\t\tanswerQuestion();\n\t}", "public void actionPerformed(ActionEvent event) {\n sendData(event.getActionCommand());\n enterField.setText(\"\");\n }", "@Override\n\t\t\tpublic void keyPressed(KeyEvent typedKey)\n\t\t\t{\n\t\t\t\tif(typedKey.getID() == KeyEvent.VK_ENTER)\n\t\t\t\t{\n\t\t\t\t\tgatherInfo();\n\t\t\t\t}\n\t\t\t\t\n\t\t\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 actionPerformed(ActionEvent e) { \n enter();\n }", "public void enterText(WebElement element,String value) {\nelement.sendKeys(value);\n\t}", "public void onKeyUp(KeyUpEvent event) {\r\n if (event.getNativeKeyCode() == KeyCodes.KEY_ENTER) {\r\n handleEvent();\r\n }\r\n }", "@And(\"^I enter \\\"([^\\\"]*)\\\" as \\\"([^\\\"]*)\\\"$\")\n\t\tpublic void i_enter_as(String object, String text) {\n\t\t\t\tSystem.out.println(\"Entering in \"+object+ \"value\"+text);\n\t\t\t\t\n\t\t\t\tselenium.type(text, object);\n\t\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 }", "@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\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 void enterTextinTextbox(WebElement element, String text) {\n\n\t\telement.clear();\n\t\telement.sendKeys(text);\n\t}", "@Override\r\n\tpublic void enter() {\n\t\t\r\n\t}", "private void enterCriteriaToSerachField(String text) {\n WebElement searchField = findElementWithWait(By.id(\"gh-ac\"));\n searchField.clear();\n searchField.sendKeys(text);\n searchField.sendKeys(Keys.RETURN);\n }", "@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\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\n\tpublic void enter(ViewChangeEvent event) {\n\t\tuserTextField.focus();\n\t}", "@FXML\n public void onEnter() {\n String userInput = inputField.getText();\n String response = duke.getResponse(userInput);\n lastCommandLabel.setText(response);\n ExpenseList expenseList = duke.expenseList;\n updateExpenseListView();\n inputField.clear();\n updateTotalSpentLabel();\n }", "public void enter();", "@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 }", "@Override\n public void handle(KeyEvent event) {\n if (event.getCode() == KeyCode.ENTER || kcUp.match(event) || kcDown.match(event)) {\n /*\n * Requests Focus for the first Field in the currently selected Tab.\n */\n getFieldForIndex(tabs.getSelectionModel().getSelectedIndex()).requestFocus();\n /*\n * Checks, if the KeyCombination for Next-Tab is pressed.\n */\n } else if (kcPlus.match(event)) {\n /*\n * Switches to the next Tab to the right (first One, if the rightmost Tab was already \n * selected) and requests Focus for it's first Field.\n */\n tabs.getSelectionModel().select(Math.floorMod(\n tabs.getSelectionModel().getSelectedIndex() + 1, 4));\n getFieldForIndex(tabs.getSelectionModel().getSelectedIndex()).requestFocus();\n /*\n * Checks, if the KeyCombination for Previous-Tab is pressed.\n */\n } else if (kcMinus.match(event)) {\n /*\n * Switches to the next Tab to the left (first One, if the leftmost Tab was already \n * selected) and requests Focus for it's first Field.\n */\n tabs.getSelectionModel().select(Math.floorMod(\n tabs.getSelectionModel().getSelectedIndex() - 1, 4));\n getFieldForIndex(tabs.getSelectionModel().getSelectedIndex()).requestFocus();\n }\n }", "@FXML private void pwdKeyEntered(KeyEvent keyEvent) {\n pwdClick();\n if(keyEvent.getCode() == KeyCode.ENTER)\n buttonLoginClick();\n }", "@Override\n public void actionPerformed(ActionEvent e) { // Acionado qnd aperta ENTER\n String string = \"\";\n // Fechar janela de login\n setVisible(false);\n\n String usuario = textField.getText();\n String senha = passwordField.getText();\n\n // Usuário pressionou ENTER no JTextField textField[0]\n if (e.getSource() == textField || e.getSource() == passwordField) {\n if (usuario.equals(\"Daniel\")) {\n if (senha.equals(\"Daniel21\")) {\n JOptionPane.showMessageDialog(null, \"Entrou no sistema!\", \"Usuário: \" + usuario,\n JOptionPane.INFORMATION_MESSAGE);\n } else {\n JOptionPane.showMessageDialog(null, \"Senha Incorreta!\", \"ERRO\", JOptionPane.ERROR_MESSAGE);\n }\n } else {\n JOptionPane.showMessageDialog(null, \"Usuário Inválido!\", \"ERRO\", JOptionPane.ERROR_MESSAGE);\n }\n }\n\n // mostrar janela de login\n setVisible(true);\n }", "public String GetInput(JTextField textField, String text)\r\n {\r\n textField.selectAll();\r\n text = textField.getText();\r\n JOptionPane.showMessageDialog(this,\"<html><font size = 5>You enter: \\\"\"+ text+\"\\\"! \"\r\n +\"Please press \\\"OK\\\" to continue or press \\\"x\\\"\"\r\n + \" to exit</font></html>\");\r\n textField.setText(\"\");\r\n return text;\r\n }", "@Override\n\t\t\tpublic void keyPressed(KeyEvent arg0) {\n\t\t\t\tif (arg0.isActionKey() || arg0.getKeyCode() == KeyEvent.VK_ENTER\n\t\t\t\t\t\t|| arg0.getKeyCode() == KeyEvent.VK_BACK_SPACE) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tJTextField txt = (JTextField) arg0.getComponent();\n\t\t\t\tif (txt.getText().length() == 9) {\n\t\t\t\t\t\n\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Možete uneti maksimalno 9 karaktera!\");\n\t\t\t\t\ttxt.setText(txt.getText().substring(0, 9));\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}", "public static final String enter(int count) {\n if (count == 1)\n return ENTER;\n return repeat(\"ENTER\"/*I18nOK:EMS*/, count);\n }", "@FXML\n\tpublic void handleKeyPressedCryptoCurrency(KeyEvent event) {\n\t\tif (event.getCode() == KeyCode.ENTER) {\n\t\t\tcryptoCurrency.setText(cryptoCurrency.getText());\n\t\t\ttype.requestFocus();\n\t\t}\n\t}", "public void enterLogin (String login) {\n actionsWithOurElements.enterTextInToElement(inputLogin, login);\n }", "public static void enterText(String objXpath, String enterValue, String objectName) throws IOException{\n\n\t\tif(driver.findElement(By.xpath(objXpath)).isDisplayed()){\n\t\t\tdriver.findElement(By.xpath(objXpath)).clear();\n\t\t\tdriver.findElement(By.xpath(objXpath)).sendKeys(enterValue);\n\n\t\t\tUpdate_Report( \"Pass\", \"enterText\", objectName + \" \"+ enterValue + \" is entered in \" + objectName + \" field\");\n\t\t}else{\n\t\t\tUpdate_Report( \"Fail\", \"enterText\", objectName + \" field does not exist in the application\");\n\t\t}\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}", "@Override\n\tpublic void keyPressed(KeyEvent e) {\n\t\tif(e.getKeyCode() == KeyEvent.VK_ENTER){\n\t\t\tif(state == 0){\n\t\t\t\tint temp = numberHighlight.i;\n\t\t\t\t//stop number highlight thread;\n\t\t\t\tnumberHighlight.cancel(true);\n\t\t\t\t//update text field with number\n\t\t\t\ttextField.setText(textField.getText() + String.valueOf(temp));\n\t\t\t\tnumberButton[temp].setBackground(new Color(224, 223, 219));\n\t\t\t\tfunctionHighlight.execute();\n\t\t\t\tstate = 1;\n\t\t\t}\n\t\t\telse if(state == 1){\n\t\t\t\top = functionHighlight.i;\n\t\t\t\ttextField.setText(textField.getText() + getFunc(op));\n\t\t\t\t//stop function highlight thread\n\t\t\t\tfunctionHighlight.cancel(true);\n\t\t\t\t//one object can only be run once therefore new object needs to be created\n\t\t\t\tnumberHighlight = new objectHighlight(numberButton, 0);\n\t\t\t\tnumberHighlight.execute();\n\t\t\t\tstate = 2;\n\t\t\t}\n\t\t\telse if(state == 2){\n\t\t\t\tint temp = numberHighlight.i;\n\t\t\t\tnumberHighlight.cancel(true);\n\t\t\t\ttextField.setText(textField.getText() + String.valueOf(temp));\n\t\t\t\tnumberButton[temp].setBackground(new Color(224, 223, 219));\n\t\t\t\tfunctionButton[op].setBackground(new Color(224, 223, 219));\n\t\t\t\tfunctionButton[op].setBackground(new Color(224, 223, 219));\n\t\t\t\ttextField.setText(evaluateExpr(textField.getText()));\n\t\t\t\t//after evaluation return to function enter state\n\t\t\t\tstate = 1;\n\t\t\t\tfunctionHighlight = new objectHighlight(functionButton, 1);\n\t\t\t\tfunctionHighlight.execute();\n\t\t\t}\n\t\t}\n\t\t//clear the user input\n\t\tif(e.getKeyCode() == KeyEvent.VK_C){\n\t\t\tif(state == 1){\n\t\t\t\t\top = functionHighlight.i;\n\t\t\t\t\tfunctionHighlight.cancel(true);\n\t\t\t\t\tnumberHighlight = new objectHighlight(numberButton, 0);\n\t\t\t\t\tnumberHighlight.execute();\n\t\t\t\t\tfunctionButton[op].setBackground(new Color(224, 223, 219));\n\t\t\t\t\tfunctionHighlight = new objectHighlight(functionButton, 1);\n\t\t\t\t\ttextField.setText(\"\");\n\t\t\t\t\tstate = 0;\n\t\t\t\t}\n\t\t\t\telse if(state == 2){\n\t\t\t\t\tfunctionButton[op].setBackground(new Color(224, 223, 219));\n\t\t\t\t\tfunctionHighlight = new objectHighlight(functionButton, 1);\n\t\t\t\t\ttextField.setText(\"\");\n\t\t\t\t\tstate = 0;\n\t\t\t\t}\n\t\t\t\telse if(state ==3){\n\t\t\t\t\ttextField.setText(\"\");\n\t\t\t\t\tstate = 0;\n\t\t\t\t\tnumberHighlight = new objectHighlight(numberButton, 0);\n\t\t\t\t\tnumberHighlight.execute();\n\t\t\t\t}\n\t\t}\n\t}", "@Override\n\tpublic void enter() {\n\t}", "@Override\r\n\tpublic boolean onKeyUp (int keyCode, KeyEvent event) {\r\n\t\tif (keyCode == KeyEvent.KEYCODE_ENTER) {\r\n\t\t\tif (mPayeeText.hasFocus()) {\r\n\t\t\t\t//sends focus to mAmountText (user pressed \"Next\")\r\n\t\t\t\tmAmountText.requestFocus();\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\t\t\telse if (mCategoryText.hasFocus()) {\r\n\t\t\t\t//sends focus to mMemoText (user pressed \"Next\")\r\n\t\t\t\tmTagText.requestFocus();\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\t\t\telse if (mTagText.hasFocus()) {\r\n\t\t\t\t//sends focus to mTagText (user pressed \"Next\")\r\n\t\t\t\tmMemoText.requestFocus();\r\n\t\t\t\treturn true;\r\n\t\t\t} else if (mMemoText.hasFocus()) {\r\n\t\t\t\t//closes soft keyboard (user pressed \"Done\")\r\n\t\t\t\tInputMethodManager inputManager = (InputMethodManager)\r\n\t\t\t\tgetSystemService(Context.INPUT_METHOD_SERVICE);\r\n\t\t\t\tinputManager.hideSoftInputFromWindow(mMemoText.getWindowToken\r\n\t\t\t\t\t\t(), InputMethodManager.HIDE_NOT_ALWAYS);\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn false;\r\n\t}", "@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 }", "@Override\r\n\t\t\tpublic void run() {\n\t\t\t\tenterField.setEditable(editable);\t//将文本域置为可编辑的状态\r\n\t\t\t}", "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 }", "@Override\r\n public void handle(KeyEvent ke){\n if (ke.getCode().equals(KeyCode.ENTER) || ke.getCode().equals(KeyCode.TAB)){ \r\n //Valida que el evento se haya generado en el campo de busqueda\r\n if(((Node)ke.getSource()).getId().equals(\"tf_buscar\")){ \r\n //Solicita los datos y envia la Respuesta a imprimirse en la Pantalla\r\n Datos.setLog_cguias(new log_CGuias()); \r\n boolean boo = Ln.getInstance().check_log_CGuias_caja(tf_buscar.getText()); \r\n numGuias = 0;\r\n if(boo){\r\n Datos.setRep_log_cguias(Ln.getInstance().find_log_CGuias(tf_buscar.getText(), \"\", \"ncaja\", Integer.parseInt(rows)));\r\n loadTable(Datos.getRep_log_cguias()); \r\n }\r\n else{\r\n change_im_val(0, im_checkg); \r\n Gui.getInstance().showMessage(\"El Nro. Guia NO existe en la \" + ScreenName, \"A\");\r\n tf_nroguia.requestFocus();\r\n }\r\n tf_buscar.setVisible(false); //establece el textField como oculto al finalizar\r\n }\r\n }\r\n }", "@Override\n public boolean onKey(View v, int keyCode, KeyEvent event) {\n if (keyCode == KeyEvent.KEYCODE_ENTER && event.getAction() == KeyEvent.ACTION_UP) {\n //enter key has been pressed and we hide the keyboard\n hideKeyboard();\n editPenalty.setCursorVisible(false);\n rootView.requestFocus();\n //return true to let it know we handled the event\n return true;\n }\n return false;\n }", "@Override\n\t\tpublic boolean onKey(View v, int keyCode, KeyEvent event) {\n\t\t\trefreshData(mAutoEdit.getText().toString().trim());\n\n\t\t\tif (keyCode == KeyEvent.KEYCODE_ENTER) {\n\n\t\t\t\tInputMethodManager imm = (InputMethodManager) v.getContext().getSystemService(Context.INPUT_METHOD_SERVICE);\n\n\t\t\t\tif (imm.isActive()) {\n\n\t\t\t\t\timm.hideSoftInputFromWindow(v.getApplicationWindowToken(), 0);\n\n\t\t\t\t}\n\n\t\t\t\treturn true;\n\n\t\t\t}\n\n\t\t\treturn false;\n\n\t\t}", "protected void beginEnterText()\n\t{\n\t\tdisplayingCaret = true;\n\t\ttext.appendText(\"|\");\n\t\tcaretBlinkTime = 0;\n\t\tclearCharBuffer = true;\n\t}", "@Override\n public void handle(KeyEvent keyEvent) {\n if(keyEvent.getCode() == KeyCode.ENTER){\n ChatPanel chatPanel=game.getChatPanel();\n Message mess=new Message(facade.getClientAccount(),\n chatPanel.getSelectedAccount(),chatPanel.getChatMessage());\n mess.setStatus(chatPanel.getSelectedOption());\n mess.setGameIndex(facade.getGameIndex());\n mess.setSlotIndex(facade.getHeroSlot());\n chatPanel.addChatMessage(facade.getUsername(),chatPanel.getChatMessage());\n com.write(mess);\n }\n }", "public void sendTextInstant(final String text, final boolean pressEnter) {\n\t\tmethods.inputManager.sendKeysInstant(text, pressEnter);\n\t}", "public static void enterText(String objXpath, String enterValue, String objectName){\n\n\t\tif(driver.findElement(By.xpath(objXpath)).isDisplayed()){\n\t\t\tdriver.findElement(By.xpath(objXpath)).clear();\n\t\t\tdriver.findElement(By.xpath(objXpath)).sendKeys(enterValue);\n\t\t\tSystem.out.println(\"Pass: \" + objectName + \" \"+ enterValue + \" is entered in \" + objectName + \" field\");\n\t\t}else{\n\t\t\tSystem.out.println(\"Fail: \" + objectName + \" field does not exist in the application\");\n\t\t}\n\t}", "public void enter() {\n process(3);\n }", "private TextField textFieldMensagem(int posX, int posY) {\n TextField entradaTexto = new TextField();//Criando uma nova entrada de Texto\n entradaTexto.setPrefWidth(230);//Adicionando Largura\n entradaTexto.setPrefHeight(26);//Adicionando Altura\n entradaTexto.setLayoutX(posX);//Adicioanndo posicao X\n entradaTexto.setLayoutY(posY);//Adicionando posicao Y\n entradaTexto.setFocusTraversable(false);//Desabilita o foco inicial\n entradaTexto.setPromptText(\"Digite e aperte ENTER\");//Adicionando texto base\n entradaTexto.setPadding(new Insets(0,30,0,5));\n\n //Adiciona um funcao ao apertar botao [ENTER]\n entradaTexto.setOnKeyReleased((KeyEvent key) -> {\n if (key.getCode() == KeyCode.ENTER) {\n this.enviarMensagem(entradaTexto.getText());\n entradaTexto.setText(\"\");//Limpa a caixa de Texto\n }\n });\n\n return entradaTexto;\n }" ]
[ "0.78321296", "0.76086015", "0.73714596", "0.7312808", "0.7228152", "0.7117411", "0.6998213", "0.69548935", "0.69498825", "0.69248945", "0.684238", "0.6823254", "0.6770565", "0.6737059", "0.67275804", "0.670139", "0.6699469", "0.66849434", "0.6660785", "0.6655484", "0.6652474", "0.6629473", "0.6621164", "0.65942097", "0.6555513", "0.6554005", "0.6526502", "0.65050495", "0.64585334", "0.6443303", "0.64314216", "0.64308417", "0.6421483", "0.6417517", "0.6412507", "0.6406755", "0.6399574", "0.63907975", "0.63872993", "0.6361815", "0.63520694", "0.63430196", "0.6341123", "0.63007903", "0.62944204", "0.62495834", "0.62363315", "0.6183437", "0.61473733", "0.61399174", "0.6121473", "0.6119744", "0.61125475", "0.60954034", "0.60889727", "0.60693556", "0.6060425", "0.6022962", "0.6015022", "0.5988359", "0.59846216", "0.5958241", "0.5951434", "0.594335", "0.591419", "0.59017044", "0.58843356", "0.5880741", "0.5876665", "0.5875995", "0.58548594", "0.5853207", "0.58344865", "0.58128816", "0.5802968", "0.57931507", "0.5787802", "0.57771355", "0.5761421", "0.57578653", "0.5739749", "0.57374024", "0.5733488", "0.5728833", "0.5726891", "0.57205683", "0.5716184", "0.5715336", "0.5707747", "0.5707346", "0.5706155", "0.57001984", "0.5679878", "0.5678863", "0.5677155", "0.5673128", "0.5667252", "0.5648312", "0.563131", "0.56263936" ]
0.65025866
28
Simulates a focus event on the given component
private static void triggerFocusGained(Component component) { FocusListener[] listeners = component.getFocusListeners(); FocusEvent e = new FocusEvent(component, (int) System.currentTimeMillis()); runSwing(() -> { for (FocusListener l : listeners) { l.focusGained(e); } }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void focusGained(FocusEvent event) {}", "public void focus() {}", "void setFocusedComponent(GComponent component)\n {\n if (!this.components.contains(component))\n throw new IllegalArgumentException(String.format(\"The component %s is not part of this context\",component));\n \n this.focusedComponent = component;\n \n // TODO: Fire events on the old and new object\n }", "void focus();", "void focus();", "public void Focus() {\n }", "public void focusGained(FocusEvent e)\r\n {\r\n // TODO Auto-generated method stub\r\n\r\n }", "public void focusNextComponent(Component paramComponent)\n/* */ {\n/* 1380 */ if (paramComponent != null) {\n/* 1381 */ paramComponent.transferFocus();\n/* */ }\n/* */ }", "public void focusGained( FocusEvent fe) \n {\n }", "public void focusGained(FocusEvent e)\r\n {\n }", "public void fireFormWrappedFocus(FormWrapEvent evt);", "public void setFocus();", "@Override\n\t\tpublic void focusGained(FocusEvent arg0) {\n\t\t\t\n\t\t}", "@Override\n\t\tpublic void focusGained(FocusEvent arg0) {\n\t\t\t\n\t\t}", "@Override\n\tpublic void focusGained(FocusEvent arg0) {\n\t\t\n\t}", "@Override\n\tpublic void focusGained(FocusEvent arg0) {\n\t\t\n\t}", "void setFocus();", "@Override\r\n public void focusGained(FocusEvent e) {\n }", "public void setFocus() {\n }", "@Override\r\n\tpublic void focus() {\r\n\t\tactivate();\r\n\t\ttoFront();\r\n\t}", "@Override\n\t\t\t\t\t\tpublic void focusGained(FocusEvent arg0) {\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t}", "@Override\n\t\t\t\t\t\tpublic void focusGained(FocusEvent arg0) {\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t}", "@Override\n\t\t\t\t\t\tpublic void focusGained(FocusEvent arg0) {\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t}", "@Override\n\t\t\t\t\t\tpublic void focusGained(FocusEvent arg0) {\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t}", "@Override\n\t\t\t\t\t\tpublic void focusGained(FocusEvent arg0) {\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t}", "@Override\n\t\t\t\t\t\tpublic void focusGained(FocusEvent arg0) {\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t}", "@Override\n\t\t\t\t\t\tpublic void focusGained(FocusEvent arg0) {\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t}", "@Override\r\n\tpublic void setFocus() {\r\n\t}", "@Override\n\t\t\tpublic void focusGained(FocusEvent arg0) {\n\t\t\t\t\n\t\t\t}", "@Override\n\t\t\tpublic void focusGained(FocusEvent arg0) {\n\t\t\t\t\n\t\t\t}", "@Override\n\t\t\tpublic void focusGained(FocusEvent arg0) {\n\t\t\t\t\n\t\t\t}", "@Override\n\t\t\t\t\tpublic void focusGained(FocusEvent arg0) {\n\t\t\t\t\t\t\n\t\t\t\t\t}", "@Override\n\t\t\t\t\tpublic void focusGained(FocusEvent arg0) {\n\t\t\t\t\t\t\n\t\t\t\t\t}", "@Override\n\tpublic void focusGained(FocusEvent e) {\n\t}", "@Override\r\n\t\t\t\t\t\t\tpublic void focusGained(FocusEvent arg0) {\n\r\n\t\t\t\t\t\t\t}", "@Override\n public void setFocus() {\n }", "@Override\n\tpublic void setFocus() {\n\t}", "@Override\r\n\t\t\tpublic void focusGained(FocusEvent arg0) {\n\t\t\t\t\r\n\t\t\t}", "public void setFocus() {\n\t}", "@Override\r\n public void focusGained(FocusEvent event) {\r\n }", "@Override\n\tpublic void setFocus() {\n\n\t}", "@Override\n\tpublic void setFocus() {\n\n\t}", "@Override\n\tpublic void setFocus() {\n\n\t}", "@Override\n\tpublic void setFocus() {\n\n\t}", "@Override\r\n\tpublic void setFocus() {\n\r\n\t}", "@Override\r\n\tpublic void setFocus() {\n\r\n\t}", "@Override\r\n\tpublic void setFocus() {\n\r\n\t}", "@Override\r\n\tpublic void setFocus() {\n\r\n\t}", "@Override\r\n\tpublic void setFocus() {\n\r\n\t}", "@Override\r\n\tpublic void setFocus() {\n\r\n\t}", "@Override\r\n\tpublic void setFocus() {\n\r\n\t}", "public void requestFocus() {\n // Not supported for MenuComponents\n }", "@Override\r\n\tpublic void setFocus() {\n\t\t\r\n\t}", "public void testFocusListener() throws Exception\n {\n checkFormEventListener(FOCUS_BUILDER, \"FOCUS\");\n }", "@Override\n\tpublic void setFocus() {\n\t\t\n\t}", "@Override\n\tpublic void setFocus() {\n\t\t\n\t}", "@Override\n\tpublic void setFocus() {\n\t\t\n\t}", "@Override\n\tpublic void setFocus() {\n\t\t\n\t}", "@Override\n\tpublic void setFocus() {\n\t\t\n\t}", "@Override\n public void focusGained(FocusEvent e) {\n }", "@Override\n public void focusGained(FocusEvent e) {\n }", "@Override\n public void focusGained(FocusEvent e) {\n }", "@Override\n public void focusGained(FocusEvent e) {\n }", "@Override\r\n\tpublic void setFocus() {\r\n\t\tif (getControl() != null)\r\n\t\t\tgetControl().setFocus();\r\n\t}", "@Override\r\n\t\tpublic void focusGained(FocusEvent e) {\n\t\t\t\r\n\t\t}", "@Override\r\n\t\tpublic void focusGained(FocusEvent e) {\n\t\t\t\r\n\t\t}", "@Override\r\n\t\tpublic void focusGained(FocusEvent e) {\n\t\t\t\r\n\t\t}", "@Override\n\t\tpublic void focusGained(FocusEvent arg0) {\n\t\t\tSystem.out.println(\"Btn F gaing\");\t\n\t\t}", "void addFocus();", "public void setFocus() {\n \t\tex.setFocus();\n \t}", "public void upFocusCycle(Component paramComponent)\n/* */ {\n/* 1398 */ if (paramComponent != null) {\n/* 1399 */ paramComponent.transferFocusUpCycle();\n/* */ }\n/* */ }", "@Override\n\t\t\tpublic void focusGained(FocusEvent e) {\n\t\t\t\t\n\t\t\t}", "@Override\n\t\t\tpublic void focusGained(FocusEvent e) {\n\t\t\t\t\n\t\t\t}", "@Override\n public void focusGained(FocusEvent e) {\n }", "@Override\n public void setFocus()\n {\n this.textInput.setFocus();\n }", "void setFocus( ChatTarget focus );", "public void focusGained(FocusEvent e) {\n\t\trepaint();\n\t}", "public void focusLost(FocusEvent e) { }", "@Override\n public void focusGained(final FocusEvent e) {\n }", "public void focusGained(FocusEvent fe) {\n //colEdScroller.getViewport().scrollRectToVisible(((JComponent)fe.getComponent()).getBounds(new Rectangle()));\n }", "public void mouseClicked(MouseEvent e){\n\r\n TShapePanel.this.requestFocus(); //Aug 06\r\n\r\n }", "public void setFocus() {\n\t\tui.setFocus();\n\t}", "@Override\n\t\tpublic void focusGained(FocusEvent e) {\t\tSystem.out.println(\"Focus Gained\");\n\t\t}", "@Override\n public void focus(FieldEvents.FocusEvent event) {\n TextField tf = (TextField) event.getSource();\n tf.setCursorPosition(tf.getValue().length());\n }", "public boolean gotFocus(Event e, Object arg) {\n return true;\n }", "public void setFocus() {\r\n\t\tIFormPart part = _parts.get(0);\r\n\t\tif ( part != null ) part.setFocus();\r\n\t}", "@Override\n\t\t\tpublic void mouseClicked(MouseEvent arg0) {\n\t\t\t\trequestFocusInWindow();\n\t\t\t}", "public void requestFocus()\n {\n super.requestFocus();\n field.requestFocus();\n }", "@Override\n\t\t\tpublic void mouseClicked(MouseEvent me) {\n\t\t\t\trequestFocusInWindow();\n\t\t\t}", "public void setFocus(boolean focus) {\n if (focus) {\n getContainerElement().focus();\n } else {\n getContainerElement().blur();\n }\n }", "public void focusLost(FocusEvent e)\n {\n }", "@Override\n public void requestFocus() {\n\tif (term != null) {\n\t //term.requestActive(); // Not implemented yet\n\t // TEMPORARY\n\t // boolean result = term.requestFocusInWindow();\n\t term.requestFocus();\n\t}\n }", "protected void gainFocus(){\r\n\t\twidgetModifyFacade.changeVersatilePane(this);\r\n\t\twidgetModifyFacade.gainedFocusSignal(this);\r\n\t//\tthis.setId(\"single-image-widget-selected\");\r\n\t}", "@Override\n public void mouseEntered(MouseEvent e) {\n view.requestFocus();\n }", "public void focusGained(FocusEvent e)\r\n/* 21: */ {\r\n/* 22: 64 */ JTextComponent c = getComponent();\r\n/* 23: 65 */ if (c.isEnabled())\r\n/* 24: */ {\r\n/* 25: 66 */ setVisible(true);\r\n/* 26: 67 */ setSelectionVisible(true);\r\n/* 27: */ }\r\n/* 28: 69 */ if ((!c.isEnabled()) || (!this.isKeyboardFocusEvent) || (!Options.isSelectOnFocusGainActive(c))) {\r\n/* 29: 72 */ return;\r\n/* 30: */ }\r\n/* 31: 74 */ if ((c instanceof JFormattedTextField)) {\r\n/* 32: 75 */ EventQueue.invokeLater(new Runnable()\r\n/* 33: */ {\r\n/* 34: */ public void run()\r\n/* 35: */ {\r\n/* 36: 77 */ PlasticFieldCaret.this.selectAll();\r\n/* 37: */ }\r\n/* 38: */ });\r\n/* 39: */ } else {\r\n/* 40: 81 */ selectAll();\r\n/* 41: */ }\r\n/* 42: */ }", "public void setFocus() {\n \t\tviewer.getControl().setFocus();\n \t}", "public void focusPreviousComponent(Component paramComponent)\n/* */ {\n/* 1365 */ if (paramComponent != null) {\n/* 1366 */ paramComponent.transferFocusBackward();\n/* */ }\n/* */ }", "public void setFocus() {\n\t\tthis.viewer.getControl().setFocus();\n\t}", "public void setFocus() {\n\t\tviewer.getControl().setFocus();\n\t}", "public void setFocus() {\n\t\tviewer.getControl().setFocus();\n\t}" ]
[ "0.7181335", "0.71211314", "0.6973088", "0.69335777", "0.69335777", "0.69192505", "0.68124247", "0.6807407", "0.6758759", "0.67173713", "0.67116743", "0.6689834", "0.6667538", "0.6667538", "0.6640798", "0.6640798", "0.6630174", "0.65966624", "0.6592922", "0.6543241", "0.65401834", "0.65401834", "0.65401834", "0.65401834", "0.65401834", "0.65401834", "0.65401834", "0.6515323", "0.65092134", "0.65092134", "0.65092134", "0.6506943", "0.6506943", "0.6489444", "0.6487166", "0.6476629", "0.646937", "0.6468167", "0.64610714", "0.64476633", "0.64345604", "0.64345604", "0.64345604", "0.64345604", "0.6432041", "0.6432041", "0.6432041", "0.6432041", "0.6432041", "0.6432041", "0.6432041", "0.6430042", "0.6428744", "0.6417645", "0.64109486", "0.64109486", "0.64109486", "0.64109486", "0.64109486", "0.6375326", "0.6375326", "0.6375326", "0.6375326", "0.63627213", "0.6352903", "0.6352903", "0.6352903", "0.6341291", "0.63305503", "0.62931156", "0.6285153", "0.6246506", "0.6246506", "0.62243325", "0.62048924", "0.6192427", "0.61805576", "0.6171761", "0.6165983", "0.61129737", "0.6107946", "0.60634863", "0.6062445", "0.6025788", "0.6007413", "0.6006833", "0.600379", "0.5995015", "0.59926295", "0.5989437", "0.5989274", "0.5984231", "0.5972757", "0.59644026", "0.5949586", "0.59450483", "0.59406537", "0.593738", "0.59308916", "0.59308916" ]
0.7789867
0
we have to call the method directly, but it is restricted, so use some magic
private static void dispatchKeyEventDirectlyToComponent(Component c, KeyEvent e) { invokeInstanceMethod("processEvent", c, new Class[] { AWTEvent.class }, new Object[] { e }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}", "public void trySafeMethod(){\n safeMethod();\n }", "private void someUtilityMethod() {\n }", "private void someUtilityMethod() {\n }", "@Override\n\tpublic void call() {\n\t\t\n\t}", "@Override\r\n\tpublic void method() {\n\t\r\n\t}", "public void method(){}", "abstract protected boolean checkMethod();", "private void invoke(Method m, Object instance, Object... args) throws Throwable {\n if (!Modifier.isPublic(m.getModifiers())) {\n try {\n if (!m.isAccessible()) {\n m.setAccessible(true);\n }\n } catch (SecurityException e) {\n throw new RuntimeException(\"There is a non-public method that needs to be called. This requires \" +\n \"ReflectPermission('suppressAccessChecks'). Don't run with the security manager or \" +\n \" add this permission to the runner. Offending method: \" + m.toGenericString());\n }\n }\n \n try {\n m.invoke(instance, args);\n } catch (InvocationTargetException e) {\n throw e.getCause();\n }\n }", "protected abstract boolean invokable(Resource r);", "public void method_4270() {}", "protected ForNonStaticMethod(Method method) {\n this.method = method;\n }", "protected abstract void beforeCall();", "public void method_115() {}", "protected void method_3848() {\r\n super.method_3848();\r\n }", "@Override\n public void function()\n {\n }", "@Override\n public void function()\n {\n }", "@Override\n\tpublic int method() {\n\t\treturn 0;\n\t}", "public abstract void call();", "@Override\r\npublic int method() {\n\treturn 0;\r\n}", "public void method_192() {}", "private void mappingMethodGet() throws SecurityException, NoSuchMethodException{\n\t\tString aux = upFirstLetter();\n\t\tString methodGet = \"get\" + aux;\n\t\tthis.methodGet = this.classFather.getMethod(methodGet);\n\t}", "@Override\r\n\tprotected void func03() {\n\t\t\r\n\t}", "protected void doSomethingElse()\r\n {\r\n \r\n }", "public void method_6349() {\r\n super.method_6349();\r\n }", "@Override\n public void perish() {\n \n }", "public void method_191() {}", "@Override\n protected void prot() {\n }", "boolean invokeOperation() {\n return false;\n }", "public void smell() {\n\t\t\n\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\r\n\tpublic void Method3() {\n\t\t\r\n\t}", "@Override\r\n\t\t\tpublic void func02() {\n\t\t\t\t\r\n\t\t\t}", "protected abstract Object invokeInContext(MethodInvocation paramMethodInvocation)\r\n/* 111: */ throws Throwable;", "public void method_203() {}", "@Override\r\n\tvoid func04() {\n\t\t\r\n\t}", "@Override\n\tpublic void myMethod() {\n\t\t\n\t}", "public void method_1449() {\r\n super.method_1449();\r\n }", "public void method_1449() {\r\n super.method_1449();\r\n }", "public void method_1449() {\r\n super.method_1449();\r\n }", "@Override\n\tpublic void dosomething() {\n\t\t\n\t}", "public static void thisMethod() {\n }", "V call() throws StatusRuntimeException;", "protected void invokeInternal(XTeeMessage<Document> request, XTeeMessage<Element> response) throws Exception {\n throw new IllegalStateException(\"You must override either the 'invokeInternal' or the 'invokeInternalEx' method!\");\n }", "@Override\r\n\tpublic Response invoke() {\n\t\treturn null;\r\n\t}", "protected void method2() {\n\t}", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "@Override\r\n\t\tpublic void action()\r\n\t\t{\r\n// throw new UnsupportedOperationException(\"Not supported yet.\");\r\n\t\t}", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "@Override\n public void func_104112_b() {\n \n }", "protected ForStaticMethod(Method method) {\n this.method = method;\n }", "public void method_6191() {\r\n super.method_6191();\r\n }", "protected boolean methodForbidden() {\n return methodToTest.getName().equals(\"getClassNull\")\n || methodToTest.getName().startsWith(\"isA\")\n || methodToTest.getName().equals(\"create\")\n || methodToTest.getName().equals(\"getTipString\")\n || methodToTest.getName().equals(\"toString\");\n }", "@Override\n\tpublic void some() {\n\t\t\n\t}", "public void method_202() {}", "public void method_199() {}", "public void method_206() {}", "protected abstract Set method_1559();", "public void method_200() {}", "@Override\r\n\tpublic void Method1() {\n\t\t\r\n\t}", "@Override\n\tvoid methodabstract() {\n\t\t\n\t}", "private Method getMethod(String methodName, Class targetClass, Class[] argument) throws SecurityException, NoSuchMethodException\n \t{\n \t\tassert methodName != null;\n \t\tassert targetClass != null;\n \t\tassert argument != null;\n \t\t\n \t\treturn targetClass.getMethod( methodName, argument );\n \t}", "@Override\n\tprotected void logic() {\n\n\t}", "public class_4 method_9() {\n return this.method_17();\n }", "public Object HandleMethod(Object... args)\r\n {\r\n //throw new Exception();\r\n \treturn null;\r\n }", "protected void method_2251() {\r\n this.method_2181();\r\n this.field_1823.method_128(this.field_1824, this.field_1850.method_2383().method_8922());\r\n this.field_1826.method_7081();\r\n }", "protected Collection method_1554() {\n return this.method_1559();\n }", "public final java.lang.Void call() {\n /*\n // Method dump skipped, instructions count: 303\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.oculus.durableiap.DurableIAPStorage.AnonymousClass2.call():java.lang.Object\");\n }", "public void callit();", "@Override\n\tpublic void doIt() {\n\t\t\n\t}", "abstract void method();", "@Override\r\n\tpublic void Method2() {\n\t\t\r\n\t}", "public void doSomething() {\n \n }", "public final java.lang.Void call() {\n /*\n // Method dump skipped, instructions count: 303\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.oculus.durableiap.DurableIAPStorage.AnonymousClass2.call():java.lang.Object\");\n }", "void legalCommand();", "@Override\n\tpublic void doYouWantTo() {\n\n\t}", "public void woke(){\n\n //TODO\n\n }", "public void method_201() {}", "@Test\n public void testInvokingExtraSafeMethod() throws Exception {\n robot.kick(height(7));\n\n // will not compile becuase height is mandatory here\n // robot.kick();\n\n // will not compile because isRoundKick() is boolean\n // robot.kick(isRoundKick(true));\n\n // will not compile becuase speed() is a punch parameter\n // robot.kick(speed(10))\n\n\n // all these are equivalent\n robot.kick(height(12), isRoundKick(true));\n robot.kick(height(12), isRoundKick()); // param constructor with default value\n robot.kick(height(12), isRoundKick); // this is really a constant\n\n // will not compile because here we've statically imported the force from punch\n // robot.kick(height(3), force(10));\n\n robot.kick(height(3), KickParam.force(100)); // we need to be explicit in this case\n }", "void call();", "@Override\n\tboolean isRegistedMethodNotNeed() {\n\t\treturn true;\n\t}", "@Override\n\tpublic void invoke(String origin, boolean allow, boolean remember) {\n\t\t\n\t}", "private void mappingMethodSet() throws SecurityException, NoSuchMethodException{\n\t\tString aux = upFirstLetter();\n\t\tString methodSet = \"set\" + aux;\n\t\tthis.methodSet = this.classFather.getMethod(methodSet, this.classType);\n\t}", "@Override\n\tpublic void realFun() {\n\n\t}", "@Override\n\tpublic Map callMethod(ISensorAccess sensor, World world, int x, int y, int z, int methodID, Object[] args) throws Exception {\n\t\treturn null;\n\t}", "public void method_193() {}", "@Override\r\n\tpublic void func01() {\n\t\t\r\n\t}", "public /* bridge */ /* synthetic */ java.lang.Object run() throws java.lang.Exception {\n /*\n // Can't load method instructions: Load method exception: bogus opcode: 00e9 in method: java.security.Signer.1.run():java.lang.Object, dex: \n */\n throw new UnsupportedOperationException(\"Method not decompiled: java.security.Signer.1.run():java.lang.Object\");\n }", "public Object call() throws Exception{\n return null;\n }", "protected boolean func_70814_o() { return true; }", "@Override\r\n\tpublic void func02() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void func02() {\n\t\t\r\n\t}", "@Override\r\n\t\t\tpublic void buscar() {\n\r\n\t\t\t}", "private static void notPossible () {\r\n\t\tSystem.out.println(\"This operation is not possible\");\r\n\t}", "public final java.lang.Void call() {\n /*\n // Method dump skipped, instructions count: 303\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.oculus.durableiap.DurableIAPStorage.AnonymousClass2.call():java.lang.Object\");\n }", "static void badMethod() {\n doStuff();\n }", "@Override\n\t\t\t\t\tpublic Method handleSimpleMethod(Element parent, FMethod src) {\n\t\t\t\t\t\treturn super.handleSimpleMethod(parent, src);\n\t\t\t\t\t}", "public abstract void mo56925d();", "@Override\r\n\tpublic void smthAbstr() {\n\t\t\r\n\t}", "@Override\n\tpublic void function() {\n\t\t\n\t}", "public static void method2(){\n\t\t\n\t}" ]
[ "0.6807018", "0.6570568", "0.64349955", "0.64349955", "0.6352257", "0.6337867", "0.6154639", "0.6152852", "0.6135456", "0.61134124", "0.6111616", "0.6106893", "0.6096677", "0.6042715", "0.60392547", "0.6031", "0.6031", "0.59968895", "0.59591836", "0.59351516", "0.5927937", "0.5922469", "0.5905088", "0.5894495", "0.5869945", "0.5852341", "0.58460194", "0.5814718", "0.580744", "0.578719", "0.57846886", "0.57826346", "0.57720196", "0.57682574", "0.5764746", "0.5763155", "0.5756324", "0.5742631", "0.5742631", "0.5742631", "0.5738031", "0.5731593", "0.5731244", "0.5731113", "0.57270885", "0.5725469", "0.5724016", "0.5723819", "0.5721226", "0.57098895", "0.5703706", "0.57019234", "0.5685399", "0.568281", "0.567102", "0.56683433", "0.56667334", "0.56490403", "0.5636186", "0.5636008", "0.5634319", "0.56265485", "0.5617198", "0.5616583", "0.5616552", "0.5616457", "0.5607468", "0.560592", "0.5585533", "0.55849063", "0.558347", "0.558272", "0.55811167", "0.5576262", "0.55742186", "0.5567483", "0.5563642", "0.55559677", "0.55478525", "0.5543688", "0.5540775", "0.5540429", "0.5528502", "0.5527168", "0.55253047", "0.552521", "0.55217683", "0.5521033", "0.5519872", "0.5519088", "0.5515949", "0.5515949", "0.55116636", "0.5506984", "0.550346", "0.55003047", "0.5496905", "0.5496403", "0.5491232", "0.54911023", "0.5489839" ]
0.0
-1
Gets any current text on the clipboard
public String getClipboardText() throws Exception { Clipboard c = GClipboard.getSystemClipboard(); Transferable t = c.getContents(null); try { String text = (String) t.getTransferData(DataFlavor.stringFlavor); return text; } catch (UnsupportedFlavorException e) { Msg.error(this, "Unsupported data flavor - 'string'. Supported flavors: "); DataFlavor[] flavors = t.getTransferDataFlavors(); for (DataFlavor dataFlavor : flavors) { Msg.error(this, "\t" + dataFlavor.getHumanPresentableName()); } throw e; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String getClipboardContents() {\n\t\tString result = \"\";\n\t\tClipboard clipboard = Toolkit.getDefaultToolkit().getSystemClipboard();\n\t\t// odd: the Object param of getContents is not currently used\n\t\tTransferable contents = clipboard.getContents(null);\n\t\tboolean hasTransferableText = (contents != null) && contents.isDataFlavorSupported(DataFlavor.stringFlavor);\n\t\tif (hasTransferableText) {\n\t\t\ttry {\n\t\t\t\tresult = (String) contents.getTransferData(DataFlavor.stringFlavor);\n\t\t\t\ttfURL.setText(result);\n\t\t\t} catch (UnsupportedFlavorException | IOException ex) {\n\t\t\t\tSystem.out.println(ex);\n\t\t\t\tex.printStackTrace();\n\t\t\t}\n\t\t}\n\t\treturn result;\n\t}", "public static String getText() {\n Transferable data = Toolkit.getDefaultToolkit().getSystemClipboard().getContents(null);\n try {\n return (String)data.getTransferData(DataFlavor.stringFlavor);\n }\n catch (Exception ignore) {\n return null;\n }\n }", "default String getClipboardText() {\n byte[] base64decodedBytes = Base64\n .getMimeDecoder()\n .decode(getClipboard(ClipboardContentType.PLAINTEXT));\n return new String(base64decodedBytes, StandardCharsets.UTF_8);\n }", "public void copyText(){\n try{\n if(mCursor.isSelected()){\n mClipboardManager.setTextToClipboard(getText().subContent(mCursor.getLeftLine(),\n mCursor.getLeftColumn(),\n mCursor.getRightLine(),\n mCursor.getRightColumn()).toString());\n }\n }catch(Exception e){\n e.printStackTrace();\n Toast.makeText(getContext(),e.toString(),Toast.LENGTH_SHORT).show();\n }\n }", "public Buffer getClipboard() {\n return clipboard.getCopy();\n }", "public String getClipboardContents() {\n String result = \"\";\n Clipboard clipboard = Toolkit.getDefaultToolkit().getSystemClipboard();\n //odd: the Object parameter of getContents is not currently used\n Transferable contents = clipboard.getContents(null);\n boolean hasTransferableText =\n (contents != null) &&\n contents.isDataFlavorSupported(DataFlavor.stringFlavor)\n ;\n if ( hasTransferableText ) {\n try {\n result = (String)contents.getTransferData(DataFlavor.stringFlavor);\n }\n catch (UnsupportedFlavorException ex){\n //highly unlikely since we are using a standard DataFlavor\n //System.out.println(ex);\n ex.printStackTrace();\n }\n catch (IOException ex) {\n //System.out.println(ex);\n ex.printStackTrace();\n }\n }\n return result;\n }", "public final java.awt.datatransfer.Clipboard getClipboard()\r\n {\r\n return _theClipboard;\r\n }", "public static Object getClipboardContents()\n\t{\n\t\tObject result = null;\n\t\tfinal Transferable contents = ClipboardHelper.clipboard.getContents(null);\n\t\tif (contents != null)\n\t\t{\n\t\t\ttry\n\t\t\t{\n\t\t\t\tif (contents.isDataFlavorSupported(DataFlavor.stringFlavor))\n\t\t\t\t{\n\t\t\t\t\tresult = contents.getTransferData(DataFlavor.stringFlavor);\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tresult = contents.getTransferData(null);\n\t\t\t\t}\n\t\t\t}\n\t\t\tcatch (final Exception e)\n\t\t\t{\n\t\t\t}\n\t\t}\n\t\treturn result;\n\t\t\n\t}", "@Override\n\tpublic void editorCopy()\n\t{\n\t\tclipboard = stringBuffer.substring(selectionStart,selectionEnd);\n\n\t\tSystem.out.println(\"DEBUG: performing Copy\" + clipboard) ;\n\t}", "public void pasteText(){\n try{\n CharSequence text = mClipboardManager.getTextFromClipboard();\n if(text != null && mConnection != null){\n mConnection.commitText(text, 0);\n }\n }catch(Exception e){\n e.printStackTrace();\n Toast.makeText(getContext(),e.toString(),Toast.LENGTH_SHORT).show();\n }\n }", "public void copySelection() {\n RTGraphComponent.RenderContext myrc = (RTGraphComponent.RenderContext) (getRTComponent().getRTRenderContext()); if (myrc == null) return;\n Clipboard clipboard = getToolkit().getSystemClipboard();\n StringBuffer sb = new StringBuffer();\n Iterator<String> it = (myrc.filterEntities(getRTParent().getSelectedEntities())).iterator();\n while (it.hasNext()) sb.append(it.next() + \"\\n\");\n StringSelection selection = new StringSelection(sb.toString());\n clipboard.setContents(selection, null);\n }", "public void copyText() {\n ((ClipboardManager) getActivity().getSystemService(\"clipboard\")).setPrimaryClip(ClipData.newPlainText(\"textFromCoolapk\", this.mBinding.text.getText()));\n Toast.show(getActivity(), \"结果已复制\");\n }", "protected OwClipboard getClipboard()\r\n {\r\n return ((OwMainAppContext) getContext()).getClipboard();\r\n }", "public static String getClipboardString() {\n Transferable t = Toolkit.getDefaultToolkit().getSystemClipboard().\n getContents(null); \n try {\n if (t != null && t.isDataFlavorSupported(DataFlavor.stringFlavor)) {\n String text = (String)t.getTransferData(DataFlavor.stringFlavor);\n return text;\n }\n } catch (UnsupportedFlavorException e) {\n } catch (IOException e) {\n }\n return null;\n }", "private void copyToClipboard(String text)\n {\n Clipboard cb = Toolkit.getDefaultToolkit().getSystemClipboard();\n cb.setContents(new StringSelection(text), null);\n }", "public Collection<Object> getClipboard()\n {\n return clipboard;\n }", "private void directToClipboard(String text) {\n\t\tthis.systemClipboard.setContents(new StringSelection(text), null);\n\t}", "@Override\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tClipboard clipboard = Toolkit.getDefaultToolkit().getSystemClipboard();\r\n\t\t\t\tString copyString = ta_content.getText().toString();\r\n\t\t\t\tif (copyString != null) {\r\n\t\t\t\t\tStringSelection contents = new StringSelection(copyString);\r\n\t\t\t\t\tclipboard.setContents(contents, null);\r\n\t\t\t\t}\r\n\t\t\t}", "public void copyToClipboard(View view) {\n //Get the text from the text view\n TextView resultTextView = findViewById(R.id.result_text_view);\n String resultText = resultTextView.getText().toString();\n\n //Copy the Text to the clipboard\n ClipboardManager clipboardManager = (ClipboardManager) getSystemService(CLIPBOARD_SERVICE);\n ClipData dataClip = ClipData.newPlainText(CLIP_TEXT_KEY, resultText);\n clipboardManager.setPrimaryClip(dataClip);\n\n //Tell the user that the text has been copied to the clipboard\n Toast.makeText(this, \"Copied to Clipboard\", Toast.LENGTH_SHORT).show();\n\n\n }", "public void selectFromClipboard() { genericClipboard(SetOp.SELECT); }", "public static String getClipboardDataAsString() {\n Clipboard clipboard = Toolkit.getDefaultToolkit().getSystemClipboard();\n Transferable clipData = clipboard.getContents(clipboard);\n if (clipData != null) {\n try {\n if (clipData.isDataFlavorSupported(DataFlavor.stringFlavor)) {\n return (String) (clipData.getTransferData(DataFlavor.stringFlavor));\n }\n } catch (UnsupportedFlavorException ufe) {\n //LOGGER.info(\"Flavor unsupported: \", ufe);\n } catch (IOException ioe) {\n //LOGGER.error(\"Data not available: \", ioe);\n }\n }\n return null;\n }", "public void toClipboard(String text) {\n\t\tthis.executor.schedule(new ClearClipBoardTask(), secondsToClearClipboard, TimeUnit.SECONDS);\n\t\tdirectToClipboard(text);\n\t}", "public void paste() {\n pasteClipboard(getToolkit().getSystemClipboard());\n }", "@Override\n public void copy() {\n clipboard.setContents(getSelectionAsList(false));\n }", "public String getText() {\n checkWidget();\n int length = OS.GetWindowTextLength(handle);\n if (length == 0)\n return \"\";\n TCHAR buffer = new TCHAR(getCodePage(), length + 1);\n OS.GetWindowText(handle, buffer, length + 1);\n return buffer.toString(0, length);\n }", "public void copySelection() {\r\n \t\t// Bertoli Marco\r\n \t\tclipboard.copy();\r\n \t}", "public void doCopy() {\n if (renderPieces.size() == 0) {\n System.out.println(\"Nothing is selected for copy operation.\");\n return;\n }\n StringBuffer sb = new StringBuffer();\n\n textBuffer.renderInit();\n Text text;\n if (!reversed) {\n while ((text = textBuffer.getTextToRender()) != null) {\n sb.append(text.getText());\n }\n } else {\n while ((text = textBuffer.getPreToRender()) != null) {\n sb.append(text);\n }\n String reversedText = sb.toString();\n sb = new StringBuffer();\n for (int i = reversedText.length()-1; i >= 0; i -= 1) {\n sb.append(reversedText.charAt(i));\n }\n }\n Clipboard clipboard = Clipboard.getSystemClipboard();\n ClipboardContent content = new ClipboardContent();\n content.putString(sb.toString());\n clipboard.setContent(content);\n System.out.println(\"Copy succeed.\");\n }", "private static Object getContents(final Clipboard clipboard, final Transfer transfer, Shell shell) {\n\t\tfinal Object[] result= new Object[1];\n\t\tshell.getDisplay().syncExec(new Runnable() {\n\t\t\tpublic void run() {\n\t\t\t\tresult[0]= clipboard.getContents(transfer);\n\t\t\t}\n\t\t});\n\t\treturn result[0];\n\t}", "private static Object getContents(final Clipboard clipboard, final Transfer transfer, Shell shell) {\n\t\tfinal Object[] result= new Object[1];\n\t\tshell.getDisplay().syncExec(new Runnable() {\n\t\t\tpublic void run() {\n\t\t\t\tresult[0]= clipboard.getContents(transfer);\n\t\t\t}\n\t\t});\n\t\treturn result[0];\n\t}", "public static void copySel() {\r\n DataClipboard.clearContent();\r\n if (DataClipboard.getSelectionLineBegin() != -1) {\r\n DataClipboard.updateContentLineBegin(DataClipboard.getSelectionLineBegin());\r\n DataClipboard.updateContentLineEnd(DataClipboard.getSelectionLineEnd());\r\n for (MeasureLine ml : DataClipboard.getSelectionTrimmed()) {\r\n if (ml != null) {\r\n DataClipboard.getContent().set(ml.getLineNumber(), ml);\r\n }\r\n }\r\n }\r\n }", "public void onTextCopy()\n\t{\n\t}", "public String getText() {\n if (!this.a_text.isEnabled())\n return null;\n\n return this.a_text.getText();\n }", "public String getText() {\n getLock().getReadLock();\n try {\n return getTextBuffer().toString();\n } finally {\n getLock().relinquishReadLock();\n }\n }", "public synchronized String getText() {\n\t\treturn text;\n\t}", "public boolean isCopyEnabled() {\n \t\tif (text == null || text.isDisposed())\n \t\t\treturn false;\n \t\treturn text.getSelectionCount() > 0;\n \t}", "public String getText() {\n return text.getText();\n }", "default String getClipboard(ClipboardContentType contentType) {\n return CommandExecutionHelper.execute(this, new AbstractMap.SimpleEntry<>(GET_CLIPBOARD,\n prepareArguments(\"contentType\", contentType.name().toLowerCase())));\n }", "private void handleCopyingTextToClipboard(String text){\n Intent intent = new Intent(getContext(), ClipboardEventHandler.class);\n intent.putExtra(\"action\", \"switch\");\n intent.putExtra(\"content\", text);\n\n getContext().startService(intent);\n\n Snackbar.make(getView(), getString(R.string.COPIED_BEGINNIG) + \" \" +\"\\\"\"+ text +\"\\\"\" + \" \" + getString(R.string.COPIED_END), Snackbar.LENGTH_SHORT).show();\n }", "public String getText() {\n\t\treturn new XWPFWordExtractor(document).getText();\n\t}", "public String getText() {\n return mTextContainer.getText();\n }", "public void pasteSystemSelection() {\n Clipboard systemSelection = getToolkit().getSystemSelection();\n if (systemSelection != null) {\n pasteClipboard(systemSelection);\n }\n }", "public void showCopyMenu() {\n new AlertDialog.Builder(getContext()).setItems(\n R.array.copypaste_menu_items,\n new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int which) {\n String intentStr = null;\n switch (which) {\n case 0:\n ClipboardManager clip = (ClipboardManager) getContext()\n .getSystemService(\n Context.CLIPBOARD_SERVICE);\n if (clip != null) {\n clip.setText(mSelectedText);\n Toast.makeText(getContext(),\n R.string.text_copied,\n Toast.LENGTH_SHORT).show();\n }\n break;\n case 1:\n try {\n Uri uri = Uri.parse(\"sms:\");\n Intent intent = new Intent(\n Intent.ACTION_SENDTO, uri);\n intent.putExtra(\"sms_body\", mSelectedText);\n intent.putExtra(\"exit_on_send\", true);\n getContext().startActivity(intent);\n } catch (ActivityNotFoundException e) {\n e.printStackTrace();\n }\n break;\n case 2:\n try {\n Intent intent = new Intent();\n intent.setAction(\"com.motorola.createnote\");\n intent.putExtra(\"CLIPBOARD\", mSelectedText);\n getContext().startActivity(intent);\n } catch (ActivityNotFoundException e) {\n e.printStackTrace();\n }\n break;\n case 3:\n try {\n String broadcastAddress = String.format(\n \"%s://%s/%s\", \"searchWord\",\n \"powerword\", mSelectedText);\n Intent intent = new Intent(\n Intent.ACTION_VIEW, Uri\n .parse(broadcastAddress));\n getContext().startActivity(intent);\n } catch (ActivityNotFoundException e) {\n e.printStackTrace();\n }\n break;\n default:\n break;\n }\n\n clearSelection(true);\n\n }\n }).setOnCancelListener(new DialogInterface.OnCancelListener() {\n public void onCancel(DialogInterface dialog) {\n clearSelection(true);\n }\n }).show();\n }", "public String getString() {\n\t\ttry {\n\t\t\treturn fromTextArea.take().trim();\n\t\t} catch (InterruptedException e) {\n\t\t\te.printStackTrace();\n\t\t\treturn null;\n\t\t}\n\t}", "public String getText() {\n\t\t\treturn text.get();\n\t\t}", "String getText();", "String getText();", "String getText();", "String getText();", "String getText();", "String getText();", "String getText();", "public void performCopy() {\n \t\ttext.copy();\n \t}", "public java.lang.String getText() {\n \t\treturn text;\n \t}", "public String getText()\n {\n return (this.text);\n }", "public CharSequence getText() {\r\n return text;\r\n }", "public void addFromClipboard() { genericClipboard(SetOp.ADD); }", "public final String getText() {\n\t\treturn text;\n\t}", "public String getText()\r\n {\r\n return this.text;\r\n }", "public String getText()\n\t{\n\t\treturn text;\n\t}", "public String getText()\n\t{\n\t\treturn text;\n\t}", "public String getText()\n\t{\n\t\treturn text;\n\t}", "public String getText() {\r\n return text;\r\n }", "public String getText() {\r\n return text;\r\n }", "public final String getText() {\n return text;\n }", "public String getText() {\r\n return text;\r\n }", "java.lang.String getText();", "java.lang.String getText();", "java.lang.String getText();", "java.lang.String getText();", "java.lang.String getText();", "java.lang.String getText();", "java.lang.String getText();", "java.lang.String getText();", "public void removeFromClipboard() { genericClipboard(SetOp.REMOVE); }", "public String getText() {\n return text;\n }", "public String getText() {\n return text;\n }", "public String getText() {\n return text;\n }", "public String getText() {\n return text;\n }", "public String getText() {\n return text;\n }", "public java.lang.String getText() {\n return text_;\n }", "public String getText() {\n return text;\n }", "public String getText() {\n return text;\n }", "public String getText() {\n return text;\n }", "public String getText() {\n return text;\n }", "public String getText() {\n return text;\n }", "public String getText() {\n return text;\n }", "public String getText() {\n return text;\n }", "public String getText() {\n return text;\n }", "public String getText() {\n return text;\n }", "public String getText() {\n return text;\n }", "public String getText() {\n return text;\n }", "public String getText() {\n return text;\n }", "public String getText() {\n return text;\n }", "public String getCopyRightText() {\r\n\t\tfooterCopyright = driver.findElement(footerCopyrightSelector);\r\n\t\treturn footerCopyright.getText();\r\n\t\t\r\n\t}", "public String getText() {\r\n\t\treturn text;\r\n\t}", "public String getText() {\r\n\t\treturn text;\r\n\t}", "public String getText();", "public String getText();", "public String getText();", "public String getText();" ]
[ "0.7489287", "0.7467568", "0.7428294", "0.7403013", "0.72832155", "0.7276216", "0.7066515", "0.7031097", "0.6991253", "0.6985411", "0.6908583", "0.6757234", "0.66851616", "0.6650204", "0.65934145", "0.6585979", "0.65643823", "0.6440767", "0.6407419", "0.63582397", "0.6290579", "0.6235289", "0.6217364", "0.621695", "0.62064946", "0.61907023", "0.61769444", "0.6173901", "0.6173901", "0.6132984", "0.612497", "0.607873", "0.6074327", "0.6065098", "0.6063593", "0.60336727", "0.59958416", "0.59812707", "0.59708357", "0.5961996", "0.5958967", "0.59546465", "0.5951557", "0.5949179", "0.59410435", "0.59410435", "0.59410435", "0.59410435", "0.59410435", "0.59410435", "0.59410435", "0.594011", "0.5925314", "0.590751", "0.58740354", "0.58645177", "0.5843996", "0.58255327", "0.5825365", "0.5825365", "0.5825365", "0.5817547", "0.5817547", "0.58115906", "0.58115786", "0.58066183", "0.58066183", "0.58066183", "0.58066183", "0.58066183", "0.58066183", "0.58066183", "0.58066183", "0.5795818", "0.5788157", "0.5788157", "0.5788157", "0.5788157", "0.5788157", "0.5784646", "0.5783135", "0.5783135", "0.5783135", "0.5783135", "0.5783135", "0.5783135", "0.5783135", "0.5783135", "0.5783135", "0.5783135", "0.5783135", "0.5783135", "0.5783135", "0.57794803", "0.57539904", "0.57539904", "0.57511294", "0.57511294", "0.57511294", "0.57511294" ]
0.6949558
10
Shows the provider by the given name.
public ComponentProvider showProvider(Tool tool, String name) { ComponentProvider provider = tool.getComponentProvider(name); tool.showComponentProvider(provider, true); return provider; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public String getProviderName() {\n return mDeveloperProvider;\n }", "public CurrencyXRateProvider findByName(String name) {\n\t\treturn (CurrencyXRateProvider) this\n\t\t\t\t.getEntityManager()\n\t\t\t\t.createNamedQuery(CurrencyXRateProvider.NQ_FIND_BY_NAME)\n\t\t\t\t.setParameter(\"clientId\",\n\t\t\t\t\t\tSession.user.get().getClient().getId())\n\t\t\t\t.setParameter(\"name\", name).getSingleResult();\n\t}", "java.lang.String getProvider();", "private MarketDataProvider getMarketDataProviderForName(String inProviderName)\n {\n populateProviderList();\n return activeProvidersByName.get(inProviderName);\n }", "private void showCard(String name) {\n CardLayout cl = (CardLayout)(cards.getLayout());\n cl.show(cards, name);\n }", "public Builder setProviderName(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n \n providerName_ = value;\n onChanged();\n return this;\n }", "String getProviderString();", "public void display(String name) {\r\n\t\tthis.getShield(name).display();\r\n\t}", "public java.lang.String getProviderName() {\n java.lang.Object ref = providerName_;\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 providerName_ = s;\n return s;\n }\n }", "public void setProvider(String value) { _provider = value; }", "String displayName();", "String displayName();", "public static void setProvider(String providerName) {\n provider = providerName;\n logger.debug(\"Provider set to : \" + providerName);\n }", "public java.lang.String getProviderName() {\n java.lang.Object ref = providerName_;\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 providerName_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "public IProvider provider();", "public String getProviderClassName();", "public String getDisplayName();", "public String getDisplayName();", "public String getDisplayName();", "public String getDisplayName();", "public String getProviderName(){\n\t\treturn proxy.getName();\n\t}", "public String getProvider() {\r\n return provider;\r\n }", "@Column(name = \"provider_name\")\n\tpublic java.lang.String getProviderName() {\n\t\treturn providerName;\n\t}", "public void setDisplayName(String name) {\r\n\t}", "public void setDisplayName(String name);", "public String getProvider() {\n return provider;\n }", "public IProvider lookupProvider(Class<? extends IProvider> providerType);", "String getDisplayName();", "String getDisplayName();", "String getDisplayName();", "String getDisplayName();", "String getDisplayName();", "String getDisplayName();", "public String getProvider() {\n\t\treturn provider;\n\t}", "public void showdetail(String name){\n navUserProfile.setText(name.charAt(0)+ \"\");\n navUsername.setText(name+\"\");\n }", "private static String getItemDisplayName(\n ProtocolProviderService provider)\n {\n if(ConfigurationUtils.isAutoAnswerDisableSubmenu())\n return GuiActivator.getResources()\n .getI18NString(\"service.gui.AUTO_ANSWER\")\n + \" - \" + provider.getAccountID().getDisplayName();\n else\n return provider.getAccountID().getDisplayName();\n }", "public void setDisplayName(String name) {\n\t}", "public String getProvider() {\n\t\treturn this.provider;\n\t}", "@ApiModelProperty(example = \"GitHub\", required = true, value = \"Name of the VCS provider (e.g. GitHub, Bitbucket).\")\n public String getProviderName() {\n return providerName;\n }", "@Override\n\t\t\tpublic String getName() {\n\t\t\t\treturn \"展示\";\n\t\t\t}", "public Provider(String name, String iconName) {\n super();\n setUID(generateUID());\n this.mName = name;\n this.mIconName = iconName;\n }", "String getDisplay_name();", "public com.google.protobuf.ByteString\n getProviderNameBytes() {\n java.lang.Object ref = providerName_;\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 providerName_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "@Override\n\tpublic String getName() {\n\t\treturn \"viewAccount.do\";\n\t}", "public void setProvider(String provider) {\n\t\tthis.provider = provider;\n\t}", "public void setProvider(String provider) {\n\t\tthis.provider = provider;\n\t}", "@GET\n\t@Path(\"/{id}\")\n\t@Produces({MediaType.APPLICATION_JSON})\n\t@ApiOperation(value = \"Returns the Provider with the given id\"\n\t\t, notes = \"\"\n\t\t, response = Provider.class\n\t\t, responseContainer = \"\")\n\tpublic Provider getProvider(@PathParam(\"id\") Long id) {\n\t\treturn null;\n\t}", "public void setDisplayName (String name) {\n impl.setDisplayName (name);\n }", "eu.europeana.uim.repox.rest.client.xml.Provider retrieveProvider(String providerId)\n throws RepoxException;", "public Builder setProvider(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n bitField0_ |= 0x00000001;\n provider_ = value;\n onChanged();\n return this;\n }", "private static String showDetails (String name){\n\t\t//We find the user\n\t\tint position = findContact(name);\n\t\t//If not found, we return null\n\t\tif (position==-1)\n\t\t\treturn null;\n\t\t//We return the details invoking the toString method\n\t\telse\n\t\t\treturn contacts[position].toString();\n\t}", "public void display() {\n java.awt.EventQueue.invokeLater(new Runnable() {\n public void run() {\n new ProviderMenu().setVisible(true);\n\n }\n });\n }", "java.lang.String getDisplayName();", "java.lang.String getDisplayName();", "java.lang.String getDisplayName();", "java.lang.String getDisplayName();", "java.lang.String getDisplayName();", "java.lang.String getDisplayName();", "public String getProvider() {\n return mProvider;\n }", "public String show() {\r\n\t\treturn \"show\";\r\n\t}", "private void displayUserInfo(String name) {\n\t\tString username = null;\n\t\tPattern p = Pattern.compile(\"\\\\[(.*?)\\\\]\");\n\t\tMatcher m = p.matcher(name);\n\t\tif (m.find())\n\t\t{\n\t\t username = m.group(1);\n\t\t lastClickedUser = username;\n\t\t}\n\t\tUser u = jdbc.get_user(username);\n\t\ttextFirstName.setText(u.get_firstname());\n\t\ttextLastName.setText(u.get_lastname());\n\t\ttextUsername.setText(u.get_username());\n\t\tif (u.get_usertype() == 1) {\n\t\t\trdbtnAdminDetails.setSelected(true);\n\t\t} else if (u.get_usertype() == 2) {\n\t\t\trdbtnManagerDetails.setSelected(true);\n\t\t} else {\n\t\t\trdbtnWorkerDetails.setSelected(true);\n\t\t}\n\t\tif (u.get_email() != null) {textEmail.setText(u.get_email());} else {textEmail.setText(\"No Email Address in Database.\");}\n\t\tif (u.get_phone() != null) {textPhone.setText(u.get_phone());} else {textPhone.setText(\"No Phone Number in Database.\");}\t\t\t\t\n\t\tcreateQualLists(u.get_userID());\n\t}", "@objid (\"13e63a4b-fab3-4b16-b7f9-69b4d6187c94\")\n ProvidedInterface getProvider();", "@Override\n\tpublic void onProviderEnabled(String provider) {\n\t\t Toast.makeText(this, \"Enabled new provider \" + provider, Toast.LENGTH_SHORT).show();\n\t\t\n\t}", "public com.google.protobuf.ByteString\n getProviderNameBytes() {\n java.lang.Object ref = providerName_;\n if (ref instanceof String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (java.lang.String) ref);\n providerName_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "public void changePanel(String name) {\n\t\t((CardLayout)cardPanel.getLayout()).show(cardPanel, name);\n\t\trequestFocus();\n\t\t\n\t\t\n\t}", "private void displayStudentByName(String name) {\n\n int falg = 0;\n\n for (Student student : studentDatabase) {\n\n if (student.getName().equals(name)) {\n\n stdOut.println(student.toString());\n\n falg = 1;\n\n break;\n }\n }\n\n if (falg == 0) {\n\n stdOut.println(\"cannot find student\\n\");\n }\n }", "public java.lang.String getProvider() {\n java.lang.Object ref = provider_;\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 provider_ = s;\n }\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "public void show() {\r\n\t\tshowMembers();\r\n\t\tshowFacilities();\r\n\t}", "@Override\r\n\tpublic Provider findProvider(Long providerId) {\n\t\treturn providerRepository.findOne(providerId);\r\n\t}", "public void onProviderEnabled(String provider) {\n \toutputWindow.append(\"\\n onProviderEnabled\" + provider);\n }", "@Override\n\tpublic void display() {\n\t\tSystem.out.println(name);\n\t}", "public java.lang.String getProvider() {\n java.lang.Object ref = provider_;\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 provider_ = s;\n }\n return s;\n }\n }", "eu.europeana.uim.repox.rest.client.xml.Provider retrieveProviderByMetadata(String mnemonic)\n throws RepoxException;", "private void displayScholarshipByName(String name) {\n\n int falg = 0;\n\n stdOut.println(name + \"\\n\");\n\n for (Scholarship scholarship : scholarshipDatabase) {\n\n stdOut.println(scholarship.getName() + \"\\n\");\n\n if (scholarship.getName().equals(name)) {\n\n stdOut.println(scholarship.toString());\n\n falg = 1;\n\n break;\n }\n }\n\n if (falg == 0) {\n\n stdOut.println(\"cannot find scholarship\\n\");\n\n }\n }", "Provider createProvider();", "public void getName(String name)\n {\n System.out.println(type + \" : \" + name);\n }", "@Override\n\t\tpublic void onProviderEnabled(String provider) {\n\t\t\tSystem.out.println(\"Provider enabled \" + provider);\n\t\t}", "public char getSeekerProvShow() {\n return getCharProperty(\"ProvShow\");\n }", "public void setNameProvider(NameProvider nameProvider2) {\n\t\tnameProvider = nameProvider2;\n\t}", "public String getName() { return displayName; }", "public String showName(){\r\n\t\tSystem.out.println(\"This is a \" + name);\r\n\t\treturn name;}", "@Override\r\n\tpublic Provider editProvider(Provider provider) {\n\t\treturn providerRepository.save(provider);\r\n\t}", "@Override\n public String getProviderName() {\n return \"SimpleEncryptionKeyStoreProvider\";\n }", "String createProvider(ConnectedVim connectedVim, boolean enable);", "@Override\n\tpublic ProductBean view(String pname) {\n\t\treturn session.selectOne(namespace+\".view\", pname);\n\t}", "public void showContact(final String name) {\n ContactInfo contactInfo = contactMap.get(name);\n if (contactInfo == null || !contactInfo.isHidden()) {\n return;\n }\n\n contactInfo.setHidden(false);\n MutableTreeNode node = new DefaultMutableTreeNode(contactInfo);\n\n add(node);\n }", "public String show() {\r\n return \"show\";\r\n }", "@NonNull\n String getDisplayName();", "public String showName()\r\n {\r\n return name;\r\n }", "protected void show(JPanel cardPanel2, String string) {\n\t\t\r\n\t}", "public void setProviderId(String value) { _providerId = value; }", "private void displayName(String name) {\n\t\tGLabel profileName = new GLabel(name);\n\t\tprofileName.setFont(PROFILE_NAME_FONT);\n\t\tprofileName.setColor(Color.BLUE);\n\t\tadd(profileName, LEFT_MARGIN, TOP_MARGIN + profileName.getHeight());\n\t\tnameY = profileName.getY();\n\t}", "public abstract List getProviders();", "@Override\n\tpublic void showProfile() {\n\t\t\n\t}", "Builder addProvider(String value);", "public void showNAME() {\r\n\t\tSystem.out.println(getName().toUpperCase());\r\n\t}", "Provider<SimpleObject> getSimpleProvider();", "public static void main (String[] args) {\n\t\tProvider[] providers = Security.getProviders();\r\n\t\t\r\n\t\t// 2. Obtenir des informations sur chaque Provider : Nom et version\r\n\t\tfor (Provider provider : providers) {\r\n\t\t\tSystem.out.println(\"Provider : \"+ provider.getName() +\" version \"+ provider.getVersion());\r\n\t\t}\r\n\t}", "private void showSearchView(String viewName)\n {\n currentSearchView = viewName;\n CardLayout cLayout = (CardLayout) searchPaneWrapper.getLayout();\n cLayout.show(searchPaneWrapper, viewName);\n }", "public java.lang.String getProviderType() {\n return this._providerType;\n }" ]
[ "0.63367075", "0.6123839", "0.6038349", "0.59925574", "0.59318674", "0.5904078", "0.5899835", "0.5760865", "0.5703105", "0.5697256", "0.56850886", "0.56850886", "0.5636912", "0.56326026", "0.56279504", "0.5626981", "0.5566501", "0.5566501", "0.5566501", "0.5566501", "0.5565005", "0.5564079", "0.5550436", "0.5527631", "0.5523518", "0.5516811", "0.5506973", "0.549379", "0.549379", "0.549379", "0.549379", "0.549379", "0.549379", "0.5485691", "0.54749584", "0.5474595", "0.54648155", "0.54632264", "0.546153", "0.54531777", "0.5447446", "0.54286027", "0.53878415", "0.5380538", "0.5377383", "0.5377383", "0.5372569", "0.536784", "0.5348075", "0.5341491", "0.5334254", "0.53322554", "0.53249454", "0.53249454", "0.53249454", "0.53249454", "0.53249454", "0.53249454", "0.5324161", "0.5292066", "0.5290388", "0.52872235", "0.528622", "0.5272852", "0.5264642", "0.5240861", "0.5235587", "0.52266777", "0.5215521", "0.5198383", "0.5194969", "0.51880366", "0.51879746", "0.5167567", "0.5161346", "0.51431626", "0.5128913", "0.5125706", "0.5122781", "0.5119822", "0.51133204", "0.5106545", "0.5104651", "0.5102515", "0.5097926", "0.50954187", "0.5094208", "0.5091984", "0.5088663", "0.50723505", "0.50618446", "0.505924", "0.50477356", "0.504351", "0.50232077", "0.5016769", "0.50144696", "0.50136787", "0.50130355", "0.5011782" ]
0.7228277
0
Performs a single left mouse click in the center of the given provider. This is useful when trying to make a provider the active provider, while making sure that one of the provider's components has focus.
public static Component clickComponentProvider(ComponentProvider provider) { JComponent component = provider.getComponent(); DockableComponent dockableComponent = getDockableComponent(component); selectTabIfAvailable(dockableComponent); Rectangle bounds = component.getBounds(); int centerX = (bounds.x + bounds.width) >> 1; int centerY = (bounds.y + bounds.height) >> 1; return clickComponentProvider(provider, MouseEvent.BUTTON1, centerX, centerY, 1, 0, false); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "default public void clickLeft() {\n\t\tremoteControlAction(RemoteControlKeyword.LEFT);\n\t}", "boolean onLeftClick(double mouseX, double mouseY);", "@Override\n\tpublic void leftClick(MouseEvent e) {\n\n\t}", "public static Component clickComponentProvider(ComponentProvider provider, int button, int x,\n\t\t\tint y, int clickCount, int modifiers, boolean popupTrigger) {\n\n\t\tJComponent component = provider.getComponent();\n\t\tfinal Component clickComponent = SwingUtilities.getDeepestComponentAt(component, x, y);\n\t\tclickMouse(clickComponent, MouseEvent.BUTTON1, x, y, clickCount, modifiers, popupTrigger);\n\t\treturn clickComponent;\n\t}", "@Override\n\tpublic void middleClick(MouseEvent e) {\n\n\t}", "public void mouseLeft() {\n\n\t}", "@Override\n\t\tpublic void mouseClicked(MouseEvent e) {\n\t\t\t// find and set the coordinates of the current click\n\t\t\t_gridPanel.selected(e.getX(), e.getY());\n\t\t}", "public void mousePressed(MouseEvent e) {\n \t // Click gauche enfoncé\n \t if (e.getButton() == 1) {\n\t \t app.modifierCurseurVue(Cursor.MOVE_CURSOR);\n\t \t prevX = e.getX();\n\t \t prevY = e.getY();\n \t }\n }", "@Override\n\tpublic void mousePressed(MouseEvent arg0) {\n\t\tgraphics.panel.requestFocus();\n\t\tx=arg0.getX();\n\t\ty=arg0.getY();\n\t}", "@Override\n public void mouseEntered(PInputEvent event) {\n \tif (currentListener instanceof DistanceTool) {\n PGISCanvas.this.setCursor(((MapTool) currentListener).getCursor());\n } \n \telse {\n PGISCanvas.this.setCursor(Cursor.getDefaultCursor());\n }\n }", "private void registerCenter(MouseEvent e) {\n\t\tcenterX = e.getX();\n\t\tcenterY = e.getY();\n\t}", "@Override\n\tpublic void mouseLeft() {\n\t\t\n\t}", "private void cs1() {\n\t\t\tctx.mouse.click(675,481,true);\n\t\t\t\n\t\t}", "@Override\n\tpublic void mouseEntered(MouseEvent arg0) {\n\t\tthis.model.setCursorPosition(this.panel.getX(), this.panel.getY());\n\t\t\n\t}", "@Override\n\tpublic void LeftButtonClick() {\n\t\t\n\t}", "public void mousePressed(MouseEvent e) {\n if (mousePressedCmd != null) {\n mousePressedCmd.execute();\n }\n }", "public void setLeftPressed(int x, int y) {\n if (!map.canSelectPoint(x, y)) {\n return;\n }\n\n selectionX = x;\n selectionY = y;\n if (lastSelectionX != -1 && lastSelectionX == selectionX\n && lastSelectionY == selectionY) {\n useSelectedAbility();\n }\n lastSelectionX = selectionX;\n lastSelectionY = selectionY;\n selectionChanged = true;\n }", "public void mousePressed(MouseEvent e) {\n if ((e.getModifiers() & InputEvent.BUTTON1_MASK) == InputEvent.BUTTON1_MASK) { // left\n movelight();\n display();\n repaint();\n e.consume();\n }\n }", "private void pressedNode(MouseEvent e) {\r\n if (e.getModifiers() >= MouseEvent.BUTTON1_MASK) {\r\n /* Set the first point in the tool */\r\n nodeTool.setFirstPoint(e.getPoint());\r\n }\r\n }", "@Override\n public void mousePressed(MouseEvent e) {\n\n prevMouse.x = x(e);\n prevMouse.y = y(e);\n\n // 3D mode\n if (getChart().getView().is3D()) {\n if (handleSlaveThread(e)) {\n return;\n }\n }\n\n // 2D mode\n else {\n\n Coord2d startMouse = prevMouse.clone();\n\n if (maintainInAxis)\n maintainInAxis(startMouse);\n\n\n\n // stop displaying mouse position on roll over\n mousePosition = new MousePosition();\n\n // start creating a selection\n mouseSelection.start2D = startMouse;\n mouseSelection.start3D = screenToModel(startMouse.x, startMouse.y);\n\n if (mouseSelection.start3D == null)\n System.err.println(\"Mouse.onMousePressed projection is null \");\n\n\n // screenToModel(bounds3d.getCorners())\n\n }\n }", "@Override\n\tpublic void onLeftClick(Player p) {\n\t\t\n\t}", "public void mouseEntered(MouseEvent e) {\n if (mouseEnteredCmd != null) {\n mouseEnteredCmd.execute();\n }\n }", "public void mousePressed(MouseEvent e) {\n\t\tdouble x = e.getX();\n\t\tdouble y = e.getY();\n\t\tswitch (clickTracker) {\n\t\t\tcase 0:\n\t\t\t\t//figureDone = false;\n\t\t\t\tflipDirection.setEnabled(false);\n\t\t\t\tlastClick = new GPoint(x,y);\n\t\t\t\tlineActive = true;\n\t\t\t\tbreak;\n\t\t\tcase 1:\n\t\t\t\tlineActive = false;\n\t\t\t\tremove(centerCircle);\n\t\t\t\tdrawCenter(x, y);\n\t\t\t\t//println(lastClick + \" x \" + x + \" y \" +y);\n\t\t\t\t//double centerX = lastClick.getX();\n\t\t\t\t//double centerY = lastClick.getY();\n\t\t\t\tlastClick = new GPoint(lastClick.getX() + centerCircle.getWidth(), lastClick.getY());\n\t\t\t\tbreak;\n\t\t\t//case 2:\n\t\t\t\t//lastClick = new GPoint(x,y);\n\t\t\t\t//lineActive = true;\n\t\t\t\t//break;\n\t\t\tcase 2:\n\t\t\t\tlineActive = false;\n\t\t\t\tremove(outerCircle);\n\t\t\t\tdrawOuter(x, y);\n\t\t\t\tbreak;\n\t\t\tcase 3:\n\t\t\t\tlineActive = false;\n\t\t\t\tremove(armLine);\n\t\t\t\tdrawArm(x,y);\n\t\t\t\tinitalizeFigure();\n\t\t\t\tbreak;\n\t\t}\n\t\tclickTracker++;\n\t\tif (clickTracker == 3 || clickTracker == 2) lineActive = true;\n\t}", "void onMouseClicked(MouseEventContext mouseEvent);", "@Override\n\tpublic void mouseClicked(MouseEvent e) {\n\t\tselect();\n\t\te.consume();\n\t}", "public void mousePressed(MouseEvent e) {\n int modifiers = e.getModifiers();\n Point point = e.getPoint();\n \n if ((modifiers & MouseEvent.BUTTON1_MASK) != 0) {\n startPoint = point;\n }\n }", "@Override\n\t\t\tpublic void mousePressed(MouseEvent arg0) {\n\t\t\t\tsetPanelColor(studentPanel);\n\t\t\t\tsidePanelInterface.setPanel(\"studentPanel\");\n\t\t\t}", "@Override\r\n\tpublic void mouseClicked(MouseEvent e) {\r\n\t\tLOG.fine(\"Clicked\");\r\n\t\tif (shapeManipulator != null) {\r\n\t\t\tshapeManipulator.mouseClicked(e);\r\n\t\t}\r\n\t}", "@Override\r\n\tpublic void rightClick(MouseEvent arg0) {\n\t\t\r\n\t}", "public void mouseClicked(MouseEvent arg0) {\n\n\t\t\t}", "@Override\r\n\tpublic void mouseClicked(MouseEvent e) {\n\t\tl1.setText(\"You cliked the mouse\");\r\n\t}", "public void moveCursorLeft();", "@Override\n\t\t\tpublic void mouseClicked(MouseEvent arg0) {\n\t\t\t\trequestFocusInWindow();\n\t\t\t}", "public void leftPressed()\r\n {\r\n worldPanel.newMapPos(-zoom,0);\r\n miniMap.newMapPos(-1,0);\r\n }", "public void mouseClicked(int mouseX, int mouseY, int mouse) {}", "public void mouseClicked(MouseEvent e)\n {\n Point p = convertToLogical(e.getX(), e.getY());\n inspectShelterAt(p);\n }", "public synchronized void mousePressed (MouseEvent e)\n\t{\n\t\tMouseDown = true;\n\t\trequestFocus();\n\t}", "@Override\n\tpublic void mousePressed(MouseEvent e) {\n\t\tco.mousePressed(e);\n\t}", "@Override\n\t\t\tpublic void mouseClicked(MouseEvent arg0) {\n\t\t\t\t\ttoggleFullSceen();\n\t\t\t}", "public void mousePressed(MouseEvent e) {\n mouseX = e.getX();\n mouseY = e.getY();\n\n lastClicked = canvas.getElementAt(new GPoint(e.getPoint()));\n\n }", "void mouseClicked(double x, double y, MouseEvent e );", "public void mouseClicked(MouseEvent arg0) {\n\t\t\n\t}", "public void mouseClicked(MouseEvent arg0) {\n\t\t\n\t}", "@Override\n\t\t\t\t\tpublic void mouseClicked(MouseEvent arg0) {\n\t\t\t\t\t\tchangePanelClients();\n\t\t\t\t\t}", "public void centerSelection() {\n RenderContext myrc = (RenderContext) rc; if (myrc == null) return;\n Set<String> sel = myrc.filterEntities(getRTParent().getSelectedEntities());\n if (sel != null && sel.size() > 0) {\n Iterator<String> it = sel.iterator();\n\twhile (it.hasNext()) { \n\t String ent = it.next(); Point2D point = entity_to_wxy.get(ent);\n\t if (last_shft_down) entity_to_wxy.put(ent, new Point2D.Double(point.getX(),m_wy)); \n\t else if (last_ctrl_down) entity_to_wxy.put(ent, new Point2D.Double(m_wx,point.getY()));\n\t else entity_to_wxy.put(ent, new Point2D.Double(m_wx,m_wy));\n\t transform(ent); \n\t}\n getRTComponent().render();\n }\n }", "public void mouseClicked(MouseEvent event)\n\t{\n\t\tint x = event.getX();\n\t\tint y = event.getY();\n\t\t\n\t\tfor (GlComponent component : components)\n\t\t{\n\t\t\tif (component.isTouched(x, y))\n\t\t\t{\n\t\t\t\tstartAction(component);\n\t\t\t}\n\t\t}\n\t}", "@Override\r\n public void mousePressed(MouseEvent e) {\n frame.addPlatform(e.getPoint());\r\n }", "public void handleLeftClick() {\n\t\tif (summonedFamiliar != null && c.getInstance().summoned != null) {\n\t\t\tif (summonedFamiliar.familiarType == FamiliarType.BOB) {\n\t\t\t\tfor (int i = 0; i < burdenedItems.length; i++) {\n\t\t\t\t\tif (c.getItems().freeSlots() > 0)\n\t\t\t\t\t\twithdrawItem(burdenedItems[i] - 1, 1);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tuseSpecial(c);\n\t\t\t}\n\t\t} else {\n\t\t\tc.getPA().sendSummOrbDetails(false, \"\");\n\t\t}\n\t}", "public void mousePressed(MouseEvent e) {\r\n maybeShowPopup(e);\r\n }", "@Override\n\tpublic void processMouseClicked(MouseEvent e) {\n\t\tmap.mouseClicked(e.getX(), e.getY());\n\t}", "void botonDemo_mouseEntered(MouseEvent e) {\n\t\tImageIcon cursor = new ImageIcon(\"../imagenes/cursores/punteroAct.gif\");\n\t\tImage image = cursor.getImage();\n\t\tCursor puntero = Toolkit.getDefaultToolkit().createCustomCursor(image, new Point(8, 8), \"img\");\n\t\tthis.setCursor(puntero);\n\n\t}", "private void hookSingleClickAction() {\n\t\tthis.addSelectionChangedListener(new ISelectionChangedListener() {\n\t\t\tpublic void selectionChanged(SelectionChangedEvent event) {\n\t\t\t\tsingleClickAction.run();\n\t\t\t}\n\t\t});\n\t}", "@Override\r\n\tpublic void mousePressed(MouseEvent e) {\r\n\t\tLOG.fine(\"Pressed...\");\r\n\t\tif (shapeManipulator != null) {\r\n\t\t\tshapeManipulator.mousePressed(e);\r\n\t\t}\r\n\t}", "void botSalir_mouseEntered(MouseEvent e) {\n\t\tImageIcon cursor = new ImageIcon(\"../imagenes/cursores/punteroAct.gif\");\n\t\tImage image = cursor.getImage();\n\t\tCursor puntero = Toolkit.getDefaultToolkit().createCustomCursor(image, new Point(8, 8), \"img\");\n\t\tthis.setCursor(puntero);\n\n\t}", "public void mousePressed(MouseEvent e) {\r\n\t\tmouseMoved(e);\r\n\t\tmenuControl();\r\n\t\t\r\n\t}", "public void mouseClicked(MouseEvent event){\r\n\t\t//we also want to let the game controller know if it was left or right\r\n\t\tif(SwingUtilities.isRightMouseButton(event)){\r\n\t\t\tgameController.reactToRightClick(new Point(event.getX(), event.getY()));\r\n\t\t}else{\r\n\t\t\tgameController.reactToLeftClick(new Point(event.getX(),event.getY()));\r\n\t\t}\r\n\t}", "@Override\r\n\tprotected void onLeftControlClick(MyAnalogOnScreenControl pAnalogOnScreenControl)\r\n\t{\n\t}", "public void mouseClicked(int ex, int ey, int button) {\r\n\t}", "public void mouseClicked(MouseEvent arg0) {\n }", "public void mousePressed(MouseEvent e) {\r\n nodeUnderMouse = findNearbyNode(e.getX(),e.getY());\r\n }", "public void mouseClicked( MouseEvent event ){}", "@Override\r\n\tpublic void mousePressed(MouseEvent e) {\n\t\tl1.setText(\"You pressed the mouse\");\r\n\t}", "@Override\n public void mouseEntered(MouseEvent e) {\n view.requestFocus();\n }", "public void mouseClicked(MouseEvent me){\r\n if (me.getClickCount() == 2) {\r\n /*set issponsorSearchRequired to true to avoid firing in\r\n *focusLost event\r\n */\r\n txtSponsorCode.setCursor(new Cursor(Cursor.WAIT_CURSOR) );\r\n isSponsorSearchRequired =true;\r\n showSponsorInfo();\r\n txtSponsorCode.setCursor(new Cursor(Cursor.DEFAULT_CURSOR) );\r\n }\r\n }", "private void handleProviderSelected() {\n \t\tint index = fProviderCombo.getSelectionIndex() - 1;\n \t\tif (index >= 0) {\n \t\t\tfProviderStack.topControl = fProviderControls.get(index);\n \t\t\tfSelectedProvider = fComboIndexToDescriptorMap.get(index);\n \t\t} else {\n \t\t\tfProviderStack.topControl = null;\n \t\t\tfSelectedProvider = null;\n \t\t}\n \t\tfProviderArea.layout();\n \t\tif (fSelectedProvider != null) {\n \t\t\tMBSCustomPageManager.addPageProperty(REMOTE_SYNC_WIZARD_PAGE_ID, SERVICE_PROVIDER_PROPERTY,\n \t\t\t\t\tfSelectedProvider.getParticipant());\n \t\t} else {\n \t\t\tMBSCustomPageManager.addPageProperty(REMOTE_SYNC_WIZARD_PAGE_ID, SERVICE_PROVIDER_PROPERTY, null);\n \t\t}\n \t}", "@Override\r\n\t\t\t\t\tpublic void mouseClicked(MouseEvent arg0) {\n\t\t\t\t\t\t\r\n\t\t\t\t\t}", "public void mousePressed(MouseEvent e) {\n\t\t\tshowPopup(e);\n\t\t}", "@Override\r\n\t\t\t\tpublic void mouseClicked(MouseEvent arg0) {\n\t\t\t\t\t\r\n\t\t\t\t}", "@Override\r\n\t\t\t\tpublic void mouseClicked(MouseEvent arg0) {\n\t\t\t\t\t\r\n\t\t\t\t}", "@Override\r\n\t\t\t\tpublic void mouseClicked(MouseEvent arg0) {\n\t\t\t\t\t\r\n\t\t\t\t}", "@Override\n public void mouseClicked(MouseEvent e)\n {\n super.mouseClicked(e);\n // Only left button clicks are allowed\n if ( e.getButton() != LEFT_BUTTON )\n {\n return;\n }\n // Only single and double left clicks are supported\n final int clickCount = e.getClickCount();\n if ( clickCount == 1 )\n {\n if ( lastPressedPerson == null )\n {\n if ( lastSelectedPerson != null )\n {\n // User wants to clear last selected node\n lastSelectedPerson.deselect();\n lastSelectedPerson = null;\n }\n }\n else\n {\n if ( lastSelectedPerson == null )\n {\n // User wants to select the first node\n lastSelectedPerson = lastPressedPerson;\n lastSelectedPerson.select();\n }\n else\n {\n // User already selected a node and now selects another node\n // or deselect the last selected node\n if ( !lastSelectedPerson.equals(lastPressedPerson) )\n {\n lastSelectedPerson.deselect();\n lastPressedPerson.select();\n lastSelectedPerson = lastPressedPerson;\n }\n else\n {\n lastSelectedPerson.deselect();\n lastSelectedPerson = null;\n }\n }\n }\n }\n else if ( clickCount == 2 )\n {\n if ( lastSelectedPerson != null )\n {\n lastSelectedPerson.deselect();\n }\n lastSelectedPerson = null;\n //\n if ( lastPressedPerson == null )\n {\n // User double-clicked on empty place, so he wants to create a new node here\n profileFrame.createNewProfile(camera.toRealX(e.getX()), camera.toRealY(e.getY()));\n }\n else\n {\n // User double-clicked on a node, so he wants to see its profile\n profileFrame.updateProfile(lastPressedPerson);\n }\n }\n }", "@Override\r\n\t\tpublic void mouseClicked(MouseEvent arg0) {\n\t\t\tMyFrame.teampanel.showOne(name2.getText());\r\n\t\t}", "@Override\n\tpublic void nativeMouseClicked(NativeMouseEvent e) {\n\t\t\n\t}", "Point userClickPoint();", "public void mouseClicked(MouseEvent e){\n\r\n TShapePanel.this.requestFocus(); //Aug 06\r\n\r\n }", "@Override\n\t\t\tpublic void mouseClicked(MouseEvent me) {\n\t\t\t\trequestFocusInWindow();\n\t\t\t}", "public void mousePressed(MouseEvent arg0) {\n\t}", "public void moveLeft() {\n Coordinate leftCoord = new Coordinate(getX() - 1, getY());\n handleMove(leftCoord, InteractionHandler.LEFT);\n }", "void botonEnviar_mouseEntered(MouseEvent e) {\n\t\tImageIcon cursor = new ImageIcon(\"../imagenes/cursores/punteroAct.gif\");\n\t\tImage image = cursor.getImage();\n\t\tCursor puntero = Toolkit.getDefaultToolkit().createCustomCursor(image, new Point(8, 8), \"img\");\n\t\tthis.setCursor(puntero);\n\n\t}", "public void mousePressed(MouseEvent arg0) {\n\n\t}", "public void mousePressed(MouseEvent arg0) {\n\t\t\t\n\t\t}", "@Override\n public void mouseEntered(MouseEvent e) {\n SearchBox source = (SearchBox) e.getComponent();\n source.setFocusable(true);\n }", "@Override\n\tpublic void mousePressed(MouseEvent arg0) {\n\t\tint x = arg0.getX();\n\t\tint y = arg0.getY();\n\t\tcurrentPoint = getPoint(x, y);\n\t\tif (currentPoint == null) {\n\t\t\tcurrentPoint = createPoint(x, y);\n\t\t\trepaint();\n\t\t}\n\t}", "@Override public void mousePressed(MouseEvent e)\n {\n Point position = new Point(e.getX(),e.getY());\n \n // Set the mouse pressd position\n this.mousePressedPosition = position;\n \n // Get the focused component\n this.focusedComponent = this.getComponentAt(position);\n \n // Fire a focus event if the focused component changed\n if (this.focusedComponent != this.lastFocusedComponent)\n {\n if (this.lastFocusedComponent != null)\n this.lastFocusedComponent.executeEvent(new ComponentBlurEvent(this.lastHoveredComponent));\n \n if (this.focusedComponent != null)\n this.focusedComponent.executeEvent(new ComponentFocusEvent(this.hoveredComponent));\n \n this.lastFocusedComponent = this.focusedComponent;\n }\n \n // Delegate mouse press events to the hovered component\n if (this.hoveredComponent != null)\n this.hoveredComponent.executeEvent(new MousePressEvent(position,Button.of(e.getButton())));\n }", "@Override\r\n\t\t\tpublic void mouseClicked(MouseEvent arg0) {\n\t\t\t\t\r\n\t\t\t}", "void botonSalir_mouseEntered(MouseEvent e) {\n\t\tImageIcon cursor = new ImageIcon(\"../imagenes/cursores/punteroAct.gif\");\n\t\tImage image = cursor.getImage();\n\t\tCursor puntero = Toolkit.getDefaultToolkit().createCustomCursor(image, new Point(8, 8), \"img\");\n\t\tthis.setCursor(puntero);\n\n\t}", "public void mouseClicked(MouseEvent e) {\n \t\t\r\n \t}", "@Override\n\t\t\tpublic void mouseClicked(MouseEvent arg0) {\n\n\t\t\t}", "@Override\n\t\t\tpublic void mouseClicked(MouseEvent arg0) {\n\n\t\t\t}", "@Override\n\t\t\tpublic void mouseClicked(MouseEvent arg0) {\n\n\t\t\t}", "@Override\n\t\t\tpublic void mouseClicked(MouseEvent arg0) {\n\n\t\t\t}", "@Override\n\t\t\tpublic void mouseClicked(MouseEvent arg0) {\n\n\t\t\t}", "@Override\n\t\t\tpublic void mouseClicked(MouseEvent arg0) {\n\n\t\t\t}", "@Override\n\t\t\tpublic void mouseClicked(MouseEvent arg0) {\n\n\t\t\t}", "void botAyuda_mouseEntered(MouseEvent e) {\n\t\tImageIcon cursor = new ImageIcon(\"../imagenes/cursores/punteroAct.gif\");\n\t\tImage image = cursor.getImage();\n\t\tCursor puntero = Toolkit.getDefaultToolkit().createCustomCursor(image, new Point(8, 8), \"img\");\n\t\tthis.setCursor(puntero);\n\n\t}", "public void mouseEntered(MouseEvent arg0) {\n\t\trequestFocus();\n\t\t\n\t}", "public void mouseClicked(MouseEvent e) {}", "public void mouseClicked(MouseEvent e) {}", "public void mouseClicked(MouseEvent e) {}", "public void mouseClicked(MouseEvent e) {}" ]
[ "0.6223318", "0.589118", "0.5852195", "0.56694865", "0.5645635", "0.5585427", "0.55263096", "0.54152834", "0.53858", "0.53847843", "0.5382803", "0.53735715", "0.5363824", "0.5363455", "0.53452706", "0.5341211", "0.532738", "0.52865857", "0.52781945", "0.523928", "0.5235041", "0.52172405", "0.5215537", "0.5199559", "0.51398575", "0.5137302", "0.512778", "0.51260054", "0.51163745", "0.5114437", "0.5104876", "0.5102963", "0.50985163", "0.5076098", "0.50757647", "0.50723135", "0.507064", "0.506988", "0.50674117", "0.5049741", "0.5041452", "0.50393057", "0.50393057", "0.5036927", "0.5033289", "0.5029967", "0.50250405", "0.5019756", "0.50105745", "0.500627", "0.50038135", "0.49980962", "0.49975452", "0.4995215", "0.49949968", "0.49948806", "0.4993311", "0.4993132", "0.49927267", "0.49913108", "0.49907058", "0.49889582", "0.498188", "0.49718782", "0.49675855", "0.49672705", "0.49636495", "0.49588943", "0.49588943", "0.49588943", "0.4958437", "0.4955812", "0.49541694", "0.4952578", "0.4951174", "0.49455675", "0.4942771", "0.4941933", "0.49413112", "0.49399635", "0.49395636", "0.4935932", "0.4932851", "0.4931858", "0.49272573", "0.49272037", "0.4926735", "0.49254882", "0.49254882", "0.49254882", "0.49254882", "0.49254882", "0.49254882", "0.49254882", "0.49237028", "0.4919435", "0.4915342", "0.4915342", "0.4915342", "0.4915342" ]
0.62208444
1
If this dockable component is in a tabbed pane then select the associated tab.
protected static void selectTabIfAvailable(final DockableComponent dockableComponent) { Container parent = (dockableComponent != null) ? dockableComponent.getParent() : null; if (parent instanceof JTabbedPane) { final JTabbedPane tabbedPane = (JTabbedPane) parent; runSwing(() -> tabbedPane.setSelectedComponent(dockableComponent), true); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\tpublic void selectTab(Tab tab) {\n\t\t\n\t}", "public void selectTab(Predicate<? super CTabItem> tabFilter) {\r\n\t\tthis.displayTab.setSelection(Arrays.stream(this.getTabFolder().getItems()).filter(tabFilter).findFirst().orElseThrow(() -> new UnsupportedOperationException()));\r\n\t\tthis.displayTab.showSelection();\r\n\t}", "public void setSelectedTab(int arg0) {\n\n\t}", "private void selectFirstTab() {\n Tab tab = view\n .getNationsTabPane()\n .getTabs().get(0);\n\n tabChanged(tab, tab);\n }", "public void tabSelected();", "@Override\r\n public void handle(ActionEvent event) {\n InnerPaneCreator.getChildTabPanes()[2].getSelectionModel().select(1);\r\n }", "public void setSelectedTab(int tab) {\n if ((tabbedPane.getTabCount() - 1) >= tab)\n tabbedPane.setSelectedIndex(tab);\n }", "public void forceChangeSelectionToWidget(ITabDescriptor tab) {\n\t\tint index = -1;\n\t\tfor (int i = 0; i < elements.size(); i++) {\n\t\t\tif (elements.get(i).getId().equals(tab.getId())) {\n\t\t\t\tindex = i;\n\t\t\t}\n\t\t}\n\t\tAssert.isTrue(index != -1, \"Could not set the selected tab in the tabbed property viewer\");//$NON-NLS-1$\n\t\tlist.select(index);\n\t}", "public static void setActiveTab(Tab tab) {\n\n try {\n controller.tabPane.getTabs().add(controller.appointmentTab);\n controller.tabPane.getTabs().add(controller.bookingTab);\n controller.tabPane.getTabs().add(controller.customerTab);\n controller.tabPane.getTabs().add(controller.employeeTab);\n controller.tabPane.getTabs().add(controller.malfunctionTab);\n controller.tabPane.getTabs().add(controller.statisticTab);\n controller.tabPane.getTabs().add(controller.vehicleTab);\n\n SingleSelectionModel<Tab> selectionModel = controller.tabPane.getSelectionModel();\n\n selectionModel.select(tab);\n } catch (NullPointerException e) {\n e.printStackTrace();\n }\n }", "public int getSelectedTab() {\n return tabbedPane.getSelectedIndex();\n }", "void onTabSelectionChanged(int tabIndex);", "public native void selectTab(GInfoWindow self, int index)/*-{\r\n\t\tself.selectTab(index);\r\n\t}-*/;", "@Override\r\n public void widgetSelected(final SelectionEvent event) {\r\n System.out.println(\"TN5250JPart: Tab folder selected: \" + tn5250jPart.getClass().getSimpleName());\r\n setFocus();\r\n }", "public Component getTabComponent();", "private void handleSelectedElement() {\n tabPane.setVisible(true);\n tabPane.getTabs().clear();\n AOElement e = null;\n if (selectedTreeItem.get() != null) e = selectedTreeItem.get().getValue();\n\n if (!(e instanceof AOLight) && !(e instanceof AOCamera) && !(e instanceof AOGeometry)) {\n tabPane.setVisible(false);\n\n } else {\n\n try {\n\n Tab t = FXMLLoader.load(getClass().getResource(\"/fxml/mainSettingsView.fxml\"));\n tabPane.getTabs().addAll(t);\n if (e instanceof ONode) t.setText(\"Node\");\n else if (e instanceof AOLight) t.setText(\"Light\");\n else if (e instanceof AOCamera) t.setText(\"Camera\");\n\n if (e instanceof ONode) {\n if (!((ONode) e).oGeos.isEmpty() && !(((ONode) e).oGeos.get(0) instanceof ONode)) {\n Tab t2 = FXMLLoader.load(getClass().getResource(\"/fxml/mainMaterialSettingsView.fxml\"));\n t2.setText(\"Material\");\n tabPane.getTabs().add(1, t2);\n tabPane.getSelectionModel().select(0);\n }\n }\n } catch (IOException e1) {\n e1.printStackTrace();\n }\n }\n }", "@Override\n\tpublic Tab getSelectedTab() {\n\t\treturn null;\n\t}", "@CalledByNative\n private static void selectTab(TranslateCompactInfoBar infobar, int actionType) {\n infobar.selectTabForTesting(actionType);\n }", "@Override\n\t\t\tpublic void handle(MouseEvent event) {\n\t\t \t\t tabpane.getSelectionModel().select(customerstab);\n\t\t\t}", "@Override\n\tpublic void onTabSelected(Tab tab, FragmentTransaction ft) {\n\t\tvp.setCurrentItem(tab.getPosition());\n\t}", "@Override\n\tpublic void addTab(Tab tab, boolean setSelected) {\n\t\t\n\t}", "@Override\r\n\t\t\tpublic void onClick(View v) {\n\t\t\t\thost.setCurrentTab(CHART);\r\n\t\t\t}", "protected abstract void doTabSelectionChanged(int oldIndex, int newIndex);", "public void selectTab(int index) {\r\n\t\tthis.displayTab.setSelection(index);\r\n\t\tthis.displayTab.showSelection();\r\n\t}", "private void showTab() {\n if (parentTab != null) {\n tab = parentTab.getTab(this);\n if (tab != null) {\n // FIXME: this should be added by the constructor or by the panel that adds this\n // tab\n // tab.getComponent().addStyleName(\"example-queries-tab\");\n tab.setEnabled(true);\n\n if (!(parentTab.getSelectedTab() instanceof ResultViewPanel)) {\n parentTab.setSelectedTab(tab);\n }\n }\n }\n\n }", "public Component getSingleTab() {\r\n return singleTab;\r\n }", "private TestUnitPanel getSelectedPanel(){\n\t\t\n\t\tTestUnitPanel selectedPanel = (TestUnitPanel)tabbedPane.getComponentAt(tabbedPane.getSelectedIndex());\n\t\tConsoleLog.Print(\"[TestMonitor] returned Unit: \" + getUnitKey());\n\t\treturn selectedPanel;\n\t}", "@ThreadConfined(type = ThreadConfined.ThreadType.AWT)\n String getSelectedTabName() {\n return selectedTabName;\n }", "public void contentPanelTabSwitchAction() {\n\t\tComponent selectedComponent = animalsTab.getTabPanel().getSelectedComponent();\n\t\tComponent animalTab = this.animalsTab;\n\t\tif (selectedComponent == animalTab) {\n\t\t\tfillUpAnimalsTable(dateToDisplay);\n\t\t}\n\t}", "@Override\n\tpublic void addTab(Tab tab, int position, boolean setSelected) {\n\t\t\n\t}", "public interface Tab {\n\n /**\n * If the tabber can group tab's, use this method to provide a group name.\n * This tab will then be grouped together with other tabs of the same name.\n *\n * @return context\n */\n public String getTabContext();\n\n /**\n * Return a large icon to use for this tab. <code>null</code> may be\n * returned\n *\n * @return icon\n */\n public Icon getTabIcon();\n\n /**\n * Return the title of the tab\n */\n public String getTabTitle();\n\n /**\n * Return the tool tip text\n *\n * @return tool tip text\n */\n public String getTabToolTipText();\n\n /**\n * Return the mnenonic\n *\n * @return mnemonic\n */\n public int getTabMnemonic();\n\n /**\n * Return the component used for rendering this tab.\n *\n * @return component\n */\n public Component getTabComponent();\n\n /**\n * This may be used to make sure any user input on this tab is correct.\n * The tab may for example show a dialog informing the user of what is\n * wrong, then return false if something is wrong.\n *\n * @return tab is ok\n */\n public boolean validateTab();\n\n /**\n * Apply any user input.\n */\n public void applyTab();\n\n /**\n * Invoked when the tab is selected.\n */\n public void tabSelected();\n}", "private static JComponent findPropertySheetTab(ContainerOperator contOper, String tabName) {\n ComponentChooser chooser = new PropertySheetTabChooser();\n ComponentSearcher searcher = new ComponentSearcher((Container)contOper.getSource());\n searcher.setOutput(TestOut.getNullOutput());\n Component comp = searcher.findComponent(chooser);\n if(comp == null) {\n return null;\n }\n JTabbedPaneOperator tabbed = new JTabbedPaneOperator((JTabbedPane)comp.getParent());\n int count = tabbed.getTabCount();\n for(int i=0; i < count; i++) {\n if(contOper.getComparator().equals(tabbed.getTitleAt(i), tabName)) {\n tabbed.selectPage(i);\n return (JComponent)tabbed.getSelectedComponent();\n }\n }\n return null;\n }", "@Override\n\tpublic void pressTab() {\n\t\tSystem.out.println(\"Change active control.\");\n\t\t\n\t\tchangeCurrentControl(false);\n\t\t\n\t\tif (getCurrentControlIndex() < getControls().size() - 1) \n\t\t\tsetCurrentControlIndex(getCurrentControlIndex() + 1);\n\t\telse \n\t\t\tsetCurrentControlIndex(0);\n\n\t\tchangeCurrentControl(true);\n\t}", "public void openTab(String tabName){\r\n\r\n\t\tTabView selectedTabView = new TabView(this);\r\n\t\ttabViews.add(selectedTabView);\r\n\t\t\r\n\t\t\r\n\t\tif(tabName == null){ // If a new tab..\r\n\t\t\t// Ensure that there isn't already a model with that name\r\n\t\t\twhile(propertiesMemento.getTabNames().contains(tabName) || tabName == null){\r\n\t\t\t\ttabName = \"New Model \" + newModelIndex;\r\n\t\t\t\tnewModelIndex++;\r\n\t\t\t}\r\n\t\t}\r\n logger.info(\"Adding tab:\" + tabName);\r\n\r\n\t\t// Just resizes and doesn't scroll - so don't need the scroll pane\r\n\t\t/*JScrollPane scrollPane = new JScrollPane(selectedTabView, \r\n \t\t\t\t\t\t\t\t JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED, \r\n \t\t\t\t\t\t\t\t JScrollPane.HORIZONTAL_SCROLLBAR_AS_NEEDED);\r\n scrollPane.getVerticalScrollBar().setUnitIncrement(20);\r\n tabbedPane.addTab(tabName, scrollPane);*/\r\n\r\n\t\ttabbedPane.addTab(tabName, selectedTabView);\r\n\r\n currentView = selectedTabView;\r\n tabbedPane.setSelectedIndex(tabbedPane.getTabCount() - 1);\r\n setTabName(tabName);\r\n\t\t\t\t\r\n tabbedPane.setTabComponentAt(tabbedPane.getSelectedIndex(), \r\n\t\t\t\t new TabButtonComponent(propertiesMemento.getImageDir(), this, currentView));\r\n \r\n // Add Mouse motion Listener \r\n currentView.addMouseMotionListener(currentView);\r\n currentView.addMouseListener(currentView);\r\n\r\n // Record the tab in the memento\r\n propertiesMemento.addTabRecord(tabName);\r\n \r\n setTabButtons(true);\r\n \r\n setStatusBarText(\"Ready\");\r\n\r\n requestFocusInWindow();\r\n\t}", "public boolean clicktab(String tabname) throws Exception {\r\n\t\t\ttry {\r\n\t\t\t\tBy tab = By.xpath(\"//div[@class='ds_jobheader']//div[contains(.,'\"+tabname+\"')]\");\r\n\t\t\t\tSystem.out.println(tab);\r\n\t\t\t\telement = driver.findElement(tab);\r\n\t\t\t\tflag = element.isDisplayed() && element.isEnabled();\r\n\t\t\t\tAssert.assertTrue(flag, \"Tab Not present\");\r\n\t\t\t\telement.click();\r\n\t\t\t\tThread.sleep(3000);\r\n\t\t\t\ttxt = element.getAttribute(\"class\");\r\n\t\t\t\tSystem.out.println(txt);\r\n\t\t\t\tif (txt.contains(\"active\")){\r\n\t\t\t\t\tflag = true;\r\n\t\t\t\t\tSystem.out.println(\"Tab \" + tabname +\" is selected\");\r\n\t\t\t\t}else{\r\n\t\t\t\t\tSystem.out.println(\"Tab \" + tabname +\" is not selected\");\r\n\t\t\t\t\tflag = false;\r\n\t\t\t\t}\r\n\t\t\t\tAssert.assertTrue(flag, \"Tab can not be selected\");\r\n\t\t\t\t\r\n\t\t\t} catch (Exception e) {\r\n\t\t\t\tthrow new Exception(\"Tab \"+tabname +\" NOT FOUND:: \"+e.getLocalizedMessage());\r\n\t\t\t}\r\n\t\t\treturn flag;\r\n\t\t\t\r\n\t\t}", "public Tab switchToTab(Palette tab) {\n click(tab.getTabPath());\n return this;\n }", "private void showTab(int tab) {\n switch (tab) {\n case OUTING_TAB_EXPENSES:\n switchToExpensesTab();\n break;\n case OUTING_TAB_BUDDIES:\n switchToBuddiesTab();\n break;\n }\n\n this.activeTab = tab;\n }", "void onTabReselected(int position);", "public native int getSelectedTab(GInfoWindow self)/*-{\r\n\t\treturn self.getSelectedTab();\r\n\t}-*/;", "private Component setTabPanel(){\n String componentKey = Integer.toString(focusL1) + \"-\" + Integer.toString(focusL2);\n\n Component wrapper = getComponentById(wrapperName);\n Component replacedPanel = getComponentById(panelName);\n\n Component panel;\n panel = panelMap.getPanelMap().get(componentKey);\n replacedPanel.replaceWith( panel );\n\n return wrapper;\n }", "@Override\n\t\t\t\t\tpublic void onClick(View v) {\n\t\t\t\t\t\tif (hMapTabs.size() > 0) {\n\n\t\t\t\t\t\t\tif (mTabHost.getTabWidget().getChildAt(1)\n\t\t\t\t\t\t\t\t\t.isSelected()) {\n\t\t\t\t\t\t\t\tif (hMapTabs.get(Const.TABS[1]).size() > 1) {\n\t\t\t\t\t\t\t\t\tresetFragment();\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tmTabHost.getTabWidget().setCurrentTab(1);\n\t\t\t\t\t\t\tmTabHost.setCurrentTab(1);\n\t\t\t\t\t\t}\n\t\t\t\t\t}", "@Override\n\t\t\t\t\tpublic void onClick(View arg0) {\n\t\t\t\t\t\tif (hMapTabs.size() > 0) {\n\n\t\t\t\t\t\t\tif (mTabHost.getTabWidget().getChildAt(2)\n\t\t\t\t\t\t\t\t\t.isSelected()) {\n\t\t\t\t\t\t\t\tif (hMapTabs.get(Const.TABS[2]).size() > 1) {\n\t\t\t\t\t\t\t\t\tresetFragment();\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tmTabHost.getTabWidget().setCurrentTab(2);\n\t\t\t\t\t\t\tmTabHost.setCurrentTab(2);\n\t\t\t\t\t\t}\n\t\t\t\t\t}", "@Override\n\t\t\tpublic void handle(MouseEvent event) {\n\t\t \t\t tabpane.getSelectionModel().select(transactionstab);\n\t\t\t}", "public void setSelection( final CTabItem item ) {\n checkWidget();\n if( item == null ) {\n SWT.error( SWT.ERROR_NULL_ARGUMENT );\n }\n int index = itemHolder.indexOf( item );\n setSelection( index );\n }", "@Override\n public void onClick(View v) {\n switch (v.getId()) {\n case R.id.main_ll_xw:\n setTabSelection(0);\n break;\n case R.id.main_ll_rili:\n setTabSelection(1);\n break;\n case R.id.main_ll_hq:\n setTabSelection(2);\n break;\n case R.id.main_ll_wd:\n setTabSelection(3);\n break;\n\n case R.id.main_ll_self:\n setTabSelection(4);\n break;\n }\n }", "@Override\n \tpublic int getSelectedDetailsTab() {\n \t\treturn patientPanel.getSelectedIndex();\n \t\t//ScrolledTab Changes start\n \t}", "public CTabItem getSelection() {\n checkWidget();\n CTabItem result = null;\n if( selectedIndex != -1 ) {\n result = ( CTabItem )itemHolder.getItem( selectedIndex );\n }\n return result;\n }", "private void selectRootNode(Tab tab) {\n Scheduler.get().scheduleDeferred(new ScheduledCommand() {\n @Override\n public void execute() {\n Editor editor = (Editor) tab.getAttributeAsObject(EDITOR);\n if (editor instanceof FMEditor) {\n FMEditor fmEditor = (FMEditor) editor;\n fmEditor.nodeManager.selectRootNode(fmEditor);\n }\n\n }\n });\n }", "@Override\n public void onPageSelected(int position) {\n tabHost.setSelectedNavigationItem(position);\n }", "private int getSelectedTab() {\n String theme = \"default\";\n List<INamedParameters.NamedPair> pairs = getPageParameters().getAllNamed();\n theme = pairs.get(0).getValue();\n if (\"grid\".equals(theme)) {\n return 1;\n } else if (\"skies\".equals(theme)) {\n return 2;\n } else if (\"gray\".equals(theme)) {\n return 3;\n } else if (\"darkblue\".equals(theme)) {\n return 4;\n } else if (\"darkgreen\".equals(theme)) {\n return 5;\n } else {\n return 0;\n }\n }", "@Override\n public void setActiveTab(Tab tab) {\n // monkey protection against delayed start\n if (tab != null) {\n mTabControl.setCurrentTab(tab);\n // the tab is guaranteed to have a webview after setCurrentTab\n mUi.setActiveTab(tab);\n }\n }", "@Override\n \t\t\tpublic void onTabSelected(\n \t\t\t\t\tcom.actionbarsherlock.app.ActionBar.Tab tab,\n \t\t\t\t\tandroid.support.v4.app.FragmentTransaction ft) {\n \t\t\t\tmViewPager.setCurrentItem(tab.getPosition());\n \t\t\t}", "@SuppressWarnings(\"unused\")\n public <T extends JComponent> void pinTab(@Nullable T tab) {\n Content content = getContentManager().getContent(tab);\n if (content != null) {\n content.setPinned(true);\n }\n }", "private void changeTab(int tabIndex) {\n if (tabIndex == 0){\n showNav();\n tabHost.setCurrentTab(0);\n radioGroup.clearCheck();\n }\n else {\n if (tabHost.getCurrentTab() == tabIndex) {\n // dong filter tab -> main tab\n showNav();\n tabHost.setCurrentTab(0);\n radioGroup.clearCheck();\n } else {\n // mo filter tab\n hideNav();\n tabHost.setCurrentTab(tabIndex);\n }\n }\n }", "public KonTabbedPane() {\n // Initialize the ArrayList\n graphInterfaces = new ArrayList<DrawingLibraryInterface>();\n\n DirectedGraph<String, DefaultEdge> graph = CreateTestGraph();\n\n /*\n * Adds a tab\n */\n DrawingLibraryInterface<String, DefaultEdge> graphInterface =\n DrawingLibraryFactory.createNewInterface(graph);\n \n graphInterfaces.add(graphInterface);\n\n // Adds the graph to the tab and adds the tab to the pane\n add(graphInterface.getPanel());\n addTab(\"First Tab\", graphInterface.getPanel());\n\n /*\n * Adds a tab\n */\n graphInterface = DrawingLibraryFactory.createNewInterface(graph);\n graphInterfaces.add(graphInterface);\n\n // Adds the graph to the tab and adds the tab to the pane\n add(graphInterface.getPanel());\n\n graphInterface.getGraphManipulationInterface().highlightNode(graph\n .vertexSet().iterator().next(), true);\n\n addTab(\"Second Tab\", graphInterface.getPanel());\n }", "@Override\n public void onTabSelected(ActionBar.Tab tab, FragmentTransaction ft) {\n viewPager.setCurrentItem(tab.getPosition());\n }", "@Override\n\t\t\t\t\tpublic void onClick(View v) {\n\t\t\t\t\t\tif (hMapTabs.size() > 0) {\n\n\t\t\t\t\t\t\tif (mTabHost.getTabWidget().getChildAt(0)\n\t\t\t\t\t\t\t\t\t.isSelected()) {\n\t\t\t\t\t\t\t\tif (hMapTabs.get(Const.TABS[0]).size() > 1) {\n\t\t\t\t\t\t\t\t\tresetFragment();\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tmTabHost.getTabWidget().setCurrentTab(0);\n\t\t\t\t\t\t\tmTabHost.setCurrentTab(0);\n\t\t\t\t\t\t}\n\t\t\t\t\t}", "@Override\n public void onSelected(List<View> tabViews, int position) {\n }", "public void setTabSelected(int position) {\n\t\tmSelectedTabIndex = position;\n\t\tfinal int tabCount = mTabLayout.getChildCount();\n\t\tfor (int i = 0; i < tabCount; i++) {\n\t\t\tfinal View child = mTabLayout.getChildAt(i);\n\t\t\tfinal boolean isSelected = i == position;\n\t\t\tchild.setSelected(isSelected);\n\t\t\tif (isSelected) {\n\t\t\t\tanimateToTab(position);\n\t\t\t}\n\t\t}\n\t}", "@Override\n\tpublic void onTabSelected(ActionBar.Tab tab, FragmentTransaction fragmentTransaction) {\n\t\tmViewPager.setCurrentItem(tab.getPosition());\n\t\ttab.setIcon(mAppSectionsPagerAdapter.getPageIconSelected(tab.getPosition()));\n\n\t}", "@Override\n public void onTabSelected(TabLayout.Tab tab) {\n\n viewPager.setCurrentItem(tab.getPosition());\n }", "@Override\r\n\tpublic void onTabSelected(Tab tab, FragmentTransaction ft) {\r\n\t\t// on tab selected\r\n\t\t// showing respected fragment view at view pager\r\n\t\tviewPager.setCurrentItem(tab.getPosition());\r\n\t}", "public Component openSingleTab(Component component) {\r\n if (component.getDefinition().getContext() == null || component.getDefinition().getContext().getComponentId() != 126) {\r\n component.getDefinition().setContext(new InterfaceContext(null, component.getId(), false));\r\n }\r\n component.open(player);\r\n return singleTab = component;\r\n }", "@FXML\n\tpublic void selectDeviceSettingsTab() {\n\t\tif (deviceSettingsTab.isSelected() && !welcomeScreen.isVisible()) {\n\t\t\tlogHelpSplitpane.setMaxHeight(470.0);\n\t\t}\n\t}", "@Override\n public void onTabSelected(TabLayout.Tab tab) {\n\n this.mPager.setCurrentItem(tab.getPosition());\n }", "@Override\n public void onTabSelected(TabLayout.Tab tab) {\n viewPager.setCurrentItem(tab.getPosition());\n }", "public void displayTreatmentTab() {\r\n\t\t\tgetActionBar().selectTab(getActionBar().getTabAt(TREATMENT_TAB_INDEX));\r\n\t\t}", "Tab getTab();", "protected void showTabs() {\r\n\t\tif (getPageCount() > 1) {\r\n\t\t\tsetPageText(0, getString(\"_UI_SelectionPage_label\"));\r\n\t\t\tif (getContainer() instanceof CTabFolder) {\r\n\t\t\t\t((CTabFolder) getContainer()).setTabHeight(SWT.DEFAULT);\r\n\t\t\t\tPoint point = getContainer().getSize();\r\n\t\t\t\tgetContainer().setSize(point.x, point.y - 6);\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public void showPopupMenu(MouseEvent mouseEvent)\r\n\t{\n\t\tComponent mouseComponent = (Component)mouseEvent.getSource();\r\n\t\tint x = mouseEvent.getX();\r\n\t\tint y = mouseEvent.getY();\r\n\r\n\t\t// Is the deepest component a JTabbedPane?\r\n\t\tComponent pressedComponent = SwingUtilities.getDeepestComponentAt(mouseComponent, x, y); \r\n\t\tJTabbedPane pressedTabbedPane = null;\r\n\t\tif (pressedComponent instanceof JTabbedPane) \r\n\t\t{\r\n\t\t\tpressedTabbedPane = (JTabbedPane)pressedComponent;\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\tpressedTabbedPane = (JTabbedPane)SwingUtilities.getAncestorOfClass(JTabbedPane.class, pressedComponent);\r\n\t\t}\r\n\t\tif (pressedTabbedPane != null)\r\n\t\t{\r\n\t\t\t// Is the ancestor component a TabbedDock?\r\n\t\t\tComponent ancestorComponent = (Component) SwingUtilities.getAncestorOfClass(Component.class, pressedTabbedPane);\r\n\t\t\tif (ancestorComponent instanceof TabDock)\r\n\t\t\t{\r\n\t\t\t\tTabDock clickedDock = (TabDock) ancestorComponent;\r\n\r\n\t\t\t\t// Calculate the dockable offset.\r\n\t\t\t\tdockableOffset.setLocation(x, y);\r\n\t\t\t\tdockableOffset = SwingUtilities.convertPoint(mouseComponent, dockableOffset, pressedTabbedPane);\r\n\r\n\t\t\t\t// Get the selected tab and its dockable.\r\n\t\t\t\tint oldTabIndex = pressedTabbedPane.indexAtLocation(dockableOffset.x, dockableOffset.y);\r\n\t\t\t\t\r\n\t\t\t\t// Create the popup menu.\r\n\t\t\t\tDockable clickedDockable = null;\r\n\t\t\t\tif (oldTabIndex >= 0)\r\n\t\t\t\t{\r\n\t\t\t\t\tComponent tabComponent = pressedTabbedPane.getComponentAt(oldTabIndex);\r\n\t\t\t\t\tclickedDockable = clickedDock.retrieveDockableOfComponent(tabComponent);\r\n\t\t\t\t}\r\n\t\t\t\tDockable[] dockableArray = new Dockable[clickedDock.getDockableCount()];\r\n\t\t\t\tint selectedIndex = -1;\r\n\t\t\t\tfor (int index = 0; index < clickedDock.getDockableCount(); index++)\r\n\t\t\t\t{\r\n\t\t\t\t\tdockableArray[index] = clickedDock.getDockable(index);\r\n\t\t\t\t\tif (dockableArray[index].equals(clickedDockable))\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tselectedIndex = index;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tCompositeDockable compositeDockable = new DefaultCompositeDockable(dockableArray, selectedIndex);\r\n\t\t\t\tJPopupMenu popupMenu = DockingManager.getComponentFactory().createPopupMenu(clickedDockable, compositeDockable);\r\n\t\t\t\t\r\n\t\t\t\t// Show the popup menu.\r\n\t\t\t\tif (popupMenu != null)\r\n\t\t\t\t{\r\n\t\t\t\t\tpopupMenu.show(mouseEvent.getComponent(), mouseEvent.getX(), mouseEvent.getY());\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\t\r\n\r\n\t}", "public void switchToChildTab() {\n for (String child : driver.getWindowHandles()) {\n try {\n driver.switchTo().window(child);\n } catch (NoSuchWindowException e) {\n log.error(\"Window is not found\");\n log.error(e.toString());\n }\n }\n }", "public abstract AbstractDajlabTab selectDefaultTab(final AbstractDajlabTab[] tabsList);", "@Override\n public void onTabSelected(TabLayout.Tab tab) {\n mViewPager.setCurrentItem(tabLayout.getSelectedTabPosition());\n }", "@Override\n public void onTabSelected(ActionBar.Tab tab,\n FragmentTransaction fragmentTransaction) {\n mViewPager.setCurrentItem(tab.getPosition());\n }", "@Override\n public void onTabSelected(ActionBar.Tab tab, FragmentTransaction fragmentTransaction) {\n mViewPager.setCurrentItem(tab.getPosition());\n }", "@Override\n public void onTabSelected(ActionBar.Tab tab, FragmentTransaction fragmentTransaction) {\n mViewPager.setCurrentItem(tab.getPosition());\n }", "@Override\n public void onTabSelected(ActionBar.Tab tab, FragmentTransaction fragmentTransaction) {\n mViewPager.setCurrentItem(tab.getPosition());\n }", "@Override\n public void onTabSelected(ActionBar.Tab tab, FragmentTransaction fragmentTransaction) {\n mViewPager.setCurrentItem(tab.getPosition());\n }", "@Override\n public void onTabSelected(ActionBar.Tab tab, FragmentTransaction fragmentTransaction) {\n mViewPager.setCurrentItem(tab.getPosition());\n }", "@Override\n public void onTabSelected(ActionBar.Tab tab, FragmentTransaction fragmentTransaction) {\n mViewPager.setCurrentItem(tab.getPosition());\n }", "@Override\n public void onTabSelected(ActionBar.Tab tab, FragmentTransaction fragmentTransaction) {\n mViewPager.setCurrentItem(tab.getPosition());\n }", "@Override\n public void onTabSelected(ActionBar.Tab tab, FragmentTransaction fragmentTransaction) {\n mViewPager.setCurrentItem(tab.getPosition());\n }", "@Override\n public void onTabSelected(ActionBar.Tab tab, FragmentTransaction fragmentTransaction) {\n mViewPager.setCurrentItem(tab.getPosition());\n }", "@Override\n\t\t\t\tpublic void onClick(View v) {\n\t\t\t\t\tif(mViewPager.getCurrentItem()==index){\n\t\t\t\t\t\tselectTab(index);\n\t\t\t\t\t}else{\n\t\t\t\t\t\tmViewPager.setCurrentItem(index, true);\n\t\t\t\t\t}\n\t\t\t\t}", "@Override\r\n public void onTabSelected(Tab tab, FragmentTransaction ft) {\n viewPager.setCurrentItem(tab.getPosition());\r\n }", "@Override\n public void onTabSelected(ActionBar.Tab tab, FragmentTransaction ft) {\n mTabPager.setCurrentItem(tab.getPosition());\n // jumpFlag = true;\n }", "@Override\n\tpublic void onTabSelected(Tab tab, FragmentTransaction ft) {\n viewPager.setCurrentItem(tab.getPosition());\n\t}", "@Override\n public void onTabSelected(TabLayout.Tab tab) {\n if (tab.getIcon() != null)\n tab.getIcon().setColorFilter(getApplicationContext().getResources().getColor(R.color.colorIconSelected), PorterDuff.Mode.SRC_IN);\n\n // set the current page position\n current_page = tab.getPosition();\n\n // if the current page is the ListMatesFragment, remove the searchView\n if(mToolbar_navig_utils!=null){\n if(current_page==2)\n mToolbar_navig_utils.getSearchView().setVisibility(View.GONE);\n else\n mToolbar_navig_utils.getSearchView().setVisibility(View.VISIBLE);\n }\n\n // refresh title toolbar (different according to the page selected)\n if(mToolbar_navig_utils !=null)\n mToolbar_navig_utils.refresh_text_toolbar();\n\n // Disable pull to refresh when mapView is displayed\n if(tab.getPosition()==0)\n swipeRefreshLayout.setEnabled(false);\n else\n swipeRefreshLayout.setEnabled(true);\n }", "public SortContentDialog clickOnTabMenu()\n {\n sortMenuButton.click();\n sleep( 500 );\n return this;\n }", "public void add(TabLike tab){\n TabLabel btn = tabLabelCreator.create(tab.getName(), this);\n\n tab.setVisible(tabs.isEmpty());\n btn.setDisable(tabs.isEmpty());\n if (tabs.isEmpty()){\n selected = btn;\n }\n\n tabs.add(tab);\n nameTab.getChildren().add(btn);\n tabContent.getChildren().add(tab);\n tab.setContainer(this);\n }", "private JTextArea getSelectedTextArea() {\r\n\t\tint index = tabbedPane.getSelectedIndex();\r\n\t\tif (index == -1) {\r\n\t\t\treturn null;\r\n\t\t}\r\n\t\tJScrollPane sp = (JScrollPane) tabbedPane.getComponent(index);\r\n\t\tJTextArea editor = (JTextArea) sp.getViewport().getView();\r\n\t\t\r\n\t\treturn editor;\r\n\t}", "public Component openSingleTab(Component component, int slot) {\r\n if (component.getDefinition().getContext() == null || component.getDefinition().getContext().getComponentId() != 126) {\r\n component.getDefinition().setSidebarContext(new SidebarInterfaceContext(null, component.getId(), slot));\r\n }\r\n component.open(player);\r\n return singleTab = component;\r\n }", "public void setDefaultTab() {\r\n\t\t\tgetActionBar().selectTab(getActionBar().getTabAt(CLASSIFICATION_TAB_INDEX));\t\r\n\t\t}", "private void registerTabChange() {\n view\n .getNationsTabPane()\n .getSelectionModel()\n .selectedItemProperty()\n .addListener((v, oldValue, newValue) -> tabChanged(oldValue, newValue));\n }", "public TabControlPanel(JTabbedPane jtp, MyTabPreviewPainter previewPainter) {\n super();\n this.jtp = jtp;\n this.closed = new LinkedList<>();\n\n this.setLayout(new BorderLayout());\n JPanel contents = getContents(jtp, previewPainter);\n contents.setOpaque(false);\n RadianceThemingCortex.ComponentOrParentScope.setButtonIgnoreMinimumSize(contents, true);\n this.add(contents, BorderLayout.CENTER);\n }", "private void setTab() {\n\t\tTabHost.TabSpec showSpec = host.newTabSpec(ShowFragment.TAG);\r\n\t\tshowSpec.setIndicator(showLayout);\r\n\t\tshowSpec.setContent(new Dumm(getBaseContext()));\r\n\t\thost.addTab(showSpec);\r\n\r\n\t\tTabHost.TabSpec addSpec = host.newTabSpec(AddRecordFrag.TAG);\r\n\t\taddSpec.setIndicator(addLayout);\r\n\t\taddSpec.setContent(new Dumm(getBaseContext()));\r\n\t\thost.addTab(addSpec);\r\n\r\n\t\tTabHost.TabSpec chartSpec = host.newTabSpec(ChartShowFrag.TAG);\r\n\t\tchartSpec.setIndicator(chartLayout);\r\n\t\tchartSpec.setContent(new Dumm(getBaseContext()));\r\n\t\thost.addTab(chartSpec);\r\n\t}", "private void setupTab() {\n setLayout(new BorderLayout());\n JSplitPane mainSplit = new JSplitPane(JSplitPane.HORIZONTAL_SPLIT);\n mainSplit.setDividerLocation(160);\n mainSplit.setBorder(BorderFactory.createEmptyBorder());\n\n // set up the MBean tree panel (left pane)\n tree = new XTree(this);\n tree.setCellRenderer(new XTreeRenderer());\n tree.getSelectionModel().setSelectionMode(TreeSelectionModel.SINGLE_TREE_SELECTION);\n tree.addTreeSelectionListener(this);\n tree.addTreeWillExpandListener(this);\n tree.addMouseListener(ml);\n JScrollPane theScrollPane = new JScrollPane(tree, JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED,\n JScrollPane.HORIZONTAL_SCROLLBAR_AS_NEEDED);\n JPanel treePanel = new JPanel(new BorderLayout());\n treePanel.add(theScrollPane, BorderLayout.CENTER);\n mainSplit.add(treePanel, JSplitPane.LEFT, 0);\n\n // set up the MBean sheet panel (right pane)\n viewer = new XDataViewer(this);\n sheet = new XSheet(this);\n mainSplit.add(sheet, JSplitPane.RIGHT, 0);\n\n add(mainSplit);\n }", "@Override\n\tpublic void onPageSelected(int position) {\n\t\tselectTab(position);\n\t}", "protected final WebMarkupContainer getTabBar() {\n return (WebMarkupContainer) get(TABS_BAR_ID);\n }", "public void changeTab(int index) {\n\t\ttabsContainer.getSelectionModel().select(index);\n\t}", "@Override\r\n\tpublic void onTabSelected(Tab tab, FragmentTransaction ft) {\n\r\n\t\tviewPager.setCurrentItem(tab.getPosition());\r\n\r\n\t}" ]
[ "0.68254864", "0.6683512", "0.64739764", "0.6385255", "0.6374617", "0.62725127", "0.6226892", "0.6219324", "0.6203245", "0.61923367", "0.61593944", "0.6115224", "0.60773975", "0.605434", "0.6045828", "0.6023901", "0.5875433", "0.5854182", "0.5768705", "0.5756873", "0.5751206", "0.57491136", "0.5702486", "0.56852543", "0.5683921", "0.5674763", "0.5649174", "0.5623957", "0.5552848", "0.5540736", "0.55197275", "0.54979974", "0.54888445", "0.5476742", "0.5463239", "0.5463165", "0.5456884", "0.5453593", "0.54529303", "0.5437655", "0.5433494", "0.5411019", "0.5404292", "0.53985447", "0.5387244", "0.53693795", "0.53673387", "0.5350196", "0.5337696", "0.5323277", "0.5314126", "0.53046274", "0.5285702", "0.52765834", "0.5276144", "0.5252205", "0.52484435", "0.52426475", "0.5214543", "0.5213834", "0.5210508", "0.52102035", "0.5202616", "0.5199502", "0.51920813", "0.5188917", "0.5176321", "0.5175776", "0.5174555", "0.5172052", "0.51710516", "0.5170774", "0.5164409", "0.5164171", "0.5164171", "0.5164171", "0.5164171", "0.5164171", "0.5164171", "0.5164171", "0.5164171", "0.5164171", "0.5158913", "0.51584846", "0.5138235", "0.5136629", "0.5134872", "0.5129583", "0.5122241", "0.5113248", "0.5111213", "0.5100521", "0.509859", "0.5087924", "0.5082113", "0.5081898", "0.50817317", "0.5073499", "0.50643206", "0.5061008" ]
0.7595609
0
Get the dockable component that contains this component if there is one.
protected static DockableComponent getDockableComponent(JComponent component) { Container parent = component.getParent(); while (parent != null) { if (parent instanceof DockableComponent) { return (DockableComponent) parent; } parent = parent.getParent(); } return null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private Component getDocked(Component c) {\r\n\t\tif (c instanceof DefaultDockingPort)\r\n\t\t\treturn ((DefaultDockingPort) c).getDockedComponent();\r\n\t\treturn c;\r\n\t}", "public Optional<ComponentSymbol> getComponent() {\r\n if (!this.getEnclosingScope().getSpanningSymbol().isPresent()) {\r\n return Optional.empty();\r\n }\r\n if (!(this.getEnclosingScope().getSpanningSymbol().get() instanceof ComponentSymbol)) {\r\n return Optional.empty();\r\n }\r\n return Optional.of((ComponentSymbol) this.getEnclosingScope().getSpanningSymbol().get());\r\n }", "public JComponent getWrappedComponent()\n {\n return field;\n }", "public Dock getDock() {\n return dock;\n }", "public JComponent getComponent() {\n return getGradleUI().getComponent();\n }", "public JComponent getWidget() {\n return itsComp;\n }", "public DockContainer getContainer() {\n return container;\n }", "public Optional<ExpandedComponentInstanceSymbol> getComponentInstance() {\r\n if (!this.getEnclosingScope().getSpanningSymbol().isPresent()) {\r\n return Optional.empty();\r\n }\r\n if (!(this.getEnclosingScope().getSpanningSymbol()\r\n .get() instanceof ExpandedComponentInstanceSymbol)) {\r\n return Optional.empty();\r\n }\r\n return Optional\r\n .of((ExpandedComponentInstanceSymbol) this.getEnclosingScope().getSpanningSymbol().get());\r\n }", "public JComponent getComponent();", "public DockableDragPainter getDockableDragPainter()\r\n\t{\r\n\t\treturn dockableDragPainter;\r\n\t}", "public javax.accessibility.AccessibleComponent getAccessibleComponent() {\n try {\n XAccessibleComponent unoAccessibleComponent = (XAccessibleComponent)\n UnoRuntime.queryInterface(XAccessibleComponent.class, unoAccessibleContext);\n return (unoAccessibleComponent != null) ? \n new AccessibleComponentImpl(unoAccessibleComponent) : null;\n } catch (com.sun.star.uno.RuntimeException e) {\n return null;\n }\n }", "public JComponent getComponent() {\n return itsComp;\n }", "public Component getComponent() {\n return component;\n }", "public boolean isDockable() {\n return true;\r\n }", "public DockedStackDividerController getDockedDividerController() {\n return this.mDividerControllerLocked;\n }", "public Component getComponent() {\n if (getUserObject() instanceof Component)\n return (Component)getUserObject();\n return null;\n }", "public JComponent getToolbarComponent()\n {\n return _box;\n }", "JComponent getImpl();", "public JComponent getComponent() { return _panel; }", "@Override\n\tpublic Component getComponent() {\n\t\treturn toolbox;\n\t}", "private Border getDesiredBorder(Component cmp) {\r\n\t\tif (cmp instanceof DefaultDockingPort)\r\n\t\t\tcmp = ((DefaultDockingPort) cmp).getDockedComponent();\r\n\r\n\t\tif (cmp instanceof DockablePanel) {\r\n\t\t\tString title = ((DockablePanel) cmp).getDockable().getDockableDesc();\r\n\t\t\treturn new TitledBorder(title);\r\n\t\t}\r\n\t\treturn dummyBorder;\r\n\t}", "public ViewAndControlsInterface getPodComponent() {\r\n return this;\r\n }", "public Component getComponent() {\n\treturn component;\n}", "protected Cursor retrieveCanDockCursor()\r\n\t{\r\n\t\treturn DockingManager.getCanDockCursor();\r\n\t}", "public IPSComponent peekParent();", "public GComponent getFocusedComponent()\n {\n return this.focusedComponent;\n }", "@Override\n\tpublic Component getComponent() {\n\t\treturn this;\n\t}", "public JPanel getCurrentPanel(){\n JPanel card = null;\n for (Component comp : contentPane.getComponents()) {\n if (comp.isVisible() == true) {\n return card;\n }\n }\n return null;\n }", "public ClientDashboardFrame getClientDashboardFrame() {\n return (ClientDashboardFrame) getParent() //JPanel\n .getParent() //JLayeredPanel\n .getParent() //JRootPanel\n .getParent(); //JFrame\n }", "public Component getParentComponent() {\r\n\t\tif (parentComponent == null) {\r\n\t\t\tif (view != null)\r\n\t\t\t\tparentComponent = view.getComponent(parentComponentName);\r\n\t\t}\r\n\t\treturn parentComponent;\r\n\t}", "ComponentBean getReferencedBean();", "public String getComponent() {\r\n\t\treturn component;\r\n\t}", "public Component getComponent(int componentId) {\r\n if (opened != null && opened.getId() == componentId) {\r\n return opened;\r\n }\r\n if (chatbox != null && chatbox.getId() == componentId) {\r\n return chatbox;\r\n }\r\n if (singleTab != null && singleTab.getId() == componentId) {\r\n return singleTab;\r\n }\r\n if (overlay != null && overlay.getId() == componentId) {\r\n return overlay;\r\n }\r\n for (Component c : tabs) {\r\n if (c != null && c.getId() == componentId) {\r\n return c;\r\n }\r\n }\r\n return null;\r\n }", "public ILexComponent getParent();", "@Override\n\tpublic ElementView getComponent() {\n\t\treturn jc;\n\t}", "public CoolBar getParent() {\n checkWidget();\n return parent;\n }", "@Nullable\n public JComponent getPreferredFocusedComponent() {\n return myEditor;\n }", "protected final Component getComponent()\n\t{\n\t\treturn component;\n\t}", "public Composite getCurrentFolderComposite(){\r\n\t\tif(compositeMap.get(compositeIndex) == null){\r\n\t\t\tComposite composite = new Composite(folderReference, SWT.NONE);\r\n\t\t\tGridLayout fillLayout = new GridLayout(1, true);\r\n\t\t\tGridData gridData = new GridData(SWT.FILL, SWT.FILL, true, false);\r\n\t\t\t\r\n\t\t\tcomposite.setLayout(fillLayout);\r\n\t\t\tcomposite.setLayoutData(gridData);\r\n\t\t\t\r\n\t\t\tcompositeMap.put(compositeIndex, composite);\r\n\t\t}\r\n\t\t\r\n\t\treturn compositeMap.get(compositeIndex);\r\n\t}", "public final Element getContainer() {\n\t\treturn impl.getContainer();\n }", "public boolean docked() {\n return inDock;\n }", "UIComponent getParent();", "public int mainComponent() {\n\t\treturn resizable ? MAIN_COMPONENT_RESIZABLE : MAIN_COMPONENT_FIXED; // interfaces\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// move\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// with\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// resizing\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// on\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// 7\n\t}", "public JComponent getContentComponent() {\r\n return this;\r\n }", "public Control getControl()\n {\n return composite;\n }", "@Override\r\n\tpublic Control getControl() {\r\n\t\treturn container;\r\n\t}", "public static SuiContainer getFocusOwner() {\r\n \t//focus owner becomes null if the last wasn't focusable/visible\r\n \treturn (focusOwner!=null&& \r\n \t\t\t\t(!focusOwner.isFocusable()||!focusOwner.isVisible())\r\n \t\t\t\t\t) ? (focusOwner=null) : focusOwner;\r\n }", "public @Nullable\n JFrame getOuterFrame() {\n if (null == outerFrame) {\n outerFrame = searchForOuterFrame();\n }\n return outerFrame;\n }", "public Component getFocusOwner() {\n return (isFocused()) ? \n KeyboardFocusManager.getCurrentKeyboardFocusManager().getFocusOwner()\n : null;\n }", "public JComponent getWorkspacePanel() {\n if (!isWorkspacePanelInitialized) {\n initWorkspacePanel();\n }\n return workspacePanel;\n }", "public ComponentConnector getDragSource() {\n return component;\n }", "public String getComponent() {\n return this.component;\n }", "public JLayeredPane getContainer(){\n\t\treturn contentPane;\n\t}", "ComponentBean getBean();", "public ShortCutComponent getShortCutComponent() {\n return shortCutComponent;\n }", "public Composite getComposite() {\n return (Composite) _section.getClient();\n }", "public JPanel getComponentAt( String name) {\n Component comp = null;\n for (Component child : this.getContentPane().getComponents()) {\n if (child.getName().equals(name)) {\n comp = child;\n }\n }\n return (JPanel)comp;\n }", "public JawbComponent getMainComponent () {\n return null;\n }", "@Override\n public JComponent getComponent () {\n return this;\n }", "@Override\n\tpublic Component getComponent() {\n\t\tComponent component = button.getComponent();\n\t\tcomponent.setBackground(color);\n\t\treturn component;\n\t}", "public Component componentAt( int x, int y ) {\n Component component = componentAt( x, y, desktop, true );\n if ( component != desktop ) {\n return component;\n }\n \n return null; \n }", "public AppComponent component(){\n return mComponent;\n }", "public JawbComponent getEditorComponent () {\n if (editorComponent == null)\n initEditorComponent ();\n return editorComponent;\n }", "protected Node getComponentNode() {\n return componentNode;\n }", "public abstract JComponent getComponent();", "public @Nullable ContainerSwitchUi getSwitchPane() {\n\t\tif (layout!=null && layout.getChild() instanceof ContainerSwitch cs) return cs.ui;\n\t\telse return null;\n\t}", "private ScrollPane scrollPane() {\r\n return (ScrollPane) this.getParent();\r\n }", "public JPanel getParent() {\n\t\treturn cardLayoutPanel;\n\t}", "private JPanel getPanelForList(){\n String listName = ((JComboBox)header.getComponent(1)).getSelectedItem().toString();\n for(Component c:window.getComponents()){\n if(c.getName().equals(listName)){\n return (JPanel)c;\n }\n }\n return null;\n }", "protected View getCompartmentView() {\n\t\tView view = (View) getDecoratorTarget().getAdapter(View.class);\r\n\t\tIterator it = view.getPersistedChildren().iterator();\r\n\t\twhile (it.hasNext()) {\r\n\t\t\tView child = (View) it.next();\r\n\t\t\tif (child.getType().equals(DeployCoreConstants.HYBRIDLIST_SEMANTICHINT)) {\r\n\t\t\t\treturn child;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn null;\r\n\t}", "public AbsBuilderLevelPanel getCurrentLevelPanel()\n\t{\n\t\tAbsBuilderLevelPanel card = null;\n\n\t\t//find the component that is set to visible (will be a JPanel\n\t\tfor (Component comp : pnlLevelSwitch.getComponents() ) {\n\t\t\tif (comp.isVisible() == true) {\n\t\t\t\tcard = (AbsBuilderLevelPanel)comp;\n\t\t\t}\n\t\t}\n\n\t\treturn card;\n\t}", "public JComponent getPodContent() {\r\n return this;\r\n }", "public void addDockable(JComponent c) {\n SingleCDockable dockable = new DefaultSingleCDockable(this.getTitle(), this.getTitle(), c); \r\n control.addDockable( dockable );\r\n \r\n // now we can set the location\r\n dockable.setLocation( CLocation.base(dockingcontent).normal() );\r\n dockable.setVisible( true );\r\n\r\n }", "@Override\n public Widget getWidget() {\n if (widget == null) {\n if (Profiler.isEnabled()) {\n Profiler.enter(\"AbstractComponentConnector.createWidget for \"\n + getClass().getSimpleName());\n }\n widget = createWidget();\n if (Profiler.isEnabled()) {\n Profiler.leave(\"AbstractComponentConnector.createWidget for \"\n + getClass().getSimpleName());\n }\n }\n\n return widget;\n }", "public Composite getComposite() {\n\t\treturn null;\n\t}", "public ToolBar getParent () {\r\n\tcheckWidget();\r\n\treturn parent;\r\n}", "public EMAComponentSymbol getComponent() {\n return (EMAComponentSymbol) this.getEnclosingScope().getSpanningSymbol().get();\n }", "public MissingDockFactory getMissingFactory() {\n return missingFactory;\n }", "public Object getComponentEditPart() {\n\t\treturn componentEditPart;\n\t}", "@Override\n public GeneralOrthoMclSettingsVisualPanel getComponent() {\n if (component == null) {\n component = new GeneralOrthoMclSettingsVisualPanel();\n\n }\n return component;\n }", "public JRibbonContainer getRibbonContainer()\n\t{\n\t\treturn ribbonContainer;\n\t}", "public Component getComponent(String name) {\n Optional<Component> component = elements.getComponent(name);\n\n if(component.isPresent()) {\n return component.get();\n } else {\n Assert.fail(\"Missing component \" + name);\n return null;\n }\n\n }", "public final AbstractComponent getChildComponent() {\n return this.child;\n }", "public JScrollPane getCurrent() {\n return scrollPane;\n }", "public JPanel getJPanel();", "public JPanel getJPanel();", "public JComponent getMainComponent() {\n\t return mainPanel;\n\t}", "public Component getBoard(String title) {\n\t\treturn this.tabPanelsMap.get(title);\n\t}", "public static ApplicationComponent component() {\n return instance().applicationComponent;\n }", "public Container getContainer();", "protected JPanel getPanel() {\n\t\treturn (JPanel) window.getContentPane();\n\t}", "C getGlassPane();", "public Component getComponent() throws WebdavException {\n init(true);\n\n try {\n if ((event != null) && (comp == null)) {\n if (ical == null) {\n ical = getSysi().toCalendar(event,\n (col.getCalType() == CalDAVCollection.calTypeInbox) ||\n (col.getCalType() == CalDAVCollection.calTypeOutbox));\n }\n\n final var cl = ical.getComponents();\n\n if ((cl == null) || (cl.isEmpty())) {\n return null;\n }\n\n // XXX Wrong - should just use the BwEvent + overrides?\n comp = cl.get(0);\n }\n } catch (final Throwable t) {\n throw new WebdavException(t);\n }\n\n return comp;\n }", "@Override\r\n\tpublic Widget getWidget() {\n\t\treturn asWidget();\r\n\t}", "@SuppressWarnings(\"unchecked\")\n public <T extends Component> T getComponent() {\n try {\n return (T) component;\n } catch (ClassCastException ex) {\n getLogger().log(Level.SEVERE,\n \"Component code/design type mismatch\", ex);\n }\n return null;\n }", "public Component getPopupComponent() {\r\n return _component;\r\n }", "public Element getSelectedCategoryElement() {\n Element categoryElement = null;\n\n IStructuredSelection categoriesCompositeSelection =\n (IStructuredSelection) getTreeViewer().getSelection();\n\n if (!categoriesCompositeSelection.isEmpty()) {\n Element selectedElement = (Element)\n categoriesCompositeSelection.getFirstElement();\n\n if (selectedElement.getName().\n equals(DeviceRepositorySchemaConstants.\n POLICY_ELEMENT_NAME)) {\n\n StringBuffer xPathBuffer = new StringBuffer();\n xPathBuffer.append(\"ancestor::\").//$NON-NLS-1$\n append(MCSNamespace.DEVICE_DEFINITIONS.getPrefix()).\n append(':').\n append(DeviceRepositorySchemaConstants.\n CATEGORY_ELEMENT_NAME);\n XPath categoryXPath = new XPath(xPathBuffer.toString(),\n new Namespace[]{MCSNamespace.DEVICE_DEFINITIONS});\n try {\n categoryElement =\n categoryXPath.selectSingleElement(selectedElement);\n } catch (XPathException e) {\n EclipseCommonPlugin.handleError(ABPlugin.getDefault(), e);\n }\n } else if (selectedElement.getName().\n equals(DeviceRepositorySchemaConstants.\n CATEGORY_ELEMENT_NAME)) {\n categoryElement = selectedElement;\n }\n }\n return categoryElement;\n }", "Component getDelegateFocusOwner() {\n return getDelegate();\n }", "public Component getConfigFormPanel()\n {\n if (configFormPanel == null)\n {\n Object form = configForm.getForm();\n if ((form instanceof Component) == false)\n {\n throw new ClassCastException(\"ConfigurationFrame :\"\n + form.getClass()\n + \" is not a class supported by this ui implementation\");\n }\n configFormPanel = (Component) form;\n }\n return configFormPanel;\n }", "public JToolBar getToolBar() {\n return myToolBar;\n }" ]
[ "0.7539412", "0.62539953", "0.6240763", "0.6209821", "0.62076557", "0.61936885", "0.61434346", "0.6066125", "0.6042534", "0.6037874", "0.6034446", "0.60103387", "0.5990374", "0.5908725", "0.5904332", "0.5894569", "0.5884222", "0.58621955", "0.5844491", "0.58156544", "0.58052546", "0.5804913", "0.57873285", "0.57774943", "0.5775742", "0.5763649", "0.57527983", "0.57309306", "0.5711416", "0.56894267", "0.56463784", "0.561568", "0.5607032", "0.5604915", "0.55920166", "0.55898565", "0.5584714", "0.5578275", "0.55637485", "0.5553992", "0.553494", "0.552758", "0.55039364", "0.5496975", "0.5490535", "0.5475974", "0.5475016", "0.54683423", "0.5464617", "0.5450988", "0.5447466", "0.54354185", "0.5418772", "0.5413873", "0.5404951", "0.54033524", "0.539258", "0.53912866", "0.53892565", "0.5386884", "0.5386694", "0.538071", "0.5379012", "0.53698486", "0.5348658", "0.5340927", "0.53360915", "0.5330196", "0.5325824", "0.5322392", "0.53217137", "0.5308465", "0.5302341", "0.52661526", "0.52556944", "0.5254185", "0.5245478", "0.523792", "0.5233141", "0.52325255", "0.52235377", "0.52224386", "0.5215563", "0.52072406", "0.52050036", "0.52050036", "0.5204183", "0.52023315", "0.5200706", "0.51978076", "0.5191142", "0.51839453", "0.5182351", "0.5182235", "0.5172381", "0.5165805", "0.51627755", "0.51604337", "0.5159489", "0.51528996" ]
0.7696856
0
Clicks the JComponent at the given point from within the given provider.
public static Component clickComponentProvider(ComponentProvider provider, int button, int x, int y, int clickCount, int modifiers, boolean popupTrigger) { JComponent component = provider.getComponent(); final Component clickComponent = SwingUtilities.getDeepestComponentAt(component, x, y); clickMouse(clickComponent, MouseEvent.BUTTON1, x, y, clickCount, modifiers, popupTrigger); return clickComponent; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static Component clickComponentProvider(ComponentProvider provider) {\n\n\t\tJComponent component = provider.getComponent();\n\t\tDockableComponent dockableComponent = getDockableComponent(component);\n\t\tselectTabIfAvailable(dockableComponent);\n\t\tRectangle bounds = component.getBounds();\n\t\tint centerX = (bounds.x + bounds.width) >> 1;\n\t\tint centerY = (bounds.y + bounds.height) >> 1;\n\n\t\treturn clickComponentProvider(provider, MouseEvent.BUTTON1, centerX, centerY, 1, 0, false);\n\t}", "@Override public void onMouseClick( Location point ) {\n new FilledRect( verticalCorner, 5, 210, canvas );\n new FilledRect( horizontalCorner, 210, 5, canvas );\n\n verticalCorner.translate( -10, 0 );\n horizontalCorner.translate( 0, -10 );\n }", "Point userClickPoint();", "public void clickCoordinate(By anyElement,int coordX,int coordY)\n {\n /*\n Moves the mouse to an offset from the top-left corner of the companyName element, then click it.\n Get chrome extension Mouse XY to find coordinates of a web-page\n The companyName element has coordinates of about (80, 100) when in 100% zoom\n The coordinates are heavily dependent on the size of the browser screen(window)/resolution.\n This function allows you to pick a coordinate, and it clicks on said chosen coordinate\n */\n Actions execute = new Actions(driver);\n WebElement offsetElement = findVisibleElement(anyElement);\n Point coordinate = offsetElement.getLocation();\n coordX -= coordinate.getX();\n coordY -= coordinate.getY();\n execute.moveToElement(offsetElement, coordX, coordY).click().perform();\n }", "public void clickOnWebCoords(WebDriver driver, Point pointToClick, String subImagePath) {\n WebElement element = generalServices.getReferenceOriginElement(driver, subImagePath);\n pointToClick = translateOpenCvCoordsToWebCoords(pointToClick, element);\n new Actions(driver).moveToElement(element, pointToClick.x, pointToClick.y).click().build().perform();\n }", "public void clickElementLocation(By anyElement)\n {\n\n Actions execute = new Actions(driver);\n execute.moveToElement(findElement(anyElement)).click().perform();\n }", "public void setclickedPoint(Point cp) {\r\n this.clickedPoint = cp;\r\n }", "private void clickPiece(int x, int y) {\n\t\t// Determine which piece it was.\n\t\tint c = x / pieceWidth;\n\t\tint r = y / pieceHeight;\n\t\tint curr = r * pcols + c;\n\t\tif (selected == -1) {\n\t\t\t// First piece to be selected -> remember\n\t\t\tselected = curr;\n\t\t}\n\t\telse if (selected == curr) {\n\t\t\t// Same piece -> deselect\n\t\t\tselected = -1;\n\t\t}\n\t\telse {\n\t\t\t// Second piece -> swap\n\t\t\tInteger p = order.get(selected);\n\t\t\torder.set(selected, order.get(curr));\n\t\t\torder.set(curr, p);\n\t\t\tselected = -1;\n\t\t}\n\t\tcanvas.repaint();\n\t}", "@Test\n\t@TestProperties(name = \"Click element ${by}:${locator}\", paramsInclude = { \"by\", \"locator\" })\n\tpublic void clickElement() {\n\t\tfindElement(by, locator).click();\n\t}", "void click(int x, int y, Keys... modifiers);", "public void onMouseClick(Location point) {\n\t Thread t6 = new MoveMouth(0, 0, canvas);\n t6.start(); \n }", "@Override\n public void onClick(View v) {\n pickPointOnMap();\n }", "void mouseClicked(double x, double y, MouseEvent e );", "@Override\r\n\tpublic void clickObject() {\n\r\n\t}", "public void click() throws ApplicationException, ScriptException {\n mouse.click(driver, locator);\n }", "@Override\n\t\tpublic void mouseClicked(MouseEvent e) {\n\t\t\t// find and set the coordinates of the current click\n\t\t\t_gridPanel.selected(e.getX(), e.getY());\n\t\t}", "public void clickCourse() {\r\n\t\tthis.clickcourse.click();\r\n\r\n\t}", "@Override\n\tpublic void mousePressed(MouseEvent arg0) {\n\t\tgraphics.panel.requestFocus();\n\t\tx=arg0.getX();\n\t\ty=arg0.getY();\n\t}", "protected void click(By locator) {\n \tint waitTime = 10;\n \tWebElement element = new WebDriverWait(DRIVER, waitTime)\n \t.until(ExpectedConditions.visibilityOfElementLocated(locator));\n\n \t element.click();\n }", "public void mouseClicked(int ex, int ey, int button) {\r\n\t}", "public void click(WebDriver driver, By byWebElement) {\n }", "public void clickOnElement (By locator){\n appiumDriver.findElement(locator).click();\n }", "void clickSomewhereElse();", "@Override\r\n\t\t\t\tpublic void mouseClicked(MouseEvent arg0) {\n\t\t\t\t\t\r\n\t\t\t\t}", "@Override\r\n\t\t\t\tpublic void mouseClicked(MouseEvent arg0) {\n\t\t\t\t\t\r\n\t\t\t\t}", "@Override\r\n\t\t\t\tpublic void mouseClicked(MouseEvent arg0) {\n\t\t\t\t\t\r\n\t\t\t\t}", "protected void click(By locator) {\n waitForVisibilityOf(locator, 5);\n waitForElementToBeClickable(locator);\n find(locator).click();\n }", "public void mouseClicked(int mouseX, int mouseY, int mouse) {}", "@Override\r\n\t\t\t\t\tpublic void mouseClicked(MouseEvent arg0) {\n\t\t\t\t\t\t\r\n\t\t\t\t\t}", "public void mouseClicked(MouseEvent arg0) {\n\n\t\t\t}", "@Override\n\t\t\tpublic void mouseClicked(MouseEvent arg0) {\n\n\t\t\t}", "@Override\n\t\t\tpublic void mouseClicked(MouseEvent arg0) {\n\n\t\t\t}", "@Override\n\t\t\tpublic void mouseClicked(MouseEvent arg0) {\n\n\t\t\t}", "@Override\n\t\t\tpublic void mouseClicked(MouseEvent arg0) {\n\n\t\t\t}", "@Override\n\t\t\tpublic void mouseClicked(MouseEvent arg0) {\n\n\t\t\t}", "@Override\n\t\t\tpublic void mouseClicked(MouseEvent arg0) {\n\n\t\t\t}", "@Override\n\t\t\tpublic void mouseClicked(MouseEvent arg0) {\n\n\t\t\t}", "public void mouseClicked(MouseEvent arg0) {\n }", "private void cs1() {\n\t\t\tctx.mouse.click(675,481,true);\n\t\t\t\n\t\t}", "public void mouseClicked( MouseEvent event ){}", "@Override\r\n\t\t\tpublic void mouseClicked(MouseEvent arg0) {\n\t\t\t\t\r\n\t\t\t}", "@Override\n public void mouseClicked(MouseEvent me) {\n }", "public void mouseClicked(MouseEvent e) {}", "public void mouseClicked(MouseEvent e) {}", "public void mouseClicked(MouseEvent e) {}", "public void mouseClicked(MouseEvent e) {}", "@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\trequestLocClick();\n\t\t\t}", "public static void performAction(DockingActionIf action, ComponentProvider provider,\n\t\t\tboolean wait) {\n\n\t\tActionContext context = runSwing(() -> {\n\t\t\tActionContext actionContext = new DefaultActionContext();\n\t\t\tif (provider == null) {\n\t\t\t\treturn actionContext;\n\t\t\t}\n\n\t\t\tActionContext newContext = provider.getActionContext(null);\n\t\t\tif (newContext == null) {\n\t\t\t\treturn actionContext;\n\t\t\t}\n\n\t\t\tactionContext = newContext;\n\t\t\tactionContext.setSourceObject(provider.getComponent());\n\n\t\t\treturn actionContext;\n\t\t});\n\n\t\tdoPerformAction(action, context, wait);\n\t}", "public void performClick() {\n\t\tgetWrappedElement().click();\n\t}", "public abstract void mouseClicked(MouseEvent e);", "public void mouseClicked(MouseEvent e) {\n\t\tdouble[] pointLocation = new double[3];\n\t\tdouble x = e.getX();\n\t\tdouble y = e.getY();\n\t\t\n\t\tplotContent.Click(x, y, pointLocation);\n\t\tif(pointLocation[0]==0.0&&pointLocation[1]==0.0&&pointLocation[2]==0.0) {\n\t\t\t\n\t\t}else {\n\t\t\ttradedetail.setText(\"\\n\"+\"Yield = \"+pointLocation[0]+\"\\n\"+\"Days_To_Maturity = \"+pointLocation[1]+\"\\n\"+\"Amount_CHF = \"+pointLocation[2]);\n\t\t}\n\t}", "public void mouseClicked(MouseEvent arg0) {\n\t\t\n\t}", "public void mouseClicked(MouseEvent arg0) {\n\t\t\n\t}", "@Override\n\t\tpublic void mouseClicked(MouseEvent arg0) {\n\t\t\t\n\t\t}", "@Override\n\t\tpublic void mouseClicked(MouseEvent arg0) {\n\t\t\t\n\t\t}", "@Override\r\n\tpublic void mouseClicked(MouseEvent arg0) {\n\t}", "@Override\n\t\t\tpublic void mouseClicked(MouseEvent arg0) {\n\t\t\t\t\n\t\t\t}", "@Override\n\t\t\tpublic void mouseClicked(MouseEvent arg0) {\n\t\t\t\t\n\t\t\t}", "public void click(WebElement element) {\nelement.click();\n\t}", "public void click(By locator){\n\t\tWebElement element = findElementClickable(locator);\n\n\t\ttry {\n\n try {\n element.click();\n }catch(StaleElementReferenceException e)\n {\n\t\t\t\telement = findElementClickable(locator);\n\t\t\t\telement.click();\n }\n LOGGER.info(\"Step : \"+Thread.currentThread().getStackTrace()[2].getMethodName()+\": Pass\");\n }catch(Exception e)\n {\n LOGGER.error(\"Step : \"+Thread.currentThread().getStackTrace()[2].getMethodName()+\": Fail\");\n //e.printStackTrace();\n throw new NotFoundException(\"Exception \"+ e +\" thrown while clicking on object using locator \"+locator);\n\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t}\n }", "public void clickIfExists() {\n try {\n\n waitTillElementVisible(5000);\n mouse.click(driver, locator);\n\n } catch (Exception e) {\n log.error(\"exception :\", e);\n }\n }", "public void click(int mx,int my){\r\n super.setLocation(mx+boundMap.getCamera().getX(),0,(my+boundMap.getCamera().getY())/Globals.__PROJECTION_SCALE__);\r\n Spatial[] spats = boundMap.getSpace().grabSpatialsAround(this)[1];\r\n for (Spatial s: spats){\r\n if (s instanceof NPC){\r\n if (((NPC)s).collideMouse())\r\n ((NPC)s).clicked();\r\n }\r\n }\r\n }", "public static void clickObjectCoordinates(By byObj, int X, int Y) throws IOException {\n\t\ttry {\n\t\t\tWebElement object = driver.findElement(byObj);\n\t\t\tActions builder = new Actions(driver);\n\t\t\tbuilder.moveToElement(object, X, Y).click().build().perform();\n\t\t}\n\t\tcatch(Exception e) {\n\t\t\tTestNotify.fatal(GenLogTC() + e.getMessage());\n\t\t}\t\n\t}", "public void mouseClicked(MouseEvent e) { \r\n }", "@Override\r\n\tpublic void mouseClicked(MouseEvent arg0) {\n\t\t\r\n\t}", "@Override\r\n\tpublic void mouseClicked(MouseEvent arg0) {\n\t\t\r\n\t}", "@Override\r\n\tpublic void mouseClicked(MouseEvent arg0) {\n\t\t\r\n\t}", "@Override\r\n\tpublic void mouseClicked(MouseEvent arg0) {\n\t\t\r\n\t}", "@Override\r\n\tpublic void mouseClicked(MouseEvent arg0) {\n\t\t\r\n\t}", "@Override\r\n\tpublic void mouseClicked(MouseEvent arg0) {\n\t\t\r\n\t}", "@Override\r\n\tpublic void mouseClicked(MouseEvent arg0) {\n\t\t\r\n\t}", "@Override\r\n\tpublic void mouseClicked(MouseEvent arg0) {\n\t\t\r\n\t}", "@Override\r\n\tpublic void mouseClicked(MouseEvent arg0) {\n\t\t\r\n\t}", "public void myClick(WebElement element) \n\t{\n\t\twaitHelper.waitForElement(element, ObjectReader.reader.getExplicitWait());\n\t\telement.click();\t\n\t}", "public void clickOn(WebElement element) {\r\n\t\telement.click();\r\n\t}", "public final void click() {\n getUnderlyingElement().click();\n }", "void onMouseClicked(MouseEventContext mouseEvent);", "public abstract void click(long ms);", "public void mouseClicked(MouseEvent evt) {\r\n }", "@Override\n\tpublic void mouseClicked(MouseEvent arg0) {\n\t}", "@Override\n\tpublic void mouseClicked(MouseEvent arg0) {\n\t}", "public void onMouseClicked(Posn p) {\n Posn temp = this.getGamePiece(p);\n int tempx = temp.x;\n int tempy = temp.y;\n for (int i = 0; i < this.width; i++) {\n for (int j = 0; j < height; j++) {\n if (tempx == i && tempy == j) {\n this.board.get(i).get(j).rotatePiece();\n }\n }\n }\n }", "@Override\n public void onClick(int x, int y)\n {\n }", "@Override\n\tpublic void mouseClicked(MouseEvent arg0) {\n\n\t}", "@Override\n\tpublic void mouseClicked(MouseEvent arg0) {\n\n\t}", "@Override\n\tpublic void mouseClicked(MouseEvent arg0) {\n\n\t}", "@Override\n\tpublic void mouseClicked(MouseEvent arg0) {\n\n\t}", "@Override\n\tpublic void mouseClicked(MouseEvent arg0) {\n\n\t}", "@Override\n\tpublic void mouseClicked(MouseEvent arg0) {\n\n\t}", "@Override\n public void mouseClicked(MouseEvent e) {\n //location where mouse was pressed\n Point mousePoint = e.getPoint();\n //conversion to location on frame\n Vec2 worldPoint = view.viewToWorld(mousePoint);\n float fx = e.getPoint().x;\n float fy = e.getPoint().y;\n float vx = worldPoint.x;\n float vy = worldPoint.y;\n //Completes checks for pressing of GUI components\n restartCheck(vx, vy);\n settingsCheck(vx, vy);\n zoomCheck(fx, fy);\n }", "public void mouseClicked(MouseEvent e)\n {}", "public static void clickOnElement(By by){ driver.findElement(by).click();\n }", "public void mouseClicked(MouseEvent event){}", "@Override\r\n\t\tpublic void mouseClicked(MouseEvent arg0) {\n\t\t\t\r\n\t\t\t\r\n\t\t}", "public void clickOnElement(By by)\n {\n driver.findElement(by).click();\n }", "public void mouseClicked(MouseEvent evt) {\n }", "public abstract void mousePressed(Point p);", "public void clickOnCourseSuggestionButton() {\n\t if(CourseSuggestions.isDisplayed()) {\n\t\twaitAndClick(CourseSuggestions);\n\t }\n\t}", "@Test\n public void resolveClick() {\n Coordinates coords = new Coordinates(0, 0);\n game.resolveClick(coords);\n assertEquals(64, game.getDataSet().size());\n assertEquals(64, game.getBackgroundSet().size());\n\n // selecting movable pieces results in dataSet changes\n game.resolveClick(redManOccupiedCoords);\n assertEquals(64, game.getDataSet().size());\n assertEquals(64, game.getBackgroundSet().size());\n\n // down-left should be selectable...\n Coordinates downLeft = redManOccupiedCoords.moveDownLeft(1);\n assertEquals(TileColor.SELECTED,\n game.getBackgroundSet().get(downLeft.getPosition()));\n\n // ...and down-right too\n Coordinates downRight = redManOccupiedCoords.moveDownRight(1);\n assertEquals(TileColor.SELECTED,\n game.getBackgroundSet().get(downRight.getPosition()));\n\n // but not up-left...\n Coordinates upLeft = redManOccupiedCoords.moveUpLeft(1);\n assertNotEquals(TileColor.SELECTED,\n game.getBackgroundSet().get(upLeft.getPosition()));\n\n // ... nor up-right\n Coordinates upRight = redManOccupiedCoords.moveUpRight(1);\n assertNotEquals(TileColor.SELECTED,\n game.getBackgroundSet().get(upRight.getPosition()));\n\n // pressing on blue tile should move piece and deselect that tile...\n coords = redManOccupiedCoords.moveDownLeft(1);\n game.resolveClick(coords);\n assertEquals(2, game.getDataSet().get(coords.getPosition()).intValue());\n assertNotEquals(TileColor.SELECTED,\n game.getBackgroundSet().get(coords.getPosition()));\n\n // ...and it should also deselect other tiles\n coords = redManOccupiedCoords.moveDownRight(1);\n assertNotEquals(TileColor.SELECTED,\n game.getBackgroundSet().get(coords.getPosition()));\n\n // TODO: capturing moves, canAnyCapture check\n // TODO: wrong team check, outside board check\n }", "void click(int slot, ClickType type);" ]
[ "0.7046529", "0.6037904", "0.5933472", "0.58838713", "0.5774358", "0.5697461", "0.55540985", "0.54938823", "0.5487503", "0.54642326", "0.54536253", "0.54046035", "0.539155", "0.53839904", "0.5332486", "0.53050876", "0.5296344", "0.52807957", "0.52519286", "0.5216789", "0.520577", "0.5204837", "0.51877934", "0.5185704", "0.5185704", "0.5185704", "0.5184096", "0.5175706", "0.5166225", "0.5164268", "0.51459587", "0.51459587", "0.51459587", "0.51459587", "0.51459587", "0.51459587", "0.51459587", "0.5143769", "0.5139568", "0.5135532", "0.51340216", "0.512765", "0.511634", "0.511634", "0.511634", "0.511634", "0.5110116", "0.50994444", "0.5098546", "0.50978184", "0.50929284", "0.50900495", "0.50900495", "0.5076584", "0.5076584", "0.5070812", "0.50693285", "0.50693285", "0.506703", "0.5065675", "0.50651926", "0.50632256", "0.5057303", "0.5055899", "0.5053683", "0.5053683", "0.5053683", "0.5053683", "0.5053683", "0.5053683", "0.5053683", "0.5053683", "0.5053683", "0.5051012", "0.5050492", "0.50497836", "0.5048368", "0.503936", "0.50386447", "0.50383586", "0.50383586", "0.50253534", "0.50221825", "0.5011484", "0.5011484", "0.5011484", "0.5011484", "0.5011484", "0.5011484", "0.5009284", "0.500811", "0.5006881", "0.5001005", "0.49995562", "0.49967927", "0.4995949", "0.49953517", "0.49944025", "0.49783283", "0.49734944" ]
0.68404305
1
Prints all found windows that are showing, nesting by parentchild relationship.
public static void printOpenWindows() { Msg.debug(AbstractDockingTest.class, "Open windows: " + getOpenWindowsAsString()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static String getOpenWindowsAsString() {\n\t\tSet<Window> allFoundWindows = getAllWindows();\n\n\t\t//@formatter:off\n\t\tList<Window> roots = allFoundWindows\n\t\t\t\t.stream()\n\t\t\t\t.filter(w -> w.getParent() == null)\n\t\t\t\t.collect(Collectors.toList())\n\t\t\t\t;\n\t\t//@formatter:on\n\n\t\tStringBuilder buffy = new StringBuilder(\"\\n\");\n\t\tfor (Window w : roots) {\n\t\t\tif (!isHierarchyShowing(w)) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\twindowToString(w, 0, buffy);\n\t\t}\n\t\treturn buffy.toString();\n\t}", "private void listWindows() {\n final Component[] components = getComponents();\n final String[] titles = new String[components.length];\n for (int i=0; i<components.length; i++) {\n Component c = components[i];\n String title = String.valueOf(c.getName());\n if (c instanceof JInternalFrame) {\n final JInternalFrame ci = (JInternalFrame) c;\n title = String.valueOf(ci.getTitle());\n c = ci.getRootPane().getComponent(0);\n }\n final Dimension size = c.getSize();\n titles[i] = title + \" : \" + c.getClass().getSimpleName() +\n '[' + size.width + \" \\u00D7 \" + size.height + ']';\n }\n final JInternalFrame frame = new JInternalFrame(\"Windows\", true, true, true, true);\n frame.add(new JScrollPane(new JList<>(titles)));\n frame.pack();\n frame.setVisible(true);\n add(frame);\n }", "@Override\r\npublic void Display(int depth) {\n\tSystem.out.println(\"-\"+depth);\r\n children.forEach(com->com.Display(depth+2));\r\n }", "public void printLaptops(){\n\t\tSystem.out.println(\"Root is: \"+vertices.get(root));\n\t\tSystem.out.println(\"Edges: \");\n\t\tfor(int i=0;i<parent.length;i++){\n\t\t\tif(parent[i] != -1){\n\t\t\t\tSystem.out.print(\"(\"+vertices.get(parent[i])+\", \"+\n\t\t\tvertices.get(i)+\") \");\n\t\t\t}\n\t\t}\n\t\tSystem.out.println();\n\t\t}", "public static void windowspwcw() {\n\t\tString windowHandle = driver.getWindowHandle();\n\t\tSystem.out.println(\"parent window is: \"+windowHandle);\n\t\tSet<String> windowHandles = driver.getWindowHandles();\n\t\tSystem.out.println(\"child window is \"+windowHandles);\n\t\tfor(String eachWindowId:windowHandles)\n\t\t{\n\t\t\tif(!windowHandle.equals(eachWindowId))\n\t\t\t{\n\t\t\t\tdriver.switchTo().window(eachWindowId);\n\t\t\t\t\n\t\t\t}\n\t\t}\n\n\t}", "public static void windowsHandlingList(WebDriver drive) {\n\t\tString thisWindow = drive.getWindowHandle();\n\t\tSystem.out.println(\"main: \" + thisWindow);\n\t\tSet<String> AllWindow = drive.getWindowHandles();\n\t\tArrayList<String> toList = new ArrayList<String>(AllWindow);\n\t\tfor (String childWindow : toList) {\n\t\t\tif (!(thisWindow.equals(childWindow))) {\n\t\t\t}\n\t\t}\n\t}", "public void printAll()\n {\n r.showAll();\n }", "public void tree()\n\t{\n\t\tIterable<Position<FileElement>> toPrint = fileSystem.PreOrder();\n\t\tfor (Position<FileElement> p : toPrint)\n\t\t{\n\t\t\tint depth = fileSystem.getDepth(p);\n\t\t\tfor (int i = 0; i < depth; i++)\n\t\t\t{\n\t\t\t\tSystem.out.print(\" \");\n\t\t\t}\n\t\t\tSystem.out.println(p.getValue());\n\t\t}\n\t}", "public ArrayList<VWindow> getSubWindowList() {\n ArrayList<VWindow> windows = new ArrayList<VWindow>(subWindows.size());\n for (VWindow widget : subWindows) {\n windows.add(widget);\n }\n return windows;\n }", "public void dumpWindowAnimators(PrintWriter pw, String subPrefix) {\n forAllWindows((Consumer<WindowState>) new Consumer(pw, subPrefix, new int[1]) {\n /* class com.android.server.wm.$$Lambda$DisplayContent$iSsga4uJnJzBuUddn6uWEUo6xO8 */\n private final /* synthetic */ PrintWriter f$0;\n private final /* synthetic */ String f$1;\n private final /* synthetic */ int[] f$2;\n\n {\n this.f$0 = r1;\n this.f$1 = r2;\n this.f$2 = r3;\n }\n\n @Override // java.util.function.Consumer\n public final void accept(Object obj) {\n DisplayContent.lambda$dumpWindowAnimators$18(this.f$0, this.f$1, this.f$2, (WindowState) obj);\n }\n }, false);\n }", "public void displayInnerBoxes() {\n for (Box box : boxes)\r\n box.display();\r\n }", "@Override // com.android.server.wm.WindowContainer\n public boolean forAllWindows(ToBooleanFunction<WindowState> callback, boolean traverseTopToBottom) {\n if (traverseTopToBottom) {\n for (int i = this.mChildren.size() - 1; i >= 0; i--) {\n DisplayChildWindowContainer child = (DisplayChildWindowContainer) this.mChildren.get(i);\n if (!skipTraverseChild(child) && child.forAllWindows(callback, traverseTopToBottom)) {\n return true;\n }\n }\n return false;\n }\n int count = this.mChildren.size();\n for (int i2 = 0; i2 < count; i2++) {\n DisplayChildWindowContainer child2 = (DisplayChildWindowContainer) this.mChildren.get(i2);\n if (!skipTraverseChild(child2) && child2.forAllWindows(callback, traverseTopToBottom)) {\n return true;\n }\n }\n return false;\n }", "public void print_root(){\r\n\t\tfor(int id = 0; id < label.length; id++){\r\n\t\t\tSystem.out.printf(\"\"%d \"\", find(id));\r\n\t\t}\r\n\t\tSystem.out.printf(\"\"\\n\"\");\r\n\t}", "public void printAll() {\n // Sort them by parent for ease of analysis\n // copy it so that we don't mess with the actual pop\n ArrayList<Bacteria> temp = (ArrayList<Bacteria>) inds.clone();\n Collections.sort(temp, new Comparator<Bacteria>() {\n @Override\n public int compare(Bacteria o1, Bacteria o2) {\n if (o1.getParentID() > o2.getParentID()) return 1;\n else if (o1.getParentID() == o2.getParentID()) return 0;\n else return -1;\n }\n });\n\t\tSystem.out.println(\"Bacteria population:\");\n for (int i=0; i < getPopSize(); i++) {\n temp.get(i).print();\n }\n System.out.println();\n\t}", "public void printTreeNodes(){\n logger.trace(\"Name: \"+this.getName());\n for(int i=0;i<this.getChildCount();i++){\n SearchBaseNode node = (SearchBaseNode) this.getChildAt(i);\n node.printTreeNodes();\n }\n }", "public void printGridAsChild()\n\t{\n\t\tfor ( int y = 0; y < height; y++)\n\t\t{\n\t\t\tSystem.out.print( \"\\t\" );\n\t\t\tfor ( int x = 0; x < width; x++ )\n\t\t\t{\n\t\t\t\t// If x & y are the same as the empty tile coordinates, print empty tile\n\t\t\t\tif ( x == x0 && y == y0 ) System.out.print( \" \" );\n\t\t\t\t// Else print element of grid\n\t\t\t\telse System.out.print( grid[x][y] + \" \" );\n\t\t\t}\n\t\t\tSystem.out.print( \"\\n\" );\n\t\t}\n\t\tSystem.out.print( \"\\n\" );\n\t}", "String showAllNodes();", "public void show() {\n\t\tfor (Leaf l : leaves) {\n\t\t\tl.show();\n\t\t}\n\t\tfor (int i = 0; i < branches.size(); i++) {\n\t\t\tBranch3D b = branches.get(i);\n\t\t\tif (b.getParent() != null) {\n\t\t\t\t/*\n\t\t\t\t * core.stroke(255); core.line(b.getPos().x, b.getPos().y,\n\t\t\t\t * b.getParent().getPos().x, b.getParent().getPos().y);\n\t\t\t\t */\n\t\t\t\tfloat sw = PApplet.map(i, 0, branches.size(), 6, 0);\n\t\t\t\tcore.strokeWeight(sw);\n\t\t\t\tcore.stroke(255);\n\n\t\t\t\tcore.line(b.getPos().x, b.getPos().y, b.getPos().z, b.getParent().getPos().x, b.getParent().getPos().y,\n\t\t\t\t\t\tb.getParent().getPos().z);\n\n\t\t\t\t/*\n\t\t\t\t * core.pushMatrix(); core.translate(b.getPos().x, b.getPos().y,\n\t\t\t\t * b.getPos().z); float height = b.getPos().z -\n\t\t\t\t * b.getParent().getPos().z;\n\t\t\t\t * DrawUtils.getInstance().drawCylinder(core, 1, 1, height, 3);\n\t\t\t\t * core.popMatrix();\n\t\t\t\t */\n\t\t\t}\n\t\t}\n\t}", "public void switchToChildWindow(String parent) {\r\n\t\t//get ra tat ca cac tab hoac cua so dang co -->ID duy nhat. Neu dung List thi no se lay ca ID trung\r\n Set<String> allWindows = driver.getWindowHandles();\r\n //for each\r\n for (String ChildWindow : allWindows) {\r\n \t//duyet qua trung\r\n if (!ChildWindow.equals(parent)) {\r\n driver.switchTo().window(ChildWindow);\r\n break;\r\n }\r\n }\r\n \r\n \r\n}", "private void printAll() {\n int numberToPrint = searchResultsTable.getItems().size();\n\n FXMLCustomerController printController = new FXMLCustomerController();\n printController = (FXMLCustomerController) printController.load();\n printController.setUpPrint(numberToPrint);\n\n if (printController.okToPrint()) {\n System.out.println(\"Printing\");\n printController.getStage().show();\n for (SearchRowItem eachItem : searchResultsTable.getItems()) {\n printController.setCustomerDetails(eachItem);\n printController.print();\n System.out.println(\"Printed : \" + eachItem.toString());\n }\n printController.endPrint();\n //printController.getStage().hide();\n }\n }", "void showAll();", "public void printTopView() {\r\n\t\tfinal ArrayList<Integer> nodeDataList = new ArrayList<>();\r\n\r\n\t\tgetLeftChildren(rootNode.left, nodeDataList);\r\n\t\tnodeDataList.add(rootNode.data);\r\n\t\tgetRightChildren(rootNode.right, nodeDataList);\r\n\r\n\t\tSystem.out.println(\"Printing Top View\");\r\n\r\n\t\tnodeDataList.forEach(nodeData -> {\r\n\t\t\tSystem.out.print(nodeData + \" \");\r\n\t\t});\r\n\t}", "void printGrid() {\n GridHelper.printGrid(hiddenGrid);\n }", "public void showSiblings() {\n\t\tSystem.out.println(\"兄弟姐妹有 : \"+SiblingsList);\r\n\t}", "void printMST(int[] parent) {\n System.out.println(\"Edge \\tWeight\");\n for (int i = 1; i < VERTICES; i++)\n System.out.println(parent[i] + \" - \" + i + \"\\t\" + graph[i][parent[i]]);\n }", "void printSubgraphs() {\n StringBuilder sb = new StringBuilder();\n for(int sgKey: listOfSolutions.keySet()) {\n HashMap<Integer, Long> soln = listOfSolutions.get(sgKey);\n // inside a soln\n //sb.append(\"S:8:\");\n for(int key: soln.keySet()) {\n sb.append(key + \",\" + soln.get(key) + \";\");\n\n }\n sb.setLength(sb.length() - 1);\n sb.append(\"\\n\");\n }\n System.out.println(\"\\n\" + sb.toString());\n }", "public void printAllScenes() {\r\n\t\tList <Scene> allScenes = handlerBridge.loadScenes();\r\n\t\tfor (Scene scene : allScenes) {\r\n\t\t\tSystem.out.print(\"Name: \" + scene.getName());\r\n\t\t\tSystem.out.println(\" - Ident: \" + scene.getIdentifier());\r\n\t\t}\r\n\t}", "public void showLogs() {\n String headID = Utils.readObject(HEADFILE, String.class);\n File asFile = new File(Main.ALL_COMMITS, headID);\n Commit associatedCommit = Utils.readObject(asFile, Commit.class);\n while (associatedCommit != null) {\n printCommitLog(associatedCommit);\n String parent = associatedCommit.getParent();\n if (parent == null) {\n break;\n }\n File commitFile = new File(Main.ALL_COMMITS, parent);\n associatedCommit = Utils.readObject(commitFile, Commit.class);\n }\n }", "public void printOut() {\n\t\tif(root.left != null) {\n\t\t\tprintOut(root.left);\n\t\t}\n\t\t\n\t\tSystem.out.println(root.element);\n\t\t\n\t\tif(root.right != null) {\n\t\t\tprintOut(root.right);\n\t\t}\n\t}", "public void printPath() {\n System.out.print(\"Path: \");\n for (int i = 0; i < parents.size(); i++) {\n Cell cell = parents.get(i);\n System.out.print(\" (\" + cell.x + \",\" + cell.y + \") \");\n }\n System.out.println(\"\\nVisited cells: \" + visitedCells);\n System.out.println(\"Length of Path: \" + parents.size());\n }", "public void printAllStages() {\n printIndex();\n printRemoval();\n }", "public List<Window> getWindows(){\n\t\treturn windows;\n\t}", "public void printGrid(){\n\t\tfor(int i=0;i<getHeight();i++){\n\t\t\tfor(int j=0;j<getWidth();j++){\n\t\t\t\tif(grid[i][j]==null)\n\t\t\t\t\tSystem.out.print(\"- \");\n\t\t\t\telse if(getGrid(i,j).isPath())\n\t\t\t\t\tSystem.out.print(\"1 \");\n\t\t\t\telse if(getGrid(i,j).isScenery())\n\t\t\t\t\tSystem.out.print(\"0 \");\n\t\t\t\telse\n\t\t\t\t\tSystem.out.print(\"? \");\n\t\t\t}\n\t\t\tSystem.out.println(\"\");\n\t\t}\n\t\tSystem.out.println();\n\t}", "public void printAllPaths() {\n\n if (root == null) System.out.println(\"No paths for you!\");\n else {\n printPaths(root.left, root.element.toString());\n printPaths(root.right, root.element.toString());\n }\n }", "public void printAll() {\n\t\tNode node = root;\n\t\twhile (node != null) {\n\t\t\tSystem.out.println(node.data);\n\t\t\tnode = node.left;\n\t\t}\n\t}", "public void printWindowElements(List<EdgeEventDepr> edgeEventDeprList) {\n String printString = \"1st Phase Window [\" + counter++ + \"]: \";\n for(EdgeEventDepr e: edgeEventDeprList) {\n printString = printString + \"; \" + e.getEdge().getOriginVertex() + \" \" + e.getEdge().getDestinVertex();\n }\n // Optionally: Print\n System.out.println(printString);\n\n }", "public void dumpMultipleElementsPerParent(Map<String, List<XSElementDeclaration>> elementsPerParent)\n throws FileNotFoundException {\n PrintStream stream = new PrintStream(\"multiple_elements_per_parent.txt\");\n\n for (String parentName : elementsPerParent.keySet()) {\n stream.println(parentName);\n\n for (XSElementDeclaration element : elementsPerParent.get(parentName)) {\n stream.print(\" \");\n stream.println(element.getName());\n }\n }\n }", "public void printAllSpreadSheets() {\n\t\tif(getBubbleSpreadsheetSet().isEmpty())\n\t\t\tSystem.out.println(\"0 Spreadsheets in Bubbledocs\");\n\t\tfor (SpreadSheet f : getBubbleSpreadsheetSet()) {\n\t\t\tSystem.out.println(f);\n\t\t}\n\t}", "public void showWindows() {\n\t\t pack();\n\t setResizable(false);\n\t setLocationRelativeTo(null);\n\t setVisible(true);\n\t\t\n\t}", "@Override\n\tpublic void showContents() {\n\t\tprogram.add(Background);\n\t\tprogram.add(lvl1);\n\t\tprogram.add(lvl2);\n\t\tprogram.add(lvl3);\n\t\tprogram.add(Back);\n\n\t}", "public void printMST() {\n\t\t\n\t\tString mstPath = \"\";\n\t\t\n\t\t/**Stores the parent child hierarchy*/\n\t\tint distance[] = new int[this.vertices];\n\t\t\n\t\t/**Stores all the vertices with their distances from source vertex*/\n\t\tMap<Integer, Integer> map = new HashMap<Integer, Integer>();\n\t\tmap.put(0, 0);\n\t\t\n\t\tfor(int i = 1; i < vertices; i++){\n\t\t\tmap.put(i, Integer.MAX_VALUE);\n\t\t}\n\t\t\n\t\tfor(int i = 0; i < vertices; i++){\n\t\t\t\n\t\t\tInteger minVertex = extractMin(map), minValue = map.get(minVertex);\n\t\t\tdistance[minVertex] = minValue;\n\t\t\t\n\t\t\tmstPath += minVertex + \" --> \";\n\t\t\t\n\t\t\t/**Removing min vertex from map*/\n\t\t\tmap.remove(minVertex);\n\t\t\t\n\t\t\t/**Exploring edges of min vertex*/\n\t\t\tArrayList<GraphEdge> edges = this.adjList[minVertex];\n\t\t\tfor(GraphEdge edge : edges){\n\t\t\t\tif(map.containsKey(edge.destination)){\n\t\t\t\t\tif(map.get(edge.destination) > distance[edge.source] + edge.weight){\n\t\t\t\t\t\tmap.put(edge.destination, distance[edge.source] + edge.weight);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\tSystem.out.println(mstPath);\n\t}", "void printLevel()\r\n\t {\r\n\t int h = height(root);\r\n\t int i;\r\n\t for (i=1; i<=h+1; i++)\r\n\t printGivenLevel(root, i);\r\n\t }", "void printGraph() {\n System.out.println(\n \"All vertices in the graph are presented below.\\n\" +\n \"Their individual edges presented after a tab. \\n\" +\n \"-------\");\n\n for (Map.Entry<Vertex, LinkedList<Vertex>> entry : verticesAndTheirEdges.entrySet()) {\n LinkedList<Vertex> adj = entry.getValue();\n System.out.println(\"Vertex: \" + entry.getKey().getName());\n for (Vertex v : adj) {\n System.out.println(\" \" + v.getName());\n }\n }\n }", "private static void print(@Nonnull Node<OWLClass> parent, @Nonnull OWLReasoner reasoner, int depth) {\n if (parent.isBottomNode()) {\n return;\n }\n // Print an indent to denote parent-child relationships\n printIndent(depth);\n // Now print the node (containing the child classes)\n printNode(parent);\n for (Node<OWLClass> child : reasoner.getSubClasses(parent.getRepresentativeElement(), true)) {\n assert child != null;\n // Recurse to do the children. Note that we don't have to worry\n // about cycles as there are non in the inferred class hierarchy\n // graph - a cycle gets collapsed into a single node since each\n // class in the cycle is equivalent.\n print(child, reasoner, depth + 1);\n }\n }", "public void displayPaths() {\r\n\t\tlog.debug(\"startPaths\");\r\n\t\tfor ( Map.Entry<Integer, Vector<Edge>> entry: startPaths.entrySet()) {\r\n\t\t\tfor ( Edge edge: entry.getValue()) {\r\n\t\t\t\tlog.debug( entry.getKey() + \": \" + edge.StartRoom + \"->\" + edge.door + \"->\" + edge.DestinationRoom );\r\n\t\t\t}\r\n\t\t}\r\n\t\tlog.debug(\"destinationPaths\");\r\n\t\tfor ( Map.Entry<Integer, Vector<Edge>> entry: destinationPaths.entrySet()) {\r\n\t\t\tfor ( Edge edge: entry.getValue()) {\r\n\t\t\t\tlog.debug( entry.getKey() + \": \" + edge.StartRoom + \"->\" + edge.door + \"->\" + edge.DestinationRoom );\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public void printTree() {\n\t\tSystem.out.println(printHelp(root));\r\n\t\t\r\n\t}", "public void print() {\n System.out.println();\n for (int level = 0; level < 4; level++) {\n System.out.print(\" Z = \" + level + \" \");\n }\n System.out.println();\n for (int row = 3; row >= 0; row--) {\n for (int level = 0; level < 4; level++) {\n for (int column = 0; column < 4; column++) {\n System.out.print(get(column, row, level));\n System.out.print(\" \");\n }\n System.out.print(\" \");\n }\n System.out.println();\n }\n System.out.println();\n }", "void printLevelOrder() {\n\t\tint h = height(root);\n\t\tint i;\n\t\tfor (i = h; i >= 1; i--)\n\t\t\tprintGivenLevel(root, i);\n\t}", "public void printContents(){\n System.out.println(this);\n System.out.println(\"Occupied by: \" + pieceAtVertex + \"\\n Neighbors:\" + neighbors);\n }", "public void waitForAllWindowsDrawn() {\n forAllWindows((Consumer<WindowState>) new Consumer(this.mWmService.mPolicy) {\n /* class com.android.server.wm.$$Lambda$DisplayContent$oqhmXZMcpcvgI50swQTzosAcjac */\n private final /* synthetic */ WindowManagerPolicy f$1;\n\n {\n this.f$1 = r2;\n }\n\n @Override // java.util.function.Consumer\n public final void accept(Object obj) {\n DisplayContent.this.lambda$waitForAllWindowsDrawn$24$DisplayContent(this.f$1, (WindowState) obj);\n }\n }, true);\n }", "public void dumpChildren ()\r\n {\r\n dumpChildren(0);\r\n }", "void printLevelOrder() \n { \n int h = height(this); \n int i; \n for (i=1; i<=h; i++) \n printGivenLevel(this, i); \n }", "public String revealAllRelationshipsInW() {\n\t\tString w = \"\";\n\t\tif (this.numWVertices > 0) {\n\t\t\tfor (int i = 0; i < this.numWVertices; i++) {\n\t\t\t\t// find w_i and print it with all its neighbors\n\t\t\t\tw += \"w\" + i + \": \" + this.vertices.get(i).getNeighbors() + \"\\n\";\n\t\t\t}\n\t\t}\n\t\treturn w;\n\t}", "public void printDirectory() {\n System.out.println(\"Inventory:\");\n for (Ingredient i : stock.keySet()) {\n System.out.printf(\"%s, %d\\n\", i.getName(), stock.get(i));\n }\n System.out.println(\"Menu:\");\n int drink_number = 1;\n for (Drink d : drinks.keySet()) {\n\n System.out.printf(\"%d, %s, $%.2f, %b\\n\", drink_number++, d.getName(), d.getPrice(), inStock(d));\n }\n }", "@Override\n public String toString() {\n return \"Window: [\" + xWindow + \",\" + yWindow + \";\" + widthWindow + \",\" + heightWindow + \"]\\n\" +\n \"Viewport: [\" + xViewport + \",\" + yViewport + \";\" + widthViewport + \",\" + heightViewport + \"]\\n\" +\n \"Scale: [\" + xScaleFactor + \",\" + yScaleFactor + \"]\\n\" +\n \"Margin: [\" + xMargin + \",\" + yMargin + \"]\\n\";\n }", "public void print() {\n\t\tint i = 1;\n\t\tfor (String s: g.keySet()) {\n\t\t\tSystem.out.print(\"Element: \" + i++ + \" \" + s + \" --> \");\n\t\t\tfor (String k: g.get(s)) {\n\t\t\t\tSystem.out.print(k + \" ### \");\n\t\t\t}\n\t\t\tSystem.out.println();\n\t\t}\n\t}", "public void printAll() {\r\n\t\t\t\t\r\n\t\tSystem.out.println(\"################\");\r\n\t\tSystem.out.println(\"Filename:\" +getFileName());\r\n\t\tSystem.out.println(\"Creation Date:\" +getCreationDate());\r\n\t\tSystem.out.println(\"Genre:\" +getGenre());\r\n\t\tSystem.out.println(\"Month:\" +getMonth());\r\n\t\tSystem.out.println(\"Plot:\" +getPlot());\r\n\t\tSystem.out.println(\"New Folder Name:\" + getNewFolder());\r\n\t\tSystem.out.println(\"New Thumbnail File Name:\" +getNewThumbnailName());\r\n\t\tSystem.out.println(\"New File Name:\" +getNewFilename());\r\n\t\tSystem.out.println(\"Season:\" +getSeason());\r\n\t\tSystem.out.println(\"Episode:\" +getEpisode());\r\n\t\tSystem.out.println(\"Selected:\" +getSelectEdit());\r\n\t\tSystem.out.println(\"Title:\" +getTitle());\r\n\t\tSystem.out.println(\"Year:\" +getYear());\r\n\t\tSystem.out.println(\"Remarks:\" +getRemarks());\r\n\t\tSystem.out.println(\"################\");\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t}", "public static void printMenu(){\n System.out.print(\"1. List all writing groups\\n\" +\n \"2. List all the data for one writing group\\n\"+\n \"3. List all publishers\\n\"+\n \"4. List all the data for one publisher\\n\"+\n \"5. List all books\\n\"+\n \"6. List all the data for one book\\n\"+\n \"7. Insert new book\\n\"+\n \"8. Insert new publisher\\n\"+\n \"9. Remove a book\\n\"+\n \"10. Quit\\n\\n\");\n }", "public void display() {\r\n\t\tArrayList<String> vnames = new ArrayList<>(vces.keySet());\r\n\t\tfor (String vname : vnames) {\r\n\t\t\tString str = vname + \" => \";\r\n\t\t\tVertex vtx = vces.get(vname);\r\n\r\n\t\t\tArrayList<String> nbrnames = new ArrayList<>(vtx.nbrs.keySet());\r\n\t\t\tfor (String nbrname : nbrnames) {\r\n\t\t\t\tstr += nbrname + \"[\" + vtx.nbrs.get(nbrname) + \"], \";\r\n\t\t\t}\r\n\r\n\t\t\tSystem.out.println(str + \".\");\r\n\t\t}\r\n\t}", "public String printToList() {\n\t\tif (hierarchy.equals(\"n\")) {\n\t\t\treturn \"<HTML>\" + visability + \" class \" + className\n\t\t\t\t\t+ \"{ <BR> <BR>\";\n\t\t} else if (isFinished == true) {\n\n\t\t\treturn \"}\";\n\t\t} else {\n\t\t\treturn \"<HTML>\" + visability + \" \" + hierarchy + \" class \"\n\t\t\t\t\t+ className + \"{ <BR> <BR>\";\n\t\t}\n\t}", "private void showFullMenu() {\n final Menu[] menu = MenuFactory.showMenu();\n System.out.println(\"Food_Id\" + \"\\t\" + \"Food_Name\" + \"\\t\" + \"Price\" + \"\\t\" + \"Prepration_Time\");\n for (final Menu m : menu) {\n System.out.println(m.getFoodId() + \"\\t\" + m.getFoodName() + \"\\t\" + m.getPrice() + \"\\t\" + m.getPreprationTime());\n }\n }", "public void levelOrder(){\n Iterator iter = iterator();\n while(iter.hasNext() == true) {\n System.out.println(iter.next());\n }\n }", "public void printAllMonomials() {\n\t\t//TODO total is just printing number of dimns...\n\t\tSystem.out.println(\"Printing monomials in dual A\" + N + \" of dimension at most \" + getDimension() + \"; total: \" + allMonomials.size() + \"\\n\");\n\t\tprintMonomials(allMonomials);\n\t}", "private void displayOutput() {\n\t\tlevel = 2;\n\t\t// Level 1 by default\n\t\ttreeBWLevel1.setIcon(new ImageIcon(ClassLoader.getSystemResource(\"image/treeBW.png\")));\n\t\tJLabel text = new JLabel(firstState.getName());\n\t\ttext.setFont(new Font(\"Serif\", Font.BOLD, 16));\n\t\ttext.setForeground(Color.white);\n\t\ttreeBWLevel1.add(text);\n\n\t\tfirstBlock.setTreeLabel(treeBWLevel1);\n\n\t\tline = new Line2D.Double(550, 975, 100, 200);\n\n\t\t// Since , NFA's are practically never ending, we have kept our\n\t\t// implementation upto 4 levels.\n\t\twhile (level != 5) {\n\t\t\tint parentTreeNo = 0;\n\t\t\tfor (StateBlockTreeNo block : previousBlock) {\n\t\t\t\tint currentLevelCounter = 0;\n\t\t\t\tint temp;\n\t\t\t\tHashMap<StateBlock, ArrayList<TransitionBlock>> list = block.getStateBlock().getStateTransitionList();\n\t\t\t\tfor (Map.Entry<StateBlock, ArrayList<TransitionBlock>> entry : list.entrySet()) {\n\t\t\t\t\tStateBlock key = entry.getKey();\n\t\t\t\t\tArrayList<TransitionBlock> value = entry.getValue();\n\t\t\t\t\tfor (TransitionBlock transitionBlock : value) {\n\n\t\t\t\t\t\tString stateName = \"\" + key.getName().toString();\n\t\t\t\t\t\tJLabel stateNo = new JLabel(stateName);\n\t\t\t\t\t\tstateNo.setFont(new Font(\"Serif\", Font.BOLD, 16));\n\t\t\t\t\t\tstateNo.setForeground(Color.white);\n\t\t\t\t\t\t++currentLevelCounter;\n\t\t\t\t\t\tStateBlockTreeNo stateBlockTreeNo = new StateBlockTreeNo();\n\t\t\t\t\t\tstateBlockTreeNo.setStateBlock(key);\n\t\t\t\t\t\tstateBlockTreeNo.setTreeNo(((block.getTreeNo() - 1) * 3) + currentLevelCounter);\n\t\t\t\t\t\tstateBlockTreeNo.setTreeLabel(labelList.get(new Integer(Integer.toString(level) + Integer.toString(stateBlockTreeNo.getTreeNo()))));\n\t\t\t\t\t\tstateBlockTreeNo.setForestPosition(new Integer(Integer.toString(level) + Integer.toString(stateBlockTreeNo.getTreeNo())));\n\n\t\t\t\t\t\tblock.getTreeConnectionList().put(stateBlockTreeNo, transitionBlock.getName());\n\n\t\t\t\t\t\tint x = labelList.get(new Integer(Integer.toString(level) + Integer.toString(stateBlockTreeNo.getTreeNo()))).getX();\n\t\t\t\t\t\tint y = labelList.get(new Integer(Integer.toString(level) + Integer.toString(stateBlockTreeNo.getTreeNo()))).getY();\n\t\t\t\t\t\tJLabel transitionLabel = new JLabel();\n\t\t\t\t\t\tlabelList.get(new Integer(Integer.toString(level) + Integer.toString(stateBlockTreeNo.getTreeNo()))).setLayout(new FlowLayout(FlowLayout.CENTER));\n\t\t\t\t\t\tlabelList.get(new Integer(Integer.toString(level) + Integer.toString(stateBlockTreeNo.getTreeNo()))).add(stateNo);\n\n\t\t\t\t\t\t/*\n\t\t\t\t\t\t * if (level == 4) { transitionLabel.setBounds(x, y +\n\t\t\t\t\t\t * 40, 30, 30); transitionLabel.setIcon(new\n\t\t\t\t\t\t * ImageIcon(\"image/appleLevel4.png\"))); //\n\t\t\t\t\t\t * labelList.get(new Integer(Integer.toString(level) //\n\t\t\t\t\t\t * + //\n\t\t\t\t\t\t * Integer.toString(stateBlockTreeNo.getTreeNo()))).\n\t\t\t\t\t\t * setIcon(new // ImageIcon(\"image/treeLevel4.png\")));\n\t\t\t\t\t\t * transitionValue.setFont(new Font(\"Serif\", Font.BOLD,\n\t\t\t\t\t\t * 10)); fl.setVgap(10); } else {\n\t\t\t\t\t\t * transitionLabel.setBounds(x + 55, y, 40, 40);\n\t\t\t\t\t\t * transitionLabel.setIcon(new\n\t\t\t\t\t\t * ImageIcon(\"image/apple.png\")));\n\t\t\t\t\t\t * transitionValue.setFont(new Font(\"Serif\", Font.BOLD,\n\t\t\t\t\t\t * 16)); // labelList.get(new\n\t\t\t\t\t\t * Integer(Integer.toString(level) // + //\n\t\t\t\t\t\t * Integer.toString\n\t\t\t\t\t\t * (stateBlockTreeNo.getTreeNo()))).setIcon(new //\n\t\t\t\t\t\t * ImageIcon(\"image/tree.png\"))); fl.setVgap(15); }\n\t\t\t\t\t\t */\n\n\t\t\t\t\t\tJLabel transitionValue = new JLabel();\n\t\t\t\t\t\ttransitionValue = appleLabels.get(Integer.parseInt(block.getTreeLabel().getName() + stateBlockTreeNo.getTreeLabel().getName()));\n\n\t\t\t\t\t\tSystem.out.println(Integer.parseInt(block.getTreeLabel().getName() + stateBlockTreeNo.getTreeLabel().getName()));\n\t\t\t\t\t\tString transitionText = transitionBlock.getName();\n\t\t\t\t\t\ttransitionValue.setFont(new Font(\"Serif\", Font.BOLD, 20));\n\t\t\t\t\t\ttransitionValue.setForeground(Color.WHITE);\n\t\t\t\t\t\ttransitionValue.setText(transitionText);\n\t\t\t\t\t\ttransitionValue.setHorizontalTextPosition(JLabel.CENTER);\n\t\t\t\t\t\ttransitionValue.setVerticalTextPosition(JLabel.CENTER);\n\n\t\t\t\t\t\t/*\n\t\t\t\t\t\t * JLabel transitionValue = new JLabel(transitionText);\n\t\t\t\t\t\t * transitionValue.setForeground(Color.white);\n\t\t\t\t\t\t * FlowLayout fl = new FlowLayout(FlowLayout.CENTER);\n\t\t\t\t\t\t * transitionLabel =\n\t\t\t\t\t\t * appleLabels.get(Integer.parseInt(block\n\t\t\t\t\t\t * .getTreeLabel().getName() +\n\t\t\t\t\t\t * stateBlockTreeNo.getTreeLabel().getName()));\n\t\t\t\t\t\t * transitionValue.setFont(new Font(\"Serif\", Font.BOLD,\n\t\t\t\t\t\t * 16)); transitionLabel.setLayout(fl);\n\t\t\t\t\t\t * transitionLabel.add(transitionValue);\n\t\t\t\t\t\t */\n\n\t\t\t\t\t\tactionPanel.add(transitionValue);\n\n\t\t\t\t\t\tcurrentBlock.add(stateBlockTreeNo);\n\t\t\t\t\t}\n\t\t\t\t\ttemp = currentLevelCounter / 3;\n\t\t\t\t\tcurrentLevelCounter = currentLevelCounter * (temp + 1);\n\t\t\t\t}\n\t\t\t\tparentTreeNo++;\n\t\t\t}\n\t\t\tlevel++;\n\t\t\tpreviousBlock = (ArrayList<StateBlockTreeNo>) currentBlock.clone();\n\t\t\tcurrentBlock.clear();\n\n\t\t}\n\n\t}", "public final void drawChildren() {\n // Set my clipping rectangle\n assert (window != null);\n assert (getScreen() != null);\n Screen screen = getScreen();\n\n // Special case: TStatusBar is drawn by TApplication, not anything\n // else.\n if (this instanceof TStatusBar) {\n return;\n }\n\n screen.setClipRight(width);\n screen.setClipBottom(height);\n\n int absoluteRightEdge = window.getAbsoluteX() + window.getWidth();\n int absoluteBottomEdge = window.getAbsoluteY() + window.getHeight();\n if (!(this instanceof TWindow) && !(this instanceof TVScroller)) {\n absoluteRightEdge -= 1;\n }\n if (!(this instanceof TWindow) && !(this instanceof THScroller)) {\n absoluteBottomEdge -= 1;\n }\n int myRightEdge = getAbsoluteX() + width;\n int myBottomEdge = getAbsoluteY() + height;\n if (getAbsoluteX() > absoluteRightEdge) {\n // I am offscreen\n screen.setClipRight(0);\n } else if (myRightEdge > absoluteRightEdge) {\n screen.setClipRight(screen.getClipRight()\n - (myRightEdge - absoluteRightEdge));\n }\n if (getAbsoluteY() > absoluteBottomEdge) {\n // I am offscreen\n screen.setClipBottom(0);\n } else if (myBottomEdge > absoluteBottomEdge) {\n screen.setClipBottom(screen.getClipBottom()\n - (myBottomEdge - absoluteBottomEdge));\n }\n\n // Set my offset\n screen.setOffsetX(getAbsoluteX());\n screen.setOffsetY(getAbsoluteY());\n\n // Draw me\n draw();\n\n // Continue down the chain\n for (TWidget widget: children) {\n widget.drawChildren();\n }\n }", "public void printAll(){\n for (Triangle triangle : triangles) {\n System.out.println(triangle.toString());\n }\n for (Circle circle : circles) {\n System.out.println(circle.toString());\n }\n for (Rectangle rectangle : rectangles) {\n System.out.println(rectangle.toString());\n }\n }", "public void switchToChildWindow(String parent) throws Exception {\r\n\t\t// get ra tat ca cac tab dang co\r\n\t\tSet<String> allWindows = driver.getWindowHandles();\r\n\t\tThread.sleep(3000);\r\n\t\tfor (String runWindow : allWindows) {\r\n\t\t\tif (!runWindow.equals(parent)) {\r\n\t\t\t\tdriver.switchTo().window(runWindow);\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public void renderWindows(Stage stage) {\n\t\tfor (int i = 0; i < windows.size(); i++) windows.get(i).render(this);\r\n\t}", "private void show() {\n System.out.println(\"...................................................................................................................................................................\");\n System.out.print(Color.RESET.getPrintColor() + \"║\");\n for(int i = 0; i < players.size(); i++) {\n if (state.getTurn() == i) {\n System.out.print(Color.PURPLE.getPrintColor());\n System.out.print((i+1) + \"- \" + players.get(i).toString());\n System.out.print(Color.RESET.getPrintColor() + \"║\");\n }\n else {\n System.out.print(Color.CYAN.getPrintColor());\n System.out.print((i+1) + \"- \" + players.get(i).toString());\n System.out.print(Color.RESET.getPrintColor() + \"║\");\n }\n }\n System.out.println();\n System.out.print(\"Direction: \");\n if (state.getDirection() == +1) {\n System.out.println(Color.PURPLE.getPrintColor() + \"clockwise ↻\");\n }\n else {\n System.out.println(Color.PURPLE.getPrintColor() + \"anticlockwise ↺\");\n }\n System.out.println(Color.RESET.getPrintColor() + \"Turn: \" + Color.PURPLE.getPrintColor() + players.get(state.getTurn()).getName() + Color.RESET.getPrintColor());\n System.out.println(currentCard.currToString());\n if (controls.get(state.getTurn()) instanceof PcControl) {\n System.out.print(players.get(state.getTurn()).backHandToString() + Color.RESET.getPrintColor());\n }\n else {\n System.out.print(players.get(state.getTurn()).handToString() + Color.RESET.getPrintColor());\n }\n }", "void print() {\n for (int i = 0; i < 8; i--) {\n System.out.print(\" \");\n for (int j = 0; j < 8; j++) {\n System.out.print(_pieces[i][j].textName());\n }\n System.out.print(\"\\n\");\n }\n }", "public static void switchToChildWindow() {\t\t\n\t\tString parent = Constants.driver.getWindowHandle();\n\t\tLOG.info(\"Parent window handle: \" +parent);\n\t\tSet <String> windows = Constants.driver.getWindowHandles();\n\t\tIterator <String> itr = windows.iterator();\n\t\twhile (itr.hasNext()) {\n\t\t\tString child = itr.next();\n\t\t\tif (!child.equals(parent)) {\n\t\t\t\tLOG.info(\"Child window handle: \" +child);\n\t\t\t\tConstants.driver.switchTo().window(child);\n\t\t\t} else {\n\t\t\t\tLOG.error(\"Parent(main) and child window hanldles are same.\");\n\t\t\t}\n\t\t}\n\n\t}", "public void PrintKNeighbours() {\n\t\t\n\t\tLinkSample ptr = k_closest;\n\t\twhile(ptr != null) {\n\t\t\tSystem.out.print(ptr.dim_weight+\" \");\n\t\t\tptr = ptr.next_ptr;\n\t\t}\n\t\t\n\t\tSystem.out.println(\"\");\n\t}", "private void displayWest()\r\n\t{\r\n\t\tfor\t(int i = 0; i < westElem; i++)\r\n\t\t{\r\n\t\t\tSystem.out.println(westQueue[i].toString());\r\n\t\t\tremoveWest();\r\n\t\t}\r\n\t}", "public void makeVisible()\n {\n wall.makeVisible();\n roof.makeVisible();\n window.makeVisible();\n }", "public static void main(String[] args) {\n\t\t\r\n\t\tSystem.setProperty(\"webdriver.chrome.driver\", \"C:\\\\work\\\\chromedriver.exe\");\r\n\t\tWebDriver driver=new ChromeDriver();\r\n\t\tdriver.get(\"https://the-internet.herokuapp.com/windows\");\r\n\t\tdriver.findElement(By.cssSelector(\"a[href*='window']\")).click();\r\n\t\t//System.out.println(driver.getTitle());//Parent window Title\r\n\t\tSet<String>ids=driver.getWindowHandles();\r\n\t\tIterator<String> it=ids.iterator();\r\n\t\tString parentid=it.next();\r\n\t\tString childid=it.next();\r\n\t\tdriver.switchTo().window(childid);\r\n\t\tSystem.out.println(driver.getTitle());\r\n\t\tdriver.switchTo().window(parentid);\r\n\t\tSystem.out.println(driver.findElement(By.xpath(\"//div[@id='content']/div/h3\")).getText());\r\n\t\t\t\t\r\n\t\t\r\n\t\t}", "public void printTree() {\n Object[] nodeArray = this.toArray();\n for (int i = 0; i < nodeArray.length; i++) {\n System.out.println(nodeArray[i]);\n }\n }", "public void printGraph()\n {\n Iterator<T> nodeIterator = nodeList.keySet().iterator();\n \n while (nodeIterator.hasNext())\n {\n GraphNode curr = nodeList.get(nodeIterator.next());\n \n while (curr != null)\n {\n System.out.print(curr.nodeId+\"(\"+curr.parentDist+\")\"+\"->\");\n curr = curr.next;\n }\n System.out.print(\"Null\");\n System.out.println();\n }\n }", "public void print(){\n\t\tSystem.out.println(\" \");\n\t\tSystem.out.println(\" \");\n\t\tSystem.out.println(\" \");\n\t\tSystem.out.println(\" \");\n\t\tSystem.out.println(\" ~ THREE ROOM DUNGEON GAME ~ \");\n\t\tfor(int i = 0; i < this.area.length;i++){\n\t\t\tSystem.out.println(\" \");\n\t\t\tSystem.out.print(\" \");\n\t\t\tfor(int p = 0 ; p < this.area.length; p++){\n\t\t\t\tif(this.Garret[i][p] == 1){\n\t\t\t\t\tSystem.out.print(\":( \");\n\t\t\t\t}\n\t\t\t\telse if(this.Ari[i][p] ==1){\n\t\t\t\t\tSystem.out.print(\" ? \");\n\t\t\t\t}\n\t\t\t\telse if(this.position[i][p] ==1){\n\t\t\t\t\tSystem.out.print(\" + \");\n\t\t\t\t}\n\t\t\t\telse if(this.Items[i][p] != null){\n\t\t\t\t\tSystem.out.print(\"<$>\");\n\t\t\t\t}\n\t\t\t\telse if(this.Door[i][p] ==1){\n\t\t\t\t\tSystem.out.print(\" D \");\n\t\t\t\t}\n\t\t\t\telse if(this.Stairs[i][p] ==1){\n\t\t\t\t\tSystem.out.print(\" S \");\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\tSystem.out.print(this.area[i][p]);\n\t\t\t\t}\n\t\t\t}//end of inner for print\n\t\t}//end of outter for print\n\n\t}", "public static void main(String[] args) {\n\t\tSystem.setProperty(\"webdriver.chrome.driver\" ,\"C:\\\\Users\\\\anuanand\\\\Downloads\\\\chromedriver_win32\\\\chromedriver.exe\");\r\n\t\tWebDriver driver =new ChromeDriver();\r\n\t\tdriver.manage().window().maximize();\r\n\t\tdriver.get(\"https://the-internet.herokuapp.com/\");\r\n\t\tdriver.findElement(By.linkText(\"Multiple Windows\")).click();\r\n\t\tSet<String> wh= driver.getWindowHandles();\r\n\t\tIterator<String> it= wh.iterator();\r\n\t\tString parentid= it.next();\r\n\t\tString childid= driver.getWindowHandle();\r\n\t\tdriver.switchTo().window(childid);\r\n\t\tSystem.out.print(driver.getTitle());\r\n\t\r\n\t\t\r\n\t\tdriver.findElement(By.linkText(\"Click Here\")).click();\r\n\t\tString newhandle= driver.getWindowHandle();\r\n\t\tdriver.switchTo().window(newhandle);\r\n\t\tSystem.out.print(driver.getTitle());\r\n\t\tdriver.switchTo().window(childid);\r\n\t\tSystem.out.print(driver.findElement(By.xpath(\"//h3[contains(text(),'Opening a new window')]\")).getText());\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t}", "public void printVisitedCells()\r\n\t{\r\n\t\tSystem.out.print(\"+ +\");\r\n\t\tfor (int i = 1; i < this.getWidth(); i++)\r\n\t\t{\r\n\t\t\tSystem.out.print(\"-+\");\r\n\t\t}\r\n\t\tSystem.out.println();\r\n\r\n\t\tfor (int i = 0; i < this.getHeight(); i++)\r\n\t\t{\r\n\t\t\t\r\n\t\t\tfor (int j = 0; j < this.getWidth(); j++)\r\n\t\t\t{\r\n\t\t\t\tCell c = this.getCellAt(i, j);\r\n\t\t\t\t// if cells are connected, no wall is printed in between them\r\n\t\t\t\tif (c.hasDoorwayTo(Cell.WEST))\r\n\t\t\t\t\tSystem.out.print(\" \");\r\n\t\t\t\telse\r\n\t\t\t\t\tSystem.out.print(\"|\");\t\t\t\r\n\t\t\t\t\r\n\t\t\t\tif(c.getDiscoveryTime() != -1)\r\n\t\t\t\t\tSystem.out.print(c.getDiscoveryTime() % 10);\r\n\t\t\t\telse\r\n\t\t\t\t\tSystem.out.print(\" \");\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tSystem.out.println(\"|\");\r\n\t\t\t\r\n\t\t\tfor (int j = 0; j < this.getWidth(); j++)\r\n\t\t\t{\r\n\t\t\t\tCell c = this.getCellAt(i, j);\r\n\t\t\t\tSystem.out.print(\"+\");\r\n\r\n\t\t\t\tif (c.hasDoorwayTo(Cell.SOUTH) || c == this.getCellAt(getHeight()-1, getWidth()-1))\r\n\t\t\t\t\tSystem.out.print(\" \");\r\n\t\t\t\telse\r\n\t\t\t\t\tSystem.out.print(\"-\");\r\n\t\t\t}\r\n\t\t\tSystem.out.println(\"+\");\r\n\t\t}\r\n\t}", "public void showResultsWindow() {\r\n \t\tshowResults.setSelected(true);\r\n \t\tshowResultsWindow(true);\r\n \t}", "public void display(){\n\t\tfor (Entry<String, Map<String, Integer>> entry : collocationMap.entrySet()){\n\t\t for (Entry<String, Integer> subEntry : entry.getValue().entrySet()){\n\t\t\t System.out.println(entry.getKey() + \" \" + subEntry.getKey() + \": \" + subEntry.getValue());\n\t\t }\n\t\t}\n\t}", "public void refreshWindowsMenu() {\r\n Window.removeAll();\r\n for(JInternalFrame cf: circuitwindows){\r\n final JInternalFrame cf2 = cf;\r\n javax.swing.JMenuItem windowItem = new javax.swing.JMenuItem();\r\n windowItem.setText(cf.getTitle()); \r\n windowItem.addActionListener(new java.awt.event.ActionListener() {\r\n public void actionPerformed(java.awt.event.ActionEvent evt) {\r\n try { cf2.setSelected(true);\r\n } catch (PropertyVetoException ex) {\r\n ErrorHandler.newError(\"Editor Error\",\"Cannot select circuit \" + cf2.getTitle() + \".\", ex);\r\n }\r\n }\r\n });\r\n Window.add(windowItem); \r\n }\r\n if(circuitwindows.size()==0){\r\n Window.setEnabled(false);\r\n } else {\r\n Window.setEnabled(true);\r\n }\r\n }", "public static void main(String[] args) throws InterruptedException {\n\t\t\t\tWebDriverManager.chromedriver().setup();\n\t\t\t\tdriver = new ChromeDriver();\n\t\t\t\t\n\t\t\t\tdriver.get(\"http://popuptest.com/goodpopups.html\");\n\t\t\t\tSystem.out.println(\"*************First Popup*************************\");\n\t\t\t\tdriver.findElement(By.linkText(\"Good PopUp #1\")).click();\n\t\t\t\twindowHanldes =driver.getWindowHandles();\n\t\t\t\titerator = windowHanldes.iterator();\n\t\t\t\tparentWindowId =iterator.next();\n\t\t\t\tSystem.out.println(\"Parent Window Id: \"+parentWindowId);\n\t\t\t\tString child1WindowId =iterator.next();\t\n\t\t\t\tSystem.out.println(\"Child 1 Window Id: \"+child1WindowId);\n\t\t\t\tdriver.switchTo().window(child1WindowId);\n\t\t\t\tSystem.out.println(\"Child 1 Window url is: \"+driver.getCurrentUrl());\n\t\t\t\tdriver.close();\n\t\t\t\tdriver.switchTo().window(parentWindowId);\n\t\t\t\tSystem.out.println(\"Parent Window url is: \"+driver.getCurrentUrl());\n\t\t\t\tThread.sleep(3000);\n\t\t\t\tSystem.out.println(\"*************Third Popup*************************\");\n\t\t\t\tdriver.findElement(By.linkText(\"Good PopUp #3\")).click();\n\t\t\t\twindowHanldes =driver.getWindowHandles();\n\t\t\t\titerator = windowHanldes.iterator();\n\t\t\t\tparentWindowId =iterator.next();\n\t\t\t\tparentWindowId=getWindowHandles(driver).next();\n\t\t\t\tSystem.out.println(\"Parent Window Id: \"+parentWindowId);\n\t\t\t\tString child2WindowId = iterator.next();\n\t\t\t\tSystem.out.println(\"Child 2 Window Id: \"+child2WindowId);\n\t\t\t\tdriver.switchTo().window(child2WindowId);\n\t\t\t\tSystem.out.println(\"child 2 winow url is: \"+driver.getCurrentUrl());\n\t\t\t\tdriver.close();\n\t\t\t\tdriver.switchTo().window(parentWindowId);\n\t\t\t\tSystem.out.println(\"Parent Window url is: \"+driver.getCurrentUrl());\n\t\t\t\tSystem.out.println(\"*************Fourth Popup*************************\");\n\t\t\t\tdriver.findElement(By.linkText(\"Good PopUp #4\")).click();\n\t\t\t\twindowHanldes =driver.getWindowHandles();\n\t\t\t\titerator = windowHanldes.iterator();\n\t\t\t\tparentWindowId =iterator.next();\n\t\t\t\tSystem.out.println(\"Parent Window Id: \"+parentWindowId);\n\t\t\t\tString child3WindowId = iterator.next();\n\t\t\t\tSystem.out.println(\"Child 3 Window Id: \"+ child3WindowId);\n\t\t\t\tdriver.switchTo().window(child3WindowId);\n\t\t\t\tSystem.out.println(\"child 3 Window url is: \"+driver.getCurrentUrl());\n\t\t\t\tdriver.close();\n\t\t\t\t\t\t\t\t\n\t\t\t\tdriver.switchTo().window(parentWindowId);\n\t\t\t\tSystem.out.println(\"Parent Window url is: \"+driver.getCurrentUrl());\n\t\t\t\tdriver.quit();\n\t\t\t\t\n\t}", "private void printSolution(int startVertex, double[] distances, int[] parents) {\n int nVertices = distances.length;\n System.out.print(\"Vertex\\t Distance\\tPath\");\n\n for (int vertexIndex = 0; vertexIndex < nVertices; vertexIndex++) {\n if (vertexIndex != startVertex) {\n System.out.print(\"\\n\" + startVertex + \" -> \");\n System.out.print(vertexIndex + \" \\t\\t \");\n System.out.print(distances[vertexIndex] + \"\\t\\t\");\n printPath(vertexIndex, parents);\n }\n }\n }", "public void printAllComponentsOnStdOut() {\r\n System.out.println(\"PackageComponent: \" + this.getName());\r\n System.out.println(\"Contains these ClassDiagramComponents: \");\r\n int counter = 1;\r\n for (ComponentBase component : classDiagramComponents) {\r\n System.out.println(\"Component no.\" + counter + \": \\t\" + component.getName());\r\n counter++;\r\n }\r\n }", "void examineContainers(){\n\t\t\tif (this.receptacle != null)//checks and sees if there's any containers in the location.\n\t\t\t\tfor (int i = 0; i < this.receptacle.size(); i++)\n\t\t\t\t\tif (!(this.receptacle.get(i) instanceof SpecialtyContainer))//if it's a hidden container, you don't know it's there, but it is...\n\t\t\t\t\t\tSystem.out.print(this.receptacle.get(i).contName + \", \");\n\t\t}", "public void calculateWindow()\n {\n Vector2 windowBottomLeftBounds = new Vector2(1000000, 1000000);\n Vector2 windowTopRightBounds = new Vector2(-1000000, -1000000);\n for (Element<?> e : children())\n {\n if (e.id() != null && (e.id().startsWith(id() + \"hBar\") || e.id().startsWith(id() + \"vBar\")))\n {\n continue;\n }\n for (Element<?> child : e)\n {\n Vector2 alignmentVector = child.alignment().alignmentVector();\n Vector2 bottomLeftBounds = new Vector2(child.x() - (alignmentVector.x * child.width()), child.y()\n - (alignmentVector.y * child.height()));\n Vector2 topRightBounds = new Vector2(bottomLeftBounds.x + child.width(), bottomLeftBounds.y + child.height());\n // left\n if (windowBottomLeftBounds.x > bottomLeftBounds.x)\n {\n windowBottomLeftBounds.x = bottomLeftBounds.x;\n }\n // bottom\n if (windowBottomLeftBounds.y > bottomLeftBounds.y)\n {\n windowBottomLeftBounds.y = bottomLeftBounds.y;\n }\n // right\n if (windowTopRightBounds.x < topRightBounds.x)\n {\n windowTopRightBounds.x = topRightBounds.x;\n }\n // top\n if (windowTopRightBounds.y < topRightBounds.y)\n {\n windowTopRightBounds.y = topRightBounds.y;\n }\n }\n }\n \n content = new CRectangle(windowBottomLeftBounds.x, windowBottomLeftBounds.y, windowTopRightBounds.x - windowBottomLeftBounds.x,\n windowTopRightBounds.y - windowBottomLeftBounds.y);\n content.origin = new Vector2(0, 0);\n \n calculateScrollSize();\n }", "public void display(int x) {\n\t\tString str=\"\";\n\t\tfor(int i=0;i<x;i++) str+=\"\\t\";\n\t\tSystem.out.println(str+row+\" \"+col);\n\t\tfor (Iterator iterator = children.iterator(); iterator.hasNext();) {\n\t\t\tMove move = (Move) iterator.next();\n\t\t\tmove.display(x+1);\n\t\t}\n\t}", "public void print() {\n\t\t\n\t\tfor(Solution sol : population) {\n\t\t\tSystem.out.println(sol.getPossibleSolution() + \" \" + sol.getPath());\n\t\t}\n\t}", "private void printFullTree()\r\n {\r\n System.out.println(fullXmlTree.toString());\r\n }", "public void showSubLines(){\n\t\tfor (int i = 1; i < lineLists.size(); i++){\n\t\t\tLinkedList<Line> lines = lineLists.get(i);\n\t\t\tfor (Line l : lines){\n\t\t\t\tl.setVisible(true);\n\t\t\t}\n\t\t}\n\t\tshowSubLines = true;\n\t}", "public String toString(){\n String str = \"\";\n for(int i = level; i>0; i--){\n str+=\"\\t\";\n }\n str += getClass().toString();\n if(noOfChildren != 0){\n str+=\" containing\\n\";\n for (int i = 0; i<this.noOfChildren; i++)\n str += getChild(i).toString();\n }\n else{\n str+=\"\\n\";\n }\n return str;\n }", "public void printMap()\r\n {\r\n\t\tint x = 0;\r\n for(Room[] row : rooms)\r\n {\r\n \tStringBuilder top = new StringBuilder(); // top row of room\r\n \tStringBuilder mid = new StringBuilder(); // mid row of room\r\n \tStringBuilder bot = null;\r\n \tif (x == row.length - 1) { // if the last row\r\n \t\tbot = new StringBuilder(); // bot row of room\r\n \t}\r\n \t\r\n for (Room room : row)\r\n {\r\n \tString roomStr = room.toString();\r\n top.append(roomStr.substring(0, 3)); // 0-3 top, 3-6, mid, 6-9 bot\r\n mid.append(roomStr.substring(3, 6)); \r\n if (x == row.length - 1) { //if the last row\r\n \tbot.append(roomStr.substring(6, 9)); //append the bot row\r\n }\r\n }\r\n // add new lines\r\n top.append('\\n');\r\n mid.append('\\n');\r\n \r\n System.out.print(top);\r\n System.out.print(mid);\r\n \r\n if (x == row.length - 1) {\r\n \tbot.append('\\n');\r\n \tSystem.out.print(bot);\r\n }\r\n x++;\r\n }\r\n }", "private void printAllItems() {\n Set<ClothingItem> items = ctrl.getAllItems();\n items.stream().forEach(System.out::println);\n }", "@Override\n public void printTree() {\n System.out.println(\"node with char: \" + this.getChar() + \" and key: \" + this.getKey());\n int i = 0;\n for(IABTNode node : this.sons) {\n if(!node.isNull()) {\n System.out.print(\"Son \" + i + \" :\");\n node.printTree();\n }\n i++;\n }\n }", "public String getWindowParts();", "public void printGraph() {\n\t\tSystem.out.println(\"-------------------\");\n\t\tSystem.out.println(\"Printing graph...\");\n\t\tSystem.out.println(\"Vertex=>[Neighbors]\");\n\t\tIterator<Integer> i = vertices.keySet().iterator();\n\t\twhile(i.hasNext()) {\n\t\t\tint name = i.next();\n\t\t\tSystem.out.println(name + \"=>\" + vertices.get(name).printNeighbors());\n\t\t}\n\t\tSystem.out.println(\"-------------------\");\n\t}", "public void go_through_tiling_windows(){\n\t\ttry{\n//\t\t\tBufferedWriter bw=new BufferedWriter(new FileWriter(outfile));\n\t\t\tfor(int chr=0;chr<variants.num_chrs;chr++){\n\t\t\t\tint last_position=variants.locations[chr][variants.num_sites[chr]-1];\n\t\t\t\tint start=1, end=tiling_win_size;\n\t\t\t\twhile(start<last_position){\n\t\t\t\t\tdouble[][] data=variants.load_variants_in_region(chr, start, end);\t\t\t\t\t\n\t\t\t\t\tfor(int k=0;k<data.length;k++){\n\t\t\t\t\t\t//do something\n\t\t\t\t\t}\n\t\t\t\t\tstart=start+tiling_win_size/2;\n\t\t\t\t\tend=start+tiling_win_size-1;\n\t\t\t\t}\n\t\t\t}//bw.close();\n\t\t}catch(Exception e){e.printStackTrace();}\n\t}", "private void printGraph() {\r\n\t\tSortedSet<String> keys = new TreeSet<String>(vertexMap.keySet());\r\n\t\tIterator it = keys.iterator();\r\n\t\twhile (it.hasNext()) {\r\n\t\t\tVertex v = vertexMap.get(it.next());\r\n\t\t\tif (v.isStatus())\r\n\t\t\t\tSystem.out.println(v.getName());\r\n\t\t\telse\r\n\t\t\t\tSystem.out.println(v.getName() + \" DOWN\");\r\n\t\t\tsortEdges(v.adjacent);\r\n\t\t\tfor (Iterator i = v.adjacent.iterator(); i.hasNext();) {\r\n\t\t\t\t// v.adjacent.sort();\r\n\t\t\t\tEdge edge = (Edge) i.next();\r\n\t\t\t\tif (edge.isStatus())\r\n\t\t\t\t\tSystem.out.println(\" \" + edge.getDestination() + \" \" + edge.getCost());\r\n\t\t\t\telse\r\n\t\t\t\t\tSystem.out.println(\" \" + edge.getDestination() + \" \" + edge.getCost() + \" DOWN\");\r\n\t\t\t}\r\n\t\t}\r\n\t}" ]
[ "0.66640365", "0.6444008", "0.60021883", "0.5997712", "0.5899482", "0.57439405", "0.5604533", "0.5545383", "0.5533157", "0.5443926", "0.5416286", "0.54156", "0.5378622", "0.5367", "0.53646153", "0.53558517", "0.5334795", "0.53211236", "0.5307922", "0.52960926", "0.52914", "0.52769303", "0.5276791", "0.52681625", "0.5268126", "0.52610236", "0.52592987", "0.52304363", "0.52018225", "0.52004987", "0.5191046", "0.51885074", "0.5171233", "0.51528436", "0.51483613", "0.5147461", "0.5138389", "0.51358575", "0.51337904", "0.5129574", "0.512551", "0.51184726", "0.51130235", "0.5112183", "0.51120573", "0.51099217", "0.5102982", "0.51029336", "0.50839376", "0.50797576", "0.5079368", "0.50732183", "0.50602365", "0.5053685", "0.5042891", "0.5041705", "0.501941", "0.50109524", "0.5010407", "0.5007464", "0.499963", "0.4999208", "0.49943033", "0.49907762", "0.4985286", "0.498309", "0.4981496", "0.49775317", "0.49697688", "0.49657992", "0.49638996", "0.49590668", "0.49588913", "0.49560156", "0.49536932", "0.49489775", "0.49410245", "0.49395236", "0.49320555", "0.49299785", "0.4926433", "0.49263713", "0.49215335", "0.49115354", "0.49109265", "0.49066895", "0.49061733", "0.49045432", "0.48998335", "0.4894648", "0.4894188", "0.48934683", "0.48916095", "0.48887947", "0.48836407", "0.48752347", "0.48732153", "0.48706177", "0.48705608", "0.4865604" ]
0.6357496
2
Returns a prettyprint string of all found windows that are showing, nesting by parentchild relationship.
public static String getOpenWindowsAsString() { Set<Window> allFoundWindows = getAllWindows(); //@formatter:off List<Window> roots = allFoundWindows .stream() .filter(w -> w.getParent() == null) .collect(Collectors.toList()) ; //@formatter:on StringBuilder buffy = new StringBuilder("\n"); for (Window w : roots) { if (!isHierarchyShowing(w)) { continue; } windowToString(w, 0, buffy); } return buffy.toString(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void printOpenWindows() {\n\t\tMsg.debug(AbstractDockingTest.class, \"Open windows: \" + getOpenWindowsAsString());\n\t}", "public String toString(){\n String str = \"\";\n for(int i = level; i>0; i--){\n str+=\"\\t\";\n }\n str += getClass().toString();\n if(noOfChildren != 0){\n str+=\" containing\\n\";\n for (int i = 0; i<this.noOfChildren; i++)\n str += getChild(i).toString();\n }\n else{\n str+=\"\\n\";\n }\n return str;\n }", "private void listWindows() {\n final Component[] components = getComponents();\n final String[] titles = new String[components.length];\n for (int i=0; i<components.length; i++) {\n Component c = components[i];\n String title = String.valueOf(c.getName());\n if (c instanceof JInternalFrame) {\n final JInternalFrame ci = (JInternalFrame) c;\n title = String.valueOf(ci.getTitle());\n c = ci.getRootPane().getComponent(0);\n }\n final Dimension size = c.getSize();\n titles[i] = title + \" : \" + c.getClass().getSimpleName() +\n '[' + size.width + \" \\u00D7 \" + size.height + ']';\n }\n final JInternalFrame frame = new JInternalFrame(\"Windows\", true, true, true, true);\n frame.add(new JScrollPane(new JList<>(titles)));\n frame.pack();\n frame.setVisible(true);\n add(frame);\n }", "public String revealAllRelationshipsInW() {\n\t\tString w = \"\";\n\t\tif (this.numWVertices > 0) {\n\t\t\tfor (int i = 0; i < this.numWVertices; i++) {\n\t\t\t\t// find w_i and print it with all its neighbors\n\t\t\t\tw += \"w\" + i + \": \" + this.vertices.get(i).getNeighbors() + \"\\n\";\n\t\t\t}\n\t\t}\n\t\treturn w;\n\t}", "@Override\n public String toString() {\n return \"Window: [\" + xWindow + \",\" + yWindow + \";\" + widthWindow + \",\" + heightWindow + \"]\\n\" +\n \"Viewport: [\" + xViewport + \",\" + yViewport + \";\" + widthViewport + \",\" + heightViewport + \"]\\n\" +\n \"Scale: [\" + xScaleFactor + \",\" + yScaleFactor + \"]\\n\" +\n \"Margin: [\" + xMargin + \",\" + yMargin + \"]\\n\";\n }", "public String getWindowParts();", "public void printLaptops(){\n\t\tSystem.out.println(\"Root is: \"+vertices.get(root));\n\t\tSystem.out.println(\"Edges: \");\n\t\tfor(int i=0;i<parent.length;i++){\n\t\t\tif(parent[i] != -1){\n\t\t\t\tSystem.out.print(\"(\"+vertices.get(parent[i])+\", \"+\n\t\t\tvertices.get(i)+\") \");\n\t\t\t}\n\t\t}\n\t\tSystem.out.println();\n\t\t}", "public String toString() {\n\n // **** ****\n StringBuilder sb = new StringBuilder();\n\n sb.append(\"\\n n: \" + this.n);\n sb.append(\"\\nparents: \" + Arrays.toString(this.parents));\n\n // **** ****\n return sb.toString();\n }", "@Override\r\n public String toString() {\r\n Queue<List<Node>> queue = new LinkedList<List<Node>>();\r\n queue.add(Arrays.asList(root));\r\n StringBuilder sb = new StringBuilder();\r\n while (!queue.isEmpty()) {\r\n Queue<List<Node>> nextQueue = new LinkedList<List<Node>>();\r\n while (!queue.isEmpty()) {\r\n List<Node> nodes = queue.remove();\r\n sb.append('{');\r\n Iterator<Node> it = nodes.iterator();\r\n while (it.hasNext()) {\r\n Node node = it.next();\r\n sb.append(node.toString());\r\n if (it.hasNext())\r\n sb.append(\", \");\r\n if (node instanceof BPTree.InternalNode)\r\n nextQueue.add(((InternalNode) node).children);\r\n }\r\n sb.append('}');\r\n if (!queue.isEmpty())\r\n sb.append(\", \");\r\n else {\r\n sb.append('\\n');\r\n }\r\n }\r\n queue = nextQueue;\r\n }\r\n return sb.toString();\r\n }", "public void dumpWindowAnimators(PrintWriter pw, String subPrefix) {\n forAllWindows((Consumer<WindowState>) new Consumer(pw, subPrefix, new int[1]) {\n /* class com.android.server.wm.$$Lambda$DisplayContent$iSsga4uJnJzBuUddn6uWEUo6xO8 */\n private final /* synthetic */ PrintWriter f$0;\n private final /* synthetic */ String f$1;\n private final /* synthetic */ int[] f$2;\n\n {\n this.f$0 = r1;\n this.f$1 = r2;\n this.f$2 = r3;\n }\n\n @Override // java.util.function.Consumer\n public final void accept(Object obj) {\n DisplayContent.lambda$dumpWindowAnimators$18(this.f$0, this.f$1, this.f$2, (WindowState) obj);\n }\n }, false);\n }", "public static String printTree()\r\n {\r\n String result = \"\";\r\n for (String s: tree.toArrayList())\r\n result = result + \" \" + s;\r\n return result;\r\n }", "public static String printTree()\n {\n \tString tree = \"\";\n ArrayList<String> letters = converter.toArrayList();\n for(int i = 0; i < letters.size(); i++)\n {\n tree += letters.get(i);\n if(i + 1 < letters.size())\n \t tree += \" \";\n }\n \n return tree;\n }", "public static String listFather() {\n\t\tString s = \"\";\n\t\tString i1 = \" \";\n\t\tfor (Entry<String, TreeMap<String, Set<String>>> en:getFatherMap().entrySet()) {\n\t\t\ts = s + en.getKey() + \":\\n\";\n\t\t\tTreeMap<String, Set<String>> fathers = en.getValue();\n\t\t\tfor (Entry<String, Set<String>> father:fathers.entrySet()) {\n\t\t\t\ts = s + i1 + father.getKey() + \" ( \";\n\t\t\t\tfor (String root:father.getValue()) {\n\t\t\t\t\ts = s + root + \" \";\n\t\t\t\t}\n\t\t\t\ts = s + \")\\n\";\n\t\t\t}\n\t\t}\n\t\treturn s;\n\t}", "public static void windowspwcw() {\n\t\tString windowHandle = driver.getWindowHandle();\n\t\tSystem.out.println(\"parent window is: \"+windowHandle);\n\t\tSet<String> windowHandles = driver.getWindowHandles();\n\t\tSystem.out.println(\"child window is \"+windowHandles);\n\t\tfor(String eachWindowId:windowHandles)\n\t\t{\n\t\t\tif(!windowHandle.equals(eachWindowId))\n\t\t\t{\n\t\t\t\tdriver.switchTo().window(eachWindowId);\n\t\t\t\t\n\t\t\t}\n\t\t}\n\n\t}", "public static void windowsHandlingList(WebDriver drive) {\n\t\tString thisWindow = drive.getWindowHandle();\n\t\tSystem.out.println(\"main: \" + thisWindow);\n\t\tSet<String> AllWindow = drive.getWindowHandles();\n\t\tArrayList<String> toList = new ArrayList<String>(AllWindow);\n\t\tfor (String childWindow : toList) {\n\t\t\tif (!(thisWindow.equals(childWindow))) {\n\t\t\t}\n\t\t}\n\t}", "public String printTree() {\n printSideways();\n return \"\";\n }", "public String printToList() {\n\t\tif (hierarchy.equals(\"n\")) {\n\t\t\treturn \"<HTML>\" + visability + \" class \" + className\n\t\t\t\t\t+ \"{ <BR> <BR>\";\n\t\t} else if (isFinished == true) {\n\n\t\t\treturn \"}\";\n\t\t} else {\n\t\t\treturn \"<HTML>\" + visability + \" \" + hierarchy + \" class \"\n\t\t\t\t\t+ className + \"{ <BR> <BR>\";\n\t\t}\n\t}", "public String outputDepthFirstSearch() {\n // output string buffer\n StringBuilder output = new StringBuilder();\n outputDepthFirstSearch(root, output);\n return output.toString();\n }", "public String toString() {\n\n StringBuilder sb = new StringBuilder();\n sb.append(\"\\nApplication Graph for \" + this.getClass().getCanonicalName() + \"\\n\");\n Map<PEMaker, Collection<StreamMaker>> pe2streamMap = pe2stream.asMap();\n for (Map.Entry<PEMaker, Collection<StreamMaker>> entry : pe2streamMap.entrySet()) {\n sb.append(toString(entry.getKey()) + \"=> \");\n for (StreamMaker sm : entry.getValue()) {\n sb.append(toString(sm));\n }\n sb.append(\"\\n\");\n }\n\n Map<StreamMaker, Collection<PEMaker>> stream2peMap = stream2pe.asMap();\n for (Map.Entry<StreamMaker, Collection<PEMaker>> entry : stream2peMap.entrySet()) {\n sb.append(toString(entry.getKey()) + \"=> \");\n for (PEMaker pm : entry.getValue()) {\n sb.append(toString(pm));\n }\n sb.append(\"\\n\");\n }\n\n return sb.toString();\n\n }", "public void printMST() {\n\t\t\n\t\tString mstPath = \"\";\n\t\t\n\t\t/**Stores the parent child hierarchy*/\n\t\tint distance[] = new int[this.vertices];\n\t\t\n\t\t/**Stores all the vertices with their distances from source vertex*/\n\t\tMap<Integer, Integer> map = new HashMap<Integer, Integer>();\n\t\tmap.put(0, 0);\n\t\t\n\t\tfor(int i = 1; i < vertices; i++){\n\t\t\tmap.put(i, Integer.MAX_VALUE);\n\t\t}\n\t\t\n\t\tfor(int i = 0; i < vertices; i++){\n\t\t\t\n\t\t\tInteger minVertex = extractMin(map), minValue = map.get(minVertex);\n\t\t\tdistance[minVertex] = minValue;\n\t\t\t\n\t\t\tmstPath += minVertex + \" --> \";\n\t\t\t\n\t\t\t/**Removing min vertex from map*/\n\t\t\tmap.remove(minVertex);\n\t\t\t\n\t\t\t/**Exploring edges of min vertex*/\n\t\t\tArrayList<GraphEdge> edges = this.adjList[minVertex];\n\t\t\tfor(GraphEdge edge : edges){\n\t\t\t\tif(map.containsKey(edge.destination)){\n\t\t\t\t\tif(map.get(edge.destination) > distance[edge.source] + edge.weight){\n\t\t\t\t\t\tmap.put(edge.destination, distance[edge.source] + edge.weight);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\tSystem.out.println(mstPath);\n\t}", "@Override\r\npublic void Display(int depth) {\n\tSystem.out.println(\"-\"+depth);\r\n children.forEach(com->com.Display(depth+2));\r\n }", "public void tree()\n\t{\n\t\tIterable<Position<FileElement>> toPrint = fileSystem.PreOrder();\n\t\tfor (Position<FileElement> p : toPrint)\n\t\t{\n\t\t\tint depth = fileSystem.getDepth(p);\n\t\t\tfor (int i = 0; i < depth; i++)\n\t\t\t{\n\t\t\t\tSystem.out.print(\" \");\n\t\t\t}\n\t\t\tSystem.out.println(p.getValue());\n\t\t}\n\t}", "private String recursiveDescription(int withTabCount) {\n String indent = \"\";\n for (int i = 0; i < withTabCount; i++) {\n indent += \"\\t\";\n }\n\n String result = indent + toString() + \"\\n\";\n if (hasChildren) {\n for (QuadtreeNode node : children) {\n result += node.recursiveDescription(withTabCount + 1);\n }\n }\n\n return result;\n }", "public void prettyPrintTree() {\r\n\t\tSystem.out.print(\"prettyPrintTree starting\");\r\n\t\tfor (int i = 0; i <= this.getTreeDepth(); i++) {\r\n\t\t\tprettyPrintTree(root, 0, i);\r\n\t\t\tSystem.out.println();\r\n\t\t}\r\n\t}", "public String innerRepresentation() {\n return toStringHelper(this.root, this.depth);\n }", "void printSubgraphs() {\n StringBuilder sb = new StringBuilder();\n for(int sgKey: listOfSolutions.keySet()) {\n HashMap<Integer, Long> soln = listOfSolutions.get(sgKey);\n // inside a soln\n //sb.append(\"S:8:\");\n for(int key: soln.keySet()) {\n sb.append(key + \",\" + soln.get(key) + \";\");\n\n }\n sb.setLength(sb.length() - 1);\n sb.append(\"\\n\");\n }\n System.out.println(\"\\n\" + sb.toString());\n }", "public ArrayList<VWindow> getSubWindowList() {\n ArrayList<VWindow> windows = new ArrayList<VWindow>(subWindows.size());\n for (VWindow widget : subWindows) {\n windows.add(widget);\n }\n return windows;\n }", "public void printWindowElements(List<EdgeEventDepr> edgeEventDeprList) {\n String printString = \"1st Phase Window [\" + counter++ + \"]: \";\n for(EdgeEventDepr e: edgeEventDeprList) {\n printString = printString + \"; \" + e.getEdge().getOriginVertex() + \" \" + e.getEdge().getDestinVertex();\n }\n // Optionally: Print\n System.out.println(printString);\n\n }", "public String revealRelationshipsInW() {\n\t\tString w = \"\";\n\t\tif (this.numWVertices > 0) {\n\t\t\tfor (int i = 0; i < this.numWVertices; i++) {\n\t\t\t\t// find w_i and print it with all its neighbors\n\t\t\t\tw += \"w\" + i + \": \" + this.vertices.get(i).getWNeighbors() + \"\\n\";\n\t\t\t}\n\t\t}\n\t\treturn \"Expected Relationships between targeted vertices (W): \\n\" + w;\n\t}", "public void floorOutline() {\n\t\tStringBuilder sb = new StringBuilder();\n\t\tsb.append(\"Floor : \" + floor + \"\\n\");\n\t\tsb.append(\"Total area: \" + area + \"m�\"+ \"\\n\");\n\t\tsb.append(\"Circulation area: \" + circulation + \"m�\"+ \"\\n\");\n\t\tsb.append(\"Useable area: \" + useableArea + \"m�\"+ \"\\n\");\n\t\tsb.append(\"Area left: \" + getRestArea() + \"m�\"+ \"\\n\");\n\t\tsb.append(\"--------------------------------\"+ \"\\n\");\n\t\tfor (int i=0; i<flatList.size(); i++) {\n\t\t\tsb.append(flatList.get(i).toString()+ \"\\n\");\n\t\t\tsb.append(\"--------------------------------\"+ \"\\n\");\n\t\t}\n\t\tSystem.out.println(sb.toString());\n\t}", "public String toString() {\r\n\t\treturn print(this.root,0);\r\n\t}", "void printMST(int[] parent) {\n System.out.println(\"Edge \\tWeight\");\n for (int i = 1; i < VERTICES; i++)\n System.out.println(parent[i] + \" - \" + i + \"\\t\" + graph[i][parent[i]]);\n }", "protected String getLevelString()\n {\n\tStringBuffer buf = new StringBuffer();\n\tfor (int i = 0; i < nestLevel; i++)\n\t buf.append(\">\");\n\treturn buf.toString();\n\t}", "public String display()\r\n {\r\n return recDisplay(root);\r\n }", "public String toString() {\n StringBuffer aBuffer = new StringBuffer(super.toString());\n aBuffer.append(\"[id=\").append(_theId).\n append(\" parent=\").append(_theParent).\n append(\" paths=\").append(_thePaths).\n append(\"]\");\n\n return aBuffer.toString();\n }", "public String toString() {\n\t\tStringBuilder buff = new StringBuilder();\n\t\tfor (int y = height-1; y>=0; y--) {\n\t\t\tbuff.append('|');\n\t\t\tfor (int x=0; x<width; x++) {\n\t\t\t\tif (getGrid(x,y)) buff.append('+');\n\t\t\t\telse buff.append(' ');\n\t\t\t}\n\t\t\tbuff.append(\"|\\n\");\n\t\t}\n\t\tfor (int x=0; x<width+2; x++) buff.append('-');\n\t\treturn(buff.toString());\n\t}", "public String toString() {\n\t\tStringBuilder buff = new StringBuilder();\n\t\tfor (int y = height-1; y>=0; y--) {\n\t\t\tbuff.append('|');\n\t\t\tfor (int x=0; x<width; x++) {\n\t\t\t\tif (getGrid(x,y)) buff.append('+');\n\t\t\t\telse buff.append(' ');\n\t\t\t}\n\t\t\tbuff.append(\"|\\n\");\n\t\t}\n\t\tfor (int x=0; x<width+2; x++) buff.append('-');\n\t\treturn(buff.toString());\n\t}", "public String toString(){\n\t\tStringBuffer sb = new StringBuffer();\n\t\tTList<T> root = this.getRoot();\n\t\tif (root == this) \n\t\t\tsb.append(\"*\");\n\t\tif (root.visited())\n\t\t\tsb.append(\"-\");\n\t\tsb.append(root.getValue());\n\t\twhile (root.hasNext()) {\n\t\t\tsb.append(\" -> \");\n\t\t\troot = root.getNext();\n\t\t\tif (root == this) \n\t\t\t\tsb.append(\"*\");\n\t\t\tif (root.visited())\n\t\t\t\tsb.append(\"-\");\n\t\t\tsb.append(root.getValue());\n\t\t}\n\t\treturn sb.toString();\n\t}", "public String printRecord() {\n int win = 0;\n int total = gameList.size();\n for (Game g : gameList) {\n if (g.isWinner(this)) {\n win++;\n }\n }\n return \"(\" + win + \"-\" + (total - win) + \")\";\n }", "public void calculateWindow()\n {\n Vector2 windowBottomLeftBounds = new Vector2(1000000, 1000000);\n Vector2 windowTopRightBounds = new Vector2(-1000000, -1000000);\n for (Element<?> e : children())\n {\n if (e.id() != null && (e.id().startsWith(id() + \"hBar\") || e.id().startsWith(id() + \"vBar\")))\n {\n continue;\n }\n for (Element<?> child : e)\n {\n Vector2 alignmentVector = child.alignment().alignmentVector();\n Vector2 bottomLeftBounds = new Vector2(child.x() - (alignmentVector.x * child.width()), child.y()\n - (alignmentVector.y * child.height()));\n Vector2 topRightBounds = new Vector2(bottomLeftBounds.x + child.width(), bottomLeftBounds.y + child.height());\n // left\n if (windowBottomLeftBounds.x > bottomLeftBounds.x)\n {\n windowBottomLeftBounds.x = bottomLeftBounds.x;\n }\n // bottom\n if (windowBottomLeftBounds.y > bottomLeftBounds.y)\n {\n windowBottomLeftBounds.y = bottomLeftBounds.y;\n }\n // right\n if (windowTopRightBounds.x < topRightBounds.x)\n {\n windowTopRightBounds.x = topRightBounds.x;\n }\n // top\n if (windowTopRightBounds.y < topRightBounds.y)\n {\n windowTopRightBounds.y = topRightBounds.y;\n }\n }\n }\n \n content = new CRectangle(windowBottomLeftBounds.x, windowBottomLeftBounds.y, windowTopRightBounds.x - windowBottomLeftBounds.x,\n windowTopRightBounds.y - windowBottomLeftBounds.y);\n content.origin = new Vector2(0, 0);\n \n calculateScrollSize();\n }", "@Override\n\tpublic String toString() {\n\t\treturn level+\":\"+title + \":\"+refId+\"::\"+childElems;\n\t}", "protected StringBuilder toStringBuilder() {\r\n StringBuilder sb;\r\n if (this.parent == null) {\r\n sb = new StringBuilder(PATH_SEP_CHAR);\r\n } else {\r\n sb = this.parent.get().toStringBuilder();\r\n }\r\n return sb.append(PATH_SEP_CHAR).append(this.localName);\r\n }", "public String toString() {\r\n\t\t\tStringBuilder sb = new StringBuilder();\r\n\t\t\t//for (GameInfo g : gamePaths)\r\n\t\t\tfor (int gI=0; gI<gamePaths.size(); gI++) {\r\n\t\t\t\tGameInfo g = (GameInfo)gamePaths.get(gI);\r\n\t\t\t\tsb.append(g.name + \"\\t\").append(g.fullName + \"\\t\").append(g.pathToIconFile + \" \\t\").append(g.numBytes + \"\\t\").append(g.mobileFormat + \"\\n\");\r\n\t\t\t}\r\n\t\t\treturn sb.toString();\r\n\t\t}", "private static String getAllChildrenAsText(Node parentNode) {\n\t\tStringBuilder builder = new StringBuilder();\n\t\t\n\t\tint numberOfChildren = parentNode.numberOfChildren();\n\t\tfor (int i = 0; i < numberOfChildren; i ++) {\n\t\t\tNode child = parentNode.getChild(i);\n\t\t\tbuilder.append(child.toString());\n\t\t\t\n\t\t\tif (child instanceof ForLoopNode) {\n\t\t\t\tbuilder.append(getAllChildrenAsText(child));\n\t\t\t\tbuilder.append(\"{$ END $}\");\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn builder.toString();\n\t}", "String showAllNodes();", "public void print_root(){\r\n\t\tfor(int id = 0; id < label.length; id++){\r\n\t\t\tSystem.out.printf(\"\"%d \"\", find(id));\r\n\t\t}\r\n\t\tSystem.out.printf(\"\"\\n\"\");\r\n\t}", "public String toString() {\n String output = dimension() + \"\\n\";\n for (int i = 0; i < blocks.length; i++) {\n for (int j = 0; j < blocks[i].length; j++) {\n if (blocks[i][j] < 10) {\n output += \" \";\n }\n output += blocks[i][j] + \" \";\n }\n output += \"\\n\";\n }\n return output;\n }", "public String toString(){\n //return myString(root);\n printInOrder(root);\n return \"\";\n }", "@Override\n public String toString() {\n return currentShowings.toString();\n }", "public void dumpMultipleElementsPerParent(Map<String, List<XSElementDeclaration>> elementsPerParent)\n throws FileNotFoundException {\n PrintStream stream = new PrintStream(\"multiple_elements_per_parent.txt\");\n\n for (String parentName : elementsPerParent.keySet()) {\n stream.println(parentName);\n\n for (XSElementDeclaration element : elementsPerParent.get(parentName)) {\n stream.print(\" \");\n stream.println(element.getName());\n }\n }\n }", "public void printPath() {\n System.out.print(\"Path: \");\n for (int i = 0; i < parents.size(); i++) {\n Cell cell = parents.get(i);\n System.out.print(\" (\" + cell.x + \",\" + cell.y + \") \");\n }\n System.out.println(\"\\nVisited cells: \" + visitedCells);\n System.out.println(\"Length of Path: \" + parents.size());\n }", "public String visibleItems() {\n \tStringBuilder s = new StringBuilder(\"\");\n for (Item item : items) {\n if (item instanceof Visible && item.isVisible()) {\n s.append(\"\\nThere is a '\").append(item.detailDescription()).append(\"' (i.e. \" + item.description() + \" ) here.\");\n }\n }\n return s.toString();\n }", "public String toString() {\n return toString(root) + \" \";//call helper method for in-order traversal representation\n }", "public String toString(){\r\n\t\tString temp = \"\";\r\n\t\tfor (String p : Persons.keySet()){\r\n\t\t\tPerson person = Persons.get(p);\r\n\t\t\ttemp += person.toString() + \"\\n\";\r\n\t\t}\r\n\r\n\t\tfor (String prj : LargeProjects){\r\n\t\t\ttemp += \"large-project(\" + prj +\")\\n\";\r\n\t\t}\r\n\r\n\t\ttemp += \"\\n\";\r\n\r\n\t\tfor (String prj : Projects){\r\n\t\t\ttemp += \"project(\" + prj + \")\\n\";\r\n\t\t}\r\n\r\n\t\ttemp += \"\\n\";\r\n\r\n\t\tfor (String r : Rooms.keySet()){\r\n\t\t\tRoom room = Rooms.get(r);\r\n\t\t\tif(room.getSize() == 1){\r\n\t\t\t\ttemp += \"small-room(\" + r + \")\\n\";\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tfor (String r : Rooms.keySet()) {\r\n\t\t\tRoom room = Rooms.get(r);\r\n\t\t\tif (room.getSize() == 2) {\r\n\t\t\t\ttemp += \"medium-room(\" + r + \")\\n\";\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tfor (String r : Rooms.keySet()){\r\n\t\t\tRoom room = Rooms.get(r);\r\n\t\t\tif(room.getSize() == 3){\r\n\t\t\t\ttemp += \"large-room(\" + r + \")\\n\";\r\n\t\t\t}\r\n\t\t}\r\n\t\ttemp += \"\\n\";\r\n\r\n\t\tfor (String r : Rooms.keySet()){\r\n\t\t\tRoom room = Rooms.get(r);\r\n\t\t\tfor(String c : room.getCloseTo()){\r\n\t\t\t\ttemp += \"close(\" + r + \", \" + c + \")\\n\";\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\ttemp += \"\\n\";\r\n\r\n\t\tfor (String g : Groups.keySet()){\r\n\t\t\ttemp += \"group(\" + g + \")\\n\";\r\n\t\t}\r\n\r\n\t\ttemp += \"\\n\";\r\n\t\t//assignments.removeAll(null);\r\n\t\tfor (Assignment assignment : Assignments){\r\n\t\t\tPerson[] people = assignment.getPerson();\r\n\t\t\tString room = assignment.getRoom().getName();\r\n\t\t\tif (people.length == 2){\r\n\t\t\t\ttemp += \"assign-to(\" + people[0].getName() + \", \" + room + \")\\n\";\r\n\t\t\t\ttemp += \"assign-to(\" + people[1].getName() + \", \" + room + \")\\n\";\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\ttemp += \"assign-to(\" + assignment.toString() + \")\\n\";\r\n\t\t\t}\r\n\t\t}\r\n\r\n\r\n\t\tint i = 0;\r\n\r\n\r\n\t\treturn temp;\r\n\t}", "public List<Window> getWindows(){\n\t\treturn windows;\n\t}", "@Override\n public String toString() {\n StringBuilder buf = new StringBuilder();\n\n buf.append(\"NestedLoops[\");\n\n if (predicate != null)\n buf.append(\"pred: \").append(predicate);\n else\n buf.append(\"no pred\");\n\n if (schemaSwapped)\n buf.append(\" (schema swapped)\");\n\n buf.append(']');\n\n return buf.toString();\n }", "@Override\r\n\tpublic synchronized String toString(){\r\n\r\n\t\tString result = String.valueOf(numberOfSplittedGroups);\r\n\r\n\t\tif(!hierarchy.isEmpty()){\r\n\t\t\tresult = result + Constants.A3_SEPARATOR + hierarchy.get(0);\r\n\t\t\tfor(int i = 1; i < hierarchy.size(); i ++){\r\n\t\t\t\tresult = result + Constants.A3_SEPARATOR + hierarchy.get(i);\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn result;\r\n\t}", "@Override\n public String parenthesize() {\n StringBuilder out = new StringBuilder();\n out.append(\"[\");\n out.append(this.leftChild.parenthesize());\n out.append(\" \");\n out.append(this.oper.getId());\n out.append(\" \");\n out.append(this.rightChild.parenthesize());\n out.append(\"]\");\n return out.toString();\n }", "public void printTree() {\n\t\tSystem.out.println(printHelp(root));\r\n\t\t\r\n\t}", "public String toString() {\n String mazeVisual = \"\";\n Maze routeMaze = this.getMaze();\n for (int row = 0; row < routeMaze.getTiles().size(); row++) {\n for (int col = 0; col < routeMaze.getTiles().get(0).size(); col++) {\n if (route.contains(routeMaze.getTiles().get(row).get(col))) {\n mazeVisual = (mazeVisual + \"*\");\n } else if (popped.contains(routeMaze.getTiles().get(row).get(col))) {\n mazeVisual = (mazeVisual + \"-\");\n } else {\n mazeVisual = (mazeVisual + routeMaze.getTiles().get(row).get(col).toString());\n }\n if ((col + 1) == routeMaze.getTiles().get(0).size()) {\n mazeVisual = mazeVisual + \"\\n\";\n }\n }\n }\n return mazeVisual;\n }", "@Override\n\tpublic String toString()\n\t{\n\n\t\tStringBuffer sb = new StringBuffer(\"top->\");\n\t\tif (!isEmpty())\n\t\t{\n for(int i = getSize() - 1; i >= 0; i--)\n {\n if(i == getSize() - 1)\n {\n sb.append(list.get(i));\n }\n else \n {\n sb.append( \"->\" + list.get(i));\n }\n }\n //System.out.println(sb.toString());\n\t\t}\n\t\treturn sb.toString();\n\t}", "protected String toString(int spaces, int expansion) {\n\t\tStringBuilder sb = new StringBuilder();\n\t\t// first line: Name:ClassName\n\t\tsb.append(StringUtil.getRepeatedString(\" \", spaces)).append(nameProperty().getValue()).append(':').append(getClass().getSimpleName()).\n\t\t\t\tappend(' ').append(getPropertyStrings()).append('\\n');\n\t\t\n\t\t// call toString on all children with spaces += 4\n\t\tif (expansion != 0 && children != null) {\n\t\t\t// Print attributes first\n\t\t\tfor (BusinessObject child : children.values()) {\n\t\t\t\tif (child.isAttribute()) {\n\t\t\t\t\tsb.append(child.toString(spaces + 4, expansion - 1));\n\t\t\t\t}\n\t\t\t}\n\t\t\t// Print everything else\n\t\t\tfor (BusinessObject child : children.values()) {\n\t\t\t\tif (!child.isAttribute()) {\n\t\t\t\t\tsb.append(child.toString(spaces + 4, expansion - 1));\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn sb.toString();\n\t}", "public String toString() {\n\t\tStringBuffer buffer = new StringBuffer();\n\t\tbuffer.append(\"Files: \\n\");\n\n\t\tfor( String file : files){\n\t\t\tbuffer.append(\"\t-\");\n\t\t\tbuffer.append(file);\n\t\t\tbuffer.append(\"\\n\");\n\t\t}\n\n\t\tthis.appendIntValueToBuffer(this.regions, \"Regions\", buffer);\n\t\tthis.appendIntValueToBuffer(this.lineAdded, \"LA\", buffer);\n\t\tthis.appendIntValueToBuffer(this.lineDeleted, \"LD\", buffer);\n\n\t\tbuffer.append(\"Functions calls: \\n\");\n\n\t\tfor(String key : this.functionCalls.keySet()) {\n\t\t\tthis.appendIntValueToBuffer(functionCalls.get(key), key, buffer);\n\t\t}\n\n\t\treturn buffer.toString();\n\t}", "public void printMap()\r\n {\r\n\t\tint x = 0;\r\n for(Room[] row : rooms)\r\n {\r\n \tStringBuilder top = new StringBuilder(); // top row of room\r\n \tStringBuilder mid = new StringBuilder(); // mid row of room\r\n \tStringBuilder bot = null;\r\n \tif (x == row.length - 1) { // if the last row\r\n \t\tbot = new StringBuilder(); // bot row of room\r\n \t}\r\n \t\r\n for (Room room : row)\r\n {\r\n \tString roomStr = room.toString();\r\n top.append(roomStr.substring(0, 3)); // 0-3 top, 3-6, mid, 6-9 bot\r\n mid.append(roomStr.substring(3, 6)); \r\n if (x == row.length - 1) { //if the last row\r\n \tbot.append(roomStr.substring(6, 9)); //append the bot row\r\n }\r\n }\r\n // add new lines\r\n top.append('\\n');\r\n mid.append('\\n');\r\n \r\n System.out.print(top);\r\n System.out.print(mid);\r\n \r\n if (x == row.length - 1) {\r\n \tbot.append('\\n');\r\n \tSystem.out.print(bot);\r\n }\r\n x++;\r\n }\r\n }", "public static String getWindowLayoutAsString(DockingWindow window) {\n return getDockingWindowLayout(window, 0);\n }", "public String toDebugString(int depth) {\n\tStringBuffer buffer = new StringBuffer();\n\tfor (int i = 0; i &lt; depth; i++) {\n\t buffer.append('\\t');\n\t}\n\tbuffer.append(((JavaElement) getElement()).toDebugString());\n\ttoDebugString(buffer);\n\tIJavaElementDelta[] children = getAffectedChildren();\n\tif (children != null) {\n\t for (int i = 0; i &lt; children.length; ++i) {\n\t\tbuffer.append(\"\\n\"); //$NON-NLS-1$\n\t\tbuffer.append(((JavaElementDelta) children[i]).toDebugString(depth + 1));\n\t }\n\t}\n\tfor (int i = 0; i &lt; this.resourceDeltasCounter; i++) {\n\t buffer.append(\"\\n\");//$NON-NLS-1$\n\t for (int j = 0; j &lt; depth + 1; j++) {\n\t\tbuffer.append('\\t');\n\t }\n\t IResourceDelta resourceDelta = this.resourceDeltas[i];\n\t buffer.append(resourceDelta.toString());\n\t buffer.append(\"[\"); //$NON-NLS-1$\n\t switch (resourceDelta.getKind()) {\n\t case IResourceDelta.ADDED:\n\t\tbuffer.append('+');\n\t\tbreak;\n\t case IResourceDelta.REMOVED:\n\t\tbuffer.append('-');\n\t\tbreak;\n\t case IResourceDelta.CHANGED:\n\t\tbuffer.append('*');\n\t\tbreak;\n\t default:\n\t\tbuffer.append('?');\n\t\tbreak;\n\t }\n\t buffer.append(\"]\"); //$NON-NLS-1$\n\t}\n\tIJavaElementDelta[] annotations = getAnnotationDeltas();\n\tif (annotations != null) {\n\t for (int i = 0; i &lt; annotations.length; ++i) {\n\t\tbuffer.append(\"\\n\"); //$NON-NLS-1$\n\t\tbuffer.append(((JavaElementDelta) annotations[i]).toDebugString(depth + 1));\n\t }\n\t}\n\treturn buffer.toString();\n }", "@Override\n\tpublic String toString() {\n\t\tString result = \"\";\n\t\t\n\t\tfor(int i = 0; i < top; i++) {\n\t\t\tresult = result + stack[i].toString() + \"\\n\";\t//shouldn't it start at max --> 0 since its a stack\n\t\t}\n\t\t\n\t\treturn result;\n\t}", "public String toString() {\r\n return _toString(overallRoot);\r\n }", "@Override\n protected void prettyPrintChildren(PrintStream s, String prefix) {\n }", "@Override\n protected void prettyPrintChildren(PrintStream s, String prefix) {\n }", "@Override\n protected void prettyPrintChildren(PrintStream s, String prefix) {\n }", "public String toString(){\n String pileString = \"\";\n\n for(int i = 0; i < this.nbObj; i++)\n {\n pileString += i + \": \" + this.objTab[i].toString() + \"\\n\";\n }\n pileString += \"End of Stack\";\n return pileString;\n }", "public String toDebugString() {\n StringBuffer str = new StringBuffer(mySelf()+\"\\n\");\n return str.toString();\n }", "public String toString() {\n return (isRelative() ? \"\" : \"(not relative)\") + getName() + \": \" +\n getClassName();\n }", "public String toString() {\n if (root == null) {\n return (treeName + \" Empty tree\\n\");\n } else {\n String space = \"\";\n return treeName + \"\\n\" + toStringRecur(root.right, space) + \"\\n\" + root.element +\n \"[No Parent so sad]\" + toStringRecur(root.left, space) + \"\\n\";\n }\n }", "@Override\n public String toString() {\n StringBuilder sb = new StringBuilder();\n int startIndex = 0;\n while (startIndex < total - laneSize - 1) {\n startIndex = printOddLane(sb, startIndex);\n startIndex = printEvenLane(sb, startIndex + laneSize);\n }\n\n return sb.toString();\n }", "public void printGrid(){\n\t\tfor(int i=0;i<getHeight();i++){\n\t\t\tfor(int j=0;j<getWidth();j++){\n\t\t\t\tif(grid[i][j]==null)\n\t\t\t\t\tSystem.out.print(\"- \");\n\t\t\t\telse if(getGrid(i,j).isPath())\n\t\t\t\t\tSystem.out.print(\"1 \");\n\t\t\t\telse if(getGrid(i,j).isScenery())\n\t\t\t\t\tSystem.out.print(\"0 \");\n\t\t\t\telse\n\t\t\t\t\tSystem.out.print(\"? \");\n\t\t\t}\n\t\t\tSystem.out.println(\"\");\n\t\t}\n\t\tSystem.out.println();\n\t}", "public String toString() {\r\n return name + \" \" + height + \" \" + width + \" \" + depth + \" \" + weight;\r\n }", "@Override\n public String toString() {\n StringBuilder sb = new StringBuilder();\n sb.append(this.getName());\n sb.append(\"\\n name=\").append(this.getName());\n sb.append(\"\\n type=\").append(this.getType());\n sb.append(\"\\n parentType=\").append(this.getParentType());\n sb.append(\"\\n resourceUrl=\").append(this.getResourceUrl());\n sb.append(\"\\n restUrl=\").append(this.getRestUrl());\n sb.append(\"\\n soapUrl=\").append(this.getSoapUrl());\n sb.append(\"\\n thumbnailUrl=\").append(this.getThumbnailUrl());\n sb.append(\"\\n capabilities=\").append(this.getCapabilities());\n sb.append(\"\\n creator=\").append(this.getCreator());\n sb.append(\"\\n description=\").append(this.getDescription());\n sb.append(\"\\n keywords=\").append(this.getKeywords());\n if (this.getEnvelope() != null) {\n if (this.getEnvelope() instanceof EnvelopeN) {\n EnvelopeN envn = (EnvelopeN) this.getEnvelope();\n sb.append(\"\\n envelope=\");\n sb.append(envn.getXMin()).append(\", \").append(envn.getYMin()).append(\", \");\n sb.append(envn.getXMax()).append(\", \").append(envn.getYMax());\n if (envn.getSpatialReference() != null) {\n sb.append(\" wkid=\").append(envn.getSpatialReference().getWKID());\n }\n }\n }\n return sb.toString();\n }", "public String toString(){\n //KEY --------\n // WHITE WALL = WW\n // WHITE ROAD = WR\n // WHITE CAPSTONE = WC\n // BLACK WALL = BW\n // BLACK ROAD = BR\n // BLACK CAPSTONE = BC\n // EMPTY = \"blank\"\n\n StringBuilder builder = new StringBuilder();\n\n /*TOP ROW*/ builder.append(\"\\t\"); for(int i = 0; i < SIZE; i++){ builder.append(i + \"\\t\");} builder.append(\"\\n\\n\");\n /*REST OF THE ROWS*/ \n for(int x = 0; x < SIZE; x++){\n builder.append(x + \"\\t\");\n for(int y = 0; y < SIZE; y++){\n TakStack current = stacks[y][x]; \n if(!current.isEmpty()){\n builder.append(getPieceString(current.top()));\n }\n builder.append(\"\\t\");\n }\n builder.append(\"\\n\\n\");\n }\n\n\n //BUILDER RETURN\n return builder.toString();\n }", "@Override public String toString() {\n\t\tWBLeftistHeap<Node<T>> clonedHeap = new WBLeftistHeap<>(heap);\n\t\tString className = getClass().getSimpleName();\n\t\tStringJoiner sj = new StringJoiner(\",\",className+\"(\",\")\");\n\t\twhile(!clonedHeap.isEmpty()) {\n\t\t\tsj.add(clonedHeap.minElem().data.toString());\n\t\t}\n\t\treturn sj.toString();\n\t}", "public String show() {\n\t\t \t\tString result =\"\";\n\t\t \t\tGson gson = new Gson();\n\t\t \t\tfor(Olders o : collectionsOlders){\n\t\t\t\t\t\tresult+=gson.toJson(o,Olders.class) + \"\\n\";\n\n\n\t\t\t\t}\n\n\t\t\t\treturn result;\n\t\t }", "public String toString() { \r\n\t\tString Sresult = \"(\" + lChild.toString() + \" / \" + rChild.toString() + \")\";\r\n\t\treturn Sresult; \r\n\t}", "public String toDebugString() {\n StringBuffer str = new StringBuffer(mySelf()+\"\\n\");\n return super.toDebugString()+str.toString();\n }", "public String toString(int level) {\n\t\tStringBuilder builder = new StringBuilder();\n\t\tfor (int i = 0; i < level; i++) {\n\t\t\tbuilder.append(\"\\t\");\n\t\t}\n\t\tbuilder.append(getName()).append(\" (\").append(getWeight()).append(\") (\").append(getTotalWeight()).append(\")\\n\");\n\t\tfor (Program child : getChildren()) {\n\t\t\tbuilder.append(child.toString(level + 1));\n\t\t}\n\t\treturn (builder.toString());\n\t}", "public void printString()\r\n\t{\r\n\t\t//print the column labels\r\n\t\tSystem.out.printf(\"%-20s %s\\n\", \"Word\", \"Occurrences [form: (Paragraph#, Line#)]\");\r\n\t\tSystem.out.printf(\"%-20s %s\\n\", \"----\", \"-----------\");\r\n\t\troot.printString();\r\n\t}", "private void printFullTree()\r\n {\r\n System.out.println(fullXmlTree.toString());\r\n }", "public String pretty() {\n StringBuffer sb = new StringBuffer();\n for(int i =0;i<numOfVectors;i++){\n for (int j = 0; j < n; j++) {\n sb = j>0?sb.append(\", \"):sb.append(\"{\");\n sb.append(x[i][j].pretty());\n }\n sb= i+1==numOfVectors?sb.append(\"} \"):strict?sb.append(\"} < lex \"):sb.append(\"} <= lex \");\n }\n return sb.toString();\n }", "public String toString() {\n\t\tStringBuilder sb = new StringBuilder();\n\t\tfor (int key: levelOrder())\n\t\t\tsb.append (key + \" \");\n\t\treturn sb.toString ();\n\t}", "public String toString() {\n if(this.portletID != null) {\n return getEntityId(this.portletID, this.portletWindowName);\n } else {\n return this.portletWindowName;\n }\n }", "public String toString(){\r\n\t\treturn root.toString();\r\n\t}", "@Override\n public String toString() {\n String result = \"\";\n\n for (int position = 0; position < 64; position++) {\n if (position > 0) {\n if (position % 16 == 0) { // New level\n result += '|';\n } else if (position % 4 == 0) {\n result += ' '; // New row\n }\n }\n result += get(position);\n }\n return result;\n }", "public java.lang.String getWindowStatement() {\n java.lang.Object ref = windowStatement_;\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 windowStatement_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "public String toString() {\n\t\treturn root.toString();\n\t}", "@Override\n public String toString(){\n StringBuffer result = new StringBuffer();\n \n for (Movable m: things){\n result.append(m.toString()).append(\"\\n\");\n }\n return result.toString().trim();\n }", "public String toString()\r\n {\r\n String result = \"\";\r\n \r\n for (int index=0; index < top; index++) \r\n result = result + stack[index].toString() + \"\\n\";\r\n \r\n return result;\r\n }", "public String toString() {\n StringBuffer sb = new StringBuffer();\n sb.append(\"C{ \");\n for (int i = 0; i < classLoaders.length; i++) {\n if (i > 0) {\n sb.append(\", \");\n }\n sb.append(classLoaders[i]);\n }\n sb.append(\" }(parent=\");\n sb.append(getParent());\n sb.append(\")\");\n return sb.toString();\n }", "@Override\n public String toString() {\n StringBuilder sb = new StringBuilder();\n Stack<StackItem> stack = new Stack<>();\n List<MenuItem> items = this.items;\n Collections.reverse(items);\n for (MenuItem i : items) {\n stack.push(new StackItem(i, 0));\n }\n while (stack.size() != 0) {\n StackItem stackItem = stack.pop();\n sb.append(this.getMenuItemRepresentation(stackItem.getMenuItem().toString(), stackItem.getLevel()));\n List<MenuItem> childs = stackItem.getMenuItem().getChilds();\n Collections.reverse(childs);\n for (MenuItem child : childs) {\n stack.push(new StackItem(child, stackItem.getLevel() + 1));\n }\n }\n return sb.toString();\n }", "private void showFullMenu() {\n final Menu[] menu = MenuFactory.showMenu();\n System.out.println(\"Food_Id\" + \"\\t\" + \"Food_Name\" + \"\\t\" + \"Price\" + \"\\t\" + \"Prepration_Time\");\n for (final Menu m : menu) {\n System.out.println(m.getFoodId() + \"\\t\" + m.getFoodName() + \"\\t\" + m.getPrice() + \"\\t\" + m.getPreprationTime());\n }\n }", "public void printTopView() {\r\n\t\tfinal ArrayList<Integer> nodeDataList = new ArrayList<>();\r\n\r\n\t\tgetLeftChildren(rootNode.left, nodeDataList);\r\n\t\tnodeDataList.add(rootNode.data);\r\n\t\tgetRightChildren(rootNode.right, nodeDataList);\r\n\r\n\t\tSystem.out.println(\"Printing Top View\");\r\n\r\n\t\tnodeDataList.forEach(nodeData -> {\r\n\t\t\tSystem.out.print(nodeData + \" \");\r\n\t\t});\r\n\t}" ]
[ "0.5810363", "0.56393963", "0.5624088", "0.55344135", "0.5496104", "0.54794306", "0.5450129", "0.5235794", "0.51726097", "0.5166431", "0.5133234", "0.5081261", "0.5076566", "0.505481", "0.50503373", "0.5025347", "0.50197196", "0.5017841", "0.49907383", "0.49689052", "0.49519542", "0.49507058", "0.49503523", "0.49224797", "0.49151835", "0.4894377", "0.4892123", "0.4882474", "0.4851529", "0.48504546", "0.48489404", "0.48380023", "0.48333913", "0.48300257", "0.4827457", "0.48175365", "0.48175365", "0.47663733", "0.4764783", "0.47606006", "0.47425994", "0.47350827", "0.4735081", "0.47328195", "0.47229362", "0.47227046", "0.4712671", "0.4708569", "0.47016233", "0.46958616", "0.46956375", "0.46926415", "0.4687695", "0.467359", "0.46665987", "0.46641836", "0.46535346", "0.4651182", "0.46485537", "0.46440622", "0.4633853", "0.46294424", "0.46264133", "0.46231028", "0.46214145", "0.46135572", "0.45983914", "0.45960742", "0.4595443", "0.4595443", "0.4595443", "0.45951784", "0.45939928", "0.45837831", "0.4579586", "0.45790595", "0.4577252", "0.45734134", "0.4565518", "0.45638922", "0.45512366", "0.45478088", "0.45397493", "0.45374724", "0.45330137", "0.45321244", "0.4531938", "0.45305574", "0.4528729", "0.45264456", "0.45260733", "0.45243627", "0.45200473", "0.45186672", "0.4518645", "0.45139524", "0.45083925", "0.45068496", "0.44981867", "0.44966096" ]
0.7640026
0
/ Debug timing of waiting for tree long start = System.nanoTime(); doWaitForTableModel(model); long end = System.nanoTime(); Msg.out( "waitForTable() " + TimeUnit.MILLISECONDS.convert(end start, TimeUnit.NANOSECONDS));
public static <T> void waitForTableModel(ThreadedTableModel<T, ?> model) { doWaitForTableModel(model); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private static <T> void doWaitForTableModel(ThreadedTableModel<T, ?> model) {\n\t\twaitForSwing();\n\n\t\tboolean didWait = false;\n\t\tint waitTime = 0;\n\t\twhile (model.isBusy()) {\n\t\t\tdidWait = true;\n\t\t\twaitTime += sleep(DEFAULT_WAIT_DELAY);\n\n\t\t\t// model loading may take longer than normal waits\n\t\t\tif (waitTime >= PRIVATE_LONG_WAIT_TIMEOUT) {\n\t\t\t\tMsg.error(AbstractDockingTest.class, createStackTraceForAllThreads()); // debug\t\t\t\t\n\t\t\t\tString busyState = getBusyState(model);\n\t\t\t\tMsg.error(AbstractDockingTest.class, busyState);\n\t\t\t\tthrow new AssertException(\n\t\t\t\t\t\"Timed-out waiting for table model to load in \" + waitTime + \"ms\");\n\t\t\t}\n\t\t}\n\n\t\twaitForSwing();\n\n\t\tif (didWait) {\n\t\t\t// try again (the idea is that we may have had a small window where the model was\n\t\t\t// not busy, but more work may be pushed on)\n\t\t\twaitForTableModel(model);\n\t\t}\n\t}", "@Test\n public void testB_TtableInfo() {\n int rowCount = menuTable.getColumns().size();\n assertNotNull(rowCount);\n //Click on row 0\n Node row = lookup(\".table-row-cell\").nth(0).query();\n assertNotNull(\"Row is null: table has not that row. \", row);\n clickOn(row);\n //verifyThat(nodeQuery, nodeMatcher);\n }", "public void handleLabTestUpdate() {\r\n SwingUtilities.invokeLater(new Runnable() {\r\n public void run() {\r\n tableModel.fireTableDataChanged();\r\n }\r\n });\r\n }", "private void jButtonFillTableActionPerformed(java.awt.event.ActionEvent evt) {\n SwingWorkerDemo worker = new SwingWorkerDemo( jBusyTable.getBusyModel() , (DefaultTableModel)jXTable.getModel() );\n\n // Start the worker\n worker.execute();\n }", "@Test\r\n public void testCellForRowAtIndex() {\r\n assertTrue(ConditionWait.tillGlobalTime(new ConditionWait.Condition() {\r\n @Override\r\n public boolean check() {\r\n return XIBTestTableViewLabelTexFieldViewController.testCellForRowAtIndex;\r\n }\r\n }));\r\n }", "public static void waitForTree(GTree gTree) {\n\t\tdoWaitForTree(gTree);\n\t}", "public void runModel(){\n\t\tcurrentView.getDynamicModelView().getModel().setProgressMonitor(progressMonitor);\r\n\t\tnew Thread(currentView.getDynamicModelView().getModel()).start();\r\n\r\n\t\tsetStatusBarText(\"Ready\");\r\n\t}", "@Test(expected = Test.None.class)\r\n\tpublic void testTableChanged() throws Exception{\r\n\t\tTableModelEvent e = new TableModelEvent(tableModel,2,2,2);\r\n\t\tModel m = new Model(0, \"trainName\", \"pathUnique\", false, fileType);\r\n\t\tModel m1 = new Model(0, \"trainName1\", \"pathUnique1\", true, fileType);\r\n\t\tModel m2 = new Model(0, \"trainName2\", \"pathUnique2\", false, fileType);\r\n\r\n\t\tfm.add(m);\r\n\t\tfm.add(m1);\r\n\t\tfm.add(m2);\r\n\t\t\r\n\t\ttrainSetListener.setLock();\r\n\t\tByteArrayOutputStream outContent = new ByteArrayOutputStream();\r\n\t System.setErr(new PrintStream(outContent));\r\n\t\ttrainSetListener.tableChanged(e);\r\n\t assertEquals(0, outContent.toString().length());\r\n\t\t\r\n\t\t\r\n\t\ttrainSetListener.unsetLock();\r\n\t\toutContent = new ByteArrayOutputStream();\r\n\t System.setErr(new PrintStream(outContent));\r\n\t\ttrainSetListener.tableChanged(e);\r\n\t assertEquals(0, outContent.toString().length());\r\n\t\t\r\n\t\t\r\n\t\toutContent = new ByteArrayOutputStream();\r\n\t System.setErr(new PrintStream(outContent));\r\n\t trainSetListener.tableChanged(null);\r\n\t assertTrue(outContent.toString().contains(\"\"\r\n\t \t\t+ \"java.lang.NullPointerException\"));\r\n\t}", "public void testDb() {\n // \"Databases\"\n String databasesLabel = Bundle.getString(\"org.netbeans.modules.db.explorer.node.Bundle\", \"RootNode_DISPLAYNAME\");\n Node databasesNode = new Node(RuntimeTabOperator.invoke().getRootNode(), databasesLabel);\n // \"Please wait...\"\n String waitNodeLabel = Bundle.getString(\"org.openide.nodes.Bundle\", \"LBL_WAIT\");\n // wait until the wait node dismiss and after that start waiting for Drivers node\n // (see issue http://www.netbeans.org/issues/show_bug.cgi?id=43910 - Creation of \n // children under Databases node is not properly synchronized)\n try {\n databasesNode.waitChildNotPresent(waitNodeLabel);\n } catch (JemmyException e) {\n // Ignore and try to continue. Sometimes it happens \"Please, wait\" node\n // is still available (maybe some threading issue).\n log(\"Timeout expired: \" + e.getMessage());\n }\n // \"Drivers\"\n String driversLabel = Bundle.getString(\"org.netbeans.modules.db.explorer.node.Bundle\", \"DriverListNode_DISPLAYNAME\");\n Node driversNode = new Node(RuntimeTabOperator.invoke().getRootNode(), databasesLabel + \"|\" + driversLabel);\n // \"Add Driver ...\"\n String addDriverItem = Bundle.getString(\"org.netbeans.modules.db.explorer.action.Bundle\", \"AddNewDriver\");\n // open a dialog to add a new JDBC driver\n new ActionNoBlock(null, addDriverItem).perform(driversNode);\n String addDriverTitle = Bundle.getString(\"org.netbeans.modules.db.explorer.dlg.Bundle\", \"AddDriverDialogTitle\");\n new NbDialogOperator(addDriverTitle).cancel();\n\n // wait until the wait node dismiss and after that start waiting for JDBC_ODBC Bridge node\n // (see issue http://www.netbeans.org/issues/show_bug.cgi?id=43910 - Creation of \n // children under Databases node is not properly synchronized)\n try {\n driversNode.waitChildNotPresent(waitNodeLabel);\n } catch (JemmyException e) {\n // Ignore and try to continue. Sometimes it happens \"Please, wait\" node\n // is still available (maybe some threading issue).\n log(\"Timeout expired: \" + e.getMessage());\n }\n // node Java DB (Embedded) should be present always\n Node javaDBNode = new Node(driversNode, \"Java DB (Embedded\"); // NOI18N\n // open a dialog to create a new connection\n new ActionNoBlock(null, \"Connect Using...\").perform(javaDBNode);\n // \"New Connection Wizard\"\n String connectionDialogTitle = Bundle.getString(\"org.netbeans.modules.db.explorer.dlg.Bundle\", \"PredefinedWizard.WizardTitle\");\n new NbDialogOperator(connectionDialogTitle).cancel();\n }", "public void refreshOntTreeTable() {\n\t\tJTree changeTree = ontChangeTT.getTree();\r\n\t\tTreeTableNode rootNode = (TreeTableNode) changeTree.getModel().getRoot();\r\n\t\trootNode.children = new Vector();\r\n\t\tthis.ontChangeEdPane.setText(\"\");\r\n\t\t\r\n\t\t// populate node tree\r\n\t\tfor (Iterator changeIter = ontChanges.iterator(); changeIter.hasNext();) {\r\n\t\t\tSwoopChange swc = (SwoopChange) changeIter.next();\r\n\t\t\t\r\n\t\t\t// skip checkpoint related changes\r\n\t\t\tif (!swc.isCheckpointRelated /*&& swc.isCommitted*/) {\r\n\t\t\t\tTreeTableNode changeNode = new TreeTableNode(swc);\r\n\t\t\t\trootNode.addChild(changeNode);\t\t\t\t\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tontChangeTT.getTree().updateUI();\r\n\t\tthis.refreshUI();\t\t\r\n\t}", "public void run() {\n\t\t\t//\t\n\t\t\tlong start = System.currentTimeMillis();\n\t\t\tint no = 0;\n\t\t\tdataSql = getSQL();\n\t\t\t//\tRow\n\t\t\tint row = 0;\n\t\t\t//\tDelete Row\n\t\t\tdetail.setRowCount(row);\n\t\t\ttry {\n\t\t\t\tm_pstmt = getStatement(dataSql);\n\t\t\t\tlog.fine(\"Start query - \"\n\t\t\t\t\t\t+ (System.currentTimeMillis() - start) + \"ms\");\n\t\t\t\tm_rs = m_pstmt.executeQuery();\n\t\t\t\tlog.fine(\"End query - \" + (System.currentTimeMillis() - start)\n\t\t\t\t\t\t+ \"ms\");\n\t\t\t\t//\tLoad Table\n\t\t\t\trow = detail.loadTable(m_rs);\n\t\t\t} catch (SQLException e) {\n\t\t\t\tlog.log(Level.SEVERE, dataSql, e);\n\t\t\t}\n\t\t\tclose();\n\t\t\t//\n\t\t\t//no = detail.getRowCount();\n\t\t\tlog.fine(\"#\" + no + \" - \" + (System.currentTimeMillis() - start)\n\t\t\t\t\t+ \"ms\");\n\t\t\tdetail.autoSize();\n\t\t\t//\n\t\t\tm_frame.setCursor(Cursor.getDefaultCursor());\n\t\t\tsetStatusLine(\n\t\t\t\t\tInteger.toString(no) + \" \"\n\t\t\t\t\t\t\t+ Msg.getMsg(Env.getCtx(), \"SearchRows_EnterQuery\"),\n\t\t\t\t\tfalse);\n\t\t\tsetStatusDB(Integer.toString(no));\n\t\t\tif (no == 0)\n\t\t\t\tlog.fine(dataSql);\n\t\t\telse {\n\t\t\t\tdetail.getSelectionModel().setSelectionInterval(0, 0);\n\t\t\t\tdetail.requestFocus();\n\t\t\t}\n\t\t\tisAllSelected = isSelectedByDefault();\n\t\t\tselectedRows(detail);\n\t\t\t//\tSet Collapsed\n\t\t\tif(row > 0)\n\t\t\t\tcollapsibleSearch.setCollapsed(isCollapsibleByDefault());\n\t\t}", "@Test(timeout = 4000)\n public void test61() throws Throwable {\n NameSpec nameSpec0 = NameSpec.IF_REPRODUCIBLE;\n DefaultDBTable defaultDBTable0 = new DefaultDBTable();\n String[] stringArray0 = new String[7];\n stringArray0[0] = \"org.h2.index.PageBtreeLeaf\";\n stringArray0[1] = \"org.h2.index.PageBtreeLeaf\";\n stringArray0[2] = \"org.h2.index.PageBtreeLeaf\";\n stringArray0[4] = \"org.h2.index.PageBtreeLeaf\";\n stringArray0[5] = \"org.h2.index.PageBtreeLeaf\";\n stringArray0[6] = \"org.h2.index.PageBtreeLeaf\";\n DBPrimaryKeyConstraint dBPrimaryKeyConstraint0 = new DBPrimaryKeyConstraint(defaultDBTable0, \"org.h2.index.PageBtreeLeaf\", true, stringArray0);\n dBPrimaryKeyConstraint0.setTable(defaultDBTable0);\n MockPrintWriter mockPrintWriter0 = new MockPrintWriter(\"org.h2.index.PageBtreeLeaf\");\n SQLUtil.renderCreateTable(defaultDBTable0, false, nameSpec0, mockPrintWriter0);\n assertNull(defaultDBTable0.getDoc());\n }", "private void waitTableBuffering(String legend){\n final WebElement res = this.driver.findElement(By.id(\"Res\"));\n this.driverWaitTime.until(ExpectedConditions.textToBePresentInElement(res, legend));\n }", "private void runWork()\r\n\t{\r\n\t\tRunnable transferPending = new Runnable()\r\n\t\t{\r\n\r\n\t\t\tpublic void run()\r\n\t\t\t{\r\n\t\t\t\ttransferPendingCellData();\r\n\t\t\t\tfireTableDataChanged(); // causes the table to be updated\r\n\t\t\t}\r\n\t\t};\r\n\r\n\t\twhile(noStopRequested)\r\n\t\t{\r\n\t\t\ttry\r\n\t\t\t{\r\n\t\t\t\t// refresh the plans vector\r\n\t\t\t\tplans = new java.util.LinkedList(Control.getInstance().getPlanObjects());\r\n\t\t\t\tcreatePendingCellData();\r\n\t\t\t\tSwingUtilities.invokeAndWait(transferPending);\r\n\t\t\t\tThread.sleep(2000L); // the REFRESH rate is set at two seconds\r\n\t\t\t}catch(InvocationTargetException tx)\r\n\t\t\t{\r\n\t\t\t\tlogger.error(\"runWork - InvocationTargetException building cell data: \", tx);\r\n\t\t\t\tstopRequest();\r\n\t\t\t}catch(InterruptedException x)\r\n\t\t\t{\r\n\t\t\t\tThread.currentThread().interrupt();\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t}", "@Test\n public void f10ModelPerformanceTest() {\n clickOn(\"#assetTypeMenuBtn\").sleep(1000);\n\n //select first asset type\n Node node = lookup(\"#columnName\").nth(1).query();\n clickOn(node).sleep(1000);\n\n //go to model tab\n clickOn(scene.getRoot().lookup(\"#modelTab\")).sleep(1000);\n\n //Modify sliders\n Slider trainSlider = (Slider) scene.getRoot().lookup(\"#trainSlider\");\n clickOn(trainSlider);\n type(KeyCode.TAB).type(KeyCode.RIGHT);\n type(KeyCode.TAB).type(KeyCode.RIGHT);\n moveBy(0, 10).clickOn().sleep(500).moveBy(0, 100).scroll(80, VerticalDirection.UP);\n\n FlowPane models = (FlowPane) scene.getRoot().lookup(\"#modelsThumbPane\");\n Pane additiveRegModel = (Pane) models.getChildren().get(5);\n Button evalButton = (Button) additiveRegModel.getChildren().get(additiveRegModel.getChildren().size() - 1);\n\n Text rmse = (Text) additiveRegModel.getChildren().get(additiveRegModel.getChildren().size() - 2);\n clickOn(rmse).sleep(3000);\n String oldRmseVal = rmse.getText();\n int i = 0;\n\n clickOn(evalButton);\n //incrementally check for 30 seconds to see if rmse has been updated\n do {\n if (rmse.getText().equals(oldRmseVal)) {\n sleep(2000);\n } else {\n break;\n }\n } while (++i < 15);\n\n clickOn(rmse).sleep(3000);\n\n assertNotNull(\"Evaluate button exists\", evalButton);\n assertNotNull(\"RMSE exists\", rmse);\n assertFalse(\"Assert current RMSE is different than old RMSE\", rmse.getText().equals(oldRmseVal));\n }", "private void initializeTableNodes(final TableNode tableNode,\n\t\t\tfinal Element schemataElement) {\n\t\tif (tableNode.getColumnNodeList() == null) {\n\t\t\tinitializationProgress++;\n\t\t\ttableNode.addPropertyChangeListener(new PropertyChangeListener() {\n\t\t\t\tpublic void propertyChange(PropertyChangeEvent evt) {\n\t\t\t\t\tString property = evt.getPropertyName();\n\t\t\t\t\tif (property.equals(AbstractNode.NODE_CHILDREN_MODIFIED)\n\t\t\t\t\t\t\t&& !(evt.getNewValue() instanceof WaitingNode)) {\n\t\t\t\t\t\tinitializationProgress--;\n\t\t\t\t\t\tif (initializationProgress == 0) {\n\t\t\t\t\t\t\tDisplay.getDefault().asyncExec(new Runnable() {\n\t\t\t\t\t\t\t\tpublic void run() {\n\t\t\t\t\t\t\t\t\tdoRestore(schemataElement);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t});\n\t\t\ttableNode.getColumnNodeList(true);\n\t\t}\n\t}", "public void doUpdateTable() {\r\n\t\tlogger.info(\"Actualizando tabla books\");\r\n\t\tlazyModel = new LazyBookDataModel();\r\n\t}", "public void loadingTable() {\n this.setRowCount(1, true);\r\n this.setVisibleRangeAndClearData(this.getVisibleRange(), true);\r\n }", "private void refresh() {\n\t\t\tRunnable run = new Runnable() {\n\t\t\t\tpublic void run() {\n\t\t\t\t\tif(table.isDisposed())return;\n\t\t\t\t\tviewer.refresh();\n\t\t\t\t}\t\t\t\n\t\t\t};\n\t\t\tDisplay.getDefault().asyncExec(run);\n\t\t}", "public DebugTableModel() {\r\n }", "private void loadTable() {\n model.getDataVector().removeAllElements();\n model.fireTableDataChanged();\n try {\n String sql = \"select * from tb_mahasiswa\";\n Statement n = a.createStatement();\n ResultSet rs = n.executeQuery(sql);\n while (rs.next()) {\n Object[] o = new Object[6];\n o[0] = rs.getString(\"id_mahasiswa\");\n o[1] = rs.getString(\"nama\");\n o[2] = rs.getString(\"tempat\");\n o[3] = rs.getString(\"waktu\");\n o[4] = rs.getString(\"status\");\n model.addRow(o);\n }\n } catch (Exception e) {\n }\n }", "private CommandResult viewTimetable() {\n timetable.executeView();\n logger.log(Level.INFO, \"User has printed timetable\");\n return new CommandResult(\"Timetable has been printed above\");\n }", "private void UpdateTable() {\n\t\t\t\t\n\t\t\t}", "protected void done() {\n logoPanel.stop();\n qtf.setCursor(normalCursor);\n searchButton.setEnabled(true);\n\n boolean isStatusOK = false;\n try {\n isStatusOK = get();\n } catch (Exception e) {\n }\n\n if (isStatusOK) {\n Thread tableFill = new Thread(msb_qtm);\n tableFill.start();\n\n try {\n tableFill.join();\n } catch (InterruptedException iex) {\n logger.warn(\"Problem joining tablefill thread\");\n }\n\n synchronized (this) {\n Thread projectFill = new Thread(\n qtf.getProjectModel());\n projectFill.start();\n try {\n projectFill.join();\n } catch (InterruptedException iex) {\n logger.warn(\"Problem joining projectfill thread\");\n }\n\n qtf.initProjectTable();\n }\n\n msb_qtm.setProjectId(\"All\");\n qtf.setColumnSizes();\n qtf.resetScrollBars();\n logoPanel.stop();\n qtf.setCursor(normalCursor);\n\n if (queryTask != null) {\n queryTask.cancel();\n }\n\n qtf.setQueryExpired(false);\n String queryTimeout = System.getProperty(\n \"queryTimeout\");\n System.out.println(\"Query expiration: \"\n + queryTimeout);\n Integer timeout = new Integer(queryTimeout);\n if (timeout != 0) {\n // Conversion from minutes of milliseconds\n int delay = timeout * 60 * 1000;\n queryTask = OMPTimer.getOMPTimer().setTimer(\n delay, infoPanel, false);\n }\n }\n }", "public void waitForBeginOfVerticalBlank();", "private void doDBProcessing() throws InterruptedException {\n\t\tThread.sleep(5000);\r\n\t\t\r\n\t}", "@Test(timeout = 4000)\n public void test061() throws Throwable {\n DBSchema dBSchema0 = new DBSchema(\"1?o)b59l\");\n List<DBTable> list0 = DBUtil.dependencyOrderedTables(dBSchema0);\n assertTrue(list0.isEmpty());\n }", "@Test\n public void testPerformance1() throws Exception {\n SchemaModel sm;\n //\n // sm = Util.loadSchemaModel2(\"resources/performance2/A.xsd\"); // NOI18N\n sm = Util.loadSchemaModel2(\"resources/performance2.zip\", \"A.xsd\"); // NOI18N\n //\n // Wait 1 second till all models are loaded and validated\n Thread.sleep(1000);\n //\n assertTrue(sm.getState() == State.VALID);\n //\n assertTrue(sm instanceof SchemaModelImpl);\n SchemaModelImpl smImpl = SchemaModelImpl.class.cast(sm);\n GlobalComponentsIndexSupport indexSupport = smImpl.getGlobalComponentsIndexSupport();\n assertNotNull(indexSupport != null);\n GlobalComponentsIndexSupport.JUnitTestSupport testSupport =\n indexSupport.getJUnitTestSupport();\n assertNotNull(testSupport != null);\n //\n // Initiate index building\n GlobalElement found = sm.findByNameAndType(\"A000\", GlobalElement.class);\n assertNotNull(found);\n Thread.sleep(500); // Wait the index is build\n //\n DecimalFormat format = new DecimalFormat(\"000\");\n //\n long before = System.nanoTime();\n for (int index = 0; index < 1000; index++) {\n String localName = \"A\" + format.format(index);\n found = sm.findByNameAndType(localName, GlobalElement.class);\n assertNotNull(found);\n }\n long after = System.nanoTime();\n long delay = (after - before) / 1000000;\n assertTrue(\"Delay=\" + delay, delay < 50L);\n System.out.println(\"Execution with index = \" + delay + \" ms\"); // NOI18N\n //\n testSupport.setIndexAllowed(false);\n before = System.nanoTime();\n for (int index = 0; index < 1000; index++) {\n String localName = \"A\" + format.format(index);\n found = sm.findByNameAndType(localName, GlobalElement.class);\n assertNotNull(found);\n }\n //\n after = System.nanoTime();\n delay = (after - before) / 1000000;\n assertTrue(\"Delay=\" + delay, delay < 1000L);\n System.out.println(\"Execution without index = \" + delay + \" ms\"); // NOI18N\n //\n System.out.println(\"=============LOG=============\"); // NOI18N\n String log = testSupport.printLog();\n System.out.print(log);\n System.out.println(\"=============================\"); // NOI18N\n //\n }", "@FXML // This method is configure from fxml file\n private void onOKButtonClick() {\n Toggle selectedToggle = this.toggleGroup.getSelectedToggle();\n boolean showPane = true;\n\n if (selectedToggle == this.networkNodeAtButton) {\n // Get the result for all node in a specific time to show in the table.\n List<NodeSimulationResult> nodeResultInTime = this.resultSimulation.getNodeResultsInTime(this.timesComboBox.getValue());\n fillTableWithNodeResult(nodeResultInTime, false);\n } else if (selectedToggle == this.networkLinkAtButton) {\n // Get the result for all links in a specific time to show in the table.\n List<LinkSimulationResult> linkResultInTime = this.resultSimulation.getLinkResultInTime(this.timesComboBox.getValue());\n fillTableWithLinkResult(linkResultInTime, false);\n } else {\n // Get the result for a specific node in each period.\n String id = this.idTextField.getText();\n if (selectedToggle == this.timeSeriesNodeButton) {\n List<NodeSimulationResult> timeSeriesForNode = this.resultSimulation.getTimeSeriesForNode(id);\n if (!timeSeriesForNode.isEmpty()){\n fillTableWithNodeResult(timeSeriesForNode, true);\n } else{\n LOGGER.debug(\"There is no node '{}' to show the hydraulic results.\", id);\n CustomDialogs.showDialog(\"Error\", \"\", \"There is no node \" + id, Alert.AlertType.ERROR, this.window);\n showPane = false;\n }\n } else if (selectedToggle == this.timeSeriesLinkButton) {\n // Get the result for a specific links in each period.\n\n List<LinkSimulationResult> timeSeriesForLink = this.resultSimulation.getTimeSeriesForLink(id);\n if (!timeSeriesForLink.isEmpty()){\n fillTableWithLinkResult(timeSeriesForLink,true);\n }else {\n LOGGER.debug(\"There is no link '{}' to show the hydraulic results.\", id);\n CustomDialogs.showDialog(\"Error\", \"\", \"There is no link \" + id, Alert.AlertType.ERROR, this.window);\n showPane = false;\n }\n }\n }\n if (showPane){\n this.tablePane.setManaged(true);\n this.tablePane.setVisible(true);\n this.window.sizeToScene();\n }\n }", "private void fillTableWithNodeResult(List<NodeSimulationResult> results, boolean showAsTimeSerie) {\n TableView<NodeSimulationResult> table = new TableView<>();\n table.getItems().clear();\n table.getItems().addAll(results);\n TableColumn<NodeSimulationResult,String> idOrTimeCol;\n TableColumn<NodeSimulationResult,String> demandCol = new TableColumn<>(\"Demand\");\n TableColumn<NodeSimulationResult,String> headCol = new TableColumn<>(\"Head\");\n TableColumn<NodeSimulationResult,String> pressureCol = new TableColumn<>(\"Pressure\");\n TableColumn<NodeSimulationResult,String> qualityCol = new TableColumn<>(\"Quality\");\n\n if (!showAsTimeSerie){\n idOrTimeCol = new TableColumn<>(\"Node ID\");\n idOrTimeCol.setCellValueFactory(param -> new ReadOnlyObjectWrapper<>(param.getValue().getId()));\n } else {\n idOrTimeCol = new TableColumn<>(\"Time\");\n idOrTimeCol.setCellValueFactory(param -> new ReadOnlyObjectWrapper<>(param.getValue().getTimeString()));\n }\n demandCol.setCellValueFactory(param -> new ReadOnlyObjectWrapper<>(Double.toString(param.getValue().getDemand())));\n headCol.setCellValueFactory(param -> new ReadOnlyObjectWrapper<>(Double.toString(param.getValue().getHead())));\n pressureCol.setCellValueFactory(param -> new ReadOnlyObjectWrapper<>(Double.toString(param.getValue().getPressure())));\n qualityCol.setCellValueFactory(param -> new ReadOnlyObjectWrapper<>(Double.toString(param.getValue().getQuality())));\n\n table.getColumns().clear();\n table.getColumns().addAll(idOrTimeCol, demandCol, headCol, pressureCol, qualityCol);\n this.tablePane.getChildren().clear(); // remove the previus table\n this.tablePane.getChildren().addAll(table);\n }", "@Override\n public void tableChanged(final TableModelEvent e) {\n SwingUtilities.invokeLater(new Runnable() {\n @Override\n public void run() {\n int viewRow = jTableImportMonitor.convertRowIndexToView(e.getFirstRow());\n jTableImportMonitor.scrollRectToVisible(jTableImportMonitor.getCellRect(viewRow, 0, true)); \n }\n });\n }", "public static void main(String[] args) {\n\t\tSystem.setProperty(\"webdriver.chrome.driver\", \"C:/Automation/Drivers/chromedriver.exe\");\r\n\r\n\t\tChromeDriver driver = new ChromeDriver();\r\n\r\n\t\tdriver.manage().timeouts().implicitlyWait(20, TimeUnit.SECONDS);\r\n\r\n\t\tdriver.get(\"http://www.leafground.com/pages/table.html\");\r\n\t\tdriver.manage().window().maximize();\r\n\t\t//get table and store in web element\r\n\t\tWebElement leafgroundstable = driver.findElementByXPath(\"//table[@id='table_id']\");\r\n\t\t//find the number of rows and store in list\r\n\t\tList<WebElement> totalrows = leafgroundstable.findElements(By.tagName(\"tr\"));\r\n\t\tSystem.out.println(\"total row count: \"+totalrows.size());\r\n\t\tWebElement firstrow = totalrows.get(1);\r\n\r\n\r\n\t\tList<WebElement> allcolumns = firstrow.findElements(By.tagName(\"td\"));\r\n\r\n\r\n\t\tSystem.out.println(\"total column count: \"+allcolumns.size());\r\n\r\n\t\t// Get the progress value of 'Learn to interact with Elements' and store it in a variable\r\n\t\t//\t\tfor (WebElement currentrow : totalrows) \r\n\t\t//\t\t{\r\n\t\t//\t\t\tList<WebElement> currentcolvals = currentrow.findElements(By.tagName(\"td\"));\r\n\t\t//\r\n\t\t//\t\t\tfor(int i=0;i<currentcolvals.size();i++)\r\n\t\t//\t\t\t{\r\n\t\t//\t\t\t\tString columntxtvalue = currentcolvals.get(i).getText();\r\n\t\t//\t\t\t\t\r\n\t\t//\t\t\t\tif(columntxtvalue.equalsIgnoreCase(\"Learn to interact with Elements\"))\r\n\t\t//\t\t\t\t{\r\n\t\t//\t\t\t\t\tSystem.out.println(\"Progress Value is : \"+currentcolvals.get(1).getText());\r\n\t\t//\t\t\t\t}\r\n\t\t//\t\t\t}\r\n\r\n\t\t//learn to interact with key board val\r\n\t\tfor (WebElement currentrow : totalrows) \r\n\t\t{\r\n\t\t\tList<WebElement> currentcolvals = currentrow.findElements(By.tagName(\"td\"));\r\n\r\n\t\t\tfor(int i=0;i<currentcolvals.size();i++)\r\n\t\t\t{\r\n\t\t\t\tString columntxtvalue = currentcolvals.get(i).getText();\r\n\r\n\t\t\t\tif(columntxtvalue.equalsIgnoreCase(\"Learn to interact using Keyboard, Actions\"))\r\n\t\t\t\t{\r\n\t\t\t\t\tSystem.out.println(\"Progress Value is : \"+currentcolvals.get(1).getText());\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\t// Find the vital task for the least completed progress and check the box\r\n\r\n//\t\t\tString[]progressvalues = null;\r\n//\r\n//\t\t\tfor (WebElement currentrow: totalrows) {\r\n//\r\n//\t\t\t\tList<WebElement> currentcolvals = currentrow.findElements(By.tagName(\"td\"));\r\n//\r\n//\t\t\t\tString text = currentcolvals.get(2).getText();\t\r\n//\t\t\t\tfor (int i = 0; i <totalrows.size(); i++) {\r\n//\t\t\t\t\tprogressvalues[i]=currentcolvals.get(1).getText();\r\n//\t\t\t\t\t\r\n//\t\t\t\t}\r\n//\t\t\t\tArrays.sort(progressvalues);\r\n//\t\t\t\t\r\n//\t\t\t\tfor(int j = 0;j<currentcolvals.size();j++)\r\n//\t\t\t\t{\r\n//\t\t\t\t\tString columntxtvalue = currentcolvals.get(j).getText();\r\n//\t\t\t\t\tif(columntxtvalue.equalsIgnoreCase(progressvalues[0]))\r\n//\t\t\t\t\t{\r\n//\t\t\t\t\t\tSystem.out.println(currentcolvals.get(2).isEnabled());\r\n//\t\t\t\t\t}\r\n//\t\t\t\t}\r\n\t\t\r\n\t WebElement progres = driver.findElementByXPath(\"//tr[i]//td[i]\");\r\n\t String interaction = progres.getText();\r\n\t\tString regex = null;\r\n\t\tString replacement = null;\r\n\t\tString replaceAll = interaction.replaceAll(regex, replacement);\r\n\t System.out.println(replaceAll);\r\n\t\t\t}", "public static void waitForEDT() {\n\t\ttry {\n\t\t\tSwingUtilities.invokeAndWait(() -> {});\n\t\t} catch (InvocationTargetException | InterruptedException e) {\n\t\t\tthrow new RuntimeException(e);\n\t\t}\n\t}", "public TablesPanel() {\n\n tableModel = new TablesTableModel(); \n matchesModel = new MatchesTableModel();\n gameChooser = new GameChooser();\n\n initComponents();\n // tableModel.setSession(session);\n\n // formater\n // change default just now from 60 to 30 secs\n // see workaround for 4.0 versions: https://github.com/ocpsoft/prettytime/issues/152\n TimeFormat timeFormat = timeFormater.removeUnit(JustNow.class);\n JustNow newJustNow = new JustNow();\n newJustNow.setMaxQuantity(1000L * 30L); // 30 seconds gap (show \"just now\" from 0 to 30 secs)\n timeFormater.registerUnit(newJustNow, timeFormat);\n\n // 1. TABLE CURRENT\n tableTables.createDefaultColumnsFromModel();\n ((MageTable)tableTables).setTableInfo(tableInfo);\n \n activeTablesSorter = new MageTableRowSorter(tableModel) {\n @Override\n public void toggleSortOrder(int column) {\n // special sort for created and seat column\n if (column == TablesTableModel.COLUMN_CREATED || column == TablesTableModel.COLUMN_SEATS) {\n List<? extends SortKey> sortKeys = getSortKeys();\n if (sortKeys.size() == 2) {\n // clear sort on second click\n setSortKeys(null);\n } else {\n // setup sort on first click\n List<SortKey> list = new ArrayList<>();\n list.add(new RowSorter.SortKey(TablesTableModel.COLUMN_SEATS, SortOrder.ASCENDING));\n list.add(new RowSorter.SortKey(TablesTableModel.COLUMN_CREATED, SortOrder.DESCENDING));\n setSortKeys(list);\n }\n } else {\n super.toggleSortOrder(column);\n }\n }\n };\n tableTables.setRowSorter(activeTablesSorter);\n\n // time ago\n tableTables.getColumnModel().getColumn(TablesTableModel.COLUMN_CREATED).setCellRenderer(timeAgoCellRenderer);\n // skill level\n tableTables.getColumnModel().getColumn(TablesTableModel.COLUMN_SKILL).setCellRenderer(skillCellRenderer);\n // seats\n tableTables.getColumnModel().getColumn(TablesTableModel.COLUMN_SEATS).setCellRenderer(seatsCellRenderer);\n\n /* date sorter (not need, default is good - see getColumnClass)\n activeTablesSorter.setComparator(TablesTableModel.COLUMN_CREATED, new Comparator<Date>() {\n @Override\n public int compare(Date v1, Date v2) {\n return v1.compareTo(v2);\n }\n\n });*/\n\n // seats sorter (free tables must be first)\n activeTablesSorter.setComparator(TablesTableModel.COLUMN_SEATS, new Comparator<String>() {\n @Override\n public int compare(String v1, String v2) {\n int[] seats1 = parseSeatsInfo(v1);\n int[] seats2 = parseSeatsInfo(v2);\n boolean free1 = seats1[0] != seats1[1];\n boolean free2 = seats2[0] != seats2[1];\n\n // free seats go first\n if (free1 || free2) {\n return Boolean.compare(free2, free1);\n }\n\n // all other seats go without sorts\n return 0;\n }\n });\n\n // default sort by created date (last games from above)\n ArrayList list = new ArrayList<>();\n list.add(new RowSorter.SortKey(TablesTableModel.COLUMN_SEATS, SortOrder.ASCENDING));\n list.add(new RowSorter.SortKey(TablesTableModel.COLUMN_CREATED, SortOrder.DESCENDING));\n activeTablesSorter.setSortKeys(list);\n\n TableUtil.setColumnWidthAndOrder(tableTables, DEFAULT_COLUMNS_WIDTH, KEY_TABLES_COLUMNS_WIDTH, KEY_TABLES_COLUMNS_ORDER);\n\n // 2. TABLE COMPLETED\n completedTablesSorter = new MageTableRowSorter(matchesModel);\n tableCompleted.setRowSorter(completedTablesSorter);\n\n // duration\n tableCompleted.getColumnModel().getColumn(MatchesTableModel.COLUMN_DURATION).setCellRenderer(durationCellRenderer);\n // start-end\n tableCompleted.getColumnModel().getColumn(MatchesTableModel.COLUMN_START).setCellRenderer(datetimeCellRenderer);\n tableCompleted.getColumnModel().getColumn(MatchesTableModel.COLUMN_END).setCellRenderer(datetimeCellRenderer);\n // default sort by ended date (last games from above)\n ArrayList list2 = new ArrayList<>();\n list2.add(new RowSorter.SortKey(MatchesTableModel.COLUMN_END, SortOrder.DESCENDING));\n completedTablesSorter.setSortKeys(list2);\n\n // 3. CHAT\n chatPanelMain.getUserChatPanel().useExtendedView(ChatPanelBasic.VIEW_MODE.NONE);\n chatPanelMain.getUserChatPanel().setBorder(null);\n chatPanelMain.getUserChatPanel().setChatType(ChatPanelBasic.ChatType.TABLES);\n\n // 4. BUTTONS (add new buttons to the end of the list -- if not then users lost their filter settings)\n filterButtons = new JToggleButton[]{btnStateWaiting, btnStateActive, btnStateFinished,\n btnTypeMatch, btnTypeTourneyConstructed, btnTypeTourneyLimited,\n btnFormatBlock, btnFormatStandard, btnFormatModern, btnFormatLegacy, btnFormatVintage, btnFormatPremodern, btnFormatCommander, btnFormatTinyLeader, btnFormatLimited, btnFormatOther,\n btnSkillBeginner, btnSkillCasual, btnSkillSerious, btnRated, btnUnrated, btnOpen, btnPassword, btnFormatOathbreaker, btnFormatPioneer};\n\n JComponent[] components = new JComponent[]{chatPanelMain, jSplitPane1, jScrollPaneTablesActive, jScrollPaneTablesFinished, jPanelTop, jPanelTables};\n for (JComponent component : components) {\n component.setOpaque(false);\n }\n\n jScrollPaneTablesActive.getViewport().setBackground(new Color(255, 255, 255, 50));\n jScrollPaneTablesFinished.getViewport().setBackground(new Color(255, 255, 255, 50));\n\n restoreFilters();\n setGUISize();\n\n Action openTableAction;\n openTableAction = new AbstractAction() {\n @Override\n public void actionPerformed(ActionEvent e) {\n String searchID = e.getActionCommand();\n int modelRow = TablesUtil.findTableRowFromSearchId(tableModel, searchID);\n if (modelRow == -1) {\n return;\n }\n UUID tableId = (UUID) tableModel.getValueAt(modelRow, TablesTableModel.ACTION_COLUMN + 3);\n UUID gameId = (UUID) tableModel.getValueAt(modelRow, TablesTableModel.ACTION_COLUMN + 2);\n String action = (String) tableModel.getValueAt(modelRow, TablesTableModel.ACTION_COLUMN);\n String gameType = (String) tableModel.getValueAt(modelRow, TablesTableModel.COLUMN_GAME_TYPE);\n boolean isTournament = (Boolean) tableModel.getValueAt(modelRow, TablesTableModel.ACTION_COLUMN + 1);\n String owner = (String) tableModel.getValueAt(modelRow, TablesTableModel.COLUMN_OWNER);\n String pwdColumn = (String) tableModel.getValueAt(modelRow, TablesTableModel.COLUMN_PASSWORD);\n switch (action) {\n case \"Join\":\n if (owner.equals(SessionHandler.getUserName()) || owner.startsWith(SessionHandler.getUserName() + ',')) {\n try {\n JDesktopPane desktopPane = (JDesktopPane) MageFrame.getUI().getComponent(MageComponents.DESKTOP_PANE);\n JInternalFrame[] windows = desktopPane.getAllFramesInLayer(javax.swing.JLayeredPane.DEFAULT_LAYER);\n for (JInternalFrame frame : windows) {\n if (frame.getTitle().equals(\"Waiting for players\")) {\n frame.toFront();\n frame.setVisible(true);\n try {\n frame.setSelected(true);\n } catch (PropertyVetoException ve) {\n LOGGER.error(ve);\n }\n }\n\n }\n } catch (InterruptedException ex) {\n LOGGER.error(ex);\n }\n return;\n }\n if (isTournament) {\n LOGGER.info(\"Joining tournament \" + tableId);\n if (!gameType.startsWith(\"Constructed\")) {\n if (TablesTableModel.PASSWORD_VALUE_YES.equals(pwdColumn)) {\n joinTableDialog.showDialog(roomId, tableId, true, !gameType.startsWith(\"Constructed\"));\n } else {\n SessionHandler.joinTournamentTable(roomId, tableId, SessionHandler.getUserName(), PlayerType.HUMAN, 1, null, \"\");\n }\n } else {\n joinTableDialog.showDialog(roomId, tableId, true, !gameType.startsWith(\"Constructed\"));\n }\n } else {\n LOGGER.info(\"Joining table \" + tableId);\n joinTableDialog.showDialog(roomId, tableId, false, false);\n }\n break;\n case \"Remove\":\n UserRequestMessage message = new UserRequestMessage(\"Removing table\", \"Are you sure you want to remove table?\");\n message.setButton1(\"No\", null);\n message.setButton2(\"Yes\", PlayerAction.CLIENT_REMOVE_TABLE);\n MageFrame.getInstance().showUserRequestDialog(message);\n break;\n case \"Show\":\n if (isTournament) {\n LOGGER.info(\"Showing tournament table \" + tableId);\n SessionHandler.watchTable(roomId, tableId);\n }\n break;\n case \"Watch\":\n if (!isTournament) {\n LOGGER.info(\"Watching table \" + tableId);\n SessionHandler.watchTable(roomId, tableId);\n }\n break;\n case \"Replay\":\n LOGGER.info(\"Replaying game \" + gameId);\n SessionHandler.replayGame(gameId);\n break;\n }\n }\n };\n\n Action closedTableAction;\n closedTableAction = new AbstractAction() {\n @Override\n public void actionPerformed(ActionEvent e) {\n String searchID = e.getActionCommand();\n int modelRow = TablesUtil.findTableRowFromSearchId(matchesModel, searchID);\n if (modelRow == -1) {\n return;\n }\n String action = (String) matchesModel.getValueAt(modelRow, MatchesTableModel.COLUMN_ACTION);\n switch (action) {\n case \"Replay\":\n java.util.List<UUID> gameList = matchesModel.getListofGames(modelRow);\n if (gameList != null && !gameList.isEmpty()) {\n if (gameList.size() == 1) {\n SessionHandler.replayGame(gameList.get(0));\n } else {\n gameChooser.show(gameList, MageFrame.getDesktop().getMousePosition());\n }\n }\n // MageFrame.getDesktop().showTournament(tournamentId);\n break;\n case \"Show\":\n if (matchesModel.isTournament(modelRow)) {\n LOGGER.info(\"Showing tournament table \" + matchesModel.getTableId(modelRow));\n SessionHandler.watchTable(roomId, matchesModel.getTableId(modelRow));\n }\n break;\n }\n }\n };\n\n // !!!! adds action buttons to the table panel (don't delete this)\n actionButton1 = new TablesButtonColumn(tableTables, openTableAction, tableTables.convertColumnIndexToView(TablesTableModel.ACTION_COLUMN));\n actionButton2 = new TablesButtonColumn(tableCompleted, closedTableAction, tableCompleted.convertColumnIndexToView(MatchesTableModel.COLUMN_ACTION));\n // selection\n tablesLastSelection.put(tableTables, \"\");\n tablesLastSelection.put(tableCompleted, \"\");\n addTableSelectListener(tableTables);\n addTableSelectListener(tableCompleted);\n // double click\n addTableDoubleClickListener(tableTables, openTableAction);\n addTableDoubleClickListener(tableCompleted, closedTableAction);\n }", "@Test\r\n public void testNumberOfRowsInSection() {\r\n assertTrue(ConditionWait.tillGlobalTime(new ConditionWait.Condition() {\r\n @Override\r\n public boolean check() {\r\n return XIBTestTableViewLabelTexFieldViewController.testNumberOfRowsInSection;\r\n }\r\n }));\r\n }", "public void updateTable()\r\n {\r\n ((JarModel) table.getModel()).fireTableDataChanged();\r\n }", "private void createTable() {\n\t\t// Tao dataModel & table \n\t\tdataModel = new DefaultTableModel(headers, 0);\n\t\ttable.setModel(dataModel);\n\t\t\n\t\tnapDuLieuChoBang();\n\t}", "@Test(timeout = 4000)\n public void test060() throws Throwable {\n DBSchema dBSchema0 = new DBSchema(\"Er\");\n DefaultDBTable defaultDBTable0 = new DefaultDBTable(\"Er\", dBSchema0);\n List<DBTable> list0 = DBUtil.dependencyOrderedTables(dBSchema0);\n assertFalse(list0.isEmpty());\n }", "public void waitForData() {\n waitForData(1);\n }", "public static void loadTree() throws NotBoundException, MalformedURLException, RemoteException, ClassNotFoundException, SQLException, InterruptedException {\n\n List<Object> ob1 = new ArrayList<>();\n ob1.add(1);\n ob1.add(1);\n//db Access1 \n List<List<Object>> sspFindMultyResult1 = ServerConnection.getServerConnector().searchMultipleResults(ob1, \"ssp_GL_LoadCombo_ActTree\", 4);\n\n DefaultTreeModel model = (DefaultTreeModel) jTree1.getModel();\n\n DefaultMutableTreeNode root = (DefaultMutableTreeNode) model.getRoot();\n\n for (List<Object> sspFindMultyResults1 : sspFindMultyResult1) {\n DefaultMutableTreeNode dmtn1 = new DefaultMutableTreeNode(sspFindMultyResults1.get(1) + \"-\" + sspFindMultyResults1.get(3));\n root.add(dmtn1);\n\n List<Object> ob2 = new ArrayList<>();\n ob2.add(2);\n ob2.add(sspFindMultyResults1.get(0));\n//db Access2\n List<List<Object>> sspFindMultyResult2 = ServerConnection.getServerConnector().searchMultipleResults(ob2, \"ssp_GL_LoadCombo_ActTree\", 4);\n\n for (List<Object> sspFindMultyResults2 : sspFindMultyResult2) {\n DefaultMutableTreeNode dmtn2 = new DefaultMutableTreeNode(sspFindMultyResults2.get(1) + \"-\" + sspFindMultyResults2.get(3));\n dmtn1.add(dmtn2);\n dmtn1.getLevel();\n\n List<Object> ob3 = new ArrayList<>();\n ob3.add(3);\n ob3.add(sspFindMultyResults2.get(0));\n//db Access3\n List<List<Object>> sspFindMultyResult3 = ServerConnection.getServerConnector().searchMultipleResults(ob3, \"ssp_GL_LoadCombo_ActTree\", 4);\n\n for (List<Object> sspFindMultyResults3 : sspFindMultyResult3) {\n DefaultMutableTreeNode dmtn3 = new DefaultMutableTreeNode(sspFindMultyResults3.get(1) + \"-\" + sspFindMultyResults3.get(3));\n dmtn2.add(dmtn3);\n\n List<Object> ob4 = new ArrayList<>();\n ob4.add(4);\n ob4.add(sspFindMultyResults3.get(0));\n//db Access4\n List<List<Object>> sspFindMultyResult4 = ServerConnection.getServerConnector().searchMultipleResults(ob4, \"ssp_GL_LoadCombo_ActTree\", 4);\n\n for (List<Object> sspFindMultyResults4 : sspFindMultyResult4) {\n DefaultMutableTreeNode dmtn4 = new DefaultMutableTreeNode(sspFindMultyResults4.get(1) + \"-\" + sspFindMultyResults4.get(3));\n dmtn3.add(dmtn4);\n\n List<Object> ob5 = new ArrayList<>();\n ob5.add(5);\n ob5.add(sspFindMultyResults4.get(0));\n//db Access5 \n List<List<Object>> sspFindMultyResult5 = ServerConnection.getServerConnector().searchMultipleResults(ob5, \"ssp_GL_LoadCombo_ActTree\", 4);\n\n for (List<Object> sspFindMultyResults5 : sspFindMultyResult5) {\n DefaultMutableTreeNode dmtn5 = new DefaultMutableTreeNode(sspFindMultyResults5.get(1) + \"-\" + sspFindMultyResults5.get(3));\n dmtn4.add(dmtn5);\n\n }\n }\n }\n }\n }\n model.reload(root);\n }", "private void runTest(final Node me) {\n if (!initialized) {\n initStressTest();\n }\n\n List<Row> runs = engine.getSqlTemplate().query(selectControlSql);\n\n for (Row run : runs) {\n int runId = run.getInt(\"RUN_ID\");\n int payloadColumns = run.getInt(\"PAYLOAD_COLUMNS\");\n int initialSeedSize = run.getInt(\"INITIAL_SEED_SIZE\");\n long duration = run.getLong(\"DURATION_MINUTES\");\n\n String status = engine.getSqlTemplate().queryForString(selectStatusSql, runId, me.getNodeId());\n\n if (isMasterNode(me) && StringUtils.isBlank(status)) {\n initStressTestRowOutgoing(payloadColumns, runId, initialSeedSize);\n initStressTestRowIncoming(payloadColumns);\n long commitRows = run.getLong(\"SERVER_COMMIT_ROWS\");\n long sleepMs = run.getLong(\"SERVER_COMMIT_SLEEP_MS\");\n\n engine.getSqlTemplate().update(insertStatusSql, runId, me.getNodeId(), \"RUNNING\");\n for (Node client : engine.getNodeService().findTargetNodesFor(NodeGroupLinkAction.W)) {\n engine.getSqlTemplate().update(insertStatusSql, runId, client.getNodeId(), \"RUNNING\");\n }\n\n fillOutgoing(runId, duration, commitRows, sleepMs, payloadColumns);\n\n engine.getSqlTemplate().update(updateStatusSql, \"COMPLETE\", runId, me.getNodeId());\n\n } else if (!isMasterNode(me) && !StringUtils.isBlank(status) && status.equals(\"RUNNING\")) {\n long commitRows = run.getLong(\"CLIENT_COMMIT_ROWS\");\n long sleepMs = run.getLong(\"CLIENT_COMMIT_SLEEP_MS\");\n\n fillIncoming(runId, duration, commitRows, sleepMs, payloadColumns);\n\n engine.getSqlTemplate().update(updateStatusSql, \"COMPLETE\", runId, me.getNodeId());\n }\n }\n }", "public void initDone() {\n super.initDone();\n try {\n setTimesForAnimation();\n //loadProfile(getPosition());\n doMoveProbe();\n } catch (Exception exc) {\n logException(\"initDone\", exc);\n }\n // Enable table panel after UI is initialized\n tablePanel.setVisible(showTable);\n }", "@Test\n public void testTableDependencies() throws Exception {\n Table table = database.findTableByName(\"programs_with_twitter_tags\");\n assertDependentTables(table, \"programs\", \"broadcasts\", \"clusters\");\n }", "public void updateCurveSelectorTable() {\r\n\t\tif (Thread.currentThread().getId() == DataExplorer.application.getThreadId()) {\r\n\t\t\tthis.graphicsTabItem.updateCurveSelectorTable();\r\n\t\t\tif (this.compareTabItem != null && !this.compareTabItem.isDisposed()) this.compareTabItem.updateCurveSelectorTable();\r\n\t\t}\r\n\t\telse {\r\n\t\t\tGDE.display.asyncExec(new Runnable() {\r\n\t\t\t\tpublic void run() {\r\n\t\t\t\t\tDataExplorer.this.graphicsTabItem.updateCurveSelectorTable();\r\n\t\t\t\t\tif (DataExplorer.this.compareTabItem != null && !DataExplorer.this.compareTabItem.isDisposed()) DataExplorer.this.compareTabItem.updateCurveSelectorTable();\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t}\r\n\t}", "@Test(timeout = 4000)\n public void test143() throws Throwable {\n ResultMatrixHTML resultMatrixHTML0 = new ResultMatrixHTML();\n resultMatrixHTML0.setEnumerateColNames(false);\n resultMatrixHTML0.getDisplayName();\n int int0 = resultMatrixHTML0.getStdDevWidth();\n assertFalse(resultMatrixHTML0.getEnumerateColNames());\n assertEquals(0, int0);\n }", "public static void run_simulation(JTable vehicleTable, JTable lightTable, Queue <Car> new_cars, ReentrantLock lock){\n Timer timer = new Timer(); \n // Creating an instance of task to be scheduled \n TimerTask task = new Worker(lightSE, lightWS, lightEW, vehicleTable, lightTable, Cars, new_cars, lock); \n \n // Scheduling the timer instance \n timer.schedule(task, 100, 1000); \n }", "@Test\r\n\t\t\tpublic void testEncuentraPrimeratabla() {\r\n\t\t\t\t//encontramos la tabla que se llama customers\r\n\t\t\t\tWebElement tabla= driver.findElement(By.xpath(\"//table[@id='customers']\"));\r\n\t\t\t\tSystem.out.println(tabla.getText());\t\r\n\t\t\t\tassertNotNull(tabla);\r\n\t\t\t}", "@Test(timeout = 4000)\n public void test116() throws Throwable {\n DefaultDBTable defaultDBTable0 = new DefaultDBTable(\"4-s<.5+Q6\");\n MockPrintWriter mockPrintWriter0 = new MockPrintWriter(\"alter materialized viewdelete\");\n DBCheckConstraint dBCheckConstraint0 = new DBCheckConstraint(\"alter materialized viewdelete\", true, defaultDBTable0, \"alte\");\n NameSpec nameSpec0 = NameSpec.ALWAYS;\n SQLUtil.renderCreateTable(defaultDBTable0, false, nameSpec0, mockPrintWriter0);\n assertEquals(\"table\", defaultDBTable0.getObjectType());\n }", "@Test\n public void f8DisplayParametersTest() {\n clickOn(\"#assetTypeMenuBtn\").sleep(1000);\n\n //select first asset type\n Node node = lookup(\"#columnName\").nth(1).query();\n clickOn(node).sleep(1000);\n\n //go to model tab\n clickOn(scene.getRoot().lookup(\"#modelTab\")).sleep(1000);\n\n FlowPane models = (FlowPane) scene.getRoot().lookup(\"#modelsThumbPane\");\n VBox parameters = (VBox) scene.getRoot().lookup(\"#modelParameters\");\n\n int i;\n //Iterate through all the models and their parameters\n for (int j = 0; j < models.getChildren().size(); j++) {\n i = 0;\n clickOn(models.getChildren().get(j));\n\n if (j == 4) {\n scroll(90, VerticalDirection.UP);\n }\n\n while (i < parameters.getChildren().size()) {\n clickOn(parameters.getChildren().get(i++)).sleep(500);\n\n if (i == 10) {\n scroll(60, VerticalDirection.UP);\n }\n }\n }\n\n assertEquals(\"There should be 8 models\", 8, models.getChildren().size());\n assertNotNull(\"Parameters exist\", parameters);\n }", "protected void getDataAndMakeTables() throws ModelException {\n\n if (m_oLegend == null) {\n return;\n }\n\n m_oChartFrame.setCursor(Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR));\n\n DetailedOutputFileManager oManager = m_oLegend.getDetailedOutputFileManager();\n int iNumTimesteps = m_oLegend.getNumberOfTimesteps(),\n iTimestepToReturnTo = m_oLegend.getCurrentTimestep(), i;\n \n declareArrays();\n \n //Force the processing of each timestep\n for (i = 0; i <= iNumTimesteps; i++) {\n\n //Flag this as desired processing\n m_bCurrentProcessing = true;\n\n //Make the file manager parse this file\n oManager.readFile(i); \n \n }\n\n //Cause this chart to ignore data from other sources\n m_bCurrentProcessing = false;\n\n //Refresh all the existing charts back to the way they were\n oManager.readFile(iTimestepToReturnTo);\n oManager.updateCharts(); \n\n // Display the tables with whatever the user has selected for a species\n\n //Make a content panel that packages in the size class controls\n JPanel jContentPanel = new JPanel(new BorderLayout());\n JComboBox<String> jComboBox = (JComboBox<String>)DataGrapher.findNamedComponent(\n m_oChartFrame.getContentPane(), SPECIES_COMBO_BOX_NAME);\n jContentPanel.add(makeSizeClassPanel(this, mp_sSpeciesNames, \n m_iNumSizeClasses, m_fSizeClassSize, jComboBox.getSelectedIndex(),\n m_bIncludeLive, m_bIncludeSnags), BorderLayout.NORTH);\n \n jContentPanel.add(makeTablePanel(jComboBox.getSelectedIndex()), BorderLayout.CENTER);\n m_oChartFrame.setContentPane(jContentPanel);\n\n //Create our menu\n m_oChartFrame = DataGrapher.addFileMenu(m_oChartFrame, this, m_bShowOneTimestep);\n\n m_oChartFrame.pack();\n\n m_oChartFrame.setCursor(Cursor.getPredefinedCursor(Cursor.\n DEFAULT_CURSOR));\n }", "@Test(timeout = 4000)\n public void test075() throws Throwable {\n DecisionTable decisionTable0 = new DecisionTable();\n String string0 = Evaluation.getGlobalInfo(decisionTable0);\n assertEquals(\"\\nSynopsis for weka.classifiers.rules.DecisionTable:\\n\\nClass for building and using a simple decision table majority classifier.\\n\\nFor more information see: \\n\\nRon Kohavi: The Power of Decision Tables. In: 8th European Conference on Machine Learning, 174-189, 1995.\", string0);\n }", "static void waitForBlockCommit() {\n try {\n Thread.sleep(5000);\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n }", "@Override\r\n\tpublic boolean updateTable() {\r\n\t\t/*\r\n\t\t * VERSION 1\r\n\t\t *\r\n\t\tobjectCollection.clear();\r\n\t\tobjectCollection.addAll(retrieveObjects());\r\n\t\trefreshTable();*/\r\n\t\tlong size=objectCollection.size();\r\n\t\tobjectCollection.clear();\r\n\t\tint index=getSelectionIndex();\r\n\t\tupdateTable(SWT.DEFAULT);\r\n\t\tselectElement(index);\r\n\t\treturn objectCollection.size()!=size;\r\n\t}", "public void changeSceneToTable() throws Exception {\n SceneManager.changeScene(\"table.fxml\");\n }", "private void onShowTableDetail(ViewNodeJSO viewNode) { \n TableTools.createDataProvider(viewNode).addDataDisplay(cellTable);\n }", "private JTable getNodesTable() {\n\t\treturn (JTable)_mainWindowReference.getView( \"NodesTable\" );\n\t}", "public void update() {\n tableChanged(new TableModelEvent(this));\n }", "private void refreshTable(){\n DefaultTableModel dm = (DefaultTableModel)table.getModel();\r\n dm.getDataVector().removeAllElements();\r\n System.out.println(\"Refresh Table\");\r\n\r\n //calling method addRows\r\n addRows();\r\n }", "@Test(enabled=true, priority =1)\r\n\tpublic void view3_validate_table_data() {\r\n\r\n\t\thelper.validate_table_names( driver.findElement(view3_curr_data) , \"Test_View3\" , \"view3_curr_data\" );\t\r\n\t\thelper.validate_table_columns( view3_curr_data_table , driver , \"\" , \"Test_View3\" , \"view3_curr_data_table\" );\r\n\r\n\t\thelper.validate_table_names( driver.findElement(view3_today_data) , \"Test_View3\" , \"view3_today_data\" );\r\n\t\thelper.validate_table_columns( view3_today_data_table , driver , \"\" , \"Test_View3\" , \"view3_today_data_table\" );\r\n\r\n\t\thelper.validate_table_names( driver.findElement(view3_curr_agent_stats_tbl) , \"Test_View3\" , \"view3_curr_agent_stats_tbl\" );\r\n\t\thelper.validate_table_columns( view3_curr_agent_stats_col , driver , \"\" , \"Test_View3\" , \"view3_curr_agent_stats_col\" );\r\n\r\n\t\thelper.validate_table_names( driver.findElement(view3_agent_details) , \"Test_View3\" , \"view3_agent_details\" );\t\r\n\t\thelper.validate_table_columns( view3_Agent_table_data_start , driver , view3_Agent_table_data_end , \"Test_View3\" , \"view3_Agent_table_data\" );\r\n\t}", "private void createStressTestStatusTable() {\n Column runId = new Column(\"RUN_ID\");\n runId.setMappedType(\"INTEGER\");\n runId.setPrimaryKey(true);\n runId.setRequired(true);\n Column nodeId = new Column(\"NODE_ID\");\n nodeId.setMappedType(\"VARCHAR\");\n nodeId.setPrimaryKey(true);\n nodeId.setRequired(true);\n nodeId.setSize(\"50\");\n Column status = new Column(\"STATUS\");\n status.setMappedType(\"VARCHAR\");\n status.setSize(\"10\");\n status.setRequired(true);\n status.setDefaultValue(\"NEW\");\n Column startTime = new Column(\"START_TIME\");\n startTime.setMappedType(\"TIMESTAMP\");\n Column endTime = new Column(\"END_TIME\");\n endTime.setMappedType(\"TIMESTAMP\");\n\n Table table = new Table(STRESS_TEST_STATUS, runId, nodeId, status, startTime, endTime);\n\n engine.getDatabasePlatform().createTables(true, true, table);\n }", "public synchronized void updateHistoTable(final boolean forceClean) {\r\n\t\tGDE.display.asyncExec(new Runnable() {\r\n\t\t\tpublic void run() {\r\n\t\t\t\tif (DataExplorer.this.histoTableTabItem != null && !DataExplorer.this.histoTableTabItem.isDisposed() && DataExplorer.this.histoTableTabItem.isVisible()) {\r\n\t\t\t\t\tif (forceClean || !DataExplorer.this.histoTableTabItem.isRowTextAndTrailValid() || !DataExplorer.this.histoTableTabItem.isHeaderTextValid()) {\r\n\t\t\t\t\t\tDataExplorer.this.histoTableTabItem.setHeader();\r\n\t\t\t\t\t}\r\n\t\t\t\t\tTrailRecordSet trailRecordSet = DataExplorer.this.histoSet.getTrailRecordSet();\r\n\t\t\t\t\tif (trailRecordSet != null) DataExplorer.this.histoTableTabItem.setRowCount(trailRecordSet.getVisibleAndDisplayableRecordsForTable().size() + trailRecordSet.getActiveDisplayTags().size());\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\t\t//\t\t\tif (activeRecordSet == null || requestingRecordSetName.isEmpty()) {\r\n\t\tif (false) { //todo is there any requirement to clean the table ???\r\n\t\t\tif (Thread.currentThread().getId() == DataExplorer.application.getThreadId()) {\r\n\t\t\t\tif (this.histoTableTabItem != null) {\r\n\t\t\t\t\tthis.histoTableTabItem.cleanTable();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\tGDE.display.asyncExec(new Runnable() {\r\n\t\t\t\t\tpublic void run() {\r\n\t\t\t\t\t\tif (DataExplorer.this.histoTableTabItem != null) {\r\n\t\t\t\t\t\t\tDataExplorer.this.histoTableTabItem.cleanTable();\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}", "private void doOK() {\n final JPPFWebSession session = (JPPFWebSession) getPage().getSession();\n final TableTreeData data = session.getTopologyData();\n final List<DefaultMutableTreeNode> selectedNodes = data.getSelectedTreeNodes();\n final CollectionMap<TopologyDriver, String> map = new ArrayListHashMap<>();\n for (final DefaultMutableTreeNode treeNode: selectedNodes) {\n final AbstractTopologyComponent comp = (AbstractTopologyComponent) treeNode.getUserObject();\n if ((comp.getParent() != null) && comp.isNode()) {\n final JPPFManagementInfo info = comp.getManagementInfo();\n if (info != null) map.putValue((TopologyDriver) comp.getParent(), comp.getUuid());\n }\n }\n for (final Map.Entry<TopologyDriver, Collection<String>> entry: map.entrySet()) {\n final TopologyDriver parent = entry.getKey();\n final NodeSelector selector = new UuidSelector(entry.getValue());\n try {\n parent.getForwarder().updateThreadPoolSize(selector, modalForm.getNbThreads());\n parent.getForwarder().updateThreadsPriority(selector, modalForm.getPriority());\n } catch(final Exception e) {\n log.error(e.getMessage(), e);\n }\n }\n }", "@Test(timeout = 4000)\n public void test089() throws Throwable {\n DefaultDBTable defaultDBTable0 = new DefaultDBTable(\"exec\");\n String string0 = SQLUtil.typeAndName(defaultDBTable0);\n assertEquals(\"table exec\", string0);\n }", "@Test\r\n public void testTransferMetalInfo() {\r\n System.out.println(\"transferMetalInfo - Table have records\");\r\n List<Vector> result = KnowledgeSystemBeanInterface.transferMetalInfo();\r\n assertEquals(result.size(), 15);\r\n System.out.println(\"testTransferMetalInfo ---------------------------------------------------- Done\");\r\n }", "@Test(timeout = 4000)\n public void test023() throws Throwable {\n ErrorPage errorPage0 = new ErrorPage();\n Checkbox checkbox0 = new Checkbox(errorPage0, \"sajp\", \"sajp\");\n TableRow tableRow0 = new TableRow(checkbox0);\n Component component0 = tableRow0.dt();\n assertEquals(\"Block_1\", component0.getComponentId());\n assertEquals(\"wheel_ErrorPage\", errorPage0.getComponentId());\n }", "public void tableStarted(int position) {\r\n }", "public void testIO(){\r\n // Don't do this every iteration because it's too expensive\r\n if(testIOTimer.get() < 0.5) {\r\n return;\r\n }\r\n testIOTimer.reset();\r\n NetworkTable table = NetworkTable.getTable(\"Status\");\r\n table.putNumber(\"dioData\", digitalModule.getAllDIO());\r\n for(int i = 1; i <= 10; i++) {\r\n table.putNumber(\"pwm\" + i, digitalModule.getPWM(i));\r\n }\r\n \r\n for(int i = 1; i <= 8; i++) {\r\n table.putNumber(\"analog\" + i, ((int)(analogModule.getVoltage(i) * 1000) / 1000.0));\r\n }\r\n }", "private void _wait() {\n\t\tfor (int i = 1000; i > 0; i--)\n\t\t\t;\n\t}", "public void run() {\n\t\t\tJTable jt = new JTable();\n\t\t\n\t\t}", "private static void statusCommand() {\n String lineFormat = \"%-8s | %-15s | %s\\n\";\n\n List<Job> neededJobs = fetchNeededJobs();\n\n // table header\n if (neededJobs.size() < 2) {\n System.out.printf(lineFormat, \"STATE\", \"START TIME\", \"JOB DIRECTORY\");\n for (int i = 0; i < 78; i++) {\n System.out.print(((9 == i || 27 == i) ? \"+\" : \"-\"));\n }\n System.out.println();\n }\n\n // table rows\n ObjectCounter<JobState> counter = new ObjectCounter<JobState>();\n for (Job job : neededJobs) {\n Date startDate = job.getStartDate();\n JobState state = job.getState();\n counter.add(state);\n String startDateStr = (null == startDate) ? \"N/A\" : new SimpleDateFormat(\"yyyyMMdd HHmmss\").format(startDate);\n System.out.printf(lineFormat, state.toString(), startDateStr, job.getDir());\n }\n\n // table footer\n System.out.println();\n String sumFormat = \"%6d %s\\n\";\n System.out.printf(sumFormat, heritrix.getJobs().size(), \"TOTAL JOBS\");\n for (JobState state : JobState.values()) {\n if (counter.getMap().keySet().contains(state)) {\n System.out.printf(sumFormat, counter.get(state), state.toString());\n }\n }\n }", "public void clickOnTableHeading() {\r\n\t\tsafeClick(addMarkerOkButton.replace(\".ant-modal-footer button.ant-btn.ant-btn-primary\",\r\n\t\t\t\t\".ant-table-column-has-actions.ant-table-column-has-sorters.ant-table-column-sort\"), SHORTWAIT);\r\n\t}", "private void initComponent() {\n\t\t// Create Table Model (rows, columns...)\n\t\ttableur = new DefaultTableModel();\n\t\t// Add title column\n\t\ttableur.addColumn(fileNumber);\n\t\ttableur.addColumn(fileName);\n\t\ttableur.addColumn(\"\");\n\t\t// Add line of Action History with NodeStructureDTO\n\t\twhile(rootNode != null){\n\t\t\ttableur.addRow(new Object[] {rootNode.getId() , rootNode.getCompletePath()});\n\t\t\trootNode = rootNode.getNextNode();\n\t\t}\n\t\t//Create JTable \n\t\ttableHistory = new JTable(tableur);\n\t\t//Change the renderer of third cells whith grey font \n\t\ttableHistory.getColumn(\"\").setCellRenderer(new ButtonRenderer());\n\t\t//Make a CheckBox in this cell\n\t\ttableHistory.getColumn(\"\").setCellEditor(new ButtonEditor(new JCheckBox()));\n\t\t//Block reordering\n\t\ttableHistory.getTableHeader().setReorderingAllowed(false);\n\t\ttableHistory.setPreferredScrollableViewportSize(new Dimension(600 , 400));\n\t\tadd(new JScrollPane(tableHistory) , BorderLayout.CENTER);\n\t}", "@And(\"^I verify project creation in \\\"([^\\\"]*)\\\"$\")\n\tpublic void readingTableContent(String tableXpath) throws IOException, InterruptedException{\n\t\tString result=selenium.readTable(tableXpath);\n\t\tAssert.assertEquals(selenium.result_pass, result);\n\t}", "private void test(NFV root) throws Exception{\n\t\tlong beginAll=System.currentTimeMillis();\n\t\tNFV rootTest = init(root);\n\t\tlong endAll=System.currentTimeMillis();\n //System.out.println(\"Total time -> \" + ((endAll-beginAll)/1000) + \"s\");\n\t\trootTest.getPropertyDefinition().getProperty().forEach(p ->{\n \tif(p.isIsSat()){\n\t\t\t\tmaxTotTime = maxTotTime<(endAll-beginAll)? (endAll-beginAll) : maxTotTime;\n\t\t\t\tSystem.out.print(\"time: \" + (endAll-beginAll) + \"ms;\");\n\t\t\t\ttotTime += (endAll-beginAll);\n \t\tnSAT++;\n \t}\n \telse{\n \t\tnUNSAT++;\n \t}\n });\n return;\n\t}", "public void ShowTable() {\n\t\tupdateTable();\n\t\ttableFrame.setVisible(true);\n\t\t\n\t}", "private void refTable() {\n try {\n String s = \"select * from stock\";\n pstm = con.prepareStatement(s);\n res = pstm.executeQuery(s);\n table.setModel(DbUtils.resultSetToTableModel(res));\n\n } catch (Exception e) {\n JOptionPane.showMessageDialog(null, \"There Is No Data In Server\");\n }\n }", "private void reloadPlanTable() {\n\t\t\r\n\t}", "public void waitForEndOfVerticalBlank();", "public void updateTable() {\n tabelModel.setRowCount(0);\n Link current = result.first;\n for (int i = 0; current != null; i++) {\n Object[] row = {current.getMasjid(), current.getAlamat()};\n tabelModel.addRow(row);\n current = current.next;\n }\n }", "@Test\n public void testGetAntrian() throws Exception {\n System.out.println(\"getAntrian\");\n setHostPort();\n Menursepsionis ui = new Menursepsionis(client, \"resp1\");\n AntrianController instance = new AntrianController(client);\n DefaultTableModel expResult = instance.getAntrian();\n DefaultTableModel result = instance.getAntrian();\n boolean resultCondition = false;\n System.out.println(result.getRowCount());\n if (result.getRowCount() >= 1) {\n resultCondition = true;\n }\n assertTrue(resultCondition);\n }", "private DefaultTableModel loadMatchedHeadersTableModel() {\r\n\t\treturn ColumnData.getTableData();\r\n\t}", "public TestFrame() {\n\n final String[] columnNames = {\"Nombre\",\n \"Apellido\",\n \"webeo\",\n \"Años de Practica\",\n \"Soltero(a)\"};\n final Object[][] data = {\n\n {\"Lhucas\", \"Huml\",\n \"Patinar\", new Integer(3), new Boolean(true)},\n {\"Kathya\", \"Walrath\",\n \"Escalar\", new Integer(2), new Boolean(false)},\n {\"Marcus\", \"Andrews\",\n \"Correr\", new Integer(7), new Boolean(true)},\n {\"Angela\", \"Lalth\",\n \"Nadar\", new Integer(4), new Boolean(false)}\n };\n\n Vector dataV1 = new Vector();\n dataV1.add(\"XXXX\");\n dataV1.add(\"YYYY\");\n dataV1.add(\"JJJJ\");\n\n Vector dataV2 = new Vector();\n dataV2.add(\"XX2XX\");\n dataV2.add(\"Y2YYY\");\n dataV2.add(\"J2JJJ\");\n\n List dataF = new ArrayList();\n dataF.add(dataV1);\n dataF.add(dataV2);\n\n /*Vector dataC = new Vector();\n dataC.add(\"1\");\n dataC.add(\"2\");\n dataC.add(\"J23JJJ\");\n\n //model = new ModeloDatosTabla(data, true);\n model = new TableModel_1_1(dataC, dataF);\n model2 = new TableModel(columnNames, data, false);\n*/\n\n\n\n initComponents();\n\n\n }", "private void btnStartTestActionPerformed(java.awt.event.ActionEvent evt) {\n try\n {\n initFileBlocker(true);\n initCapturingThread();\n initKeyboardThread();\n }catch(Exception e) { e.printStackTrace();}\n \n \n String testName = (String) table.getValueAt(table.getSelectedRow(), 0);\n String duration = (String) table.getValueAt(table.getSelectedRow(), 3);\n duration += \":00\";\n Bson bsonFilter = Filters.eq(\"Title\", testName);\n FindIterable<Document> findIt = documents.filter(bsonFilter);\n System.out.println(\"Result is: \" + findIt.first());\n try {\n Home.pending_Tests.startCountdown(duration, findIt.first());\n } catch (Exception e) {\n System.out.println(e);\n } \n this.setVisible(false);\n// Home.dispose();\n// this.setUndecorated(true);\n Home.pending_Tests.setVisible(true);\n }", "private void MontarTabela(String where) {\n \n int linha = 0;\n int coluna = 0;\n \n String offset = String.valueOf(getPaginacao());\n \n while(linha < 10){\n while(coluna < 7){\n tbConFin.getModel().setValueAt(\"\", linha, coluna);\n coluna++;\n }\n linha++;\n coluna = 0;\n }\n \n linha = 0;\n \n String rd_id\n ,rd_codico\n ,rd_nome\n ,rd_receita_despesa\n ,rd_grupo\n ,rd_fixa\n ,rd_ativo;\n \n \n \n try{\n ResultSet rsConFin = cc.stm.executeQuery(\"select * from v_receitadespesa \"+where+\" order by rd_codico limit 10 offset \"+offset);\n \n while ( rsConFin.next() ) {\n rd_id = rsConFin.getString(\"RD_ID\");\n rd_codico = rsConFin.getString(\"rd_codico\");\n rd_nome = rsConFin.getString(\"rd_nome\");\n rd_receita_despesa = getRecDesp(rsConFin.getString(\"rd_receita_despesa\"));\n rd_grupo = getSimNao(rsConFin.getString(\"rd_grupo\"));\n rd_fixa = getSimNao(rsConFin.getString(\"rd_fixa\"));\n rd_ativo = getSimNao(rsConFin.getString(\"rd_ativo\"));\n \n tbConFin.getModel().setValueAt(rd_id, linha, 0);\n tbConFin.getModel().setValueAt(rd_codico, linha, 1);\n tbConFin.getModel().setValueAt(rd_nome, linha, 2);\n tbConFin.getModel().setValueAt(rd_receita_despesa, linha, 3);\n tbConFin.getModel().setValueAt(rd_grupo, linha, 4);\n tbConFin.getModel().setValueAt(rd_fixa, linha, 5);\n tbConFin.getModel().setValueAt(rd_ativo, linha, 6);\n \n linha++;\n }\n \n \n if(linha <= 10){\n setMensagem(\"A Busca retornou \"+linha+\" registros!\");\n }\n \n if(linha < 10){\n setFimConsulta(true);\n }else{\n setFimConsulta(false);\n }\n \n }catch(SQLException e){\n JOptionPane.showMessageDialog(this, \"Erro ao Carregar informações de contas financeiras!\\n\"+e.getMessage());\n }\n \n }", "@Test(timeout = 4000)\n public void test235() throws Throwable {\n ErrorPage errorPage0 = new ErrorPage();\n Table table0 = new Table(errorPage0, (String) null);\n table0.h1();\n assertEquals(\"Table_1\", table0.getComponentId());\n assertEquals(\"wheel_ErrorPage\", errorPage0.getComponentId());\n }", "@Test public void testClickWithSomeTablets() throws Exception {\n int first=toUnsignedInt(myInetAddress.getAddress()[3]);\n // maybe make first 101?\n int n=32;\n Group group=new Group(first,first+n-1,true);\n p(group.toString());\n ArrayList<Main> mains=new ArrayList<>();\n for(int i=0;i<n;i++) {\n int myService=group.serviceBase+first+i;\n Main main=new Main(defaultProperties,group,Model.mark1.clone(),myService);\n mains.add(main);\n Tablet tablet=main.instance();\n main.myInetAddress=myInetAddress;\n tablet.startListening();\n }\n Main m1=mains.get(0);\n m1.instance().click(1);\n Thread.sleep(100);\n for(Main main:mains)\n p(\"model: \"+main.model);\n for(Main main:mains)\n assertTrue(main.model.state(1));\n for(Main main:mains) {\n Tablet tablet=main.instance();\n tablet.stopListening();\n }\n }", "private void waitConstant() {\r\n \t\tlong\tlwait = CL_FRMPRDAC;\r\n \t\t// drawing is active?\r\n \t\tif(m_fHorzShift == 0 && m_lTimeZoomStart == 0\r\n \t\t\t\t&& GloneApp.getDoc().isOnAnimation() == false)\r\n \t\t\tlwait = CL_FRMPRDST;\t\t// stalled\r\n \r\n \t\t// make constant fps\r\n \t\t// http://stackoverflow.com/questions/4772693/\r\n \t\tlong\tldt = System.currentTimeMillis() - m_lLastRendered;\r\n \t\ttry {\r\n \t\t\tif(ldt < lwait)\r\n \t\t\t\tThread.sleep(lwait - ldt);\r\n \t\t} catch (InterruptedException e) {\r\n \t\t\te.printStackTrace();\r\n \t\t}\r\n \t}", "@Test(timeout = 4000)\n public void test003() throws Throwable {\n ErrorPage errorPage0 = new ErrorPage();\n Table table0 = new Table(errorPage0, \"p|qV6$[lYUxn\\\"2`n%sF\");\n TableBlock tableBlock0 = table0.thead();\n TableRow tableRow0 = tableBlock0.tr();\n Component component0 = tableRow0.th();\n assertEquals(\"wheel_ErrorPage\", errorPage0.getComponentId());\n assertEquals(\"Block_1\", component0.getComponentId());\n }", "@Test\n public void invalidTableEgress() throws InterruptedException {\n for (int i = 100; i < 110; ++i) {\n this.sfcOfRendererDataListener.onDataTreeChanged(createSfcOfRendererConfig(100, i));\n Thread.sleep(SLEEP); // otherwise the failure is not detected\n verifySettersNotCalled();\n }\n }", "private void updateStatus() {\n Response block = blockTableModel.getChainHead();\n int height = (block != null ? block.getInt(\"height\") : 0);\n nodeField.setText(String.format(\"<html><b>NRS node: [%s]:%d</b></html>\",\n Main.serverConnection.getHost(),\n Main.serverConnection.getPort()));\n chainHeightField.setText(String.format(\"<html><b>Chain height: %d</b></html>\",\n height));\n connectionsField.setText(String.format(\"<html><b>Peer connections: %d</b></html>\",\n connectionTableModel.getActiveCount()));\n }", "@Test(timeout = 4000)\n public void test080() throws Throwable {\n ResultMatrixPlainText resultMatrixPlainText0 = new ResultMatrixPlainText();\n assertEquals(1, resultMatrixPlainText0.getVisibleColCount());\n assertEquals(\"Generates the output as plain text (for fixed width fonts).\", resultMatrixPlainText0.globalInfo());\n assertFalse(resultMatrixPlainText0.getRemoveFilterName());\n assertEquals(\"Whether to output row names or just numbers representing them.\", resultMatrixPlainText0.printRowNamesTipText());\n assertTrue(resultMatrixPlainText0.getPrintColNames());\n assertEquals(0, resultMatrixPlainText0.getColNameWidth());\n assertEquals(\"The maximum width for the row names (0 = optimal).\", resultMatrixPlainText0.rowNameWidthTipText());\n assertEquals(\"Whether to output column names or just numbers representing them.\", resultMatrixPlainText0.printColNamesTipText());\n assertEquals(0, resultMatrixPlainText0.getDefaultColNameWidth());\n assertEquals(5, resultMatrixPlainText0.getDefaultCountWidth());\n assertFalse(resultMatrixPlainText0.getDefaultShowStdDev());\n assertEquals(0, resultMatrixPlainText0.getDefaultMeanWidth());\n assertEquals(\"Whether to enumerate the column names (prefixing them with '(x)', with 'x' being the index).\", resultMatrixPlainText0.enumerateColNamesTipText());\n assertEquals(25, resultMatrixPlainText0.getDefaultRowNameWidth());\n assertEquals(1, resultMatrixPlainText0.getColCount());\n assertEquals(\"The number of decimals after the decimal point for the standard deviation.\", resultMatrixPlainText0.stdDevPrecTipText());\n assertTrue(resultMatrixPlainText0.getEnumerateColNames());\n assertEquals(1, resultMatrixPlainText0.getVisibleRowCount());\n assertEquals(0, resultMatrixPlainText0.getMeanWidth());\n assertEquals(\"The width of the standard deviation (0 = optimal).\", resultMatrixPlainText0.stdDevWidthTipText());\n assertTrue(resultMatrixPlainText0.getDefaultEnumerateColNames());\n assertEquals(2, resultMatrixPlainText0.getDefaultStdDevPrec());\n assertEquals(\"The number of decimals after the decimal point for the mean.\", resultMatrixPlainText0.meanPrecTipText());\n assertEquals(0, resultMatrixPlainText0.getStdDevWidth());\n assertEquals(\"The maximum width of the column names (0 = optimal).\", resultMatrixPlainText0.colNameWidthTipText());\n assertEquals(\"Whether to show the row with averages.\", resultMatrixPlainText0.showAverageTipText());\n assertFalse(resultMatrixPlainText0.getShowAverage());\n assertEquals(1, resultMatrixPlainText0.getRowCount());\n assertEquals(0, resultMatrixPlainText0.getSignificanceWidth());\n assertTrue(resultMatrixPlainText0.getDefaultPrintColNames());\n assertEquals(\"Whether to display the standard deviation column.\", resultMatrixPlainText0.showStdDevTipText());\n assertFalse(resultMatrixPlainText0.getEnumerateRowNames());\n assertEquals(25, resultMatrixPlainText0.getRowNameWidth());\n assertEquals(2, resultMatrixPlainText0.getMeanPrec());\n assertFalse(resultMatrixPlainText0.getShowStdDev());\n assertEquals(\"The width of the mean (0 = optimal).\", resultMatrixPlainText0.meanWidthTipText());\n assertEquals(2, resultMatrixPlainText0.getStdDevPrec());\n assertEquals(\"Plain Text\", resultMatrixPlainText0.getDisplayName());\n assertFalse(resultMatrixPlainText0.getDefaultShowAverage());\n assertTrue(resultMatrixPlainText0.getDefaultPrintRowNames());\n assertEquals(\"Whether to enumerate the row names (prefixing them with '(x)', with 'x' being the index).\", resultMatrixPlainText0.enumerateRowNamesTipText());\n assertEquals(\"Whether to remove the classname package prefixes from the filter names in datasets.\", resultMatrixPlainText0.removeFilterNameTipText());\n assertEquals(\"The width of the significance indicator (0 = optimal).\", resultMatrixPlainText0.significanceWidthTipText());\n assertEquals(5, resultMatrixPlainText0.getCountWidth());\n assertFalse(resultMatrixPlainText0.getDefaultRemoveFilterName());\n assertFalse(resultMatrixPlainText0.getDefaultEnumerateRowNames());\n assertEquals(0, resultMatrixPlainText0.getDefaultSignificanceWidth());\n assertEquals(\"The width of the counts (0 = optimal).\", resultMatrixPlainText0.countWidthTipText());\n assertEquals(2, resultMatrixPlainText0.getDefaultMeanPrec());\n assertTrue(resultMatrixPlainText0.getPrintRowNames());\n assertEquals(0, resultMatrixPlainText0.getDefaultStdDevWidth());\n assertNotNull(resultMatrixPlainText0);\n assertEquals(1, ResultMatrix.SIGNIFICANCE_WIN);\n assertEquals(2, ResultMatrix.SIGNIFICANCE_LOSS);\n assertEquals(0, ResultMatrix.SIGNIFICANCE_TIE);\n \n resultMatrixPlainText0.clear();\n assertEquals(1, resultMatrixPlainText0.getVisibleColCount());\n assertEquals(\"Generates the output as plain text (for fixed width fonts).\", resultMatrixPlainText0.globalInfo());\n assertFalse(resultMatrixPlainText0.getRemoveFilterName());\n assertEquals(\"Whether to output row names or just numbers representing them.\", resultMatrixPlainText0.printRowNamesTipText());\n assertTrue(resultMatrixPlainText0.getPrintColNames());\n assertEquals(0, resultMatrixPlainText0.getColNameWidth());\n assertEquals(\"The maximum width for the row names (0 = optimal).\", resultMatrixPlainText0.rowNameWidthTipText());\n assertEquals(\"Whether to output column names or just numbers representing them.\", resultMatrixPlainText0.printColNamesTipText());\n assertEquals(0, resultMatrixPlainText0.getDefaultColNameWidth());\n assertEquals(5, resultMatrixPlainText0.getDefaultCountWidth());\n assertFalse(resultMatrixPlainText0.getDefaultShowStdDev());\n assertEquals(0, resultMatrixPlainText0.getDefaultMeanWidth());\n assertEquals(\"Whether to enumerate the column names (prefixing them with '(x)', with 'x' being the index).\", resultMatrixPlainText0.enumerateColNamesTipText());\n assertEquals(25, resultMatrixPlainText0.getDefaultRowNameWidth());\n assertEquals(1, resultMatrixPlainText0.getColCount());\n assertEquals(\"The number of decimals after the decimal point for the standard deviation.\", resultMatrixPlainText0.stdDevPrecTipText());\n assertTrue(resultMatrixPlainText0.getEnumerateColNames());\n assertEquals(1, resultMatrixPlainText0.getVisibleRowCount());\n assertEquals(0, resultMatrixPlainText0.getMeanWidth());\n assertEquals(\"The width of the standard deviation (0 = optimal).\", resultMatrixPlainText0.stdDevWidthTipText());\n assertTrue(resultMatrixPlainText0.getDefaultEnumerateColNames());\n assertEquals(2, resultMatrixPlainText0.getDefaultStdDevPrec());\n assertEquals(\"The number of decimals after the decimal point for the mean.\", resultMatrixPlainText0.meanPrecTipText());\n assertEquals(0, resultMatrixPlainText0.getStdDevWidth());\n assertEquals(\"The maximum width of the column names (0 = optimal).\", resultMatrixPlainText0.colNameWidthTipText());\n assertEquals(\"Whether to show the row with averages.\", resultMatrixPlainText0.showAverageTipText());\n assertFalse(resultMatrixPlainText0.getShowAverage());\n assertEquals(1, resultMatrixPlainText0.getRowCount());\n assertEquals(0, resultMatrixPlainText0.getSignificanceWidth());\n assertTrue(resultMatrixPlainText0.getDefaultPrintColNames());\n assertEquals(\"Whether to display the standard deviation column.\", resultMatrixPlainText0.showStdDevTipText());\n assertFalse(resultMatrixPlainText0.getEnumerateRowNames());\n assertEquals(25, resultMatrixPlainText0.getRowNameWidth());\n assertEquals(2, resultMatrixPlainText0.getMeanPrec());\n assertFalse(resultMatrixPlainText0.getShowStdDev());\n assertEquals(\"The width of the mean (0 = optimal).\", resultMatrixPlainText0.meanWidthTipText());\n assertEquals(2, resultMatrixPlainText0.getStdDevPrec());\n assertEquals(\"Plain Text\", resultMatrixPlainText0.getDisplayName());\n assertFalse(resultMatrixPlainText0.getDefaultShowAverage());\n assertTrue(resultMatrixPlainText0.getDefaultPrintRowNames());\n assertEquals(\"Whether to enumerate the row names (prefixing them with '(x)', with 'x' being the index).\", resultMatrixPlainText0.enumerateRowNamesTipText());\n assertEquals(\"Whether to remove the classname package prefixes from the filter names in datasets.\", resultMatrixPlainText0.removeFilterNameTipText());\n assertEquals(\"The width of the significance indicator (0 = optimal).\", resultMatrixPlainText0.significanceWidthTipText());\n assertEquals(5, resultMatrixPlainText0.getCountWidth());\n assertFalse(resultMatrixPlainText0.getDefaultRemoveFilterName());\n assertFalse(resultMatrixPlainText0.getDefaultEnumerateRowNames());\n assertEquals(0, resultMatrixPlainText0.getDefaultSignificanceWidth());\n assertEquals(\"The width of the counts (0 = optimal).\", resultMatrixPlainText0.countWidthTipText());\n assertEquals(2, resultMatrixPlainText0.getDefaultMeanPrec());\n assertTrue(resultMatrixPlainText0.getPrintRowNames());\n assertEquals(0, resultMatrixPlainText0.getDefaultStdDevWidth());\n assertEquals(1, ResultMatrix.SIGNIFICANCE_WIN);\n assertEquals(2, ResultMatrix.SIGNIFICANCE_LOSS);\n assertEquals(0, ResultMatrix.SIGNIFICANCE_TIE);\n \n resultMatrixPlainText0.setRowName(0, \"\");\n assertEquals(1, resultMatrixPlainText0.getVisibleColCount());\n assertEquals(\"Generates the output as plain text (for fixed width fonts).\", resultMatrixPlainText0.globalInfo());\n assertFalse(resultMatrixPlainText0.getRemoveFilterName());\n assertEquals(\"Whether to output row names or just numbers representing them.\", resultMatrixPlainText0.printRowNamesTipText());\n assertTrue(resultMatrixPlainText0.getPrintColNames());\n assertEquals(0, resultMatrixPlainText0.getColNameWidth());\n assertEquals(\"The maximum width for the row names (0 = optimal).\", resultMatrixPlainText0.rowNameWidthTipText());\n assertEquals(\"Whether to output column names or just numbers representing them.\", resultMatrixPlainText0.printColNamesTipText());\n assertEquals(0, resultMatrixPlainText0.getDefaultColNameWidth());\n assertEquals(5, resultMatrixPlainText0.getDefaultCountWidth());\n assertFalse(resultMatrixPlainText0.getDefaultShowStdDev());\n assertEquals(0, resultMatrixPlainText0.getDefaultMeanWidth());\n assertEquals(\"Whether to enumerate the column names (prefixing them with '(x)', with 'x' being the index).\", resultMatrixPlainText0.enumerateColNamesTipText());\n assertEquals(25, resultMatrixPlainText0.getDefaultRowNameWidth());\n assertEquals(1, resultMatrixPlainText0.getColCount());\n assertEquals(\"The number of decimals after the decimal point for the standard deviation.\", resultMatrixPlainText0.stdDevPrecTipText());\n assertTrue(resultMatrixPlainText0.getEnumerateColNames());\n assertEquals(1, resultMatrixPlainText0.getVisibleRowCount());\n assertEquals(0, resultMatrixPlainText0.getMeanWidth());\n assertEquals(\"The width of the standard deviation (0 = optimal).\", resultMatrixPlainText0.stdDevWidthTipText());\n assertTrue(resultMatrixPlainText0.getDefaultEnumerateColNames());\n assertEquals(2, resultMatrixPlainText0.getDefaultStdDevPrec());\n assertEquals(\"The number of decimals after the decimal point for the mean.\", resultMatrixPlainText0.meanPrecTipText());\n assertEquals(0, resultMatrixPlainText0.getStdDevWidth());\n assertEquals(\"The maximum width of the column names (0 = optimal).\", resultMatrixPlainText0.colNameWidthTipText());\n assertEquals(\"Whether to show the row with averages.\", resultMatrixPlainText0.showAverageTipText());\n assertFalse(resultMatrixPlainText0.getShowAverage());\n assertEquals(1, resultMatrixPlainText0.getRowCount());\n assertEquals(0, resultMatrixPlainText0.getSignificanceWidth());\n assertTrue(resultMatrixPlainText0.getDefaultPrintColNames());\n assertEquals(\"Whether to display the standard deviation column.\", resultMatrixPlainText0.showStdDevTipText());\n assertFalse(resultMatrixPlainText0.getEnumerateRowNames());\n assertEquals(25, resultMatrixPlainText0.getRowNameWidth());\n assertEquals(2, resultMatrixPlainText0.getMeanPrec());\n assertFalse(resultMatrixPlainText0.getShowStdDev());\n assertEquals(\"The width of the mean (0 = optimal).\", resultMatrixPlainText0.meanWidthTipText());\n assertEquals(2, resultMatrixPlainText0.getStdDevPrec());\n assertEquals(\"Plain Text\", resultMatrixPlainText0.getDisplayName());\n assertFalse(resultMatrixPlainText0.getDefaultShowAverage());\n assertTrue(resultMatrixPlainText0.getDefaultPrintRowNames());\n assertEquals(\"Whether to enumerate the row names (prefixing them with '(x)', with 'x' being the index).\", resultMatrixPlainText0.enumerateRowNamesTipText());\n assertEquals(\"Whether to remove the classname package prefixes from the filter names in datasets.\", resultMatrixPlainText0.removeFilterNameTipText());\n assertEquals(\"The width of the significance indicator (0 = optimal).\", resultMatrixPlainText0.significanceWidthTipText());\n assertEquals(5, resultMatrixPlainText0.getCountWidth());\n assertFalse(resultMatrixPlainText0.getDefaultRemoveFilterName());\n assertFalse(resultMatrixPlainText0.getDefaultEnumerateRowNames());\n assertEquals(0, resultMatrixPlainText0.getDefaultSignificanceWidth());\n assertEquals(\"The width of the counts (0 = optimal).\", resultMatrixPlainText0.countWidthTipText());\n assertEquals(2, resultMatrixPlainText0.getDefaultMeanPrec());\n assertTrue(resultMatrixPlainText0.getPrintRowNames());\n assertEquals(0, resultMatrixPlainText0.getDefaultStdDevWidth());\n assertEquals(1, ResultMatrix.SIGNIFICANCE_WIN);\n assertEquals(2, ResultMatrix.SIGNIFICANCE_LOSS);\n assertEquals(0, ResultMatrix.SIGNIFICANCE_TIE);\n \n int int0 = resultMatrixPlainText0.getDefaultStdDevPrec();\n assertEquals(1, resultMatrixPlainText0.getVisibleColCount());\n assertEquals(\"Generates the output as plain text (for fixed width fonts).\", resultMatrixPlainText0.globalInfo());\n assertFalse(resultMatrixPlainText0.getRemoveFilterName());\n assertEquals(\"Whether to output row names or just numbers representing them.\", resultMatrixPlainText0.printRowNamesTipText());\n assertTrue(resultMatrixPlainText0.getPrintColNames());\n assertEquals(0, resultMatrixPlainText0.getColNameWidth());\n assertEquals(\"The maximum width for the row names (0 = optimal).\", resultMatrixPlainText0.rowNameWidthTipText());\n assertEquals(\"Whether to output column names or just numbers representing them.\", resultMatrixPlainText0.printColNamesTipText());\n assertEquals(0, resultMatrixPlainText0.getDefaultColNameWidth());\n assertEquals(5, resultMatrixPlainText0.getDefaultCountWidth());\n assertFalse(resultMatrixPlainText0.getDefaultShowStdDev());\n assertEquals(0, resultMatrixPlainText0.getDefaultMeanWidth());\n assertEquals(\"Whether to enumerate the column names (prefixing them with '(x)', with 'x' being the index).\", resultMatrixPlainText0.enumerateColNamesTipText());\n assertEquals(25, resultMatrixPlainText0.getDefaultRowNameWidth());\n assertEquals(1, resultMatrixPlainText0.getColCount());\n assertEquals(\"The number of decimals after the decimal point for the standard deviation.\", resultMatrixPlainText0.stdDevPrecTipText());\n assertTrue(resultMatrixPlainText0.getEnumerateColNames());\n assertEquals(1, resultMatrixPlainText0.getVisibleRowCount());\n assertEquals(0, resultMatrixPlainText0.getMeanWidth());\n assertEquals(\"The width of the standard deviation (0 = optimal).\", resultMatrixPlainText0.stdDevWidthTipText());\n assertTrue(resultMatrixPlainText0.getDefaultEnumerateColNames());\n assertEquals(2, resultMatrixPlainText0.getDefaultStdDevPrec());\n assertEquals(\"The number of decimals after the decimal point for the mean.\", resultMatrixPlainText0.meanPrecTipText());\n assertEquals(0, resultMatrixPlainText0.getStdDevWidth());\n assertEquals(\"The maximum width of the column names (0 = optimal).\", resultMatrixPlainText0.colNameWidthTipText());\n assertEquals(\"Whether to show the row with averages.\", resultMatrixPlainText0.showAverageTipText());\n assertFalse(resultMatrixPlainText0.getShowAverage());\n assertEquals(1, resultMatrixPlainText0.getRowCount());\n assertEquals(0, resultMatrixPlainText0.getSignificanceWidth());\n assertTrue(resultMatrixPlainText0.getDefaultPrintColNames());\n assertEquals(\"Whether to display the standard deviation column.\", resultMatrixPlainText0.showStdDevTipText());\n assertFalse(resultMatrixPlainText0.getEnumerateRowNames());\n assertEquals(25, resultMatrixPlainText0.getRowNameWidth());\n assertEquals(2, resultMatrixPlainText0.getMeanPrec());\n assertFalse(resultMatrixPlainText0.getShowStdDev());\n assertEquals(\"The width of the mean (0 = optimal).\", resultMatrixPlainText0.meanWidthTipText());\n assertEquals(2, resultMatrixPlainText0.getStdDevPrec());\n assertEquals(\"Plain Text\", resultMatrixPlainText0.getDisplayName());\n assertFalse(resultMatrixPlainText0.getDefaultShowAverage());\n assertTrue(resultMatrixPlainText0.getDefaultPrintRowNames());\n assertEquals(\"Whether to enumerate the row names (prefixing them with '(x)', with 'x' being the index).\", resultMatrixPlainText0.enumerateRowNamesTipText());\n assertEquals(\"Whether to remove the classname package prefixes from the filter names in datasets.\", resultMatrixPlainText0.removeFilterNameTipText());\n assertEquals(\"The width of the significance indicator (0 = optimal).\", resultMatrixPlainText0.significanceWidthTipText());\n assertEquals(5, resultMatrixPlainText0.getCountWidth());\n assertFalse(resultMatrixPlainText0.getDefaultRemoveFilterName());\n assertFalse(resultMatrixPlainText0.getDefaultEnumerateRowNames());\n assertEquals(0, resultMatrixPlainText0.getDefaultSignificanceWidth());\n assertEquals(\"The width of the counts (0 = optimal).\", resultMatrixPlainText0.countWidthTipText());\n assertEquals(2, resultMatrixPlainText0.getDefaultMeanPrec());\n assertTrue(resultMatrixPlainText0.getPrintRowNames());\n assertEquals(0, resultMatrixPlainText0.getDefaultStdDevWidth());\n assertEquals(1, ResultMatrix.SIGNIFICANCE_WIN);\n assertEquals(2, ResultMatrix.SIGNIFICANCE_LOSS);\n assertEquals(0, ResultMatrix.SIGNIFICANCE_TIE);\n assertEquals(2, int0);\n }", "public void readCompleteTable()\n\t{\n\t\topen();\n\t\tList<Map<Object, String>> tbl = HtmlTable.rowsFrom(table);\n\t\t//System.out.println(tbl);\n\n\t}", "@Test(timeout=300000)\n public void test0() throws Throwable {\n ControllerLoadViewer controllerLoadViewer0 = new ControllerLoadViewer((Object[][]) null);\n int[] intArray0 = controllerLoadViewer0.getTraceableColumns();\n assertArrayEquals(new int[] {2, 3, 4, 5}, intArray0);\n }", "private void updateChildren() {\n modulesTableModel.clear();\n repositoriesTableModel.clear();\n if (modules != null) {\n repositoriesTableModel.set(modules.xgetRepositoryArray());\n modulesTableModel.set(modules.getModuleArray());\n } else {\n repositoriesTableModel.fireTableDataChanged();\n modulesTableModel.fireTableDataChanged();\n }\n }", "private void initTable() {\n\t\tDefaultTableModel dtm = (DefaultTableModel)table.getModel();\n\t\tdtm.setRowCount(0);\t\t\n\t\tfor(int i=0;i<MainUi.controller.sale.items.size();i++){\n\t\t\tVector v1 = new Vector();\n\t\t\tv1.add(MainUi.controller.sale.items.get(i).getProdSpec().getTitle());\n\t\t\tv1.add(MainUi.controller.sale.items.get(i).getCopies());\n\t\t\tdtm.addRow(v1);\n\t\t}\n\t\tlblNewLabel.setText(\"\"+MainUi.controller.sale.getTotal());\n\t}", "private void initTableView() {\n // nastaveni sloupcu pro zobrazeni spravne hodnoty a korektniho datoveho typu\n this.colId.setCellValueFactory(cellData -> cellData.getValue().getPersonalIdProperty());\n this.colName.setCellValueFactory(cellData -> cellData.getValue().getDisplayNameProperty());\n this.colAge.setCellValueFactory(cellData -> cellData.getValue().getAgeProperty().asObject());\n this.colGender.setCellValueFactory(cellData -> cellData.getValue().getGenderProperty());\n this.colPrice.setCellValueFactory(cellData -> cellData.getValue().getPriceProperty().asObject());\n\n // nastaveni listu prvku tabulce\n this.offerTable.setItems(this.marketplace.getOfferList());\n\n // listener pro zjisteni, ktery prvek tabulky uzivatel oznacil a naplneni aktualni reference na vybrane dite\n this.offerTable.getSelectionModel().getSelectedCells().addListener(new ListChangeListener<TablePosition>() {\n\n @Override\n public void onChanged(Change<? extends TablePosition> change) {\n ObservableList selectedCells = offerTable.getSelectionModel().getSelectedCells();\n TablePosition tablePosition = (TablePosition) selectedCells.get(0);\n currentChild = marketplace.getOfferList().get(tablePosition.getRow());\n System.out.println(currentChild);\n updateUi();\n }\n });\n }", "private int waitUntilReady()\r\n {\r\n int rc = 0;\r\n // If a stock Item is in the Table, We do not want to start\r\n // The Lookup, if the name of the stock has not been identified.\r\n // here we will wait just a couple a second at a time.\r\n // until, the user has entered the name of the stock.\r\n // MAXWAIT is 20 minutes, since we are 1 second loops.\r\n // 60 loops is 1 minute and 20 of those is 20 minutes\r\n final int MAXWAIT = 60 * 20;\r\n int counter = 0;\r\n do\r\n {\r\n try\r\n {\r\n Thread.currentThread().sleep(ONE_SECOND);\r\n }\r\n catch (InterruptedException exc)\r\n {\r\n // Do Nothing - Try again\r\n }\r\n if (counter++ > MAXWAIT)\r\n { // Abort the Lookup for historic data\r\n this.cancel();\r\n return -1;\r\n }\r\n }\r\n while (\"\".equals(sd.getSymbol().getDataSz().trim()));\r\n\r\n return 0;\r\n }", "private void initTable() {\n \t\t// init table\n \t\ttable.setCaption(TABLE_CAPTION);\n \t\ttable.setPageLength(10);\n \t\ttable.setSelectable(true);\n \t\ttable.setRowHeaderMode(Table.ROW_HEADER_MODE_INDEX);\n \t\ttable.setColumnCollapsingAllowed(true);\n \t\ttable.setColumnReorderingAllowed(true);\n \t\ttable.setSelectable(true);\n \t\t// this class handles table actions (see handleActions method below)\n \t\ttable.addActionHandler(this);\n \t\ttable.setDescription(ACTION_DESCRIPTION);\n \n \t\t// populate Toolkit table component with test SQL table rows\n \t\ttry {\n \t\t\tQueryContainer qc = new QueryContainer(\"SELECT * FROM employee\",\n \t\t\t\t\tsampleDatabase.getConnection());\n \t\t\ttable.setContainerDataSource(qc);\n \t\t} catch (SQLException e) {\n \t\t\te.printStackTrace();\n \t\t}\n \t\t// define which columns should be visible on Table component\n \t\ttable.setVisibleColumns(new Object[] { \"FIRSTNAME\", \"LASTNAME\",\n \t\t\t\t\"TITLE\", \"UNIT\" });\n \t\ttable.setItemCaptionPropertyId(\"ID\");\n \t}", "private void printTable() {\n System.out.println(\"COMPLETED SLR PARSE TABLE\");\n System.out.println(\"_________________________\");\n System.out.print(\"\\t|\");\n // print header\n for(int i = 0; i < pHeader.size(); i++) {\n pHeader.get(i);\n System.out.print(\"\\t\" + i + \"\\t|\");\n }\n System.out.println();\n // print body\n for(int i = 0; i < parseTable.size(); i++) {\n System.out.print(i + \"\\t|\");\n for(int j = 0; j < parseTable.get(i).size(); j++) {\n System.out.print(\"\\t\" + parseTable.get(i).get(j) + \"\\t|\");\n }\n System.out.println();\n }\n System.out.println();\n System.out.println(\"END OF SLR PARSE TABLE\");\n System.out.println();\n }", "private void load_table() {\n DefaultTableModel model = new DefaultTableModel();\n model.addColumn(\"ID\");\n model.addColumn(\"NIM\");\n model.addColumn(\"Nama\");\n model.addColumn(\"Kelamin\");\n model.addColumn(\"Phone\");\n model.addColumn(\"Agama\");\n model.addColumn(\"Status\");\n\n //menampilkan data database kedalam tabel\n try {\n String sql = \"SELECT * FROM mhs\";\n java.sql.Connection koneksi = (Connection) Koneksi.KoneksiDB();\n java.sql.Statement stm = koneksi.createStatement();\n java.sql.ResultSet res = stm.executeQuery(sql);\n\n while (res.next()) {\n model.addRow(new Object[]{res.getString(1), res.getString(2),\n res.getString(3), res.getString(4), res.getString(5),\n res.getString(6), res.getString(7)});\n }\n tabelMahasiswa.setModel(model);\n } catch (Exception e) {\n JOptionPane.showMessageDialog(this, e.getMessage());\n }\n\n }" ]
[ "0.70610285", "0.600978", "0.5678197", "0.5503278", "0.5502349", "0.54023755", "0.5395682", "0.53806245", "0.5332212", "0.53062254", "0.530399", "0.5269147", "0.52621967", "0.51844156", "0.51219755", "0.51205605", "0.51189107", "0.5105512", "0.50939095", "0.5082452", "0.5082227", "0.5072556", "0.50655574", "0.5061295", "0.50517505", "0.5039759", "0.50390863", "0.5034637", "0.50090516", "0.50057817", "0.49811432", "0.4975036", "0.49512127", "0.49486282", "0.49432757", "0.4936223", "0.49329954", "0.4928578", "0.4920704", "0.490207", "0.49016973", "0.48946163", "0.48816565", "0.48783046", "0.48731646", "0.48682243", "0.48669893", "0.48627317", "0.48610893", "0.4858405", "0.48552364", "0.48442492", "0.4840693", "0.4833395", "0.48211023", "0.47930673", "0.4786449", "0.4770545", "0.4770486", "0.47682807", "0.47621456", "0.47619992", "0.47552705", "0.4748223", "0.4742743", "0.4731663", "0.47308043", "0.4728832", "0.47236893", "0.47215697", "0.47186878", "0.4718221", "0.4717188", "0.47110853", "0.4704817", "0.47013792", "0.4698196", "0.46941772", "0.46914148", "0.4685857", "0.46845058", "0.46829686", "0.46811187", "0.46811113", "0.46767917", "0.46757132", "0.4674946", "0.4671599", "0.46698722", "0.4666977", "0.46639976", "0.46633402", "0.4661777", "0.46593678", "0.4657386", "0.46521598", "0.46504116", "0.46501303", "0.46496367", "0.46486408" ]
0.60784775
1
Always wait for Swing at least once. There seems to be a race condition for incremental threaded models where the table is not busy at the time this method is called, but there is an update pending via an invokeLater().
private static <T> void doWaitForTableModel(ThreadedTableModel<T, ?> model) { waitForSwing(); boolean didWait = false; int waitTime = 0; while (model.isBusy()) { didWait = true; waitTime += sleep(DEFAULT_WAIT_DELAY); // model loading may take longer than normal waits if (waitTime >= PRIVATE_LONG_WAIT_TIMEOUT) { Msg.error(AbstractDockingTest.class, createStackTraceForAllThreads()); // debug String busyState = getBusyState(model); Msg.error(AbstractDockingTest.class, busyState); throw new AssertException( "Timed-out waiting for table model to load in " + waitTime + "ms"); } } waitForSwing(); if (didWait) { // try again (the idea is that we may have had a small window where the model was // not busy, but more work may be pushed on) waitForTableModel(model); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void jButtonFillTableActionPerformed(java.awt.event.ActionEvent evt) {\n SwingWorkerDemo worker = new SwingWorkerDemo( jBusyTable.getBusyModel() , (DefaultTableModel)jXTable.getModel() );\n\n // Start the worker\n worker.execute();\n }", "public static void waitForEDT() {\n\t\ttry {\n\t\t\tSwingUtilities.invokeAndWait(() -> {});\n\t\t} catch (InvocationTargetException | InterruptedException e) {\n\t\t\tthrow new RuntimeException(e);\n\t\t}\n\t}", "public void handleLabTestUpdate() {\r\n SwingUtilities.invokeLater(new Runnable() {\r\n public void run() {\r\n tableModel.fireTableDataChanged();\r\n }\r\n });\r\n }", "private void actuallyRefresh() {\n synchronized (this) {\n if (table != null) {\n table.recomputeModel(book, getDisplayedSecurities(), allowMissingPrices, timelySnapshotInterval);\n }\n }\n if (tablePane != null) {\n tablePane.setVisible(true);\n tablePane.revalidate();\n }\n }", "@Override\n public void tableChanged(final TableModelEvent e) {\n SwingUtilities.invokeLater(new Runnable() {\n @Override\n public void run() {\n int viewRow = jTableImportMonitor.convertRowIndexToView(e.getFirstRow());\n jTableImportMonitor.scrollRectToVisible(jTableImportMonitor.getCellRect(viewRow, 0, true)); \n }\n });\n }", "public void updateText() throws JUIGLELangException {\n SwingUtilities.invokeLater(new Runnable() {\n\n\n public void run() {\n fireTableStructureChanged();\n }\n });\n\n }", "private void refresh() {\n\t\t\tRunnable run = new Runnable() {\n\t\t\t\tpublic void run() {\n\t\t\t\t\tif(table.isDisposed())return;\n\t\t\t\t\tviewer.refresh();\n\t\t\t\t}\t\t\t\n\t\t\t};\n\t\t\tDisplay.getDefault().asyncExec(run);\n\t\t}", "synchronized void refresh() {\n\n\t\t// We must not call fireTableDataChanged, because that would clear the\n\t\t// selection in the task window\n\t\tfireTableRowsUpdated(0, size - 1);\n\n\t}", "public static <T> void waitForTableModel(ThreadedTableModel<T, ?> model) {\n\t\tdoWaitForTableModel(model);\n\t}", "private void init () {\n\t\tSwingUtilities.invokeLater(new Runnable() {\n public void run() {\n \tSwingOperatorView.stateOnCurrentObject();\n }\n\t\t});\n\t}", "public void forceUpdateUI() {\n\t\tupdateUI();\n\t}", "public void actionPerformed(ActionEvent ae){\n if(waitingForRepaint){\n repaint();\n }\n }", "public void runModel(){\n\t\tcurrentView.getDynamicModelView().getModel().setProgressMonitor(progressMonitor);\r\n\t\tnew Thread(currentView.getDynamicModelView().getModel()).start();\r\n\r\n\t\tsetStatusBarText(\"Ready\");\r\n\t}", "@Override\r\n\tpublic boolean updateTable() {\r\n\t\t/*\r\n\t\t * VERSION 1\r\n\t\t *\r\n\t\tobjectCollection.clear();\r\n\t\tobjectCollection.addAll(retrieveObjects());\r\n\t\trefreshTable();*/\r\n\t\tlong size=objectCollection.size();\r\n\t\tobjectCollection.clear();\r\n\t\tint index=getSelectionIndex();\r\n\t\tupdateTable(SWT.DEFAULT);\r\n\t\tselectElement(index);\r\n\t\treturn objectCollection.size()!=size;\r\n\t}", "protected void done() {\n logoPanel.stop();\n qtf.setCursor(normalCursor);\n searchButton.setEnabled(true);\n\n boolean isStatusOK = false;\n try {\n isStatusOK = get();\n } catch (Exception e) {\n }\n\n if (isStatusOK) {\n Thread tableFill = new Thread(msb_qtm);\n tableFill.start();\n\n try {\n tableFill.join();\n } catch (InterruptedException iex) {\n logger.warn(\"Problem joining tablefill thread\");\n }\n\n synchronized (this) {\n Thread projectFill = new Thread(\n qtf.getProjectModel());\n projectFill.start();\n try {\n projectFill.join();\n } catch (InterruptedException iex) {\n logger.warn(\"Problem joining projectfill thread\");\n }\n\n qtf.initProjectTable();\n }\n\n msb_qtm.setProjectId(\"All\");\n qtf.setColumnSizes();\n qtf.resetScrollBars();\n logoPanel.stop();\n qtf.setCursor(normalCursor);\n\n if (queryTask != null) {\n queryTask.cancel();\n }\n\n qtf.setQueryExpired(false);\n String queryTimeout = System.getProperty(\n \"queryTimeout\");\n System.out.println(\"Query expiration: \"\n + queryTimeout);\n Integer timeout = new Integer(queryTimeout);\n if (timeout != 0) {\n // Conversion from minutes of milliseconds\n int delay = timeout * 60 * 1000;\n queryTask = OMPTimer.getOMPTimer().setTimer(\n delay, infoPanel, false);\n }\n }\n }", "private void updateGUIStatus() {\r\n\r\n }", "public static void updateSummaryTable() {\n tableModel.fireTableDataChanged();\n tableModel.fireTableStructureChanged();\n window.resetSize();\n\n window.setComboBox();\n showWindow();\n }", "public static void ready() {\r\n\t\tinicialitzarGUI();\r\n\t\tviewtable();\r\n\t}", "@Override\n public void update() {\n this.blnDoUpdate.set(true);\n }", "public void refreshGUI() {\n try {\n // get all clerk theough the DAO to a tempory List\n List<Clerk> clerkList = clerkDAO.getAllClerk();\n\n // create the model and update the \"table\"\n ClerkTableModel model = new ClerkTableModel(clerkList);\n table.setModel(model);\n\n } catch (Exception exc) {\n JOptionPane.showMessageDialog(ClerkViewer.this, \"Error: \" + exc, \"Error\", JOptionPane.ERROR_MESSAGE);\n }\n }", "public void loadingTable() {\n this.setRowCount(1, true);\r\n this.setVisibleRangeAndClearData(this.getVisibleRange(), true);\r\n }", "public void startLoading() {\r\n\t\tgetDisplay().setRowCount(0, true);\r\n\t\tlabel1.setHTML(\"\");\r\n\t\tlabel2.setHTML(\"\");\r\n\t}", "private void myInit() {\n init_key();\n init_tbl_inventory();\n data_cols();\n focus();\n SwingUtilities.invokeLater(new Runnable() {\n @Override\n public void run() {\n jTextField1.grabFocus();\n }\n });\n\n }", "private void waitForSecondChangeBeforeNotification() {\n\t\tif (hasChanged())\n\t\t\tnotifyObservers(Global.COMPONENT_SIZE_UPDATE);\n\t\telse\n\t\t\tsetChanged();\n\t}", "private void runWork()\r\n\t{\r\n\t\tRunnable transferPending = new Runnable()\r\n\t\t{\r\n\r\n\t\t\tpublic void run()\r\n\t\t\t{\r\n\t\t\t\ttransferPendingCellData();\r\n\t\t\t\tfireTableDataChanged(); // causes the table to be updated\r\n\t\t\t}\r\n\t\t};\r\n\r\n\t\twhile(noStopRequested)\r\n\t\t{\r\n\t\t\ttry\r\n\t\t\t{\r\n\t\t\t\t// refresh the plans vector\r\n\t\t\t\tplans = new java.util.LinkedList(Control.getInstance().getPlanObjects());\r\n\t\t\t\tcreatePendingCellData();\r\n\t\t\t\tSwingUtilities.invokeAndWait(transferPending);\r\n\t\t\t\tThread.sleep(2000L); // the REFRESH rate is set at two seconds\r\n\t\t\t}catch(InvocationTargetException tx)\r\n\t\t\t{\r\n\t\t\t\tlogger.error(\"runWork - InvocationTargetException building cell data: \", tx);\r\n\t\t\t\tstopRequest();\r\n\t\t\t}catch(InterruptedException x)\r\n\t\t\t{\r\n\t\t\t\tThread.currentThread().interrupt();\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t}", "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 }", "@Override\n\tpublic void updatePanel() {\n\t\tstatTable.setStatTable(getModel().getRowCount(),\n\t\t\t\tgetModel().getRowNames(), getModel().getColumnCount(),\n\t\t\t\tgetModel().getColumnNames());\n\t\tgetModel().updatePanel();\n\t}", "public void initDone() {\n super.initDone();\n try {\n setTimesForAnimation();\n //loadProfile(getPosition());\n doMoveProbe();\n } catch (Exception exc) {\n logException(\"initDone\", exc);\n }\n // Enable table panel after UI is initialized\n tablePanel.setVisible(showTable);\n }", "public void setUploading()\n {\n jPanel4.setVisible(false);\n th.start();\n }", "public void init() {\n try {\n java.awt.EventQueue.invokeAndWait(new Runnable() {\n public void run() {\n initComponents();\n }\n });\n } catch (Exception ex) {\n ex.printStackTrace();\n }\n }", "private void initJBusyComponentTab() {\n /** Create the {@link BusyLayerUI}\n */\n this.printingUI = new BasicBusyLayerUI();\n\n /** Give a range to the printing model\n */\n this.printingModel.setMinimum(0);\n this.printingModel.setMaximum(1000000);\n\n /** Bound the LayerUI and the BusyModel to the JBusyComponent\n */\n this.jBusyComponent.setBusyLayerUI( this.printingUI );\n this.jBusyComponent.setBusyModel( this.printingModel );\n\n /** Init the default Task Duration to 5 seconds\n */\n this.jSpinnerTaskDuration.setValue(5);\n this.jSpinnerMinTaskDuration.setValue(2);\n }", "public void refreshTable() {\r\n\t\t// THIS is the key method to ensure JTable view is synchronized\r\n\t\tjtable.revalidate();\r\n\t\tjtable.repaint();\r\n\t\tthis.revalidate();\r\n\t\tthis.repaint();\r\n\t}", "public static void init() {\n resetTable();\n window.setVisible(true);\n }", "public void testRefreshPanel() {\n Operation element = new OperationImpl();\n element.setConcurrency(CallConcurrencyKind.CONCURRENT);\n\n panel.configurePanel(element);\n\n assertTrue(\"Failed to refresh panel correctly.\",\n ((JCheckBox) panel.retrievePanel().getComponent(0)).isSelected());\n }", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n Available = new javax.swing.JPanel();\n jPanel1 = new javax.swing.JPanel();\n button = new javax.swing.JButton();\n jScrollPane1 = new javax.swing.JScrollPane();\n table = new javax.swing.JTable();\n jLabel1 = new javax.swing.JLabel();\n jLabel2 = new javax.swing.JLabel();\n jLabel3 = new javax.swing.JLabel();\n jLabel4 = new javax.swing.JLabel();\n jLabel5 = new javax.swing.JLabel();\n btnStartTest = new javax.swing.JButton();\n\n setBackground(new java.awt.Color(255, 255, 255));\n\n Available.setBackground(new java.awt.Color(255, 255, 255));\n Available.setFont(new java.awt.Font(\"Segoe UI\", 0, 14)); // NOI18N\n\n jPanel1.setBackground(new java.awt.Color(255, 255, 255));\n\n button.setBackground(new java.awt.Color(54, 33, 89));\n button.setFont(new java.awt.Font(\"Segoe UI\", 1, 14)); // NOI18N\n button.setForeground(new java.awt.Color(255, 255, 255));\n button.setText(\"Refresh\");\n button.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n buttonActionPerformed(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 .addComponent(button, javax.swing.GroupLayout.PREFERRED_SIZE, 89, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addContainerGap(41, Short.MAX_VALUE))\n );\n jPanel1Layout.setVerticalGroup(\n jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addGap(102, 102, 102)\n .addComponent(button)\n .addContainerGap(307, Short.MAX_VALUE))\n );\n\n table.setFont(new java.awt.Font(\"Segoe UI\", 0, 14)); // NOI18N\n table.setForeground(new java.awt.Color(51, 0, 51));\n table.setModel(new javax.swing.table.DefaultTableModel(\n new Object [][] {\n {null, null, null, null, null},\n {null, null, null, null, null},\n {null, null, null, null, null},\n {null, null, null, null, null}\n },\n new String [] {\n \"Title 1\", \"Title 2\", \"Title 3\", \"Title 4\", \"Title 5\"\n }\n ));\n table.setGridColor(new java.awt.Color(204, 204, 255));\n table.setRowMargin(3);\n jScrollPane1.setViewportView(table);\n if (table.getColumnModel().getColumnCount() > 0) {\n table.getColumnModel().getColumn(2).setResizable(false);\n table.getColumnModel().getColumn(2).setPreferredWidth(15);\n table.getColumnModel().getColumn(3).setPreferredWidth(3);\n }\n ListSelectionModel listSelectionModel = table.getSelectionModel();\n listSelectionModel.addListSelectionListener(createSelectionListener());\n table.setSelectionModel(listSelectionModel);\n\n jLabel1.setBackground(new java.awt.Color(83, 51, 113));\n jLabel1.setFont(new java.awt.Font(\"Segoe UI\", 1, 14)); // NOI18N\n jLabel1.setText(\"Test Description\");\n\n jLabel2.setBackground(new java.awt.Color(83, 51, 113));\n jLabel2.setFont(new java.awt.Font(\"Segoe UI\", 1, 14)); // NOI18N\n jLabel2.setText(\"Course Code\");\n jLabel2.setDoubleBuffered(true);\n\n jLabel3.setBackground(new java.awt.Color(83, 51, 113));\n jLabel3.setFont(new java.awt.Font(\"Segoe UI\", 1, 14)); // NOI18N\n jLabel3.setText(\"Date & Time\");\n\n jLabel4.setBackground(new java.awt.Color(83, 51, 113));\n jLabel4.setFont(new java.awt.Font(\"Segoe UI\", 1, 14)); // NOI18N\n jLabel4.setText(\"Open/Closed\");\n\n jLabel5.setBackground(new java.awt.Color(83, 51, 113));\n jLabel5.setFont(new java.awt.Font(\"Segoe UI\", 1, 14)); // NOI18N\n jLabel5.setText(\"Duration\");\n\n btnStartTest.setBackground(new java.awt.Color(54, 33, 89));\n btnStartTest.setFont(new java.awt.Font(\"Segoe UI\", 2, 14)); // NOI18N\n btnStartTest.setForeground(new java.awt.Color(255, 255, 255));\n btnStartTest.setText(\"Start Test\");\n btnStartTest.setEnabled(false);\n btnStartTest.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n btnStartTestActionPerformed(evt);\n }\n });\n\n javax.swing.GroupLayout AvailableLayout = new javax.swing.GroupLayout(Available);\n Available.setLayout(AvailableLayout);\n AvailableLayout.setHorizontalGroup(\n AvailableLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(AvailableLayout.createSequentialGroup()\n .addGroup(AvailableLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(AvailableLayout.createSequentialGroup()\n .addContainerGap()\n .addComponent(jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 855, Short.MAX_VALUE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED))\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, AvailableLayout.createSequentialGroup()\n .addGap(21, 21, 21)\n .addComponent(jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, 145, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(18, 18, 18)\n .addComponent(jLabel2, javax.swing.GroupLayout.PREFERRED_SIZE, 138, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(29, 29, 29)\n .addComponent(jLabel3, javax.swing.GroupLayout.PREFERRED_SIZE, 167, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(jLabel5, javax.swing.GroupLayout.PREFERRED_SIZE, 140, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(jLabel4, javax.swing.GroupLayout.PREFERRED_SIZE, 140, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 56, Short.MAX_VALUE)))\n .addGroup(AvailableLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(btnStartTest)))\n );\n AvailableLayout.setVerticalGroup(\n AvailableLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(AvailableLayout.createSequentialGroup()\n .addGap(35, 35, 35)\n .addComponent(btnStartTest)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n .addGroup(AvailableLayout.createSequentialGroup()\n .addGap(20, 20, 20)\n .addGroup(AvailableLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel1)\n .addComponent(jLabel2)\n .addComponent(jLabel3)\n .addComponent(jLabel4)\n .addComponent(jLabel5))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 295, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(0, 0, Short.MAX_VALUE))\n );\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 .addComponent(Available, javax.swing.GroupLayout.Alignment.TRAILING, 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 .addGroup(layout.createSequentialGroup()\n .addComponent(Available, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(0, 108, Short.MAX_VALUE))\n );\n }", "@Override\n public void run() {\n try{\n Thread.sleep(5000);\n // To get rid of the Exception lets run the label updating after process is get completing. So that is label is\n // getting updated on the UI Thread and we don't get any exception\n Platform.runLater(new Runnable() { // Opening new Runnable to update the label\n @Override\n public void run() { // This is running in the UI Thread so updating the label\n ourLabel.setText(\"We did something\");\n }\n });\n } catch (InterruptedException e) {\n // We don't care about this\n }\n }", "private static void laterShowNewAtlas() {\n javax.swing.SwingUtilities.invokeLater(new Runnable() {\n public void run() {\n displayNewAtlas();\n }\n });\n }", "public void updateCurveSelectorTable() {\r\n\t\tif (Thread.currentThread().getId() == DataExplorer.application.getThreadId()) {\r\n\t\t\tthis.graphicsTabItem.updateCurveSelectorTable();\r\n\t\t\tif (this.compareTabItem != null && !this.compareTabItem.isDisposed()) this.compareTabItem.updateCurveSelectorTable();\r\n\t\t}\r\n\t\telse {\r\n\t\t\tGDE.display.asyncExec(new Runnable() {\r\n\t\t\t\tpublic void run() {\r\n\t\t\t\t\tDataExplorer.this.graphicsTabItem.updateCurveSelectorTable();\r\n\t\t\t\t\tif (DataExplorer.this.compareTabItem != null && !DataExplorer.this.compareTabItem.isDisposed()) DataExplorer.this.compareTabItem.updateCurveSelectorTable();\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t}\r\n\t}", "public synchronized void goNow() {\n\t if ((waitingCarSize > 0) && (count > 0) && (count < waitingCarSize) && (buttonPressed == false)){\n\t buttonPressed = true;\n\t }\n\t notifyAll();\n\t return;\n }", "public void init(){\r\n\t\t\r\n\t\ttry {\r\n\t\t\tSwingUtilities.invokeAndWait(new Runnable() {\r\n\t\t\t\tpublic void run() {\r\n\t\t\t\t\tbuildWindow();\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t} catch (Exception e) {\r\n\t\t\tSystem.err.println(\"createGUI didn't complete successfully\");\r\n\t\t}\r\n\t}", "public GUIView() {\n initComponents();\n setMaxThreads();\n setCountOfElements(1);\n setCountOfThreads(1);\n this.isReadyForCalculation = false;\n }", "private void compInit() throws Exception {\n // Clean up deferred observations from previous UT dates\n DeferredProgramList.cleanup();\n\n // Input Panel Setup\n WidgetPanel inputPanel = new WidgetPanel(\n new Hashtable<String, String>(), widgetBag);\n\n _widgetPanel = inputPanel;\n calibrationMenu = new CalibrationsPanel();\n buildStagingPanel();\n\n // Table setup\n try {\n msbQTM = new MSBQueryTableModel();\n } catch (Exception e) {\n logger.error(\"Unable to create table model\", e);\n e.printStackTrace();\n exitQT();\n }\n\n infoPanel = new InfoPanel(msbQTM, localQuerytool, this);\n\n ProjectTableModel ptm = new ProjectTableModel();\n projectTableSetup(ptm);\n tableSetup();\n\n logger.info(\"Table setup\");\n\n resultsPanel = new JScrollPane(table);\n resultsPanel.getViewport().setScrollMode(JViewport.BLIT_SCROLL_MODE);\n projectPane = new JScrollPane(projectTable);\n projectPane.getViewport().setScrollMode(JViewport.BLIT_SCROLL_MODE);\n\n tablePanel = new JSplitPane(JSplitPane.HORIZONTAL_SPLIT, projectPane,\n resultsPanel);\n tablePanel.setDividerSize(0);\n tablePanel.validate();\n\n tablePanel.setMinimumSize(new Dimension(-1, 100));\n\n topPanel = new JSplitPane(JSplitPane.HORIZONTAL_SPLIT, infoPanel,\n tabbedPane);\n topPanel.setMinimumSize(new Dimension(-1, 450));\n topPanel.setDividerSize(0);\n topPanel.validate();\n\n // Build Menu\n buildMenu();\n\n logger.info(\"Menu built\");\n\n setLayout(new BorderLayout());\n add(topPanel, BorderLayout.NORTH);\n add(tablePanel, BorderLayout.CENTER);\n\n // Read the configuration to determine the widgets\n try {\n inputPanel.parseConfig(WIDGET_CONFIG_FILE);\n } catch (IOException e) {\n logger.fatal(\"Widget Panel Parse Failed\", e);\n }\n\n logger.info(\"Widget config parsed\");\n }", "private void init() {\n// LoginHelper.USER = new NguoiDungDAO().selectById(\"ND002\");\n putClientProperty(\"JInternalFrame.isPalette\", Boolean.TRUE);\n getRootPane().setWindowDecorationStyle(JRootPane.NONE);\n ((BasicInternalFrameUI) this.getUI()).setNorthPane(null);\n this.setBorder(null);\n\n if (LoginHelper.quyenQuanTri()) {\n mand = \"\";\n } else {\n mand = LoginHelper.USER.getMaND();\n }\n\n tbl_dangdat0.setModel(tblModel0);\n tbl_henngay1.setModel(tblModel1);\n tbl_23.setModel(tblModel23);\n tbl_4.setModel(tblModel4);\n\n loadTable0();\n loadTable1();\n// Thread th = new Thread(this);\n// th.start();\n loadTable23();\n loadTable4();\n }", "final void waitFinished() {\n if (selectionSyncTask != null) {\n selectionSyncTask.waitFinished();\n }\n }", "public void init()\n\t{\n\t\ttry\n\t\t{\n\t\t\tjavax.swing.SwingUtilities.invokeAndWait(new Runnable()\n\t\t\t{\n\t\t\t\tpublic void run()\n\t\t\t\t{\n\t\t\t\t\tcreateGUI();\n\t\t\t\t}\n\t\t\t});\n\t\t} catch (Exception e)\n\t\t{\n\t\t\tSystem.err.println(\"createGUI didn't successfully complete: \"\n\t\t\t\t\t+ e.toString());\n\t\t}\n\t}", "private void waitTableBuffering(String legend){\n final WebElement res = this.driver.findElement(By.id(\"Res\"));\n this.driverWaitTime.until(ExpectedConditions.textToBePresentInElement(res, legend));\n }", "private void firstSight()\n\t{\n\t\tSwingUtilities.invokeLater(new Runnable() {\n\t\t public void run() { \n\t\t \tfor(int a = 0; a < GRIDSIZE; a++)\n\t\t\t {\n\t\t\t \tfor(int b = 0; b < GRIDSIZE; b++)\n\t\t\t\t {\n\t\t\t \t\tbotones[a][b].toggleOnOff();\n\t\t\t \t\tbotones[a][b].setEnabled(true);\n\t\t\t\t }\n\t\t\t }\n\t\t\t\ttimerStart.stop();\n\t\t }\n\t\t });\n\t}", "public ComplaintSubmitted() {\n initComponents();\n dtm = (DefaultTableModel) cTable.getModel();\n this.showContent(\"Waiting For Approval\");\n this.setLocationRelativeTo(null);\n }", "public void update() {\n tableChanged(new TableModelEvent(this));\n }", "public static void triggerRefresh() {\n TableView transplantWaitingList = (TableView) App.getWindow().getScene()\n .lookup(\"#transplantWaitingList\");\n if (transplantWaitingList == null) {\n // Handle case were accountsList is not initialised.\n throw new NullPointerException(\n \"TableView object 'transplantWaitingList' is not initialised in the main window.\");\n } else {\n // Trigger instantiated update.\n transplantWaitingList.refresh();\n }\n }", "@Override\r\n\tprotected void done() {\r\n\t\ttry {\r\n\t\t\tthis.get();\r\n\r\n\t\t\tRunnable run = new Runnable() {\r\n\r\n\t\t\t\t@Override\r\n\t\t\t\tpublic void run() {\r\n\t\t\t\t\ttry {\r\n\t\t\t\t\t\tMainFrame mf = GUITools.getMainFrame();\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t// try to restore the window at the last location\r\n\t\t\t\t\t\tPropertyManager pm = PropertyManager.getManager(mf);\r\n\t\t\t\t\t\tProperties p = pm.read();\r\n\t\t\t\t\t\t// first run, write default values\r\n\t\t\t\t\t\tif (p.isEmpty()){\r\n\t\t\t\t\t\t\tDimension dimScreen = Toolkit.getDefaultToolkit().getScreenSize();\r\n\t\t\t\t\t\t\tint width = (int) dimScreen.getWidth() / 9 * 8;\r\n\t\t\t\t\t\t\tint height = (int) dimScreen.getHeight() / 9 * 8;\r\n\t\t\t\t\t\t\tmf.setLocation(width / 9 * 1 / 2, height / 9 * 1 / 3);\r\n\t\t\t\t\t\t\tmf.setPreferredSize(new Dimension(width, height));\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tp.setProperty(\"loc_x\", String.valueOf(mf.getLocation().x));\r\n\t\t\t\t\t\t\tp.setProperty(\"loc_y\", String.valueOf(mf.getLocation().y));\r\n\t\t\t\t\t\t\tp.setProperty(\"width\", String.valueOf(width));\r\n\t\t\t\t\t\t\tp.setProperty(\"height\", String.valueOf(height));\r\n\t\t\t\t\t\t\tp.setProperty(\"extendedState\", String.valueOf(JFrame.MAXIMIZED_BOTH));\r\n\t\t\t\t\t\t\tpm.write();\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tmf.setVisible(true);\r\n\t\t\t\t\t\t// start like last time\r\n\t\t\t\t\t\tmf.setLocation(new Point(Integer.valueOf(p.getProperty(\"loc_x\")), Integer.valueOf(p.getProperty(\"loc_y\")))); \r\n\t\t\t\t\t\tmf.setSize(Integer.valueOf(p.getProperty(\"width\")), Integer.valueOf(p.getProperty(\"height\")));\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tif (Integer.valueOf(p.getProperty(\"extendedState\")) != JFrame.MAXIMIZED_BOTH){\r\n\t\t\t\t\t\t\tmf.setExtendedState(JFrame.NORMAL);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t} catch (Exception e) {\r\n\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t}\r\n\t\t\t};\r\n\t\t\t// finally display (from EDT)\r\n\t\t\tSwingUtilities.invokeLater(run);\r\n\r\n\t\t\tSystem.gc();\r\n\r\n\t\t} catch (InterruptedException e1) {\r\n\t\t\tSystem.out.println(\"IQM Fatal: \"+ e1);\r\n\t\t\tDialogUtil.getInstance().showErrorMessage(null, e1, true);\r\n\t\t\tSystem.exit(-1);\r\n\t\t} catch (ExecutionException e1) {\r\n\t\t\tSystem.out.println(\"IQM Fatal: \"+ e1);\r\n\t\t\tDialogUtil.getInstance().showErrorMessage(null, e1, true);\r\n\t\t\tSystem.exit(-1);\r\n\t\t} catch (Exception e) {\r\n\t\t\tSystem.out.println(\"IQM Fatal: \"+ e);\r\n\t\t\tDialogUtil.getInstance().showErrorMessage(null, e, true);\r\n\t\t\tSystem.exit(-1);\r\n\t\t}\r\n\t}", "private void updatePanel() {\n\t\tProbeUtilities.updateModelProbePanel();\n\t}", "void waitForAddStatusIsDisplayed() {\n\t\tSeleniumUtility.waitElementToBeVisible(driver, homepageVehiclePlanning.buttonTagAddStatusHomepageVehiclePlanning);\n\t}", "@Override\n\t\t\t\t\t\t\t\tpublic void run() {\n\t\t\t\t\t\t\t\t\twait = new waittingDialog();\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t}", "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 }", "void init() {\n txtClassname.getDocument().removeDocumentListener(syncTableDocL);\n txtTablename.getDocument().removeDocumentListener(syncClassDocL);\n txtDescription.getDocument().removeDocumentListener(syncClassDocL);\n txtPrimaryKeyfield.getDocument().removeDocumentListener(syncClassDocL);\n cidsClass = model.getCidsClass();\n initCboAttrPolicy();\n final DomainserverProject project = model.getProject();\n classTableModel = new ClassTableModel(project, cidsClass);\n tblAttr.setModel(classTableModel);\n final JXTable attrTable = (JXTable)tblAttr;\n attrTable.setSortOrder(0, SortOrder.ASCENDING);\n attrTable.setSortable(true);\n for (int i = 1; i < attrTable.getColumnCount(); ++i) {\n attrTable.getColumnExt(i).setSortable(false);\n }\n attrTable.getColumnExt(0).setVisible(false);\n retrieveAndSortTypes();\n final List<Icon> allIcons = new ArrayList<Icon>(project.getCidsDataObjectBackend().getAllEntities(Icon.class));\n Collections.sort(allIcons, new Comparators.Icons());\n cboClassIcons.setModel(new DefaultComboBoxModel(allIcons.toArray()));\n cboObjectIcons.setModel(new DefaultComboBoxModel(allIcons.toArray()));\n cboClassIcons.setRenderer(new Renderers.IconCellRenderer(project));\n cboObjectIcons.setRenderer(new Renderers.IconCellRenderer(project));\n if (cidsClass == null) {\n txtClassname.setText(\"\"); // NOI18N\n txtTablename.setText(\"\"); // NOI18N\n chkSync.setSelected(true);\n cboClassIcons.setSelectedIndex(0);\n cboObjectIcons.setSelectedIndex(0);\n txtPrimaryKeyfield.setText(\"ID\"); // NOI18N\n chkType.setEnabled(false);\n chkType.setSelected(true);\n chkIndexed.setSelected(false);\n txtDescription.setText(\"\"); // NOI18N\n } else {\n cboClassIcons.setSelectedItem(cidsClass.getClassIcon());\n cboObjectIcons.setSelectedItem(cidsClass.getObjectIcon());\n txtClassname.setText(cidsClass.getName());\n txtTablename.setText(cidsClass.getTableName());\n chkSync.setSelected(cidsClass.getName().equalsIgnoreCase(cidsClass.getTableName()));\n txtPrimaryKeyfield.setText(cidsClass.getPrimaryKeyField());\n cboObjectIcons.getSelectedItem();\n cboObjectIcons.getModel();\n chkType.setEnabled(false);\n chkType.setSelected(true);\n chkIndexed.setSelected((cidsClass.isIndexed() != null) && cidsClass.isIndexed());\n final String desc = cidsClass.getDescription();\n txtDescription.setText((desc == null) ? \"\" : desc); // NOI18N\n }\n this.cidsClass = classTableModel.getCidsClass();\n txtClassname.getDocument().addDocumentListener(syncTableDocL);\n txtTablename.getDocument().addDocumentListener(syncClassDocL);\n txtDescription.getDocument().addDocumentListener(syncClassDocL);\n txtPrimaryKeyfield.getDocument().addDocumentListener(syncClassDocL);\n syncTablename();\n classTableModel.setAttrSync(jtbAttrSync.isSelected());\n model.fireChangeEvent();\n tblAttr.getSelectionModel().clearSelection();\n }", "private void initComponents() {\r\n\r\n jLabel1 = new javax.swing.JLabel();\r\n txtPageSize = new JTextFieldPallete();\r\n btnRefresh = new javax.swing.JButton();\r\n btnMoreRecords = new javax.swing.JButton();\r\n dlgLookup = new javax.swing.JDialog();\r\n jScrollPane1 = new javax.swing.JScrollPane();\r\n tblRecords = new JTableReadOnly(35);\r\n jPanel1 = new javax.swing.JPanel();\r\n btnSelectRecord = new javax.swing.JButton();\r\n lblStatus = new javax.swing.JLabel();\r\n pnlCriteria = new javax.swing.JPanel();\r\n btnLookup = new component.JButtonPallete();\r\n\r\n org.jdesktop.application.ResourceMap resourceMap = org.jdesktop.application.Application.getInstance(common2.Common2App.class).getContext().getResourceMap(LookupTable.class);\r\n jLabel1.setText(resourceMap.getString(\"jLabel1.text\")); // NOI18N\r\n\r\n txtPageSize.setText(resourceMap.getString(\"txtPageSize.text\")); // NOI18N\r\n txtPageSize.setPreferredSize(new java.awt.Dimension(40, 20));\r\n txtPageSize.addActionListener(new java.awt.event.ActionListener() {\r\n public void actionPerformed(java.awt.event.ActionEvent evt) {\r\n txtPageSizeActionPerformed(evt);\r\n }\r\n });\r\n txtPageSize.addFocusListener(new java.awt.event.FocusAdapter() {\r\n public void focusLost(java.awt.event.FocusEvent evt) {\r\n txtPageSizeFocusLost(evt);\r\n }\r\n });\r\n\r\n btnRefresh.setText(resourceMap.getString(\"btnRefresh.text\")); // NOI18N\r\n btnRefresh.addActionListener(new java.awt.event.ActionListener() {\r\n public void actionPerformed(java.awt.event.ActionEvent evt) {\r\n btnRefreshActionPerformed(evt);\r\n }\r\n });\r\n\r\n btnMoreRecords.setText(resourceMap.getString(\"btnMoreRecords.text\")); // NOI18N\r\n btnMoreRecords.addActionListener(new java.awt.event.ActionListener() {\r\n public void actionPerformed(java.awt.event.ActionEvent evt) {\r\n btnMoreRecordsActionPerformed(evt);\r\n }\r\n });\r\n\r\n dlgLookup.setTitle(\"Lookup\"); // NOI18N\r\n try {\r\n dlgLookup.setAlwaysOnTop(true);\r\n }\r\n catch (Exception e) {\r\n }\r\n dlgLookup.setMinimumSize(new java.awt.Dimension(450, 250));\r\n dlgLookup.setModal(true);\r\n\r\n tblRecords.setAutoCreateRowSorter(true);\r\n tblRecords.addKeyListener(new java.awt.event.KeyAdapter() {\r\n public void keyTyped(java.awt.event.KeyEvent evt) {\r\n tblRecordsKeyTyped(evt);\r\n }\r\n });\r\n jScrollPane1.setViewportView(tblRecords);\r\n\r\n btnSelectRecord.setText(\"Use Selected Record\"); // NOI18N\r\n btnSelectRecord.addActionListener(new java.awt.event.ActionListener() {\r\n public void actionPerformed(java.awt.event.ActionEvent evt) {\r\n btnSelectRecordActionPerformed(evt);\r\n }\r\n });\r\n jPanel1.add(btnSelectRecord);\r\n\r\n lblStatus.setText(resourceMap.getString(\"lblStatus.text\")); // NOI18N\r\n jPanel1.add(lblStatus);\r\n\r\n pnlCriteria.setLayout(new java.awt.GridBagLayout());\r\n\r\n javax.swing.GroupLayout dlgLookupLayout = new javax.swing.GroupLayout(dlgLookup.getContentPane());\r\n dlgLookup.getContentPane().setLayout(dlgLookupLayout);\r\n dlgLookupLayout.setHorizontalGroup(\r\n dlgLookupLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\r\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, dlgLookupLayout.createSequentialGroup()\r\n .addContainerGap()\r\n .addGroup(dlgLookupLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)\r\n .addComponent(pnlCriteria, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, 461, Short.MAX_VALUE)\r\n .addComponent(jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 461, Short.MAX_VALUE)\r\n .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, 461, Short.MAX_VALUE))\r\n .addContainerGap())\r\n );\r\n dlgLookupLayout.setVerticalGroup(\r\n dlgLookupLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\r\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, dlgLookupLayout.createSequentialGroup()\r\n .addContainerGap()\r\n .addComponent(pnlCriteria, javax.swing.GroupLayout.PREFERRED_SIZE, 34, javax.swing.GroupLayout.PREFERRED_SIZE)\r\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\r\n .addComponent(jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 159, Short.MAX_VALUE)\r\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\r\n .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\r\n .addContainerGap())\r\n );\r\n\r\n setLayout(new java.awt.GridLayout(1, 0));\r\n\r\n btnLookup.setText(\"...\"); // NOI18N\r\n btnLookup.setIconTextGap(0);\r\n btnLookup.setMargin(new java.awt.Insets(0, 0, 0, 0));\r\n btnLookup.setName(\"btnLookup\"); // NOI18N\r\n btnLookup.addActionListener(new java.awt.event.ActionListener() {\r\n public void actionPerformed(java.awt.event.ActionEvent evt) {\r\n btnLookupActionPerformed(evt);\r\n }\r\n });\r\n add(btnLookup);\r\n }", "private void waitConstant() {\r\n \t\tlong\tlwait = CL_FRMPRDAC;\r\n \t\t// drawing is active?\r\n \t\tif(m_fHorzShift == 0 && m_lTimeZoomStart == 0\r\n \t\t\t\t&& GloneApp.getDoc().isOnAnimation() == false)\r\n \t\t\tlwait = CL_FRMPRDST;\t\t// stalled\r\n \r\n \t\t// make constant fps\r\n \t\t// http://stackoverflow.com/questions/4772693/\r\n \t\tlong\tldt = System.currentTimeMillis() - m_lLastRendered;\r\n \t\ttry {\r\n \t\t\tif(ldt < lwait)\r\n \t\t\t\tThread.sleep(lwait - ldt);\r\n \t\t} catch (InterruptedException e) {\r\n \t\t\te.printStackTrace();\r\n \t\t}\r\n \t}", "public void update(){\n\t\tthis.setVisible(true);\n\t}", "@Override\n\t\t\t\t\t\tpublic void run() {\n\t\t\t\t\t\t\tupdateUI();\n\t\t\t\t\t\t}", "public void actionPerformed(ActionEvent e) {\n\t\t\t\t if(isFieldsEmpty() == true) {\n\t\t\t\t\t errorPopUpBox(\"Please Enter a value in one of the search fields\",\"Error\");\n\t\t\t\t }else {\n\t\t\t\t\t \n\t\t\t\t\t new Thread(new Runnable(){\n\t\t\t\t\t @Override\n\t\t\t\t\t public void run(){\n\t\t\t\t\t \t\n\t\t\t\t\t \t\tgetAtmId();\n\t\t\t\t\t \t\tgetAtmBranchName();\n\t\t\t\t\t \t\tgetBalance();\n\t\t\t\t\t \t\tgetMaxCash();\n\t\t\t\t\t \t\tgetAtmStNum();\n\t\t\t\t\t \t\tgetAtmStName();\n\t\t\t\t\t \t\tgetAtmCity();\n\t\t\t\t\t \t\tgetAtmState();\n\t\t\t\t\t \t\tgetAtmZip();\n\t\t\t\t\t \t\tatmTable.refresh();\n\t\t\t\t\t }\n\t\t\t\t\t }).start();\n\t\t\t\t\t\n\t\t\t\t }\t \n\t\t\t }", "protected void _updateWidgets()\n\t{\n\t\t// Show the title\n\t\tString title = _spItem.getTitleAttr() ;\n\t\tif( title != null )\n\t\t\t_obsTitle.setText( title ) ;\n\t\telse\n\t\t\t_obsTitle.setText( \"\" ) ;\n\n\t\tString state = _avTab.get( \"state\" ) ;\n\t\tif( state == null )\n\t\t\t_obsState.setText( \"Not in Active Database\" ) ;\n\t\telse\n\t\t\t_obsState.setText( state ) ;\n\n\t\tignoreActions = true ; // MFO\n\n\t\tSpObs obs = ( SpObs )_spItem ;\n\t\t\n\t\t// Set the priority\n\t\tint pri = obs.getPriority() ;\n\t\t_w.jComboBox1.setSelectedIndex( pri - 1 ) ;\n\n\t\t// Set whether or not this is a standard\n\t\t_w.standard.setSelected( obs.getIsStandard() ) ;\n\n\t\t// Added for OMP (MFO, 7 August 2001)\n\t\t_w.optional.setValue( obs.isOptional() ) ;\n\n\t\tint numberRemaining = obs.getNumberRemaining();\n\t\t_w.setRemainingCount(numberRemaining);\n\n\t\t_w.unSuspendCB.addActionListener( this ) ;\n\n\t\tignoreActions = false ;\n\n\t\t_w.estimatedTime.setText( OracUtilities.secsToHHMMSS( obs.getElapsedTime() , 1 ) ) ;\n\n\t\t_updateMsbDisplay() ;\n\t}", "private void updateBusyIconModel() {\n this.modelIcon.setBusy( this.jCheckBoxBusy.isSelected() );\n this.modelIcon.setDeterminate( this.jCheckBoxDeterminate.isSelected() );\n this.modelIcon.setMinimum( this.jSlider.getMinimum() );\n this.modelIcon.setMaximum( this.jSlider.getMaximum() );\n this.modelIcon.setValue( this.jSlider.getValue() );\n }", "private void initialize() {\r\n\t\tMySQLAccess conn = new MySQLAccess();\r\n\t\tframe = new JFrame();\r\n\t\tframe.setBounds(100, 100, 601, 386);\r\n\t\tframe.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);\r\n\t\tframe.getContentPane().setLayout(null);\r\n\r\n\t\tJLabel lblRequestForChanging = new JLabel(\"Request for changing Personal Info\");\r\n\t\tlblRequestForChanging.setFont(new Font(\"Calibri\", Font.BOLD, 16));\r\n\t\tlblRequestForChanging.setBounds(10, 11, 279, 25);\r\n\t\tframe.getContentPane().add(lblRequestForChanging);\r\n\r\n\t\ttextField = new JTextField();\r\n\t\ttextField.setBounds(100, 264, 86, 20);\r\n\t\tframe.getContentPane().add(textField);\r\n\t\ttextField.setColumns(10);\r\n\t\ttextField.setEditable(false);\r\n\r\n\t\tscrollPane = new JScrollPane();\r\n\t\tscrollPane.setBounds(20, 47, 511, 206);\r\n\t\tframe.getContentPane().add(scrollPane);\r\n\t\ttable = new JTable();\r\n\r\n\r\n\t\ttable.addMouseListener(new MouseAdapter() {\r\n\t\t\t@Override\r\n\t\t\tpublic void mouseClicked(MouseEvent e) {\r\n\t\t\t\tint selectedRow = table.getSelectedRow();\r\n\t\t\t\tDefaultTableModel model = (DefaultTableModel)table.getModel();\r\n\t\t\t\tString k=model.getValueAt(selectedRow, 0).toString();\r\n\t\t\t\ttextField.setText(model.getValueAt(selectedRow, 0).toString());\r\n\r\n\t\t\t}\r\n\t\t});\r\n\t\tscrollPane.setViewportView(table);\r\n\r\n\t\tDefaultTableModel model = new DefaultTableModel(new String[]{\"RequestID\", \"clientID\", \"Field\", \"Info\"}, 0);\r\n\r\n\r\n\t\ttry {\r\n\t\t\tStatement pst=conn.readDataBaseTransac();\r\n\r\n\t\t\tString query=\"select * from Requests WHERE `done`=0\";\r\n\r\n\t\t\tResultSet rs=pst.executeQuery(query);\r\n\t\t\tResultSetMetaData metaData = rs.getMetaData();\r\n\r\n\r\n\r\n\t\t\twhile(rs.next())\r\n\t\t\t{\r\n\r\n\t\t\t\tString a = rs.getString(\"rID\");\r\n\t\t\t\tString b = rs.getString(\"clientID\");\r\n\t\t\t\tString c = rs.getString(\"field\");\r\n\t\t\t\tString d = rs.getString(\"info\");\r\n\r\n\r\n\t\t\t\tmodel.addRow(new Object[]{a, b, c, d});\r\n\t\t\t}\r\n\r\n\t\t\ttable.setModel(model);\r\n\r\n\t\t\tJLabel lblRequestId = new JLabel(\"Request ID:\");\r\n\t\t\tlblRequestId.setBounds(10, 264, 73, 14);\r\n\t\t\tframe.getContentPane().add(lblRequestId);\r\n\r\n\r\n\r\n\r\n\t\t\tJButton btnAccept = new JButton(\"Accept\");\r\n\t\t\tbtnAccept.addActionListener(new ActionListener() {\r\n\t\t\t\tpublic void actionPerformed(ActionEvent arg0) {\r\n\t\t\t\t\tint rID;\r\n\t\t\t\t\tString reqID;\r\n\t\t\t\t\treqID=textField.getText();\r\n\r\n\t\t\t\t\trID=Integer.parseInt(reqID);\r\n\r\n\t\t\t\t\tString query=\"SELECT * from `Requests` where `rID`=\"+ rID;\r\n\r\n\r\n\t\t\t\t\ttry {\r\n\t\t\t\t\t\tResultSet rs=pst.executeQuery(query);\r\n\t\t\t\t\t\tResultSetMetaData metaData = rs.getMetaData();\r\n\t\t\t\t\t\tint wrong=0;\r\n\t\t\t\t\t\tString query3=null;\r\n\t\t\t\t\t\tint arith;\r\n\r\n\t\t\t\t\t\twhile(rs.next())\r\n\t\t\t\t\t\t{\r\n\r\n\t\t\t\t\t\t\tString a = rs.getString(\"rID\");\r\n\t\t\t\t\t\t\tString b = rs.getString(\"clientID\");\r\n\t\t\t\t\t\t\tString c = rs.getString(\"field\");\r\n\t\t\t\t\t\t\tString d = rs.getString(\"info\");\r\n\t\t\t\t\t\t\tint cID=Integer.parseInt(b);\r\n\r\n\t\t\t\t\t\t\tif(c.equals(\"name\")) {\r\n\r\n\t\t\t\t\t\t\t\tquery3=\"UPDATE `client` SET name= `\"+d+\"` where `clientID`=\"+ cID;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\telse if(c.equals(\"lastname\")) {\r\n\t\t\t\t\t\t\t\tquery3=\"UPDATE `client` SET `lastname`= '\"+d+\"' where `clientID`=\"+ cID;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\telse if(c.equals(\"personalinfo\")) {\r\n\r\n\t\t\t\t\t\t\t\tquery3=\"UPDATE `client` SET personalinfo= `\"+d+\"` where `clientID`=\"+ cID;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\telse if(c.equals(\"risk\")) {\r\n\r\n\t\t\t\t\t\t\t\tarith=Integer.parseInt(d);\r\n\t\t\t\t\t\t\t\tquery3=\"UPDATE `client` SET risk= `\"+arith+\"` where `clientID`=\"+ cID;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\telse if(c.equals(\"illegal\")) {\r\n\t\t\t\t\t\t\t\tarith=Integer.parseInt(d);\r\n\t\t\t\t\t\t\t\tquery3=\"UPDATE `client` SET illegal= `\"+arith+\"` where `clientID`=\"+ cID;\r\n\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\telse if(c.equals(\"changed\")) {\r\n\t\t\t\t\t\t\t\tarith=Integer.parseInt(d);\r\n\t\t\t\t\t\t\t\tquery3=\"UPDATE `client` SET changed= `\"+arith+\"` where `clientID`=\"+ cID;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\telse if(c.equals(\"recommendations\")){\r\n\t\t\t\t\t\t\t\tarith=Integer.parseInt(d);\r\n\t\t\t\t\t\t\t\tquery3=\"UPDATE `client` SET recommendations= `\"+arith+\"` where `clientID`=\"+ cID;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\telse {\r\n\r\n\t\t\t\t\t\t\t\twrong=1;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tSystem.out.println(\"efkika\");\r\n\r\n\t\t\t\t\t\t\tif(wrong==0) {\r\n\t\t\t\t\t\t\t\ttry {\r\n\t\t\t\t\t\t\t\t\tint rs2=pst.executeUpdate(query3);\r\n\t\t\t\t\t\t\t\t} catch (SQLException e) {\r\n\t\t\t\t\t\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\t\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t//\r\n\r\n\r\n\r\n\t\t\t\t\t} catch (SQLException e1) {\r\n\t\t\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\t\t\te1.printStackTrace();\r\n\t\t\t\t\t}\r\n\r\n\r\n\r\n\t\t\t\t\tString query3=\"UPDATE `requests` SET `done`= 1 where `rID`=\"+ rID;\r\n\t\t\t\t\ttry {\r\n\t\t\t\t\t\tint rs2=pst.executeUpdate(query3);\r\n\t\t\t\t\t} catch (SQLException e) {\r\n\t\t\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t\t}\r\n\r\n\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t\tbtnAccept.setBounds(10, 302, 89, 23);\r\n\t\t\tframe.getContentPane().add(btnAccept);\r\n\r\n\t\t\tJButton btnDecline = new JButton(\"Decline\");\r\n\t\t\tbtnDecline.addActionListener(new ActionListener() {\r\n\t\t\t\tpublic void actionPerformed(ActionEvent arg0) {\r\n\t\t\t\t\tint rID;\r\n\t\t\t\t\tString reqID;\r\n\t\t\t\t\treqID=textField.getText();\r\n\r\n\t\t\t\t\trID=Integer.parseInt(reqID);\r\n\r\n\t\t\t\t\tString query=\"UPDATE `requests` SET `done`= 1 where `rID`=\"+ rID;\r\n\r\n\t\t\t\t\ttry {\r\n\t\t\t\t\t\tint rs=pst.executeUpdate(query);\r\n\t\t\t\t\t} catch (SQLException e) {\r\n\t\t\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t\tbtnDecline.setBounds(121, 302, 89, 23);\r\n\t\t\tframe.getContentPane().add(btnDecline);\r\n\r\n\t\t} catch (Exception e) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\r\n\r\n\r\n\r\n\t}", "public void clickApply() {\n // check if more than one player is selected\n playerNameList = new ArrayList<>();\n if (!boxPlayer1.getValue().equals(\"None\"))\n playerNameList.add(boxPlayer1.getValue().toString());\n if (!boxPlayer2.getValue().equals(\"None\"))\n playerNameList.add(boxPlayer2.getValue().toString());\n if (!boxPlayer3.getValue().equals(\"None\"))\n playerNameList.add(boxPlayer3.getValue().toString());\n if (!boxPlayer4.getValue().equals(\"None\"))\n playerNameList.add(boxPlayer4.getValue().toString());\n // sort list\n Collections.sort(playerNameList);\n if (playerNameList.size() < 2) {\n resetPieChart();\n resetLabels();\n showAlertSelectionFail(\"Selection error\", \"Please select at least two players.\");\n return;\n }else {\n numberOfParticipants = playerNameList.size();\n }\n\n // open window with wait message and center it\n Window window = btnApply.getScene().getWindow();\n showWaitWindow(window);\n\n // run task/thread with evaluation, then close message\n Task checkEvaluateDataTask = new Task<Void>() {\n @Override\n public Void call() {\n Platform.runLater(\n () -> {\n // TIMESTAMP\n //System.out.println(\"#### \" + this.getClass() + \": method \" + new Object(){}.getClass().getEnclosingMethod().getName() + \"() is running now at line XXXX. Time: \" + java.time.Clock.systemUTC().instant());\n //evaluateDataClientHeavy();\n evaluateDataDBHeavy();\n waitAlert.setResult(ButtonType.OK);\n waitAlert.close();\n // TIMESTAMP\n //System.out.println(\"#### \" + this.getClass() + \": method \" + new Object(){}.getClass().getEnclosingMethod().getName() + \"() is running now at line XXXX. Time: \" + java.time.Clock.systemUTC().instant());\n\n }\n );\n return null;\n }\n };\n new Thread(checkEvaluateDataTask).start();\n // run timer to check if this task is finished. If finished run update on gui and close waitAlert\n }", "public static void waitWhileLoading()\r\n {\r\n while (isLoading())\r\n ThreadUtil.sleep(10);\r\n }", "private void showTableControl()\r\n {\r\n debug(\"showTableControl() \");\r\n int index = tabPane.getSelectedIndex();\r\n JTable table = (JTable) tableVector.elementAt(index);\r\n this.setStatusBar(\"Showing table control panel for table[\" + index + \"]\");\r\n HGTableControlPanel.showTableControlsDialog(frame, table, false);\r\n debug(\"showTableControl() - complete\");\r\n }", "public void run() {\n\t\t\t//\t\n\t\t\tlong start = System.currentTimeMillis();\n\t\t\tint no = 0;\n\t\t\tdataSql = getSQL();\n\t\t\t//\tRow\n\t\t\tint row = 0;\n\t\t\t//\tDelete Row\n\t\t\tdetail.setRowCount(row);\n\t\t\ttry {\n\t\t\t\tm_pstmt = getStatement(dataSql);\n\t\t\t\tlog.fine(\"Start query - \"\n\t\t\t\t\t\t+ (System.currentTimeMillis() - start) + \"ms\");\n\t\t\t\tm_rs = m_pstmt.executeQuery();\n\t\t\t\tlog.fine(\"End query - \" + (System.currentTimeMillis() - start)\n\t\t\t\t\t\t+ \"ms\");\n\t\t\t\t//\tLoad Table\n\t\t\t\trow = detail.loadTable(m_rs);\n\t\t\t} catch (SQLException e) {\n\t\t\t\tlog.log(Level.SEVERE, dataSql, e);\n\t\t\t}\n\t\t\tclose();\n\t\t\t//\n\t\t\t//no = detail.getRowCount();\n\t\t\tlog.fine(\"#\" + no + \" - \" + (System.currentTimeMillis() - start)\n\t\t\t\t\t+ \"ms\");\n\t\t\tdetail.autoSize();\n\t\t\t//\n\t\t\tm_frame.setCursor(Cursor.getDefaultCursor());\n\t\t\tsetStatusLine(\n\t\t\t\t\tInteger.toString(no) + \" \"\n\t\t\t\t\t\t\t+ Msg.getMsg(Env.getCtx(), \"SearchRows_EnterQuery\"),\n\t\t\t\t\tfalse);\n\t\t\tsetStatusDB(Integer.toString(no));\n\t\t\tif (no == 0)\n\t\t\t\tlog.fine(dataSql);\n\t\t\telse {\n\t\t\t\tdetail.getSelectionModel().setSelectionInterval(0, 0);\n\t\t\t\tdetail.requestFocus();\n\t\t\t}\n\t\t\tisAllSelected = isSelectedByDefault();\n\t\t\tselectedRows(detail);\n\t\t\t//\tSet Collapsed\n\t\t\tif(row > 0)\n\t\t\t\tcollapsibleSearch.setCollapsed(isCollapsibleByDefault());\n\t\t}", "@Test\r\n public void testCellForRowAtIndex() {\r\n assertTrue(ConditionWait.tillGlobalTime(new ConditionWait.Condition() {\r\n @Override\r\n public boolean check() {\r\n return XIBTestTableViewLabelTexFieldViewController.testCellForRowAtIndex;\r\n }\r\n }));\r\n }", "private void constructInfoPanel() {\n try {\n Runnable doUpdate = new Runnable() {\n public void run() {\n infoPanel = new JPanel();\n infoPanel.setPreferredSize(relativeSize(0.8f, 0.04f));\n \n infoLabel = new JLabel(\"Waiting for Clients\");\n infoLabel.setForeground(new Color(0, 51, 102));\n infoLabel.setFont(new Font(\"Garamond\", Font.BOLD, 17));\n \n infoPanel.add(infoLabel);\n }\n };\n if (SwingUtilities.isEventDispatchThread())\n doUpdate.run();\n else\n SwingUtilities.invokeAndWait(doUpdate);\n }catch(Exception e) {\n e.printStackTrace();\n }\n }", "protected void checkIfReady() throws Exception {\r\n checkComponents();\r\n }", "private void btnUpdateActionPerformed(java.awt.event.ActionEvent evt) {\n Tables tables = new Tables();\n try{\n int id = Integer.parseInt(lblID.getText().trim());\n String tableNumber = txtUpdateTable.getText().trim();\n \n int asAvailable = 1 ;\n \n tables.setTableId(id);\n tables.setTableNumber(tableNumber);\n tables.setAsAvailable(asAvailable);\n \n tableService.updateTableNumber(tables);\n }catch(Exception e){\n JOptionPane.showMessageDialog(null, \"Please Fill TextField\");\n }\n \n vectorTablesNumber = commonService.getVectorTables();\n\n TablesTableModel tableTableModel = new TablesTableModel(vectorTablesNumber);\n tblTablesNumber.setModel(tableTableModel);\n \n \n txtUpdateTable.setText(\"\");\n \n }", "private void initializeComponent() throws Exception {\n System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(FormReconcileAllergy.class);\n this.labelBatch = new System.Windows.Forms.Label();\n this.gridAllergyExisting = new OpenDental.UI.ODGrid();\n this.gridAllergyImport = new OpenDental.UI.ODGrid();\n this.butRemoveRec = new OpenDental.UI.Button();\n this.butOK = new OpenDental.UI.Button();\n this.butAddNew = new OpenDental.UI.Button();\n this.butAddExist = new OpenDental.UI.Button();\n this.gridAllergyReconcile = new OpenDental.UI.ODGrid();\n this.butClose = new OpenDental.UI.Button();\n this.SuspendLayout();\n //\n // labelBatch\n //\n this.labelBatch.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));\n this.labelBatch.Location = new System.Drawing.Point(76, 640);\n this.labelBatch.Name = \"labelBatch\";\n this.labelBatch.Size = new System.Drawing.Size(739, 24);\n this.labelBatch.TabIndex = 152;\n this.labelBatch.Text = \"Clicking OK updates the patient\\'s allergies to match the reconciled list.\";\n this.labelBatch.TextAlign = System.Drawing.ContentAlignment.MiddleRight;\n //\n // gridAllergyExisting\n //\n this.gridAllergyExisting.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) | System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Right)));\n this.gridAllergyExisting.setHScrollVisible(false);\n this.gridAllergyExisting.Location = new System.Drawing.Point(4, 12);\n this.gridAllergyExisting.Name = \"gridAllergyExisting\";\n this.gridAllergyExisting.setScrollValue(0);\n this.gridAllergyExisting.setSelectionMode(OpenDental.UI.GridSelectionMode.MultiExtended);\n this.gridAllergyExisting.Size = new System.Drawing.Size(477, 245);\n this.gridAllergyExisting.TabIndex = 65;\n this.gridAllergyExisting.setTitle(\"Current Allergies\");\n this.gridAllergyExisting.setTranslationName(\"GridAllergyExisting\");\n //\n // gridAllergyImport\n //\n this.gridAllergyImport.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) | System.Windows.Forms.AnchorStyles.Right)));\n this.gridAllergyImport.setHScrollVisible(false);\n this.gridAllergyImport.Location = new System.Drawing.Point(497, 12);\n this.gridAllergyImport.Name = \"gridAllergyImport\";\n this.gridAllergyImport.setScrollValue(0);\n this.gridAllergyImport.setSelectionMode(OpenDental.UI.GridSelectionMode.MultiExtended);\n this.gridAllergyImport.Size = new System.Drawing.Size(480, 245);\n this.gridAllergyImport.TabIndex = 77;\n this.gridAllergyImport.setTitle(\"Transition of Care/Referral Summary\");\n this.gridAllergyImport.setTranslationName(\"GridAllergyImport\");\n //\n // butRemoveRec\n //\n this.butRemoveRec.setAdjustImageLocation(new System.Drawing.Point(0, 0));\n this.butRemoveRec.Anchor = System.Windows.Forms.AnchorStyles.Bottom;\n this.butRemoveRec.setAutosize(true);\n this.butRemoveRec.setBtnShape(OpenDental.UI.enumType.BtnShape.Rectangle);\n this.butRemoveRec.setBtnStyle(OpenDental.UI.enumType.XPStyle.Silver);\n this.butRemoveRec.setCornerRadius(4F);\n this.butRemoveRec.Location = new System.Drawing.Point(437, 599);\n this.butRemoveRec.Name = \"butRemoveRec\";\n this.butRemoveRec.Size = new System.Drawing.Size(99, 24);\n this.butRemoveRec.TabIndex = 82;\n this.butRemoveRec.Text = \"Remove Selected\";\n this.butRemoveRec.Click += new System.EventHandler(this.butRemoveRec_Click);\n //\n // butOK\n //\n this.butOK.setAdjustImageLocation(new System.Drawing.Point(0, 0));\n this.butOK.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));\n this.butOK.setAutosize(true);\n this.butOK.setBtnShape(OpenDental.UI.enumType.BtnShape.Rectangle);\n this.butOK.setBtnStyle(OpenDental.UI.enumType.XPStyle.Silver);\n this.butOK.setCornerRadius(4F);\n this.butOK.Location = new System.Drawing.Point(821, 640);\n this.butOK.Name = \"butOK\";\n this.butOK.Size = new System.Drawing.Size(75, 24);\n this.butOK.TabIndex = 81;\n this.butOK.Text = \"&OK\";\n this.butOK.Click += new System.EventHandler(this.butOK_Click);\n //\n // butAddNew\n //\n this.butAddNew.setAdjustImageLocation(new System.Drawing.Point(0, 0));\n this.butAddNew.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));\n this.butAddNew.setAutosize(true);\n this.butAddNew.setBtnShape(OpenDental.UI.enumType.BtnShape.Rectangle);\n this.butAddNew.setBtnStyle(OpenDental.UI.enumType.XPStyle.Silver);\n this.butAddNew.setCornerRadius(4F);\n this.butAddNew.Image = Resources.getdown();\n this.butAddNew.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft;\n this.butAddNew.Location = new System.Drawing.Point(712, 263);\n this.butAddNew.Name = \"butAddNew\";\n this.butAddNew.Size = new System.Drawing.Size(51, 24);\n this.butAddNew.TabIndex = 80;\n this.butAddNew.Text = \"Add\";\n this.butAddNew.TextAlign = System.Drawing.ContentAlignment.MiddleRight;\n this.butAddNew.Click += new System.EventHandler(this.butAddNew_Click);\n //\n // butAddExist\n //\n this.butAddExist.setAdjustImageLocation(new System.Drawing.Point(0, 0));\n this.butAddExist.Anchor = System.Windows.Forms.AnchorStyles.Bottom;\n this.butAddExist.setAutosize(true);\n this.butAddExist.setBtnShape(OpenDental.UI.enumType.BtnShape.Rectangle);\n this.butAddExist.setBtnStyle(OpenDental.UI.enumType.XPStyle.Silver);\n this.butAddExist.setCornerRadius(4F);\n this.butAddExist.Image = Resources.getdown();\n this.butAddExist.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft;\n this.butAddExist.Location = new System.Drawing.Point(218, 263);\n this.butAddExist.Name = \"butAddExist\";\n this.butAddExist.Size = new System.Drawing.Size(51, 24);\n this.butAddExist.TabIndex = 79;\n this.butAddExist.Text = \"Add\";\n this.butAddExist.TextAlign = System.Drawing.ContentAlignment.MiddleRight;\n this.butAddExist.Click += new System.EventHandler(this.butAddExist_Click);\n //\n // gridAllergyReconcile\n //\n this.gridAllergyReconcile.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Right)));\n this.gridAllergyReconcile.setHScrollVisible(false);\n this.gridAllergyReconcile.Location = new System.Drawing.Point(4, 293);\n this.gridAllergyReconcile.Name = \"gridAllergyReconcile\";\n this.gridAllergyReconcile.setScrollValue(0);\n this.gridAllergyReconcile.setSelectionMode(OpenDental.UI.GridSelectionMode.MultiExtended);\n this.gridAllergyReconcile.Size = new System.Drawing.Size(973, 300);\n this.gridAllergyReconcile.TabIndex = 67;\n this.gridAllergyReconcile.setTitle(\"Reconciled Allergies\");\n this.gridAllergyReconcile.setTranslationName(\"gridAllergyReconcile\");\n //\n // butClose\n //\n this.butClose.setAdjustImageLocation(new System.Drawing.Point(0, 0));\n this.butClose.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));\n this.butClose.setAutosize(true);\n this.butClose.setBtnShape(OpenDental.UI.enumType.BtnShape.Rectangle);\n this.butClose.setBtnStyle(OpenDental.UI.enumType.XPStyle.Silver);\n this.butClose.setCornerRadius(4F);\n this.butClose.Location = new System.Drawing.Point(902, 640);\n this.butClose.Name = \"butClose\";\n this.butClose.Size = new System.Drawing.Size(75, 24);\n this.butClose.TabIndex = 2;\n this.butClose.Text = \"&Close\";\n this.butClose.Click += new System.EventHandler(this.butCancel_Click);\n //\n // FormReconcileAllergy\n //\n this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None;\n this.ClientSize = new System.Drawing.Size(982, 676);\n this.Controls.Add(this.labelBatch);\n this.Controls.Add(this.gridAllergyExisting);\n this.Controls.Add(this.gridAllergyImport);\n this.Controls.Add(this.butRemoveRec);\n this.Controls.Add(this.butOK);\n this.Controls.Add(this.butAddNew);\n this.Controls.Add(this.butAddExist);\n this.Controls.Add(this.gridAllergyReconcile);\n this.Controls.Add(this.butClose);\n this.Icon = ((System.Drawing.Icon)(resources.GetObject(\"$this.Icon\")));\n this.MinimumSize = new System.Drawing.Size(530, 518);\n this.Name = \"FormReconcileAllergy\";\n this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;\n this.Text = \"Reconcile Allergies\";\n this.Load += new System.EventHandler(this.FormReconcileAllergy_Load);\n this.ResumeLayout(false);\n }", "private void updateSimilarFrame() {\n\t\tint userSelect = list.getSelectedIndex();\n\t\tString userSelectStr = resultListRankedNames.get(userSelect);\n\t\tInteger frm = similarFrameMap.get(userSelectStr);\n\t\terrorsg = \" from frame \" + (frm + 1) + \" to frame \" + (frm + 151);\n\t\tThread initThread = new Thread() {\n\t\t\tpublic void run() {\n\t\t\t\terrorLabel.setText(errorsg);\n\t\t\t\tHashtable<Integer, JComponent> hashtable = new Hashtable<Integer, JComponent>();\n\t\t hashtable.put(frm + 1, new JLabel(\"↑\")); \n\t\t hashtable.put(frm + 151, new JLabel(\"↑\")); \n\t\t slider.setLabelTable(hashtable);\n\n//\t\t slider.setPaintTicks(true);\n\t\t slider.setPaintLabels(true);\n//\t\t System.out.println(slider.getLabelTable().toString());\n\t\t\t}\n\t\t};\n\t\tinitThread.start();\n\t}", "@Override\n public void run() {\n super.run();\n for (int i = 0; i < times; i++) {\n SwingUtilities.invokeLater(new Runnable() {\n public void run() {\n // TODO Auto-generated method stub\n GenerationDetail detail = ga.getDetail();\n generationLabel.setText(String.valueOf(detail.getGeneration()+1));\n averageFitnessLabel.setText(String.valueOf(detail.getAverageFitness()));\n maxFitnessLabel.setText(String.valueOf(detail .getMaxFitness()));\n minFitnessLabel.setText(String.valueOf(detail.getMinFitness()));\n progressBar.setValue(100 * (detail.getGeneration())/ Integer.valueOf(times-1));\n }\n });\n }\n }", "private void initiateInternal() {\n\n //define adaptation listener\n this.addComponentListener(new ComponentAdapter() {\n @Override\n public void componentResized(ComponentEvent e) {\n adapt(e);\n }\n });\n\n //solve problem with unloading of internal components\n setExtendedState(ICONIFIED | MAXIMIZED_BOTH);\n //the set visible must be the last thing called \n pack();\n setExtendedState(MAXIMIZED_BOTH);\n setVisible(true);\n }", "public void refreshJTable()\n {\n \n \n }", "private void btnStartTestActionPerformed(java.awt.event.ActionEvent evt) {\n try\n {\n initFileBlocker(true);\n initCapturingThread();\n initKeyboardThread();\n }catch(Exception e) { e.printStackTrace();}\n \n \n String testName = (String) table.getValueAt(table.getSelectedRow(), 0);\n String duration = (String) table.getValueAt(table.getSelectedRow(), 3);\n duration += \":00\";\n Bson bsonFilter = Filters.eq(\"Title\", testName);\n FindIterable<Document> findIt = documents.filter(bsonFilter);\n System.out.println(\"Result is: \" + findIt.first());\n try {\n Home.pending_Tests.startCountdown(duration, findIt.first());\n } catch (Exception e) {\n System.out.println(e);\n } \n this.setVisible(false);\n// Home.dispose();\n// this.setUndecorated(true);\n Home.pending_Tests.setVisible(true);\n }", "private void setupSwing() {\r\n SwingUtilities.invokeLater(new Runnable() {\r\n @Override\r\n public void run() {\r\n \r\n try {\r\n for (LookAndFeelInfo info: UIManager.getInstalledLookAndFeels()) {\r\n if (info.getName().equals(\"Windows\")) {\r\n UIManager.setLookAndFeel(info.getClassName());\r\n }\r\n }\r\n } catch (ClassNotFoundException \r\n | InstantiationException\r\n | IllegalAccessException \r\n | UnsupportedLookAndFeelException e) {\r\n e.printStackTrace(System.err);\r\n }\r\n \r\n window = new ManagerWindow(MetagridManager.this);\r\n window.pack();\r\n window.setVisible(true);\r\n }\r\n });\r\n }", "public void updateCellVoltageWindow() {\r\n\t\tif (this.cellVoltageTabItem != null && !this.cellVoltageTabItem.isDisposed()) {\r\n\t\t\tif (Thread.currentThread().getId() == DataExplorer.application.getThreadId()) {\r\n\t\t\t\tthis.cellVoltageTabItem.getCellVoltageMainComposite().redraw();\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\tGDE.display.asyncExec(new Runnable() {\r\n\t\t\t\t\tpublic void run() {\r\n\t\t\t\t\t\tDataExplorer.this.cellVoltageTabItem.getCellVoltageMainComposite().redraw();\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 synchronized void makeBusy(){\n isBusy = true;\n }", "public void waitForKeyPress() {\n panel.bWaitingForKey = true;\n while (panel.bWaitingForKey) {\n try {\n Thread.sleep(100);\n } catch (InterruptedException e) {\n }\n }\n }", "public static void GUI() {\r\n mainFrame.setTitle(\"Clustering\");\r\n homePanel.setLayout(null);\r\n mainFrame.setSize(450, 700);\r\n mainFrame.setResizable(false);\r\n mainFrame.setDefaultCloseOperation(mainFrame.DISPOSE_ON_CLOSE);\r\n // setDefaultCloseOperation(JFrame.DO_NOTHING_ON_CLOSE);\r\n mainFrame.setLocationRelativeTo(null);\r\n mainFrame.setVisible(true);\r\n\r\n tabelData.setModel(tabelDataModel);\r\n tabelScrollBar.getViewport().add(tabelData);\r\n tabelData.setEnabled(true);\r\n tabelData.setAutoResizeMode(JTable.AUTO_RESIZE_OFF);\r\n TableColumn col1 = tabelData.getColumnModel().getColumn(0);\r\n col1.setPreferredWidth(50);\r\n TableColumn col2 = tabelData.getColumnModel().getColumn(1);\r\n col2.setPreferredWidth(50);\r\n TableColumn col3 = tabelData.getColumnModel().getColumn(2);\r\n col3.setPreferredWidth(100);\r\n TableColumn col4 = tabelData.getColumnModel().getColumn(3);\r\n col4.setPreferredWidth(100);\r\n DefaultTableCellRenderer tableAlignCenter = new DefaultTableCellRenderer();\r\n tableAlignCenter.setHorizontalAlignment(JLabel.CENTER);\r\n tabelData.getColumnModel().getColumn(0).setCellRenderer(tableAlignCenter);\r\n tabelData.getColumnModel().getColumn(1).setCellRenderer(tableAlignCenter);\r\n tabelData.getColumnModel().getColumn(2).setCellRenderer(tableAlignCenter);\r\n tabelData.getColumnModel().getColumn(3).setCellRenderer(tableAlignCenter);\r\n tabelData.setEnabled(false);\r\n\r\n statusSQLText.setBounds(75, 20, 90, 25);\r\n statusSQL.setBounds(175, 20, 210, 25);\r\n databaseSQLText.setBounds(75, 50, 90, 25);\r\n databaseSQL.setBounds(175, 50, 210, 25);\r\n databaseTabel.setBounds(75, 80, 390, 25);\r\n databaseTabelXYText.setBounds(75, 110, 90, 25);\r\n databaseTabelXY.setBounds(175, 110, 210, 25);\r\n\r\n Btn_LiatTabel.setBounds(75, 160, 300, 25);\r\n Btn_BuatCluster.setBounds(75, 190, 300, 25);\r\n\r\n tabelScrollBar.setBounds(75, 240, 300, 400);\r\n\r\n clusteringTitle.setBounds(75, 240, 300, 25);\r\n clusteringXText.setBounds(75, 270, 150, 25);\r\n clusteringYText.setBounds(75, 300, 150, 25);\r\n clusteringLiterationText.setBounds(75, 330, 150, 25);\r\n clusteringClusterText.setBounds(75, 360, 150, 25);\r\n clusteringNoteText.setBounds(75, 390, 300, 25);\r\n Btn_ClusterGen.setBounds(75, 420, 300, 25);\r\n clusteringX.setBounds(225, 270, 150, 25);\r\n clusteringY.setBounds(225, 300, 150, 25);\r\n clusteringLiteration.setBounds(225, 330, 150, 25);\r\n clusteringCluster.setBounds(225, 360, 150, 25);\r\n\r\n statusSQLText.setText(\"SQL Status:\");\r\n statusSQL.setText(\"Loading\");\r\n databaseSQLText.setText(\"Database:\");\r\n databaseTabel.setText(\"Info Tabel Database\");\r\n databaseTabelXYText.setText(\"data_csv_xy:\");\r\n\r\n Btn_LiatTabel.setText(\"Buka Tabel Data\");\r\n Btn_BuatCluster.setText(\"Buka Form Clustering\");\r\n\r\n clusteringTitle.setText(\"Masukan data yang dibutuhkan\");\r\n clusteringXText.setText(\"Set Title Untuk Nilai X\");\r\n clusteringYText.setText(\"Set Title Untuk Nilai Y\");\r\n clusteringLiterationText.setText(\"Set Jumlah Literasi\");\r\n clusteringClusterText.setText(\"Set Jumlah Cluster\");\r\n Btn_ClusterGen.setText(\"Hasilkan Clustering\");\r\n clusteringNoteText.setText(\"Note: Literasi Min 5, Cluster Min 2 Max 10\");\r\n\r\n databaseSQLText.setVisible(false);\r\n databaseSQL.setVisible(false);\r\n databaseTabel.setVisible(false);\r\n databaseTabelXYText.setVisible(false);\r\n databaseTabelXY.setVisible(false);\r\n Btn_LiatTabel.setVisible(false);\r\n Btn_BuatCluster.setVisible(false);\r\n\r\n tabelScrollBar.setVisible(false);\r\n\r\n clusteringTitle.setVisible(false);\r\n clusteringXText.setVisible(false);\r\n clusteringYText.setVisible(false);\r\n clusteringLiterationText.setVisible(false);\r\n clusteringClusterText.setVisible(false);\r\n Btn_ClusterGen.setVisible(false);\r\n clusteringX.setVisible(false);\r\n clusteringY.setVisible(false);\r\n clusteringLiteration.setVisible(false);\r\n clusteringCluster.setVisible(false);\r\n clusteringNoteText.setVisible(false);\r\n\r\n Btn_LiatTabel.addActionListener(new ActionListener() {\r\n @Override\r\n public void actionPerformed(ActionEvent e) {\r\n if (tabelScrollBar.isVisible()) {\r\n Btn_LiatTabel.setText(\"Buka Tabel Data\");\r\n VisTabel(false);\r\n } else {\r\n if (clusteringTitle.isVisible()) {\r\n Btn_BuatCluster.setText(\"Buka Form Clustering\");\r\n VisCluster(false);\r\n }\r\n getTabelData();\r\n Btn_LiatTabel.setText(\"Tutup Tabel Data\");\r\n VisTabel(true);\r\n }\r\n }\r\n });\r\n\r\n Btn_BuatCluster.addActionListener(new ActionListener() {\r\n @Override\r\n public void actionPerformed(ActionEvent e) {\r\n if (clusteringTitle.isVisible()) {\r\n Btn_BuatCluster.setText(\"Buka Form Clustering\");\r\n VisCluster(false);\r\n } else {\r\n if (tabelScrollBar.isVisible()) {\r\n Btn_LiatTabel.setText(\"Buka Tabel Data\");\r\n VisTabel(false);\r\n }\r\n Btn_BuatCluster.setText(\"Tutup Form Clustering\");\r\n VisCluster(true);\r\n }\r\n }\r\n });\r\n\r\n Btn_ClusterGen.addActionListener(new ActionListener() {\r\n @Override\r\n public void actionPerformed(ActionEvent e) {\r\n boolean Error = false;\r\n String nilaiX = clusteringX.getText();\r\n String nilaiY = clusteringY.getText();\r\n String nilaiLiteration = clusteringLiteration.getText();\r\n String nilaiCluster = clusteringCluster.getText();\r\n\r\n if (conn != null) {\r\n if (nilaiX.trim().length() == 0) {\r\n Error = true;\r\n JOptionPane.showMessageDialog(null, \"Nilai X harus di isi\", \"Error\", JOptionPane.ERROR_MESSAGE);\r\n }\r\n\r\n if (!Error && nilaiY.trim().length() == 0) {\r\n Error = true;\r\n JOptionPane.showMessageDialog(null, \"Nilai Y harus di isi\", \"Error\", JOptionPane.ERROR_MESSAGE);\r\n }\r\n\r\n if (!Error && nilaiLiteration.trim().length() == 0) {\r\n Error = true;\r\n JOptionPane.showMessageDialog(null, \"Jumlah literasi harus di isi\", \"Error\",\r\n JOptionPane.ERROR_MESSAGE);\r\n }\r\n\r\n if (!Error && nilaiLiteration.trim().length() == 0) {\r\n Error = true;\r\n JOptionPane.showMessageDialog(null, \"Jumlah cluster harus di isi\", \"Error\",\r\n JOptionPane.ERROR_MESSAGE);\r\n }\r\n\r\n int literation = 0;\r\n int cluster = 0;\r\n\r\n if (!Error) {\r\n try {\r\n literation = Integer.parseInt(nilaiLiteration);\r\n cluster = Integer.parseInt(nilaiCluster);\r\n } catch (NumberFormatException ex) {\r\n Error = true;\r\n JOptionPane.showMessageDialog(null, ex.getMessage(), \"Error\", JOptionPane.ERROR_MESSAGE);\r\n }\r\n }\r\n\r\n if (!Error && literation < 5) {\r\n Error = true;\r\n JOptionPane.showMessageDialog(null, \"Literasi terlalu kecil\", \"Error\",\r\n JOptionPane.ERROR_MESSAGE);\r\n }\r\n\r\n if (!Error && cluster < 2) {\r\n Error = true;\r\n JOptionPane.showMessageDialog(null, \"Cluster terlalu kecil\", \"Error\",\r\n JOptionPane.ERROR_MESSAGE);\r\n }\r\n\r\n if (!Error && cluster > 10) {\r\n Error = true;\r\n JOptionPane.showMessageDialog(null, \"Cluster terlalu besar\", \"Error\",\r\n JOptionPane.ERROR_MESSAGE);\r\n }\r\n\r\n if (!Error) {\r\n runKMeans(nilaiX, nilaiY, literation, cluster);\r\n }\r\n } else {\r\n JOptionPane.showMessageDialog(null, \"Database not connected\", \"Error\", JOptionPane.ERROR_MESSAGE);\r\n }\r\n }\r\n });\r\n\r\n homePanel.add(statusSQLText);\r\n homePanel.add(statusSQL);\r\n homePanel.add(databaseSQLText);\r\n homePanel.add(databaseSQL);\r\n homePanel.add(databaseTabel);\r\n homePanel.add(databaseTabelXYText);\r\n homePanel.add(databaseTabelXY);\r\n\r\n homePanel.add(Btn_LiatTabel);\r\n homePanel.add(Btn_BuatCluster);\r\n\r\n homePanel.add(tabelScrollBar);\r\n\r\n homePanel.add(clusteringTitle);\r\n homePanel.add(clusteringXText);\r\n homePanel.add(clusteringYText);\r\n homePanel.add(clusteringLiterationText);\r\n homePanel.add(clusteringClusterText);\r\n homePanel.add(Btn_ClusterGen);\r\n homePanel.add(clusteringNoteText);\r\n homePanel.add(clusteringX);\r\n homePanel.add(clusteringY);\r\n homePanel.add(clusteringLiteration);\r\n homePanel.add(clusteringCluster);\r\n\r\n mainFrame.getContentPane().add(homePanel);\r\n }", "private void initialize() {\r\n\t\tframe = new JFrame();\r\n\t\tframe.setBounds(100, 100, 954, 469);\r\n\t\tframe.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\r\n\t\tframe.getContentPane().setLayout(null);\r\n\t\tJScrollPane scrollPane = new JScrollPane();\r\n\t\tscrollPane.setBounds(47, 64, 881, 355);\r\n\t\tframe.getContentPane().add(scrollPane);\r\n\t String header[] = { \"Number\", \"Previous Hash\", \"Hash\", \"Envio\", \"Recibo\", \"Valor\" };\r\n\t\tJPanel tablePanel = new JPanel(new BorderLayout());\r\n\t\tDefaultTableModel model = new DefaultTableModel(header,0);\r\n\t\ttable = new JTable(model);\r\n\t\ttablePanel.add(table, BorderLayout.CENTER);\r\n\t\ttablePanel.add(table.getTableHeader(), BorderLayout.NORTH);\r\n\t\ttable.getTableHeader().setReorderingAllowed(false);;\r\n\t\tscrollPane.setViewportView(table);\r\n\t\t\r\n\t\tfillTable(model);\r\n\t\tJComboBox<String> comboBox = new JComboBox<String>();\r\n\t\tcomboBox.setBounds(47, 11, 283, 20);\r\n\t\tframe.getContentPane().add(comboBox);\r\n\t\t\r\n\t\tfor(int i=0;i<Controller.getBlockchain().getWallet().size();i++) {\r\n\t\t\tcomboBox.addItem(Controller.getBlockchain().getWallet().get(i).getID());\r\n\t\t}\r\n\t\t\r\n\t\tJButton btnBusqueda = new JButton(\"Busqueda\");\r\n\t\tbtnBusqueda.addActionListener(new ActionListener() {\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\r\n\t\t\t\tmodel.setRowCount(0);\r\n\t\t\t\tfillTableSearch(model,comboBox.getSelectedIndex());\r\n\t\t\t}\r\n\t\t});\r\n\t\tbtnBusqueda.setBounds(340, 10, 116, 23);\r\n\t\tframe.getContentPane().add(btnBusqueda);\r\n\t\tJButton btnReset = new JButton(\"Reset\");\r\n\t\tbtnReset.addActionListener(new ActionListener() {\r\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\r\n\t\t\t\tif (model.getRowCount() > 0) {\r\n\t\t\t\t for (int i = model.getRowCount() - 1; i > -1; i--) {\r\n\t\t\t\t \tmodel.removeRow(i);\r\n\t\t\t\t }\r\n\t\t\t\t}\r\n\t\t\t\tfillTable(model);\r\n\t\t\t}\r\n\t\t});\r\n\t\tbtnReset.setBounds(839, 10, 89, 23);\r\n\t\tframe.getContentPane().add(btnReset);\r\n\t\t\r\n\t\tJButton btnAdministracionCarteras = new JButton(\"Administracion Carteras\");\r\n\t\tbtnAdministracionCarteras.addActionListener(new ActionListener() {\r\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\r\n\t\t\t\tWallets wallet=new Wallets(Controller);\r\n\t\t\t\twallet.getFrame().setVisible(true);\r\n\t\t\t\tframe.setVisible(false);\r\n\t\t\t}\r\n\t\t});\r\n\t\tbtnAdministracionCarteras.setBounds(626, 10, 203, 23);\r\n\t\tframe.getContentPane().add(btnAdministracionCarteras);\r\n\t}", "private void initComponents() {\n\n dataScrollPane = new javax.swing.JScrollPane();\n dataTable = new com.cosmos.acacia.gui.AcaciaTable();\n buttonsPanel = new com.cosmos.swingb.JBPanel();\n closeButton = new com.cosmos.swingb.JBButton();\n refreshButton = new com.cosmos.swingb.JBButton();\n deleteButton = new com.cosmos.swingb.JBButton();\n modifyButton = new com.cosmos.swingb.JBButton();\n newButton = new com.cosmos.swingb.JBButton();\n selectButton = new com.cosmos.swingb.JBButton();\n unselectButton = new com.cosmos.swingb.JBButton();\n classifyButton = new com.cosmos.swingb.JBButton();\n specialFunctionalityButton = new com.cosmos.swingb.JBButton();\n filterButton = new com.cosmos.swingb.JBButton();\n\n setName(\"Form\"); // NOI18N\n addKeyListener(new java.awt.event.KeyAdapter() {\n public void keyPressed(java.awt.event.KeyEvent evt) {\n onKeyPressed(evt);\n }\n });\n setLayout(new java.awt.BorderLayout());\n\n dataScrollPane.setName(\"dataScrollPane\"); // NOI18N\n\n dataTable.setName(\"dataTable\"); // NOI18N\n dataTable.addKeyListener(new java.awt.event.KeyAdapter() {\n public void keyPressed(java.awt.event.KeyEvent evt) {\n onKeyPressed(evt);\n }\n });\n dataScrollPane.setViewportView(dataTable);\n\n add(dataScrollPane, java.awt.BorderLayout.CENTER);\n\n buttonsPanel.setName(\"buttonsPanel\"); // NOI18N\n\n javax.swing.ActionMap actionMap = org.jdesktop.application.Application.getInstance(com.cosmos.acacia.crm.gui.AcaciaApplication.class).getContext().getActionMap(AbstractTablePanel.class, this);\n closeButton.setAction(actionMap.get(\"closeAction\")); // NOI18N\n closeButton.setName(\"closeButton\"); // NOI18N\n\n refreshButton.setAction(actionMap.get(\"refreshAction\")); // NOI18N\n refreshButton.setName(\"refreshButton\"); // NOI18N\n\n deleteButton.setAction(actionMap.get(\"deleteAction\")); // NOI18N\n deleteButton.setName(\"deleteButton\"); // NOI18N\n\n modifyButton.setAction(actionMap.get(\"modifyAction\")); // NOI18N\n modifyButton.setName(\"modifyButton\"); // NOI18N\n\n newButton.setAction(actionMap.get(\"newAction\")); // NOI18N\n newButton.setName(\"newButton\"); // NOI18N\n\n selectButton.setAction(actionMap.get(\"selectAction\")); // NOI18N\n selectButton.setName(\"selectButton\"); // NOI18N\n\n unselectButton.setAction(actionMap.get(\"unselectAction\")); // NOI18N\n unselectButton.setName(\"unselectButton\"); // NOI18N\n\n classifyButton.setAction(actionMap.get(\"classifyAction\")); // NOI18N\n org.jdesktop.application.ResourceMap resourceMap = org.jdesktop.application.Application.getInstance(com.cosmos.acacia.crm.gui.AcaciaApplication.class).getContext().getResourceMap(AbstractTablePanel.class);\n classifyButton.setText(resourceMap.getString(\"classifyButton.text\")); // NOI18N\n classifyButton.setName(\"classifyButton\"); // NOI18N\n\n specialFunctionalityButton.setAction(actionMap.get(\"specialAction\")); // NOI18N\n specialFunctionalityButton.setName(\"specialFunctionalityButton\"); // NOI18N\n\n filterButton.setAction(actionMap.get(\"filter\")); // NOI18N\n filterButton.setName(\"filterButton\"); // NOI18N\n\n javax.swing.GroupLayout buttonsPanelLayout = new javax.swing.GroupLayout(buttonsPanel);\n buttonsPanel.setLayout(buttonsPanelLayout);\n buttonsPanelLayout.setHorizontalGroup(\n buttonsPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, buttonsPanelLayout.createSequentialGroup()\n .addContainerGap()\n .addComponent(selectButton, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(unselectButton, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 51, Short.MAX_VALUE)\n .addComponent(specialFunctionalityButton, javax.swing.GroupLayout.PREFERRED_SIZE, 145, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(filterButton, javax.swing.GroupLayout.PREFERRED_SIZE, 91, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(classifyButton, javax.swing.GroupLayout.PREFERRED_SIZE, 91, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(newButton, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(modifyButton, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(deleteButton, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(18, 18, 18)\n .addComponent(refreshButton, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(18, 18, 18)\n .addComponent(closeButton, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addContainerGap())\n );\n\n buttonsPanelLayout.linkSize(javax.swing.SwingConstants.HORIZONTAL, new java.awt.Component[] {closeButton, deleteButton, modifyButton, newButton, refreshButton, selectButton});\n\n buttonsPanelLayout.setVerticalGroup(\n buttonsPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, buttonsPanelLayout.createSequentialGroup()\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addGroup(buttonsPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(closeButton, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(selectButton, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(refreshButton, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(deleteButton, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(modifyButton, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(newButton, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(unselectButton, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(classifyButton, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(filterButton, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(specialFunctionalityButton, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addContainerGap())\n );\n\n buttonsPanelLayout.linkSize(javax.swing.SwingConstants.VERTICAL, new java.awt.Component[] {closeButton, deleteButton, modifyButton, newButton, refreshButton, selectButton, unselectButton});\n\n add(buttonsPanel, java.awt.BorderLayout.PAGE_END);\n }", "private void waitForAWT() throws Exception {\n Mutex.EVENT.readAccess(new Mutex.Action() {\n public Object run() {\n return null;\n }\n });\n }", "public void run() {\n\t\t\tJTable jt = new JTable();\n\t\t\n\t\t}", "private boolean hasTableContainerLoaded() {\n return delegationDefaultCreationScreen.tableContainer.isDisplayed();\n }", "public synchronized void start_scn_updates() {\r\n \tif (scn_update_thread == null){\r\n scn_update_thread = new Thread(this);\r\n scn_update_thread.start();\r\n \t}\r\n \tscn_ready = true;\r\n \trepaint();\r\n \tscn_repaint = true;\r\n }", "@Override\r\n\t\tpublic void run() {\n\t\t\twhile((second--)!=1) {\r\n\t\t\t\ttry {\r\n\t\t\t\t\tThread.sleep(1000);\r\n\t\t\t\t\tPlatform.runLater(new Runnable() {\r\n\t\t\t\t\t\t @Override\r\n\t\t\t\t\t\t public void run() {\r\n\t\t\t\t\t\t\t SetTime();\r\n\t\t\t\t\t\t }\r\n\t\t\t\t\t});\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t} catch (InterruptedException e) {\r\n\t\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tsubmitbtn.setDisable(true);\r\n\t\t\tbackbtn.setDisable(false);\r\n\t\t\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}", "private void initComponents() {\n\t\tfixedSizeTable = new FixedSizeTable();\r\n\t\tdataModel = new NonEditableTableModel();\r\n\t\t\r\n\t\tfixedSizeTable.getTable().setModel(dataModel);\r\n\t\tfixedSizeTable.getTable().setEnabled(false);\r\n\t\r\n\t\t// initialize selection listener\r\n\t\ttableMouseListener = new TableMouseListener();\r\n\t\t\r\n\t\t// add it to the panel so that it is centered left right and top down\r\n\t\tsetOpaque(false);\r\n\t\tsetLayout(new GridBagLayout());\r\n\t\tadd(fixedSizeTable, new GridBagConstraints());\r\n\t}", "public void requestRepaint() {\n\t\tJWLC.nativeHandler().wlc_output_schedule_render(this.to());\n\t}", "private void cargarTablaBienesInventario() throws Exception{\r\n \r\n AppContext app =(AppContext) AppContext.getApplicationContext();\r\n final JFrame desktop= (JFrame)app.getMainFrame();\r\n final TaskMonitorDialog progressDialog= new TaskMonitorDialog(desktop, null);\r\n progressDialog.setTitle(\"TaskMonitorDialog.Wait\");\r\n progressDialog.addComponentListener(new ComponentAdapter()\r\n {\r\n public void componentShown(ComponentEvent e) \r\n {\r\n new Thread(new Runnable()\r\n {\r\n public void run() //throws Exception\r\n {\r\n try{\r\n progressDialog.report(aplicacion.getI18nString(\"inventario.app.tag3\"));\r\n\r\n Collection c= null;\r\n boolean b= true;\r\n \r\n bienesJPanel.clearTable();\r\n\r\n if (patron.equals(Const.PATRON_INMUEBLES_URBANOS) ||\r\n \t\tpatron.equals(Const.PATRON_INMUEBLES_RUSTICOS)){\r\n \tc= inventarioClient.getBienesInventario(Const.ACTION_GET_INMUEBLES, Const.SUPERPATRON_BIENES, patron, null, filtro, null,null);\r\n }else if (patron.equals(Const.PATRON_MUEBLES_HISTORICOART) ||\r\n \t\tpatron.equals(Const.PATRON_BIENES_MUEBLES)){\r\n \tc= inventarioClient.getBienesInventario(Const.ACTION_GET_MUEBLES, Const.SUPERPATRON_BIENES, patron, null, filtro, null,null);\r\n }else if (patron.equals(Const.PATRON_DERECHOS_REALES)){\r\n \tc= inventarioClient.getBienesInventario(Const.ACTION_GET_DERECHOS_REALES, Const.SUPERPATRON_BIENES, patron, null, filtro, null,null);\r\n }else if (patron.equals(Const.PATRON_VALOR_MOBILIARIO)){\r\n \tc= inventarioClient.getBienesInventario(Const.ACTION_GET_VALORES_MOBILIARIOS, Const.SUPERPATRON_BIENES, patron, null, filtro, null,null);\r\n }else if (patron.equals(Const.PATRON_CREDITOS_DERECHOS_PERSONALES)){\r\n \tc= inventarioClient.getBienesInventario(Const.ACTION_GET_CREDITOS_DERECHOS, Const.SUPERPATRON_BIENES, patron, null, filtro, null,null);\r\n }else if (patron.equals(Const.PATRON_SEMOVIENTES)){\r\n \tc= inventarioClient.getBienesInventario(Const.ACTION_GET_SEMOVIENTES, Const.SUPERPATRON_BIENES, patron, null, filtro, null,null);\r\n }else if (patron.equals(Const.PATRON_VIAS_PUBLICAS_URBANAS) ||\r\n \t\tpatron.equals(Const.PATRON_VIAS_PUBLICAS_RUSTICAS)){\r\n \tc= inventarioClient.getBienesInventario(Const.ACTION_GET_VIAS, Const.SUPERPATRON_BIENES, patron, null, filtro, null,null);\r\n }else if (patron.equals(Const.PATRON_VEHICULOS)){\r\n \tc= inventarioClient.getBienesInventario(Const.ACTION_GET_VEHICULOS, Const.SUPERPATRON_BIENES, patron, null, filtro, null,null);\r\n }else{\r\n \t/** No es ningun tipo reconocido. */\r\n \tb= false;\r\n }\r\n\r\n /** Cargamos la coleccion */\r\n bienesJPanel.loadListaBienes(c);\r\n \r\n }\r\n catch(Exception e){\r\n \tErrorDialog.show(aplicacion.getMainFrame(), aplicacion.getI18nString(\"inventario.SQLError.Titulo\"),\r\n \t\t\taplicacion.getI18nString(\"inventario.SQLError.Aviso\"), StringUtil.stackTrace(e));\r\n }\r\n finally\r\n \t\t\t\t\t{\r\n \t\t\t\t\t\tprogressDialog.setVisible(false);\r\n \t\t\t\t\t}\r\n }\r\n }).start();\r\n }\r\n });\r\n GUIUtil.centreOnWindow(progressDialog);\r\n progressDialog.setVisible(true);\r\n\r\n \r\n }", "public synchronized void updateGUITable() {\n\t\tmyIntegerTableModel.setRowCount(0);\n\t\tmyFloatTableModel.setRowCount(0);\n\t\tmyBooleanTableModel.setRowCount(0);\n\t\t//for(int i = 0; i < myIntegerTableModel.getRowCount(); i++) myIntegerTableModel.removeRow(0);\n\t\t//for(int i = 0; i < myFloatTableModel.getRowCount(); i++) myFloatTableModel.removeRow(0);\n\t\t//for(int i = 0; i < myBooleanTableModel.getRowCount(); i++) myBooleanTableModel.removeRow(0);\n\t\t\n\t\t// for all integer values, add their fields\n\t\tIterator it = configIntegerValues.entrySet().iterator();\n\t while (it.hasNext()) {\n\t Map.Entry<String, String> pairs = (Entry<String, String>) it.next();\t \n\t myIntegerTableModel.addRow(new String[] {pairs.getKey(), pairs.getValue()});\n\t }\n\t \n\t\tit = configFloatValues.entrySet().iterator();\n\t while (it.hasNext()) {\n\t Map.Entry<String, String> pairs = (Entry<String, String>) it.next();\t \n\t myFloatTableModel.addRow(new String[] {pairs.getKey(), pairs.getValue()});\n\t }\n\t \n\t\tit = configBooleanValues.entrySet().iterator();\n\t while (it.hasNext()) {\n\t Map.Entry<String, String> pairs = (Entry<String, String>) it.next();\t \n\t myBooleanTableModel.addRow(new String[] {pairs.getKey(), pairs.getValue()});\n\t }\n\t}", "@Override\n public boolean isBusy() {\n return false;\n }", "private void initialize()\n {\n orderList = new ArrayList<OrderData>( );\n setBounds(100, 100, 530, 370);\n setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n getContentPane().setLayout(null);\n setResizable(false);\n\n JLabel lblNewLabel = new JLabel(\"Order\");\n lblNewLabel.setFont(new Font(\"Lucida Grande\", Font.PLAIN, 15));\n lblNewLabel.setBounds(22, 18, 61, 16);\n getContentPane().add(lblNewLabel);\n\n JScrollPane scrollPane = new JScrollPane();\n scrollPane.setBounds(22, 47, 497, 189);\n getContentPane().add(scrollPane);\n\n table = new JTable();\n scrollPane.setViewportView(table);\n table.setModel(new DefaultTableModel(\n new Object [][] {\n\n },\n new String [] {\n \"Order ID\", \"Customer Username\", \"Total Price\", \"Status\", \"Payment Type\", \"Delivery Type\"\n })\n {\n Class[] types = new Class [] {\n String.class, String.class, Float.class, String.class, String.class, String.class\n };\n boolean[] canEdit = new boolean [] {\n false, false, false, false, false\n };\n\n public Class getColumnClass(int columnIndex) {\n return types [columnIndex];\n }\n\n public boolean isCellEditable(int rowIndex, int columnIndex) {\n return canEdit [columnIndex];\n }\n });\n\n table.addMouseListener(new MouseAdapter() {\n public void mouseClicked(MouseEvent evt) {\n//\t\t\t\tproductsTableMouseClicked(evt);\n }\n });\n orderTableModel = (DefaultTableModel) table.getModel();\n table.setFillsViewportHeight(true);\n\n scrollPane.setViewportView(table);\n if (table.getColumnModel().getColumnCount() > 0) {\n table.getColumnModel().getColumn(0).setResizable(false);\n table.getColumnModel().getColumn(1).setResizable(false);\n table.getColumnModel().getColumn(2).setResizable(false);\n table.getColumnModel().getColumn(3).setResizable(false);\n table.getColumnModel().getColumn(4).setResizable(false);\n table.getColumnModel().getColumn(5).setResizable(false);\n }\n table.setSelectionModel( new ForcedListSelectionModel());\n\n\n pendingRadioButton = new JRadioButton(\"Pending\");\n pendingRadioButton.setBounds(22, 248, 141, 23);\n getContentPane().add(pendingRadioButton);\n pendingRadioButton.setSelected( true );\n\n shippingRadioButton = new JRadioButton(\"Shipping\");\n shippingRadioButton.setBounds(22, 280, 141, 23);\n getContentPane().add(shippingRadioButton);\n\n ButtonGroup group = new ButtonGroup();\n group.add( pendingRadioButton );\n group.add( shippingRadioButton );\n\n viewButton = new JButton(\"View\");\n viewButton.setBounds(308, 265, 90, 29);\n getContentPane().add(viewButton);\n\n statusButton = new JButton(\"Set Status\");\n statusButton.addActionListener(new ActionListener() {\n public void actionPerformed(ActionEvent e) {\n }\n });\n statusButton.setBounds(308, 312, 90, 29);\n getContentPane().add(statusButton);\n\n backButton = new JButton(\"Back\");\n backButton.addActionListener(new ActionListener() {\n public void actionPerformed(ActionEvent e) {\n }\n });\n backButton.setBounds(429, 312, 90, 29);\n getContentPane().add(backButton);\n }", "private void tellTheUserToWait() {\n\t\tfinal JDialog warningDialog = new JDialog(descriptionDialog, ejsRes.getString(\"Simulation.Opening\"));\r\n\t\tfinal JLabel label = new JLabel(ejsRes.getString(\"Simulation.Opening\"));\r\n\t\tlabel.setBorder(new javax.swing.border.EmptyBorder(5, 5, 5, 5));\r\n\t\tSwingUtilities.invokeLater(new Runnable() {\r\n\t\t\t@Override\r\n\t\t\tpublic void run() {\r\n\t\t\t\twarningDialog.getContentPane().setLayout(new java.awt.BorderLayout());\r\n\t\t\t\twarningDialog.getContentPane().add(label, java.awt.BorderLayout.CENTER);\r\n\t\t\t\twarningDialog.validate();\r\n\t\t\t\twarningDialog.pack();\r\n\t\t\t\twarningDialog.setLocationRelativeTo(descriptionDialog);\r\n\t\t\t\twarningDialog.setModal(false);\r\n\t\t\t\twarningDialog.setVisible(true);\r\n\t\t\t}\r\n\t\t});\r\n\t\tjavax.swing.Timer timer = new javax.swing.Timer(3000, new ActionListener() {\r\n\t\t\t@Override\r\n\t\t\tpublic void actionPerformed(ActionEvent _actionEvent) {\r\n\t\t\t\twarningDialog.setVisible(false);\r\n\t\t\t\twarningDialog.dispose();\r\n\t\t\t}\r\n\t\t});\r\n\t\ttimer.setRepeats(false);\r\n\t\ttimer.start();\r\n\t}", "@Override\n\tpublic void run() {\n\t\twhile (computeFrame()) {}\n\t\tframe.setVisible(false);\n\t\tframe.dispose();\n\t}", "public void waitForAlertDisplay()\n {\n new WebDriverWait(driver,\n DEFAULT_TIMEOUT, 5000).ignoring(StaleElementReferenceException.class).ignoring(\n WebDriverException.class).\n until(ExpectedConditions.alertIsPresent());\n }" ]
[ "0.6638079", "0.64815664", "0.6479976", "0.6116877", "0.61150765", "0.6033413", "0.5859537", "0.57484835", "0.5716975", "0.5700566", "0.5697767", "0.56503075", "0.56313956", "0.56213504", "0.5613221", "0.5608069", "0.55717665", "0.55696845", "0.5569354", "0.5563248", "0.55401725", "0.55385476", "0.55275244", "0.55225915", "0.55151343", "0.5514976", "0.5509754", "0.54871464", "0.54735637", "0.54671204", "0.5464061", "0.54486644", "0.5440224", "0.542364", "0.54233134", "0.54192734", "0.5399271", "0.53978705", "0.53851736", "0.5381135", "0.5373911", "0.5372245", "0.53713095", "0.53551275", "0.53470504", "0.5338756", "0.5334906", "0.53273636", "0.53033143", "0.5299585", "0.52963", "0.5292453", "0.5287768", "0.5268793", "0.52587813", "0.5256396", "0.5248564", "0.52455175", "0.5241276", "0.5228493", "0.5228447", "0.52256596", "0.52235824", "0.52228934", "0.52142376", "0.521128", "0.5203817", "0.52037513", "0.5202827", "0.52027947", "0.52001536", "0.5196735", "0.5195614", "0.5187786", "0.51800483", "0.5177943", "0.51750356", "0.51732695", "0.5166452", "0.51660246", "0.51640266", "0.51622725", "0.5159377", "0.5152863", "0.5149937", "0.5148261", "0.5139887", "0.5139818", "0.5136211", "0.5135044", "0.5133503", "0.51289517", "0.51287764", "0.51241064", "0.51232445", "0.512233", "0.5121165", "0.5117997", "0.5117017", "0.5110791" ]
0.65082747
1
/ // Debug timing of waiting for tree long start = System.nanoTime(); doWaitForTree(gTree); long end = System.nanoTime(); Msg.out( "waitForTree() " + TimeUnit.MILLISECONDS.convert(end start, TimeUnit.NANOSECONDS));
public static void waitForTree(GTree gTree) { doWaitForTree(gTree); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test\n\tpublic void test6_OpenTree() throws GeneralLeanFtException{\n\t\ttry\n\t\t{\t\t\t\t\n\t\t\tSystem.out.println(\"Test 6 - Open Trees Started\");\n\t\t\t\n\t\t\t//Main Window\n\t\t\tWindow mainWindow = Desktop.describe(Window.class, new WindowDescription.Builder()\n\t\t\t.title(\"SwingSet2\").index(0).build());\n\t\t\tThread.sleep(2000);\n\t\t\t\n\t\t\t//Toolbar Object\n\t\t\tToolBar toolbar = mySet.OR.MainWindow().ToolBar(); \n\n\t\t\t// Clicking the JTree displays the required frame\n\t\t\ttoolbar.getButton(\"JTree\").press();\n\t\t\t\n\t\t\t//Tree View Object\n\t\t\tTreeView javaTree = mainWindow.describe(TreeView.class, new TreeViewDescription.Builder()\n\t\t\t.nativeClass(\"TreeDemo$1\").build());\n\t\t\t\n\t\t\t//Expand a Node\n\t\t\tString nodePath = \"Music;Classical;Beethoven;concertos\";\n\t\t\tTreeViewNode requiredNode = javaTree.getNode(nodePath);\n\t\t\trequiredNode.expand();\n\n\t\t\t//Select a Node\n\t\t\tnodePath = \"Music;Classical;Beethoven;concertos;No. 4 - G Major\";\t\t\t\n\t\t\tjavaTree.activateNode(nodePath);\t\t\t\t\n\t\t\t\n\t\t\t//Get Number of Sub Nodes of a Node\n\t\t\tnodePath = \"Music;Classical;Beethoven;Quartets\";\t\t\t\n\t\t\tSystem.out.println(\"Child Count - \" + LeanFTJavaTreeHelper.getSubNodeCount(javaTree, nodePath));\n\n\t\t\t//Get All Sub Nodes\n\t\t\tjava.util.List<String> subNodes = LeanFTJavaTreeHelper.getAllSubNodes(javaTree,nodePath);\n\t\t\t\n\t\t\t//Search for a Node in the Whole Tree\n\t\t\tNativeObject root = LeanFTJavaTreeHelper.getRoot(javaTree);\n\t\t\tassertTrue(LeanFTJavaTreeHelper.searchNodeinTree(javaTree,root, \"No. 5 - E-Flat\"));\n\t\t\t\t\t\t\n\t\t}\t\t\n\t\tcatch(Exception e)\n\t\t{\n\t\t\tSystem.out.println(\"Unexpected Error Occurred. Message = \" + e.getMessage());\n\t\t\tassertTrue(false);\n\t\t}\n\t\tfinally\n\t\t{\n\t\t\tSystem.out.println(\"Test 6 - Open Trees finished\");\t\n\t\t}\n\t}", "@Test\n public void test2(){\n times = new ArrayList<Long>();\n for(int i = 0; i<threadnums.length; i++){\n BSTInterface tree = new LockFreeBST();\n makeThread2(tree, threadnums[i]);\n\n\n System.out.println( \"When there are \"+threadnums[i] + \"threads, there are \"+tree.getNum() + \" nodes\");\n\n long startTime=System.currentTimeMillis();\n for(int k = 0; k<100; k++)\n tree.search(totalnum/2);\n long endTime=System.currentTimeMillis();\n System.out.println( \"When there are \"+threadnums[i] + \"threads, the search takes \"+ (endTime-startTime) + \" ms\");\n }\n for(int i = 0; i<threadnums.length; i++){\n System.out.println(\"When there are \"+threadnums[i]+\" threads, \"+\"it takes \"+times.get(i)+\" ms\");\n }\n }", "@Test\n public void treeSample() {\n this.pool.invoke(JobTrees.buildTree());\n }", "@Test\n public void test1(){\n times = new ArrayList<Long>();\n for(int i = 0; i<threadnums.length; i++){\n BSTInterface tree = new LockFreeBST();\n makeThread1(tree, threadnums[i]);\n\n System.out.println( \"When there are \"+threadnums[i] + \" threads, there are \"+tree.getNum() + \" nodes\");\n\n long startTime=System.currentTimeMillis();\n for(int k = 0; k<100; k++)\n tree.search(totalnum/2);\n long endTime=System.currentTimeMillis();\n System.out.println( \"When there are \"+threadnums[i] + \"threads, the search takes \"+ (endTime-startTime) + \" ms\");\n }\n for(int i = 0; i<threadnums.length; i++){\n System.out.println(\"When there are \"+threadnums[i]+\" threads, \"+\"it takes \"+times.get(i)+\" ms\");\n }\n }", "public static void main(String[] args) {\n SearchTree search = new SearchTree(new Node(INITIAL_STATE), GOAL_STATE);\n long startTime = System.currentTimeMillis();\n\n search.breadthFirstSearch();\n// search.depthFirstSearch();\n// search.iterativeDeepening(10);\n\n long finishTime = System.currentTimeMillis();\n long totalTime = finishTime - startTime;\n System.out.println(\"\\n[Elapsed time: \" + totalTime + \" milliseconds]\");\n System.out.println(\"========================================================\");\n }", "private void treeBreadthFirstTraversal() {\n Node currNode = root;\n java.util.LinkedList<Node> queue = new java.util.LinkedList<Node>();\n\n // Highlights the first Node.\n queueNodeSelectAnimation(currNode, \"Exploring \" + currNode.key,\n AnimationParameters.ANIM_TIME);\n\n // Explores Nodes until the queue is empty.\n while (true) {\n\n // Marks that this Node's children should be explored.\n for (int i = 0; i < getNumChildren(); ++i) {\n if (currNode.children[i] != null) {\n queue.addLast(currNode.children[i]);\n queueQueueAddAnimation(currNode.children[i],\n \"Queueing \" + currNode.children[i].key,\n AnimationParameters.ANIM_TIME);\n\n }\n }\n\n // Pops the next Node from the queue.\n if (!queue.isEmpty()) {\n currNode = queue.pop();\n queueListPopAnimation(\"Popped \" + currNode.key,\n AnimationParameters.ANIM_TIME);\n queueNodeSelectAnimation(currNode, \"Exploring \" + currNode.key,\n AnimationParameters.ANIM_TIME);\n\n }\n // If the queue is empty, breaks.\n else break;\n\n }\n }", "public static void loadTree() throws NotBoundException, MalformedURLException, RemoteException, ClassNotFoundException, SQLException, InterruptedException {\n\n List<Object> ob1 = new ArrayList<>();\n ob1.add(1);\n ob1.add(1);\n//db Access1 \n List<List<Object>> sspFindMultyResult1 = ServerConnection.getServerConnector().searchMultipleResults(ob1, \"ssp_GL_LoadCombo_ActTree\", 4);\n\n DefaultTreeModel model = (DefaultTreeModel) jTree1.getModel();\n\n DefaultMutableTreeNode root = (DefaultMutableTreeNode) model.getRoot();\n\n for (List<Object> sspFindMultyResults1 : sspFindMultyResult1) {\n DefaultMutableTreeNode dmtn1 = new DefaultMutableTreeNode(sspFindMultyResults1.get(1) + \"-\" + sspFindMultyResults1.get(3));\n root.add(dmtn1);\n\n List<Object> ob2 = new ArrayList<>();\n ob2.add(2);\n ob2.add(sspFindMultyResults1.get(0));\n//db Access2\n List<List<Object>> sspFindMultyResult2 = ServerConnection.getServerConnector().searchMultipleResults(ob2, \"ssp_GL_LoadCombo_ActTree\", 4);\n\n for (List<Object> sspFindMultyResults2 : sspFindMultyResult2) {\n DefaultMutableTreeNode dmtn2 = new DefaultMutableTreeNode(sspFindMultyResults2.get(1) + \"-\" + sspFindMultyResults2.get(3));\n dmtn1.add(dmtn2);\n dmtn1.getLevel();\n\n List<Object> ob3 = new ArrayList<>();\n ob3.add(3);\n ob3.add(sspFindMultyResults2.get(0));\n//db Access3\n List<List<Object>> sspFindMultyResult3 = ServerConnection.getServerConnector().searchMultipleResults(ob3, \"ssp_GL_LoadCombo_ActTree\", 4);\n\n for (List<Object> sspFindMultyResults3 : sspFindMultyResult3) {\n DefaultMutableTreeNode dmtn3 = new DefaultMutableTreeNode(sspFindMultyResults3.get(1) + \"-\" + sspFindMultyResults3.get(3));\n dmtn2.add(dmtn3);\n\n List<Object> ob4 = new ArrayList<>();\n ob4.add(4);\n ob4.add(sspFindMultyResults3.get(0));\n//db Access4\n List<List<Object>> sspFindMultyResult4 = ServerConnection.getServerConnector().searchMultipleResults(ob4, \"ssp_GL_LoadCombo_ActTree\", 4);\n\n for (List<Object> sspFindMultyResults4 : sspFindMultyResult4) {\n DefaultMutableTreeNode dmtn4 = new DefaultMutableTreeNode(sspFindMultyResults4.get(1) + \"-\" + sspFindMultyResults4.get(3));\n dmtn3.add(dmtn4);\n\n List<Object> ob5 = new ArrayList<>();\n ob5.add(5);\n ob5.add(sspFindMultyResults4.get(0));\n//db Access5 \n List<List<Object>> sspFindMultyResult5 = ServerConnection.getServerConnector().searchMultipleResults(ob5, \"ssp_GL_LoadCombo_ActTree\", 4);\n\n for (List<Object> sspFindMultyResults5 : sspFindMultyResult5) {\n DefaultMutableTreeNode dmtn5 = new DefaultMutableTreeNode(sspFindMultyResults5.get(1) + \"-\" + sspFindMultyResults5.get(3));\n dmtn4.add(dmtn5);\n\n }\n }\n }\n }\n }\n model.reload(root);\n }", "static void waitForBlockCommit() {\n try {\n Thread.sleep(5000);\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n }", "public static void waitFilesystemTime() throws InterruptedException {\n /*\n * How much time to wait until we are sure that the file system will update the last\n * modified timestamp of a file. This is usually related to the accuracy of last timestamps.\n * In modern windows systems 100ms be more than enough (NTFS has 100us accuracy --\n * see https://msdn.microsoft.com/en-us/library/windows/desktop/ms724290(v=vs.85).aspx).\n * In linux it will depend on the filesystem. ext4 has 1ns accuracy (if inodes are 256 byte\n * or larger), but ext3 has 1 second.\n */\n Thread.sleep(2000);\n }", "public void run() \n\t{\n\t\tNode currentNode = this.tree.getRoot();\n\t\t\n\t\t//if the tree is empty and set the new node as the root node\n\t\tif (this.tree.getRoot() == null) \n\t\t{\n\t\t\tthis.tree.setRoot(this.node = new Node(this.node));\n\t\t\tthis.node.advanceToTheRoot();\n\t\t\ttree.getNote().setNote(\"Inserting a new root node [\" + node.getData()+\"].\");\n\t\t\twaitOnPause();\n\t\t} \n\t\telse \n\t\t{\n\t\t\t//otherwise go above the node and start to search\n\t\t\tthis.node.advanceToAboveTheRoot();\n\t\t\ttree.getNote().setNote(\"Starting to insert node [\"+this.value+\"].\");\n\t\t\twaitOnPause();\n\t\t\t\n\t\t\twhile (true) \n\t\t\t{\n\t\t\t\tint result = 0;\n\t\t\t\tboolean exit = false;\n\t\t\t\t\n\t\t\t\t//if the new node and the node which is being search are both numbers then \n\t\t\t\t//..convert their values into numbers and compare them.\n\t\t\t\tif(tree.isNumeric(currentNode.getData()) && tree.isNumeric(this.value))\n\t\t\t\t{\n\t\t\t\t\tint current = Integer.parseInt(currentNode.getData());\n\t\t\t\t\tint thisValue = Integer.parseInt(this.value);\n\t\t\t\t\t\n\t\t\t\t\tif (current == thisValue)\n\t\t\t\t\t\tresult = 1;\n\t\t\t\t\t\n\t\t\t\t\t// if the new node comes before the current node, go left\n\t\t\t\t\tif (thisValue < current) \n\t\t\t\t\t\tresult = 2;\n\t\t\t\t\telse if (thisValue > current) \n\t\t\t\t\t\tresult = 3;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t//else the node which is being searched is a number so compare\n\t\t\t\t\t//..them both as words.\n\t\t\t\t\tif (currentNode.getData().compareTo(this.value) == 0) \n\t\t\t\t\t\tresult = 1;\n\t\t\t\t\t\n\t\t\t\t\t// if the new node comes before the current node, go left\n\t\t\t\t\tif (this.value.compareTo(currentNode.getData()) < 0) \n\t\t\t\t\t\tresult = 2;\n\t\t\t\t\telse if (this.value.compareTo(currentNode.getData()) > 0)\n\t\t\t\t\t\tresult = 3;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tswitch(result)\n\t\t\t\t{\n\t\t\t\t\tcase 1:\n\t\t\t\t\t\t//if the node already exists in the tree then remove the 'Search' node\n\t\t\t\t\t\ttree.getNote().setNote(\"Node [\"+this.value+\"] already exists in the tree.\");\n\t\t\t\t\t\tif(!mf.getOpenF())\n\t\t\t\t\t\t\tthis.node.bgColor(node.getDeleteColor());\n\t\t\t\t\t\telse\n\t\t\t\t\t\t\tthis.node.setColor(node.getInvisibleColor(), node.getInvisibleColor());\n\t\t\t\t\t\twaitOnPause();\n\t\t\t\t\t\tthis.node.goDown();\n\t\t\t\t\t\ttree.getNote().setNote(\"\");\n\t\t\t\t\t\twaitOnPause();\n\t\t\t\t\t\treturn;\n\t\t\t\t\t\t\n\t\t\t\t\tcase 2:\n\t\t\t\t\t\t//if the new node is less than the node which is being searched then go to its left\n\t\t\t\t\t\t//...child. If the left child is empty then set the new node as the left child and\n\t\t\t\t\t\t//...connect them both.\n\t\t\t\t\t\ttree.getNote().setNote(\"Checking left side since node [\" + this.value +\n\t\t\t\t\t\t\t\t\"] is less than node [\"+ currentNode.getData()+\"].\");\n\t\t\t\t\t\tif (currentNode.getLeft() != null)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tcurrentNode = currentNode.getLeft();\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse \n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tcurrentNode.connectNode(this.node = new Node(this.node),\"left\");\n\t\t\t\t\t\t\ttree.getNote().setNote(\"Node [\"+this.value+\"] inserted since node [\"+currentNode.getData()+\n\t\t\t\t\t\t\t\t\t\"]'s left child is empty.\");\n\t\t\t\t\t\t\texit = true;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\tcase 3:\n\t\t\t\t\t\t//if the new node is greater than the node which is being searched then go to its right\n\t\t\t\t\t\t//...child. If the right child is empty then set the new node as the right child and\n\t\t\t\t\t\t//...connect them both.\n\t\t\t\t\t\ttree.getNote().setNote(\"Going to right side since node [\" + this.value +\n\t\t\t\t\t\t\t\t\"] is greater than node [\"+ currentNode.getData()+\"].\");\n\t\t\t\t\t\t\n\t\t\t\t\t\tif (currentNode.getRight() != null)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tcurrentNode = currentNode.getRight();\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse \n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t// create a new node\n\t\t\t\t\t\t\tthis.node = new Node(this.node);\n\t\t\t\t\t\t\tcurrentNode.connectNode(this.node,\"right\");\n\t\t\t\t\t\t\ttree.getNote().setNote(\"Node [\"+this.value+\"] inserted since node [\"+currentNode.getData()+\n\t\t\t\t\t\t\t\t\t\"]'s right child is empty.\");\n\t\t\t\t\t\t\texit = true;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\tdefault:\n\t\t\t\t\t\tbreak;\t\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif(exit)\n\t\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t\t//go to above the next node which is being searched.\n\t\t\t\tthis.node.advanceToNode(currentNode);\n\t\t\t\twaitOnPause();\t\n\t\t\t}\n\t\t\t\n\t\t\tthis.node = (this.tree.node = null);\n\t\t\t\n\t\t\t//if the tree is not empty then reposition it.\n\t\t\tif(this.tree.getRoot() != null)\n\t\t\t\t\tthis.tree.getRoot().repositionTree();\n\t\t\t\n\t\t\twaitOnPause();\n\t\t\t\n\t\t\t//check if the tree is balanced.\n\t\t\tthis.tree.reBalanceNode(currentNode);\n\t\t}\n\t\ttree.getNote().setNote(\"Insertion Complete.\");\n\t\ttree.getMainFrame().getStack().push(\"i \"+this.value); //add the operation to the stack\n\t}", "public static void testTreeContains()\n {\n ArrayList<Tree<String>> treelist = new ArrayList<Tree<String>>();\n treelist.add(new BinaryTree<String>());\n treelist.add(new AVLTree<String>());\n treelist.add(new RBTree<String>());\n treelist.add(new SplayTree<String>());\n\n int testruns = 20;\n\n System.out.println(\"Start TreeContains test\");\n for(Tree<String> t : treelist)\n {\n try\n {\n RobotRunner.loadDictionaryIntoTree(\"newDutch.dic\", t);\n// RobotRunner.loadDictionaryIntoTree(\"smallDutch.dic\", t);\n// RobotRunner.loadDictionaryIntoTree(\"Dutch.dic\", t); //Won't work with BinaryTree and SplayTree, too many items == StackOverflow\n// RobotRunner.loadDictionaryIntoTree(\"dict.txt\", t); //Won't work with BinaryTree and SplayTree, too many items == StackOverflow\n }\n catch(IOException e)\n {\n System.out.println(e);\n }\n System.out.println(\"\\nStart Testcase\");\n long nanoTime = 0;\n for(int i = 1; i <= testruns; i++)\n {\n System.out.println(\"Run \" + i);\n SystemAnalyser.start();\n t.contains(\"aanklotsten\");\n SystemAnalyser.stop();\n nanoTime += SystemAnalyser.getNanoTimeElapsed();\n SystemAnalyser.printPerformance();\n }\n System.out.println(\"Total nanotime: \" + nanoTime);\n System.out.println(\"Average nanotime per run: \" + (nanoTime / testruns));\n System.out.println(\"Stop Testcase\\n\");\n }\n System.out.println(\"Values after test.\");\n SystemAnalyser.printSomeTestValues();\n }", "private MoveTree generateTree() {\n\n\t\tArrayList<MoveTree> leaves = new ArrayList<>();\n\n\t\tMoveTree tree = new MoveTree(Main.getSWController().getGame().getCurrentGameState());\n\t\tleaves.add(tree);\n\n\t\tfinal Flag flag = new Flag(), finished = new Flag();\n\n\t\tTimer timer = new Timer(true);\n\t\ttimer.schedule(new TimerTask() {\n\t\t\t@Override\n\t\t\tpublic void run() {\n\t\t\t\tsynchronized (flag) {\n\t\t\t\t\tif (!finished.value)\n\t\t\t\t\t\tflag.value = true;\n\t\t\t\t}\n\t\t\t}\n\t\t}, 9000);\n\n\t\twhile (true) {\n\t\t\tArrayList<MoveTree> newLeaves = new ArrayList<>();\n\t\t\tfor (MoveTree leaf : leaves) {\n\t\t\t\tGameState state = leaf.getState();\n\t\t\t\tPlayer currentPlayer = state.getPlayer();\n\n\t\t\t\tfor (Card handcard : currentPlayer.getHand()) {\n\t\t\t\t\tBuildCapability capability = Main.getSWController().getPlayerController().canBuild(currentPlayer, handcard, state);\n\t\t\t\t\tswitch (capability) {\n\t\t\t\t\tcase FREE:\n\t\t\t\t\tcase OWN_RESOURCE:\n\t\t\t\t\t\tMove move = new Move(handcard, Action.BUILD);\n\t\t\t\t\t\tMoveTree newTree = new MoveTree(move, doMove(move, currentPlayer, state));\n\t\t\t\t\t\tnewLeaves.add(newTree);\n\t\t\t\t\t\tleaf.addChild(newTree);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase TRADE:\n\t\t\t\t\t\tTradeOption trade = Main.getSWController().getPlayerController().getTradeOptions(currentPlayer, handcard.getRequired(), state).get(0);\n\t\t\t\t\t\tMove tradeMove = new Move(handcard, Action.BUILD);\n\t\t\t\t\t\ttradeMove.setTradeOption(trade);\n\t\t\t\t\t\tMoveTree newTree2 = new MoveTree(tradeMove, doMove(tradeMove, currentPlayer, state));\n\t\t\t\t\t\tnewLeaves.add(newTree2);\n\t\t\t\t\t\tleaf.addChild(newTree2);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tdefault:\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\n\t\t\t\t\tif (currentPlayer.getBoard().nextSlot() != -1) {\n\t\t\t\t\t\tArrayList<Resource> slotRequirements = new ArrayList<>(Arrays.asList(currentPlayer.getBoard().getNextSlotRequirement()));\n\t\t\t\t\t\tcapability = Main.getSWController().getPlayerController().hasResources(currentPlayer, slotRequirements, state);\n\t\t\t\t\t\tswitch (capability) {\n\t\t\t\t\t\tcase OWN_RESOURCE:\n\t\t\t\t\t\t\tMove move = new Move(handcard, Action.PLACE_SLOT);\n\t\t\t\t\t\t\tMoveTree newTree = new MoveTree(move, doMove(move, currentPlayer, state));\n\t\t\t\t\t\t\tnewLeaves.add(newTree);\n\t\t\t\t\t\t\tleaf.addChild(newTree);\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase TRADE:\n\t\t\t\t\t\t\tTradeOption trade = Main.getSWController().getPlayerController().getTradeOptions(currentPlayer, slotRequirements, state).get(0);\n\t\t\t\t\t\t\tMove tradeMove = new Move(handcard, Action.PLACE_SLOT);\n\t\t\t\t\t\t\ttradeMove.setTradeOption(trade);\n\t\t\t\t\t\t\tMoveTree newTree2 = new MoveTree(tradeMove, doMove(tradeMove, currentPlayer, state));\n\t\t\t\t\t\t\tnewLeaves.add(newTree2);\n\t\t\t\t\t\t\tleaf.addChild(newTree2);\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tdefault:\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\tMove sellmove = new Move(handcard, Action.SELL);\n\t\t\t\t\tMoveTree selltree = new MoveTree(sellmove, doMove(sellmove, currentPlayer, state));\n\t\t\t\t\tnewLeaves.add(selltree);\n\t\t\t\t\tleaf.addChild(selltree);\n \n\t\t\t\t\tif (!currentPlayer.isOlympiaUsed() && !Main.getSWController().getCardController().hasCard(currentPlayer, handcard.getInternalName())) {\n\t\t\t\t\t\tMove olympiamove = new Move(handcard, Action.OLYMPIA);\n\t\t\t\t\t\tMoveTree olympiatree = new MoveTree(olympiamove, doMove(olympiamove, currentPlayer, state));\n\t\t\t\t\t\tnewLeaves.add(olympiatree);\n\t\t\t\t\t\tleaf.addChild(olympiatree);\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tsynchronized (flag) {\n\t\t\t\t\tif (flag.value) {\n\t\t\t\t\t\tfor (MoveTree child : leaves)\n\t\t\t\t\t\t\tchild.getChildren().clear();\n\t\t\t\t\t\treturn tree;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tboolean breakAfterwards = false;\n\n\t\t\tfor (MoveTree newLeaf : newLeaves) {\n\t\t\t\tfor (Player player : newLeaf.getState().getPlayers()) {\n\t\t\t\t\tif (player.isMausoleum()) {\n\t\t\t\t\t\tCard card = getHalikarnassusCard(player, newLeaf.getState().getTrash(), newLeaf.getState());\n\t\t\t\t\t\tif (card == null)\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tnewLeaf.getState().getTrash().remove(card);\n\t\t\t\t\t\tplayer.getBoard().addCard(card);\n\t\t\t\t\t\tif (card.getEffects() != null)\n\t\t\t\t\t\t\tfor (Effect effect : card.getEffects())\n\t\t\t\t\t\t\t\tif (effect.getType() == EffectType.WHEN_PLAYED)\n\t\t\t\t\t\t\t\t\teffect.run(player, Main.getSWController().getGame());\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tnewLeaf.getState().setCurrentPlayer((newLeaf.getState().getCurrentPlayer() + 1) % newLeaf.getState().getPlayers().size());\n\n\t\t\t\tif (newLeaf.getState().getCurrentPlayer() == newLeaf.getState().getFirstPlayer()) {\n\t\t\t\t\tif (newLeaf.getState().getRound() < GameController.NUM_ROUNDS)\n\t\t\t\t\t\tMain.getSWController().getGameController().nextRound(Main.getSWController().getGame(), newLeaf.getState());\n\t\t\t\t\telse // stop look-ahead at the end of age\n\t\t\t\t\t\tbreakAfterwards = true;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tleaves.clear();\n\t\t\tleaves.addAll(newLeaves);\n\n\t\t\tif (breakAfterwards)\n\t\t\t\tbreak;\n\t\t}\n\n\t\tfinished.value = true;\n\n\t\treturn tree;\n\t}", "private void _wait() {\n\t\tfor (int i = 1000; i > 0; i--)\n\t\t\t;\n\t}", "@Test\n public void shouldTimoutWalkDevice() throws IOException, InterruptedException {\n\n final ExecutorService executorService = Executors.newCachedThreadPool();\n\n expect(configuration.createPDU(PDU.GETBULK)).andReturn(new PDU());\n expect(target.getVersion()).andReturn(SnmpConstants.version2c);\n expect(configuration.getWalkTimeout()).andReturn(1).anyTimes();\n expect(configuration.getMaxRepetitions()).andReturn(1);\n\n expectToGetBulkAndNotify(executorService, DUMMY_OID1);\n\n replayAll();\n\n final WalkResponse response = session.walkDevice(variableHandler, oidList);\n assertFalse(response.isSuccess());\n assertTrue(response.toString().contains(\"fail\"));\n assertNotNull(response.getThrowable());\n\n verifyAll();\n executorService.shutdown();\n executorService.awaitTermination(15, TimeUnit.SECONDS);\n }", "@Test(timeout = 4000)\n public void test13() throws Throwable {\n SimpleNode simpleNode0 = new SimpleNode(101);\n SystemInUtil.addInputLine(\"G!I\");\n simpleNode0.jjtGetParent();\n simpleNode0.jjtAddChild((Node) null, 89);\n StringWriter stringWriter0 = new StringWriter();\n simpleNode0.jjtAddChild((Node) null, 101);\n simpleNode0.jjtGetChild(101);\n assertEquals(102, simpleNode0.jjtGetNumChildren());\n }", "@Test(timeout = 4000)\n public void test21() throws Throwable {\n byte[] byteArray0 = new byte[0];\n ByteArrayInputStream byteArrayInputStream0 = new ByteArrayInputStream(byteArray0, 1, 1);\n JavaParser javaParser0 = new JavaParser(byteArrayInputStream0);\n SimpleNode simpleNode0 = new SimpleNode(javaParser0, (-120811353));\n Node[] nodeArray0 = new Node[6];\n nodeArray0[0] = (Node) simpleNode0;\n nodeArray0[1] = (Node) simpleNode0;\n nodeArray0[2] = (Node) simpleNode0;\n nodeArray0[3] = (Node) simpleNode0;\n nodeArray0[4] = (Node) simpleNode0;\n SimpleNode simpleNode1 = new SimpleNode(javaParser0, 1);\n nodeArray0[5] = (Node) simpleNode1;\n simpleNode0.children = nodeArray0;\n int int0 = simpleNode0.jjtGetNumChildren();\n assertEquals(6, int0);\n }", "@Test(timeout = 4000)\n public void test39() throws Throwable {\n SimpleNode simpleNode0 = new SimpleNode(0);\n simpleNode0.identifiers = null;\n simpleNode0.jjtOpen();\n assertEquals(0, simpleNode0.jjtGetNumChildren());\n }", "boolean treeFinished(treeNode root){\n\t\treturn (root.parent == null && root.lc == null && root.rc == null);\n\t}", "protected abstract long waitToTravel();", "public void testRootHierarchy() throws Exception {\n // Initialize the tree with a driver and a connection\n JDBCDriver driver = Util.createDummyDriver();\n JDBCDriverManager.getDefault().addDriver(driver);\n\n addListener();\n DatabaseConnection conn = DatabaseConnection.create(\n driver, \"jdbc:mark//twain\", \"tomsawyer\", null, \"whitewash\", true);\n ConnectionManager.getDefault().addConnection(conn);\n waitChanged();\n\n RootNode rootNode = RootNode.instance();\n\n // Need to force a refresh because otherwise it happens asynchronously\n // and this test does not pass reliably\n RootNode.instance().getChildNodesSync();\n \n checkConnection(rootNode, conn);\n checkNodeChildren(rootNode);\n }", "@Test\n public void testLargeTree() {\n BPlusTree<Integer, Integer> tree = new BPlusTree<Integer, Integer>();\n ArrayList<Integer> numbers = new ArrayList<Integer>(100000);\n for (int i = 0; i < 100000; i++) {\n numbers.add(i);\n }\n Collections.shuffle(numbers);\n for (int i = 0; i < 100000; i++) {\n tree.insert(numbers.get(i), numbers.get(i));\n }\n testTreeInvariants(tree);\n int depth = treeDepth(tree.root);\n assertTrue(depth < 11);\n }", "public void waitTime(double time){\n double startTime = System.currentTimeMillis() + time *1000 ;\n while (opMode.opModeIsActive()){\n if (System.currentTimeMillis() > startTime) break;\n }\n }", "private void loadTree(){ \n PBarHelper.show();\n DataProvider.getTreeHierarchy(mScreenId, new DataProvider.AsyncCallback<ViewNodeJSO>() {\n @Override\n public void onError(Request r, Throwable t) {\n PBarHelper.hide();\n Window.alert(t.getMessage());\n }\n\n @Override\n public void onDownloaded(ViewNodeJSO result) {\n mRoot = result; \n CellTree.Resources res = GWT.create(CustomTreeResources.class);\n //create tree model\n mTreeViewModel = new ViewHierarchyTreeViewModel(result);\n //add selection handler to select view on canvas\n mTreeViewModel.setOnSelectionChangedListener(new OnSelectionChangedListener() { \n @Override\n public void onSelectionChanged(ViewNodeJSO viewNode, boolean selected) { \n ScreenPreviewPage.this.onViewTreeNodeSelectionChanged(viewNode, selected);\n }\n });\n //add hover listener just to highlight view\n mTreeViewModel.setOnViewNodeMouseOverListener(new OnViewNodeMouseOverListener() {\n @Override\n public void onMouseOver(ViewNodeJSO viewNode) {\n if (mTreeViewModel.getSelectedNode() == null) {\n clearCanvas();\n drawRectForView(viewNode);\n }\n }\n });\n //remove old tree if necessary, currently there is no reload support (reload page only)\n if (mCellTree != null) {\n mCellTree.removeFromParent();\n }\n mCellTree = new CellTree(mTreeViewModel, null, res); \n mCellTree.setDefaultNodeSize(1000);//no show more button\n centerPanel.add(mCellTree); \n CellTreeTools.expandAll(mCellTree.getRootTreeNode());\n mCellTree.setAnimationEnabled(true);\n PBarHelper.hide();\n } \n });\n }", "private void doBasicUpdate(){\n for (int i = 0; i < subTrees.length - 1; i++) { //top tree never receives an update (reason for -1)\r\n if(!subTrees[i].hasStopped()) {\r\n doOneUpdateStep() ;\r\n }\r\n }\r\n }", "public void testGetCachedChild() {\n FileObject fobj = getFileObject(testFile);\n FileObject parent = fobj.getParent();\n monitor.reset();\n FileObject[] childs = parent.getChildren();\n monitor.getResults().assertResult(1, StatFiles.ALL);\n monitor.getResults().assertResult(1, StatFiles.READ);\n //second time\n monitor.reset();\n childs = parent.getChildren();\n monitor.getResults().assertResult(0, StatFiles.ALL);\n }", "public void testGetChildren() throws IOException {\n FileObject fobj = getFileObject(testFile);\n FileObject parent = fobj.getParent();\n parent = parent.createFolder(\"parent\");\n File pFile = getFile(parent);\n for (int i = 0; i < 10; i++) {\n assertTrue(new File(pFile, \"file\" + i).createNewFile());\n assertTrue(new File(pFile, \"fold\" + i).mkdir());\n }\n monitor.reset();\n FileObject[] children = parent.getChildren();\n //20 x children, 1 x File.listFiles \n monitor.getResults().assertResult(21, StatFiles.ALL);\n monitor.getResults().assertResult(21, StatFiles.READ);\n //second time\n monitor.reset();\n children = parent.getChildren();\n monitor.getResults().assertResult(0, StatFiles.ALL);\n }", "@Test\n public void incrementalBuild_treeArtifacts_correctlyProducesNewTree() throws Exception {\n if (OS.getCurrent() == OS.WINDOWS) {\n return;\n }\n writeOutputDirRule();\n write(\n \"BUILD\",\n \"load(':output_dir.bzl', 'output_dir')\",\n \"output_dir(\",\n \" name = 'foo',\",\n \" content_map = {'file-1': '1', 'file-2': '2', 'file-3': '3'},\",\n \")\");\n setDownloadToplevel();\n buildTarget(\"//:foo\");\n waitDownloads();\n\n write(\n \"BUILD\",\n \"load(':output_dir.bzl', 'output_dir')\",\n \"output_dir(\",\n \" name = 'foo',\",\n \" content_map = {'file-1': '1', 'file-4': '4'},\",\n \")\");\n restartServer();\n setDownloadToplevel();\n buildTarget(\"//:foo\");\n waitDownloads();\n\n assertValidOutputFile(\"foo/file-1\", \"1\");\n assertValidOutputFile(\"foo/file-4\", \"4\");\n assertOutputDoesNotExist(\"foo/file-2\");\n assertOutputDoesNotExist(\"foo/file-3\");\n }", "public void dumpTree() {\n\t\tsendMessage(\"/g_dumpTree\", new Object[] { 0, 0 });\n\t}", "@VTID(6)\n mmarquee.automation.uiautomation.TreeScope treeScope();", "public void breadthFirstTraversal() {\n beginAnimation();\n treeBreadthFirstTraversal();\n stopAnimation();\n\n }", "private void commonLoadTestForHtml(){\n\t\tWebElement tree = getElement(\"id=tree\");\n\t\tlog(\"Found Element for id=tree \" + tree.toString());\n\n\t\t//Make sure News attributes are correct\n\t\tWebElement news = getElement(\"{\\\"element\\\":\\\"#tree\\\",\\\"subId\\\":\\\"oj-tree-node['#news']['title']\\\"}\");\n\t\tAssert.assertNotNull(news);\n\t\tnews.click();\n\n\t\tString content = getText(RESULTS_CONTAINER);\n\t\tlog(\"content\"+content);\n waitForText(RESULTS_CONTAINER, \"id=news\");\n\n\n\t\t// Finds the blogs node and make sure its not null\n\t\twaitForElementVisible(\"{\\\"element\\\":\\\"#tree\\\",\\\"subId\\\":\\\"oj-tree-node['#blogs']['disclosure']\\\"}\");\n\t\tWebElement blogs = getElement(\"{\\\"element\\\":\\\"#tree\\\",\\\"subId\\\":\\\"oj-tree-node['#blogs']['disclosure']\\\"}\");\n\n\t\tlog(\"Node: \" + blogs);\n\n\t\tAssert.assertNotNull(blogs);\n\n\t\tblogs.click(); // This should expand the node blogs\n\n\t\t//Find the children of blogs node: Today\n\t\tWebElement today = getElement(\"{\\\"element\\\":\\\"#tree\\\",\\\"subId\\\":\\\"oj-tree-node['#today']['title']\\\"}\");\n\n\t\t//Find the children of blogs node: Previous\n\t\tWebElement previous = getElement(\"{\\\"element\\\":\\\"#tree\\\",\\\"subId\\\":\\\"oj-tree-node['#prev']['title']\\\"}\");\n\n\t\tWebElement previousDiscIcon = getElement(\"{\\\"element\\\":\\\"#tree\\\",\\\"subId\\\":\\\"oj-tree-node['#prev']['disclosure']\\\"}\");\n\n\t\tAssert.assertNotNull(previousDiscIcon);\n\n\t\t//Click on Previous Node\n\t\twaitForElementVisible(\"{\\\"element\\\":\\\"#tree\\\",\\\"subId\\\":\\\"oj-tree-node['#prev']['disclosure']\\\"}\");\n\t\tpreviousDiscIcon.click();\n\n\t\t//Find the children of previous node: Yesterday\n\t\tWebElement yesterday = getElement(\"{\\\"element\\\":\\\"#tree\\\",\\\"subId\\\":\\\"oj-tree-node['#yesterday']['title']\\\"}\");\n\n\t\t//Find the children of previous node: 2DaysBack\n\t\tWebElement twodaysback = getElement(\"{\\\"element\\\":\\\"#tree\\\",\\\"subId\\\":\\\"oj-tree-node['#daysback2']['title']\\\"}\");\n\n\n\n\n\t}", "private void bfs() {\n\t\tQueue<Node> q = new ArrayDeque<>();\n\t\tq.add(treeNodes.get(0));\n\t\twhile (!q.isEmpty()) {\n\t\t\tint size = q.size();\n\t\t\tfor (int i = 0; i < size; i++) {\n\t\t\t\tNode curr = q.poll();\n\t\t\t\ttime += curr.informTime;\n\t\t\t\tSet<Node> nextNodes = curr.nextNodes;\n\t\t\t\tif (nextNodes == null || curr.id == treeNodes.get(0).id)\n\t\t\t\t\tcontinue;\n\t\t\t\tfor (Node node : nextNodes) {\n\t\t\t\t\tq.add(node);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t}", "public void testDumpNode() throws RepositoryException{\n \n MockControl nodeCtrl = MockControl.createNiceControl(Node.class);\n Node node = (Node) nodeCtrl.getMock();\n \n MockControl iteratorCtrl = MockControl.createControl(PropertyIterator.class);\n PropertyIterator iterator = (PropertyIterator) iteratorCtrl.getMock();\n \n MockControl iterCtrl = MockControl.createControl(NodeIterator.class);\n NodeIterator iter = (NodeIterator) iterCtrl.getMock();\n \n nodeCtrl.expectAndReturn(node.getPath(), \"path\");\n nodeCtrl.expectAndReturn(node.getProperties(), iterator);\n iteratorCtrl.expectAndReturn(iterator.hasNext(), false);\n nodeCtrl.expectAndReturn(node.getNodes(), iter);\n iterCtrl.expectAndReturn(iter.hasNext(), false);\n \n sessionControl.expectAndReturn(session.getRootNode(), node);\n \n sessionControl.replay();\n sfControl.replay();\n nodeCtrl.replay();\n \n jt.dump(null);\n \n nodeCtrl.verify();\n }", "public static void waitForNodeRemovalFromDOM(WebDriver driver)\n\t{\n\t\tboolean bCompleteBeforeTimeout = wasNodeRemovedFromDOM(driver, sTempUniqueNode);\n\t\tif (bCompleteBeforeTimeout)\n\t\t\treturn;\n\n\t\tString sError = \"Node (\" + sTempUniqueNode + \") was not removed from the DOM before timeout occurred\";\n\t\tLogs.logError(new GenericActionNotCompleteException(sError));\n\t}", "@Test(timeout = 10000L)\n public void testNodesInformation() throws Exception {\n CommonDriverAdminTests.testNodesInformation(client, nbNodes);\n }", "@Test\n\tpublic void testTreeOutput() throws Exception\n\t{\n\t\tfinal HttpServletRequest request = mock(HttpServletRequest.class);\n\t\tfinal HttpServletResponse response = mock(HttpServletResponse.class);\n\n\t\t// servlet mock responses\n\t\tfinal Map<String, String> map = new HashMap<String, String>();\n\t\tmap.put(\"__action\", \"download_json\");\n\t\tmap.put(\"__target\", \"jqGridView\");\n\t\tmap.put(\"Operation\", \"LOAD_TREE\");\n\t\tfor (final Entry<String, String> entry : map.entrySet())\n\t\t{\n\t\t\twhen(request.getParameter(entry.getKey())).thenReturn(entry.getValue());\n\t\t}\n\t\twhen(request.getParameterMap()).thenReturn(map);\n\t\twhen(request.getMethod()).thenReturn(\"GET\");\n\n\t\tfinal ServletOutputStream mockOutstream = mock(ServletOutputStream.class);\n\t\twhen(response.getOutputStream()).thenReturn(mockOutstream);\n\n\t\tfinal Tuple molRequest = new MolgenisRequest(request, response);\n\t\tplugin.handleRequest(db, molRequest, System.out);\n\n\t\tverify(mockOutstream)\n\t\t\t\t.print(\"[{\\\"title\\\" : \\\"Country\\\", \\\"isFolder\\\": \\\"true\\\",\\\"children\\\" : [{\\\"title\\\" : \\\"Code\\\", \\\"path\\\" : \\\"Country.Code\\\"},{\\\"title\\\" : \\\"Name\\\", \\\"path\\\" : \\\"Country.Name\\\"},{\\\"title\\\" : \\\"Continent\\\", \\\"path\\\" : \\\"Country.Continent\\\"},{\\\"title\\\" : \\\"Region\\\", \\\"path\\\" : \\\"Country.Region\\\"},{\\\"title\\\" : \\\"SurfaceArea\\\", \\\"path\\\" : \\\"Country.SurfaceArea\\\"},{\\\"title\\\" : \\\"IndepYear\\\", \\\"path\\\" : \\\"Country.IndepYear\\\"},{\\\"title\\\" : \\\"Population\\\", \\\"path\\\" : \\\"Country.Population\\\"},{\\\"title\\\" : \\\"LifeExpectancy\\\", \\\"path\\\" : \\\"Country.LifeExpectancy\\\"},{\\\"title\\\" : \\\"GNP\\\", \\\"path\\\" : \\\"Country.GNP\\\"},{\\\"title\\\" : \\\"GNPOld\\\", \\\"path\\\" : \\\"Country.GNPOld\\\"},{\\\"title\\\" : \\\"LocalName\\\", \\\"path\\\" : \\\"Country.LocalName\\\"},{\\\"title\\\" : \\\"GovernmentForm\\\", \\\"path\\\" : \\\"Country.GovernmentForm\\\"},{\\\"title\\\" : \\\"HeadOfState\\\", \\\"path\\\" : \\\"Country.HeadOfState\\\"},{\\\"title\\\" : \\\"Capital\\\", \\\"path\\\" : \\\"Country.Capital\\\"},{\\\"title\\\" : \\\"Code2\\\", \\\"path\\\" : \\\"Country.Code2\\\"}]},{\\\"title\\\" : \\\"City\\\", \\\"isFolder\\\": \\\"true\\\",\\\"children\\\" : [{\\\"title\\\" : \\\"ID\\\", \\\"path\\\" : \\\"City.ID\\\"},{\\\"title\\\" : \\\"Name\\\", \\\"path\\\" : \\\"City.Name\\\"},{\\\"title\\\" : \\\"CountryCode\\\", \\\"path\\\" : \\\"City.CountryCode\\\"},{\\\"title\\\" : \\\"District\\\", \\\"path\\\" : \\\"City.District\\\"},{\\\"title\\\" : \\\"Population\\\", \\\"path\\\" : \\\"City.Population\\\"}]},{\\\"title\\\" : \\\"CountryLanguage\\\", \\\"isFolder\\\": \\\"true\\\",\\\"children\\\" : [{\\\"title\\\" : \\\"CountryCode\\\", \\\"path\\\" : \\\"CountryLanguage.CountryCode\\\"},{\\\"title\\\" : \\\"Language\\\", \\\"path\\\" : \\\"CountryLanguage.Language\\\"},{\\\"title\\\" : \\\"IsOfficial\\\", \\\"path\\\" : \\\"CountryLanguage.IsOfficial\\\"},{\\\"title\\\" : \\\"Percentage\\\", \\\"path\\\" : \\\"CountryLanguage.Percentage\\\"}]}]\");\n\n\t\tverifyNoMoreInteractions(mockOutstream);\n\t}", "public void waitForRootRegionLocation() {\n regionManager.waitForRootRegionLocation();\n }", "@Test(timeout = 5000)\n public void graphTest_runtime() {\n int v=1000*50, e=v*6;\n graph g = graph_creator(v,e,1);\n // while(true) {;}\n }", "public void waitSelected(final TreePath path) {\n\twaitSelected(new TreePath[] { path });\n }", "@DISPID(1611006008) //= 0x60060038. The runtime will prefer the VTID if present\n @VTID(84)\n void parametersNodeInTree(\n boolean oNodeDisplayed);", "private void setup(){\n buildTree(2);\n }", "@Test(timeout = 4000)\n public void test08() throws Throwable {\n JSJshop jSJshop0 = new JSJshop();\n JSJshopNode jSJshopNode0 = jSJshop0.getTree();\n assertNull(jSJshopNode0);\n }", "public final void quietlyCompleteRoot()\n/* */ {\n/* 687 */ Object localObject = this;\n/* 688 */ for (;;) { CountedCompleter localCountedCompleter; if ((localCountedCompleter = ((CountedCompleter)localObject).completer) == null) {\n/* 689 */ ((CountedCompleter)localObject).quietlyComplete();\n/* 690 */ return;\n/* */ }\n/* 692 */ localObject = localCountedCompleter;\n/* */ }\n/* */ }", "public void show() {\n\t\t\n\t\tSystem.out.println(\"time (tree setup) = \" + treeSetup + \" ms\");\n\t\tSystem.out.println(\"time (average search) = \" + (totalSearch/(float)countSearch) + \" ms\");\n\t\tSystem.out.println(\"time (average at) = \" + (totalAt/(float)countAt) + \" ms\");\n \t}", "private void test(NFV root) throws Exception{\n\t\tlong beginAll=System.currentTimeMillis();\n\t\tNFV rootTest = init(root);\n\t\tlong endAll=System.currentTimeMillis();\n //System.out.println(\"Total time -> \" + ((endAll-beginAll)/1000) + \"s\");\n\t\trootTest.getPropertyDefinition().getProperty().forEach(p ->{\n \tif(p.isIsSat()){\n\t\t\t\tmaxTotTime = maxTotTime<(endAll-beginAll)? (endAll-beginAll) : maxTotTime;\n\t\t\t\tSystem.out.print(\"time: \" + (endAll-beginAll) + \"ms;\");\n\t\t\t\ttotTime += (endAll-beginAll);\n \t\tnSAT++;\n \t}\n \telse{\n \t\tnUNSAT++;\n \t}\n });\n return;\n\t}", "public void tree()\n\t{\n\t\tIterable<Position<FileElement>> toPrint = fileSystem.PreOrder();\n\t\tfor (Position<FileElement> p : toPrint)\n\t\t{\n\t\t\tint depth = fileSystem.getDepth(p);\n\t\t\tfor (int i = 0; i < depth; i++)\n\t\t\t{\n\t\t\t\tSystem.out.print(\" \");\n\t\t\t}\n\t\t\tSystem.out.println(p.getValue());\n\t\t}\n\t}", "void resetTreeForQueries() {\n\t\t_queryTree = new Tree(_tree);\n\t\tif(DEBUG) {\n\t\t\tSystem.out.printf(\"\\nquery tree structure:\\n%s\\n\",_queryTree.getLongInfo());\n\t\t}\n\t}", "public void run(){\n\n File fileRoot = new File(path);\n root = new DefaultMutableTreeNode(new fileNode(fileRoot));\n treemodel = new DefaultTreeModel(root);\n\n tree = new JTree(treemodel);\n tree.setShowsRootHandles(true);\n JScrollPane scrollPane = new JScrollPane(tree);\n this.panel.add(scrollPane);\n //frame.setLocationByPlatform(true);\n this.panel.setSize(1000, 1000);\n this.panel.setVisible(true);\n /*\n this.panel.add(scrollPane);\n //frame.setLocationByPlatform(true);\n this.panel.setSize(1000, 1000);\n this.panel.setVisible(true);\n */\n\n createChildren cc = new createChildren(fileRoot, root);\n new Thread(cc).start();\n\n\n }", "@Override\n public void grow() {\n System.out.println(\"Tree growing\");\n }", "@Test\n public void test(){\n BinarySearchTree tree = new BinarySearchTree(new Node(35));\n\n tree.addNode(4);\n tree.addNode(15);\n tree.addNode(3);\n tree.addNode(1);\n tree.addNode(20);\n tree.addNode(8);\n tree.addNode(50);\n tree.addNode(40);\n tree.addNode(30);\n tree.addNode(80);\n tree.addNode(70);\n\n tree.addNode(90);\n\n tree.deleteNode(50);\n System.out.println(\"=====中序遍历 递归法=====\");\n TreeUtil.traverseInOrder(tree.getRoot());\n\n System.out.println(\"\");\n System.out.println(\"=====中序遍历 迭代法=====\");\n TreeUtil.traverseInOrderByIteration(tree.getRoot());\n\n System.out.println(\"\");\n System.out.println(\"=====前序遍历=====\");\n TreeUtil.traversePreOrder(tree.getRoot());\n\n System.out.println(\"\");\n System.out.println(\"=====中序遍历 迭代法=====\");\n TreeUtil.traversePreOrderByIteration(tree.getRoot());\n\n System.out.println(\"\");\n System.out.println(\"=====后序遍历=====\");\n TreeUtil.traversePostOrder(tree.getRoot());\n\n System.out.println(\"\");\n System.out.println(\"=====后序遍历 迭代法=====\");\n TreeUtil.traversePostOrderByIteration(tree.getRoot());\n\n System.out.println(\"\");\n System.out.println(\"=====层次遍历=====\");\n TreeUtil.traverseLevelOrder(tree.getRoot());\n\n int height = TreeUtil.getChildDepth(tree.getRoot());\n System.out.println(\"\");\n System.out.println(\"树高:\"+height);\n }", "private void driveToNextNode(){\n updateAngles();\n computeDriveMechanics();\n\n //Set Speeds and drive\n double[] speedValues = getSpeedValues();\n setRobotSpeed(speedValues[0], speedValues[1]);\n //long end2 = System.nanoTime();\n\n //Update Metrics\n this.nodeCount = currentTree.size();\n this.nodeExploredCount = bestTree.size();\n //this.nodeGenTime += end1 - start1;\n //this.nodeDriveTime += end2 - start2;\n\n System.out.println(\"currenenenen:: \"+ currentNode.getPosition());\n System.out.println(\"currenenenen:: \"+ nextNode.getPosition());\n\n this.cumulativeEuclidean += getDistanceBetween(\n currentNode.getPosition(), nextNode.getPosition());\n\n //updateMetrics();\n\n //set current node as next node\n currentNode = nextNode;\n\n this.cumulativeTurnAngle += this.bearingAngle;\n }", "public void waitToFinish()\n/* */ {\n/* 473 */ synchronized (this) {\n/* 474 */ while (getIterationsToGo() > 0) {\n/* */ try {\n/* 476 */ wait();\n/* */ }\n/* */ catch (InterruptedException e) {\n/* 479 */ e.printStackTrace();\n/* */ }\n/* */ }\n/* */ }\n/* */ }", "public void testNodeAddingAndRemoving() {\n final Children c = new Array();\n Node n = new AbstractNode (c);\n final PListView lv = new PListView();\n final ExplorerPanel p = new ExplorerPanel();\n p.add(lv, BorderLayout.CENTER);\n p.getExplorerManager().setRootContext(n);\n p.open();\n\n final Node c1 = new AbstractNode(Children.LEAF);\n c1.setDisplayName(\"First\");\n c1.setName(\"First\");\n c.add(new Node[] { c1 });\n Node c2 = new AbstractNode(Children.LEAF);\n c2.setDisplayName(\"Second\");\n c2.setName(\"Second\");\n //Thread.sleep(500);\n\n for (int i = 0; i < 5; i++) {\n c.remove(new Node[] { c1 });\n c.add(new Node[] { c2 });\n \n // Waiting for until the view is updated.\n // This should not be necessary\n try {\n SwingUtilities.invokeAndWait( new EmptyRunnable() );\n } catch (InterruptedException ie) {\n fail (\"Caught InterruptedException:\" + ie.getMessage ());\n } catch (InvocationTargetException ite) {\n fail (\"Caught InvocationTargetException: \" + ite.getMessage ());\n }\n \n try {\n p.getExplorerManager().setSelectedNodes(new Node[] {c2} );\n } catch (PropertyVetoException pve) {\n fail (\"Caught the PropertyVetoException when set selected node \" + c2.getName ()+ \".\");\n }\n \n c.remove(new Node[] { c2 });\n c.add(new Node[] { c1 });\n \n //Thread.sleep(350);\n }\n }", "public void printTreeNodes(){\n logger.trace(\"Name: \"+this.getName());\n for(int i=0;i<this.getChildCount();i++){\n SearchBaseNode node = (SearchBaseNode) this.getChildAt(i);\n node.printTreeNodes();\n }\n }", "public static void simulate(BinarySearchTree tree)\n {\n String data = \"\";\n\n //populateTree(tree);\n\n populateTreeRandom(tree);\n\n data = tree.breadthFirstTraversal();\n\n System.out.println(\"RANDOM DATA POST POPULATION: \\n\" + data);\n }", "@DISPID(1611006004) //= 0x60060034. The runtime will prefer the VTID if present\n @VTID(80)\n void constraintsNodeInTree(\n boolean oNodeDisplayed);", "private void loadInitialTree() {\n navTreeWidget.addItem( \"Please wait...\" );\n DeferredCommand.addCommand(new Command() {\n\t\t\tpublic void execute() {\n\t\t service.loadChildCategories( \"/\",\n\t\t new GenericCallback() {\n\n\n\t\t public void onSuccess(Object result) {\n\t\t selectedPath = null;\n\t\t navTreeWidget.removeItems();\n\n\t\t TreeItem root = new TreeItem();\n\t\t root.setHTML(\"<img src=\\\"images/desc.gif\\\"/>\");\n\t\t navTreeWidget.addItem(root);\n\n\t\t String[] categories = (String[]) result;\n\n\t\t if (categories.length == 0) {\n\t\t showEmptyTree();\n\t\t } else {\n\t\t hideEmptyTree();\n\t\t }\n\t\t for ( int i = 0; i < categories.length; i++ ) {\n\t\t TreeItem it = new TreeItem();\n\t\t it.setHTML( \"<img src=\\\"images/category_small.gif\\\"/>\" + categories[i] );\n\t\t it.setUserObject( categories[i] );\n\t\t it.addItem( new PendingItem() );\n\t\t root.addItem( it );\n\t\t }\n\n\t\t root.setState(true);\n\t\t }\n\n\n\n\t\t } );\n\t\t\t}}\n );\n\n }", "@Test\n public void iterate0() {\n runAndWait(() -> {\n int err = 0;\n RBTree<Integer> tree = new RBTree<>();\n List<Integer> list = new ArrayList<>(List.of(1, 2, 3, 4, 5, 6, 7, 8, 9, 10));\n Collections.shuffle(list);\n tree.addAll(list);\n Collections.sort(list);\n int i = 0;\n for (int val : tree) {\n if (i >= list.size()) {\n fail(\"The tree iterated over more elements than the initial list!\");\n }\n if (val != list.get(i)) {\n System.err.println(\"Expected the value \" + list.get(i) + \", but found \" + val);\n err++;\n }\n i++;\n }\n assertEquals(\"There were \" + err + \" errors!\", 0, err);\n }, 64, 1000);\n \n }", "private static void task3(int nUMS, BinarySearchTree<Integer> t) {\n\t\t\n\t\t long start = System.nanoTime();\n\t\t System.out.println( \"Deletion in the table...\" );\n\t\t int count=0;\n\t\t\tfor( int i = 1; i <= nUMS; i++)\n\t\t\t{\n\t\t\t\tif(t.isEmpty() == false)\n\t\t\t\t{\n\t\t\t\t\n\t\t\t\tt.remove(i);\n\t\t\t\t\n\t\t\t\t}\n//\t\t\t\tSystem.out.println(GenerateInt.generateNumber());\n\n\t\t\t}\n\t\t\tSystem.out.println(\"Total Size \" + count);\n\t\t\tSystem.out.println(\"Is it empty \" + t.isEmpty());\n\t\t\tlong end = System.nanoTime();;\n\t\t\tlong elapsedTime = end - start;\n\t\t\tSystem.out.println(elapsedTime + \" NanoSeconds\");\n\t\t\tSystem.out.println(\"Average Time \" + elapsedTime/nUMS);\n\t\t \n\t\t }", "void checkTrees(Box tree);", "@Test\n public void testExpandTree() {\n // TODO: test ExpandTree\n }", "public static void main(String[] args) throws Exception {\n int B = 4096; //bytes max por pagina\n int M = 200; //cantidad de rectangulos tal que el nodo no pese mas que B\n\n int maxCord = 500000;\n int maxDelta = 100;\n\n Random rnd = new Random();\n\n int m = (M * 40) / 100; // m = 40% M\n\n int left = rnd.nextInt(maxCord);\n int bottom = rnd.nextInt(maxCord);\n int deltaX = rnd.nextInt(maxDelta);\n int deltaY = rnd.nextInt(maxDelta);\n\n Rectangle r = new Rectangle(left, left + deltaX, bottom + deltaY, bottom);\n DiskController diskController = new DiskController(M);\n long address = diskController.memoryAssigner();\n Node tree = new Root(m, M, r, diskController, address);\n\n diskController.saveNode(tree);\n long rootSize =diskController.getNodeSize(address);\n System.out.println(\"Tamaño de raiz : \" + rootSize + \" bytes\");\n\n int n=0;\n while (diskController.getNodeSize(address) < B){\n if(n==157) { break;}\n n++;\n Rectangle rn;\n left = rnd.nextInt(maxCord);\n bottom = rnd.nextInt(maxCord);\n deltaX = rnd.nextInt(maxDelta);\n deltaY = rnd.nextInt(maxDelta);\n rn = new Rectangle(left, left + deltaX, bottom + deltaY, bottom);\n tree.insert(rn, new LinearSplit());\n System.out.println(\"Rectangulos insertados : \" + n);\n }\n float nodeCoverage = diskController.nodeOcupation();\n System.out.println(\"Coverage : \"+nodeCoverage);\n System.out.println(\"Tamaño de raiz llena : \" + diskController.getNodeSize(address) + \" bytes, con \"+n+\" nodos insertados. Con raiz vacía de \"+rootSize+\" bytes\");\n //Tamaño de raiz llena : 4089 bytes, con 157 nodos insertados. Con raiz vacía de 478 bytes\n\n }", "public static void main(String[] args) {\n TreeNode root = new TreeNode(20, null, null);\n TreeNode lvl2Node1 = insertTreeNode(true, 10, root);\n TreeNode lvl2Node2 = insertTreeNode(false, 1, root);\n TreeNode lvl3Node1 = insertTreeNode(true, 25, lvl2Node1);\n TreeNode lvl3Node2 = insertTreeNode(false, 26, lvl2Node1);\n TreeNode lvl3Node3 = insertTreeNode(true, 32, lvl2Node2);\n TreeNode lvl3Node4 = insertTreeNode(false, 37, lvl2Node2);\n insertTreeNode(true, 5, lvl3Node1);\n insertTreeNode(false, 6, lvl3Node2);\n insertTreeNode(false, 8, lvl3Node3);\n insertTreeNode(true, 10, lvl3Node4);\n\n\n breadthFirstSearchPrintTree(root);\n\n }", "@Test\r\n public void testIsInTreeOf() {\r\n System.out.println(\"isInTreeOf\");\r\n ConfigNode configNode = new ConfigNode();\r\n \r\n ConfigNode childNode1 = new ConfigNode(testLine);\r\n configNode.appendChild(childNode1);\r\n assertTrue(childNode1.isInTreeOf(configNode));\r\n assertFalse(configNode.isInTreeOf(childNode1));\r\n \r\n ConfigNode childNode2 = new ConfigNode(testLine);\r\n configNode.appendChild(childNode2);\r\n assertTrue(childNode2.isInTreeOf(configNode));\r\n assertFalse(childNode2.isInTreeOf(childNode1));\r\n \r\n ConfigNode childOfChildNode2 = new ConfigNode(testLine);\r\n childNode2.appendChild(childOfChildNode2);\r\n assertTrue(childOfChildNode2.isInTreeOf(configNode));\r\n assertTrue(childOfChildNode2.isInTreeOf(childNode2));\r\n assertFalse(childOfChildNode2.isInTreeOf(childNode1));\r\n }", "ProcessRunner waitFor();", "public void testRemoveAndAddNodes() {\n final Children c = new Array();\n Node n = new AbstractNode (c);\n final PListView lv = new PListView();\n final ExplorerPanel p = new ExplorerPanel();\n p.add(lv, BorderLayout.CENTER);\n p.getExplorerManager().setRootContext(n);\n p.open();\n Node[] children = new Node[NO_OF_NODES];\n\n for (int i = 0; i < NO_OF_NODES; i++) {\n children[i] = new AbstractNode(Children.LEAF);\n children[i].setDisplayName(Integer.toString(i));\n children[i].setName(Integer.toString(i));\n c.add(new Node[] { children[i] } );\n }\n //Thread.sleep(2000);\n \n try {\n // Waiting for until the view is updated.\n // This should not be necessary\n try {\n SwingUtilities.invokeAndWait( new EmptyRunnable() );\n } catch (InterruptedException ie) {\n fail (\"Caught InterruptedException:\" + ie.getMessage ());\n } catch (InvocationTargetException ite) {\n fail (\"Caught InvocationTargetException: \" + ite.getMessage ());\n }\n p.getExplorerManager().setSelectedNodes(new Node[] {children[0]} );\n } catch (PropertyVetoException pve) {\n fail (\"Caught the PropertyVetoException when set selected node \" + children[0].getName ()+ \".\");\n }\n \n for (int i = 0; i < NO_OF_NODES; i++) {\n c.remove(new Node [] { children[i] } );\n children[i] = new AbstractNode(Children.LEAF);\n children[i].setDisplayName(Integer.toString(i));\n children[i].setName(Integer.toString(i));\n c.add(new Node[] { children[i] } );\n //Thread.sleep(350);\n }\n assertEquals(NO_OF_NODES, c.getNodesCount());\n }", "void doMcTree() throws NotConnectedException, NotSuspendedException, NoResponseException\n\t{\n\t\t/* wait a bit if we are not halted */\n\t\twaitTilHalted();\n\t\ttry\n\t\t{\n\t\t\tString var = nextToken(); // our variable reference\n\t\t\tString member = \"_target\"; //$NON-NLS-1$\n\t\t\tboolean printPath = false;\n\t\t\tObject result = null;\n\t\t\tString name = null;\n\n\t\t\t// did the user specify a member name\n\t\t\tif (hasMoreTokens())\n\t\t\t{\n\t\t\t\tmember = nextToken();\n\n\t\t\t\t// did they specify some other options\n\t\t\t\twhile(hasMoreTokens())\n\t\t\t\t{\n\t\t\t\t\tString option = nextToken();\n\t\t\t\t\tif (option.equalsIgnoreCase(\"fullpath\")) //$NON-NLS-1$\n\t\t\t\t\t\tprintPath = true;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// first parse it, then attempt to evaluate the expression\n\t\t\tValueExp expr = parseExpression(var);\n\t\t\tresult = evalExpression(expr).value;\n\n\t\t\tStringBuilder sb = new StringBuilder();\n\n\t\t\tif (result instanceof Variable)\n\t\t\t{\n\t\t\t\tname = ((Variable)result).getName();\n\t\t\t\tresult = ((Variable)result).getValue();\n\t\t\t}\n\n\t\t\t// It worked an should now be a value that we can traverse looking for member properties\n\n\t\t\tif (result instanceof Value)\n\t\t\t{\n\t\t\t\tArrayList<Object> e = new ArrayList<Object>();\n\t\t\t\tdumpTree(new HashMap<Object, String>(), e, name, (Value)result, member);\n\n\t\t\t\t// now sort according to our criteria\n\t\t\t\ttreeResults(sb, e, member, printPath);\n\t\t\t}\n\t\t\telse\n\t\t\t\tthrow new NoSuchVariableException(result);\n\n\t\t\tout( sb.toString() );\n\t\t}\n\t\tcatch(NoSuchVariableException nsv)\n\t\t{\n\t\t\tMap<String, Object> args = new HashMap<String, Object>();\n\t\t\targs.put(\"variable\", nsv.getMessage()); //$NON-NLS-1$\n\t\t\terr(getLocalizationManager().getLocalizedTextString(\"variableUnknown\", args)); //$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}", "public void doWait(){\n\t\tsynchronized(m){\n\t\t\ttry{\n\t\t\t\tm.wait(32000,0);\n\t\t\t} catch(InterruptedException e){}\n\t\t}\n\t}", "private void commonLoadTestForJson(){\n\t\tWebElement tree = getElement(\"id=tree\");\n\t\tlog(\"Found Element for id=tree \" + tree.toString());\n\n\t\t//Make sure News attributes are correct\n\t\tWebElement news = getElement(\"{\\\"element\\\":\\\"#tree\\\",\\\"subId\\\":\\\"oj-tree-node['#news']['title']\\\"}\");\n\t\tAssert.assertNotNull(news);\n\t\tnews.click();\n\n\t\tString content = getText(RESULTS_CONTAINER);\n\t\tlog(\"content\"+content);\n content.contains(\"id=news\");\n\n\n\n\t\t// Finds the blogs node and make sure its not null\n\t\twaitForElementVisible(\"{\\\"element\\\":\\\"#tree\\\",\\\"subId\\\":\\\"oj-tree-node['#blogs']['disclosure']\\\"}\");\n\t\tWebElement blogs = getElement(\"{\\\"element\\\":\\\"#tree\\\",\\\"subId\\\":\\\"oj-tree-node['#blogs']['disclosure']\\\"}\");\n\n\t\tlog(\"Node: \" + blogs);\n\n\t\tAssert.assertNotNull(blogs);\n\n\t\tblogs.click(); // This should expand the node blogs\n\n\t\tlog(\"clicked\");\n\n\t\t//Find the children of blogs node: Today\n\t\tWebElement today = getElement(\"{\\\"element\\\":\\\"#tree\\\",\\\"subId\\\":\\\"oj-tree-node['#today']['title']\\\"}\");\n\n\t\t//Find the children of blogs node: Yesterday\n\t\tWebElement yesterday = getElement(\"{\\\"element\\\":\\\"#tree\\\",\\\"subId\\\":\\\"oj-tree-node['#yesterday']['title']\\\"}\");\n\n\t\t//Find the children of blogs node: 2DaysBack\n\t\tWebElement twodaysback = getElement(\"{\\\"element\\\":\\\"#tree\\\",\\\"subId\\\":\\\"oj-tree-node['#2daysback']['title']\\\"}\");\n\n\n\t\t//Find the children of blogs node: Archive\n\t\tWebElement archive = getElement(\"{\\\"element\\\":\\\"#tree\\\",\\\"subId\\\":\\\"oj-tree-node['#archive']['title']\\\"}\");\n\n\t}", "public static void main(String[] args) throws InterruptedException {\n int[] arr = new int[]{26, 18, 39, 16, 22, 28, 42};\n Node<Integer> root = null;\n\n for (int i = 0; i < arr.length; i++) {\n root = insert(root, arr[i]);\n }\n\n root = inOrder(root);\n\n Node<Integer> curr = root;\n while (curr != null) {\n System.out.println(curr.value);\n curr = curr.left;\n\n Thread.sleep(500);\n }\n\n }", "public static void main(String[] args) {\r\n\t\t\r\n\t\t binarytree bt = new binarytree(); bt.display();\r\n\t\t System.out.println(bt.size2()); System.out.println(bt.size());\r\n\t\t System.out.println(bt.max()); System.out.println(bt.min());\r\n\t\t \r\n\t\t System.out.println(bt.height()); System.out.println(bt.find(87));\r\n\t\t System.out.println(bt.find(5)); //bt.mirror(); bt.display();\r\n\t\t \r\n\t\t bt.preOrder(); bt.postOrder(); bt.inOrder();\r\n\t\t System.out.println(\"**************************************\");\r\n\t\t bt.levelorder(); bt.preorderI();\r\n\t\t \r\n\t\t/*\r\n\t\t * System.out.println(bt.find(87)); System.out.println(bt.find(5));\r\n\t\t * \r\n\t\t * System.out.println(bt.height());\r\n\t\t * \r\n\t\t * // bt.display();\r\n\t\t */// bt.mirror();\r\n\t\t\t// bt.display();\r\n\t\t/*\r\n\t\t * bt.preOrder(); bt.postOrder(); bt.inOrder(); bt.levelOrder();\r\n\t\t * bt.preOrderI();33\r\n\t\t * \r\n\t\t * System.out.println(bt.postOrderPred(50));\r\n\t\t * System.out.println(bt.postOrderSucc(50));\r\n\t\t * \r\n\t\t * bt.multiCalculator();\r\n\t\t */\r\n\t\tint[] pre = { 50, 25, 12, 49, 62, 87, 75 };\r\n\t\tint[] in = { 12, 25, 49, 50, 62, 75, 87 };\r\n\t\tbinarytree b2 = new binarytree(pre, in);\r\n\t\tbt.display();\r\n\t\tSystem.out.println(b2.diameter());\r\n\t\tSystem.out.println(b2.isbst());\r\n\t\tSystem.out.println(b2.isbst3());\r\n\t}", "public void checkTree() {\r\n checkTreeFromNode(treeRoot);\r\n }", "public void determinePartitions( Callback c ){\n mCurrentDepth = 0;\n GraphNode node;\n GraphNode child;\n int depth = 0;\n List levelList = new java.util.LinkedList();\n int i = 0;\n //they contain those nodes whose parents have not been traversed as yet\n //but the BFS did it.\n List orphans = new java.util.LinkedList();\n\n\n //set the depth of the dummy root as 0\n mRoot.setDepth( mCurrentDepth );\n\n mQueue.addLast( mRoot );\n\n while( !mQueue.isEmpty() ){\n node = (GraphNode)mQueue.getFirst();\n depth = node.getDepth();\n if( mCurrentDepth < depth ){\n\n if( mCurrentDepth > 0 ){\n //we are done with one level!\n constructPartitions( c, levelList, mCurrentDepth );\n }\n\n\n //a new level starts\n mCurrentDepth++;\n levelList.clear();\n }\n mLogger.log( \"Adding to level \" + mCurrentDepth + \" \" + node.getID(),\n LogManager.DEBUG_MESSAGE_LEVEL);\n levelList.add( node );\n\n //look at the orphans first to see if any\n //of the dependency has changed or not.\n /*it = orphans.iterator();\n while(it.hasNext()){\n child = (GraphNode)it.next();\n if(child.parentsBlack()){\n child.setDepth(depth + 1);\n System.out.println(\"Set depth of \" + child.getID() + \" to \" + child.getDepth());\n\n child.traversed();\n mQueue.addLast(child);\n }\n\n //remove the child from the orphan\n it.remove();\n }*/\n\n\n node.setColor( GraphNode.BLACK_COLOR );\n for( Iterator it = node.getChildren().iterator(); it.hasNext(); ){\n child = (GraphNode)it.next();\n if(!child.isColor( GraphNode.GRAY_COLOR ) &&\n child.parentsColored( GraphNode.BLACK_COLOR )){\n mLogger.log( \"Adding to queue \" + child.getID(),\n LogManager.DEBUG_MESSAGE_LEVEL );\n child.setDepth( depth + 1 );\n child.setColor( GraphNode.GRAY_COLOR );\n mQueue.addLast( child );\n }\n /*else if(!child.isTraversed() && !child.parentsBlack()){\n //we have to do the bumping effect\n System.out.println(\"Bumping child \" + child);\n orphans.add(child);\n }*/\n }\n node = (GraphNode)mQueue.removeFirst();\n mLogger.log( \"Removed \" + node.getID(),\n LogManager.DEBUG_MESSAGE_LEVEL);\n }\n\n //handle the last level of the BFS\n constructPartitions( c, levelList, mCurrentDepth );\n\n\n //all the partitions are dependant sequentially\n for( i = mCurrentDepth; i > 1; i-- ){\n constructLevelRelations( c, i - 1, i );\n\n }\n\n done( c );\n }", "private static void task1(int nUMS, BinarySearchTree<Integer> t, GenerateInt generateInt) {\n\t\t long start = System.nanoTime();\n\t\t System.out.println( \"Fill in the table...Binary Tree\" );\n\t\t int count=1;\n\t\t\tfor( int i = 1; i <= nUMS; i++)\n\t\t\t{\n\t\t\t\t \t\t \n\t\t\t\tt.insert(i);\n//\t\t\t\tSystem.out.println(i);\n\t\t\t\tcount = i;\n\n\t\t\t}\n\t\t\tSystem.out.println(\"Total Size \" + count);\n\t\t\tlong end = System.nanoTime();;\n\t\t\tlong elapsedTime = end - start;\n\t\t\tSystem.out.println(elapsedTime + \" NanoSeconds\");\n\t\t\tSystem.out.println(\"Average Time \" + elapsedTime/nUMS);\n\t\t \n\t\t }", "@Test\n\tpublic void testInsert4() {\n\t\t\n\t\tBTree<Long,String> T = new BTree<Long, String>(3);\n\t\tT.insert(new Long(10), \"Ten\");\n\t\tT.insert(new Long(20), \"Twenty\");\n\t\tT.insert(new Long(30), \"Thirty\");\n\t\t\n\t\tT.insert(new Long(70), \"Seventy\");\n\t\tT.insert(new Long(60), \"Sixty\");\n\t\tT.insert(new Long(80), \"Eighty\");\n\t\t\n\t\tT.insert(new Long(50), \"Fifty\");\n\t\tT.insert(new Long(40), \"Fourty\");\n\t\tT.insert(new Long(55), \"Fifty-Five\");\n\t\tT.insert(new Long(65), \"Sixty-Five\");\n\t\t\n\t\tassertTrue( T.root instanceof InnerNode);\n\t\t\n\t\tInnerNode<Long,String> root = (InnerNode<Long,String>) T.root;\n\t\tassertEquals(1, root.keys.size());\n\t\tassertEquals(60, (long) root.keys.get(0));\n\t\tassertEquals(2, root.children.size());\n\t\t\n\t\tInnerNode<Long,String> left = (InnerNode<Long,String>) root.children.get(0);\n\t\tInnerNode<Long,String> right = (InnerNode<Long,String>) root.children.get(1);\n\t\t\n\t\tassertEquals(30, (long) left.keys.get(0));\n\t\tassertEquals(50, (long) left.keys.get(1));\n\t\t\n\t\tassertEquals(70, (long) right.keys.get(0));\n\t\t\n\t\tLeafNode<Long, String> child0 = (LeafNode<Long, String>) left.children.get(0);\n\t\tLeafNode<Long, String> child1 = (LeafNode<Long, String>) left.children.get(1);\n\t\t\n\t\tLeafNode<Long, String> child2 = (LeafNode<Long, String>) left.children.get(2);\n\t\t\n\t\tLeafNode<Long, String> child3 = (LeafNode<Long, String>) right.children.get(0);\n\t\tLeafNode<Long, String> child4 = (LeafNode<Long, String>) right.children.get(1);\n\t\t\n\t\tassertEquals(10, (long) child0.children.get(0).key);\n\t\tassertEquals(20, (long) child0.children.get(1).key);\n\t\t\n\t\tassertEquals(30, (long) child1.children.get(0).key);\n\t\tassertEquals(40, (long) child1.children.get(1).key);\n\t\t\n\t\tassertEquals(50, (long) child2.children.get(0).key);\n\t\tassertEquals(55, (long) child2.children.get(1).key);\n\t\t\n\t\tassertEquals(60, (long) child3.children.get(0).key);\n\t\tassertEquals(65, (long) child3.children.get(1).key);\n\t\t\n\t\tassertEquals(70, (long) child4.children.get(0).key);\n\t\tassertEquals(80, (long) child4.children.get(1).key);\n\t\t\n\t}", "@Test\n public void visualiseTree()\n {\n System.out.println(avlTree.toString());\n }", "void updateRootInfo(Callback callback) {\n\t\t\tif (updatePending.compareAndSet(false, true)) {\n\t\t\t\tFile[] localRoots = listRoots(); // possibly sloooow\n\t\t\t\tsynchronized (this) {\n\t\t\t\t\troots = List.of(localRoots);\n\t\t\t\t}\n\t\t\t\tfor (File root : localRoots) {\n\t\t\t\t\tdescriptionMap.put(root, getInitialRootDescriptionString(root));\n\t\t\t\t\ticonMap.put(root, PENDING_ROOT_ICON);\n\t\t\t\t}\n\n\t\t\t\tThread updateThread = new Thread(\n\t\t\t\t\t() -> asyncUpdateRootInfo(localRoots, Callback.dummyIfNull(callback)));\n\t\t\t\tupdateThread.setName(\"GhidraFileChooser File System Updater\");\n\t\t\t\tupdateThread.start();\n\t\t\t\t// updateThread will unset the updatePending flag when done\n\t\t\t}\n\t\t}", "public void inOrderTraversal() {\n beginAnimation();\n treeInOrderTraversal(root);\n stopAnimation();\n\n }", "public static void main(String[] args) throws IOException {\n\n // check for correct number of arguments\n if (args.length > constants.TREEQUERY_MAX_ARG_COUNT || args.length < constants.TREEQUERY_MIN_ARG_COUNT) {\n System.out.println(\"Error: Incorrect number of arguments were input\");\n return;\n }\n\n int pageSize;\n String start_index = args[0].replace('_',' ');\n // allowing range query with arguments length\n Key start_key = new Key(start_index), end_key = null;\n if(args.length == constants.TREEQUERY_MAX_ARG_COUNT) {\n String end_index = args[1].replace('_', ' ');\n end_key = new Key(end_index);\n pageSize = Integer.parseInt(args[constants.TREEQUERY_MAX_PAGE_SIZE_ARG]);\n }else\n pageSize = Integer.parseInt(args[constants.TREEQUERY_MIN_PAGE_SIZE_ARG]);\n\n String datafile = \"heap.\" + pageSize;\n String treefile = String.format(\"bptree.%d\", pageSize);\n\n long startTime = 0;\n long finishTime = 0;\n long tree_start = 0, tree_end = 0;\n\n int numBytesIntField = Integer.BYTES;\n SimpleDateFormat dateFormat = new SimpleDateFormat(\"MM/dd/yyyy hh:mm:ss a\");\n\n FileInputStream inStream = null;\n FileInputStream inStream_tree = null;\n try{\n File file = new File(datafile);\n inStream = new FileInputStream(file);\n inStream_tree = new FileInputStream(treefile);\n\n // calculate tree degree\n int degree = (int) Math.sqrt((double) file.length()/pageSize);\n tree_start = System.nanoTime();\n BPlusTree tree = new BPlusTree(degree, pageSize);\n // construct tree from tree file\n tree.construct(inStream_tree);\n tree_end = System.nanoTime();\n\n // start query\n startTime = System.nanoTime();\n\n byte[] sdtnameBytes = new byte[constants.STD_NAME_SIZE];\n byte[] idBytes = new byte[constants.ID_SIZE];\n byte[] dateBytes = new byte[constants.DATE_SIZE];\n byte[] yearBytes = new byte[constants.YEAR_SIZE];\n byte[] monthBytes = new byte[constants.MONTH_SIZE];\n byte[] mdateBytes = new byte[constants.MDATE_SIZE];\n byte[] dayBytes = new byte[constants.DAY_SIZE];\n byte[] timeBytes = new byte[constants.TIME_SIZE];\n byte[] sensorIdBytes = new byte[constants.SENSORID_SIZE];\n byte[] sensorNameBytes = new byte[constants.SENSORNAME_SIZE];\n byte[] countsBytes = new byte[constants.COUNTS_SIZE];\n RandomAccessFile raf = new RandomAccessFile(datafile, \"r\");\n // range query\n if(end_key!=null) {\n // Range query can have more than one results, using ArrayList to save\n ArrayList<Integer> result = tree.query(start_key, end_key);\n if (!result.isEmpty()){\n result.forEach(p -> {\n try {\n // random access file seek to the point we want\n raf.seek(p);\n // retrieve the whole data from this point\n byte[] data = new byte[constants.TOTAL_SIZE];\n raf.read(data);\n /*\n * Fixed Length Records (total size = 112 bytes):\n * SDT_NAME field = 24 bytes, offset = 0\n * id field = 4 bytes, offset = 24\n * date field = 8 bytes, offset = 28\n * year field = 4 bytes, offset = 36\n * month field = 9 bytes, offset = 40\n * mdate field = 4 bytes, offset = 49\n * day field = 9 bytes, offset = 53\n * time field = 4 bytes, offset = 62\n * sensorid field = 4 bytes, offset = 66\n * sensorname field = 38 bytes, offset = 70\n * counts field = 4 bytes, offset = 108\n *\n * Copy the corresponding sections of \"page\" to the individual field byte arrays\n */\n System.arraycopy(data, 0, sdtnameBytes, 0, constants.STD_NAME_SIZE);\n System.arraycopy(data, constants.STD_NAME_SIZE, idBytes, 0, numBytesIntField);\n System.arraycopy(data, constants.DATE_OFFSET, dateBytes, 0, constants.DATE_SIZE);\n System.arraycopy(data, constants.YEAR_OFFSET, yearBytes, 0, numBytesIntField);\n System.arraycopy(data, constants.MONTH_OFFSET, monthBytes, 0, constants.MONTH_SIZE);\n System.arraycopy(data, constants.MDATE_OFFSET, mdateBytes, 0, numBytesIntField);\n System.arraycopy(data, constants.DAY_OFFSET, dayBytes, 0, constants.DAY_SIZE);\n System.arraycopy(data, constants.TIME_OFFSET, timeBytes, 0, numBytesIntField);\n System.arraycopy(data, constants.SENSORID_OFFSET, sensorIdBytes, 0, numBytesIntField);\n System.arraycopy(data, constants.SENSORNAME_OFFSET, sensorNameBytes, 0, constants.SENSORNAME_SIZE);\n System.arraycopy(data, constants.COUNTS_OFFSET, countsBytes, 0, numBytesIntField);\n\n // Convert long data into Date object\n Date date = new Date(ByteBuffer.wrap(dateBytes).getLong());\n String sdtNameString = new String(sdtnameBytes);\n\n // Get a string representation of the record for printing to stdout\n String record = sdtNameString.trim() + \",\" + ByteBuffer.wrap(idBytes).getInt()\n + \",\" + dateFormat.format(date) + \",\" + ByteBuffer.wrap(yearBytes).getInt() +\n \",\" + new String(monthBytes).trim() + \",\" + ByteBuffer.wrap(mdateBytes).getInt()\n + \",\" + new String(dayBytes).trim() + \",\" + ByteBuffer.wrap(timeBytes).getInt()\n + \",\" + ByteBuffer.wrap(sensorIdBytes).getInt() + \",\" +\n new String(sensorNameBytes).trim() + \",\" + ByteBuffer.wrap(countsBytes).getInt();\n System.out.println(record);\n } catch (IOException e) {\n e.printStackTrace();\n }\n });\n System.out.printf(\"\\nRange query result: %d records found.\\n\", result.size());\n }\n }else {\n // equal query\n int result = tree.query(start_key);\n if (result!=-1) {\n try {\n // same as Range query\n raf.seek(result);\n byte[] data = new byte[constants.TOTAL_SIZE];\n raf.read(data);\n /*\n * Fixed Length Records (total size = 112 bytes):\n * SDT_NAME field = 24 bytes, offset = 0\n * id field = 4 bytes, offset = 24\n * date field = 8 bytes, offset = 28\n * year field = 4 bytes, offset = 36\n * month field = 9 bytes, offset = 40\n * mdate field = 4 bytes, offset = 49\n * day field = 9 bytes, offset = 53\n * time field = 4 bytes, offset = 62\n * sensorid field = 4 bytes, offset = 66\n * sensorname field = 38 bytes, offset = 70\n * counts field = 4 bytes, offset = 108\n *\n * Copy the corresponding sections of \"page\" to the individual field byte arrays\n */\n System.arraycopy(data, 0, sdtnameBytes, 0, constants.STD_NAME_SIZE);\n System.arraycopy(data, constants.STD_NAME_SIZE, idBytes, 0, numBytesIntField);\n System.arraycopy(data, constants.DATE_OFFSET, dateBytes, 0, constants.DATE_SIZE);\n System.arraycopy(data, constants.YEAR_OFFSET, yearBytes, 0, numBytesIntField);\n System.arraycopy(data, constants.MONTH_OFFSET, monthBytes, 0, constants.MONTH_SIZE);\n System.arraycopy(data, constants.MDATE_OFFSET, mdateBytes, 0, numBytesIntField);\n System.arraycopy(data, constants.DAY_OFFSET, dayBytes, 0, constants.DAY_SIZE);\n System.arraycopy(data, constants.TIME_OFFSET, timeBytes, 0, numBytesIntField);\n System.arraycopy(data, constants.SENSORID_OFFSET, sensorIdBytes, 0, numBytesIntField);\n System.arraycopy(data, constants.SENSORNAME_OFFSET, sensorNameBytes, 0, constants.SENSORNAME_SIZE);\n System.arraycopy(data, constants.COUNTS_OFFSET, countsBytes, 0, numBytesIntField);\n\n // Convert long data into Date object\n Date date = new Date(ByteBuffer.wrap(dateBytes).getLong());\n String sdtNameString = new String(sdtnameBytes);\n\n // Get a string representation of the record for printing to stdout\n String record = sdtNameString.trim() + \",\" + ByteBuffer.wrap(idBytes).getInt()\n + \",\" + dateFormat.format(date) + \",\" + ByteBuffer.wrap(yearBytes).getInt() +\n \",\" + new String(monthBytes).trim() + \",\" + ByteBuffer.wrap(mdateBytes).getInt()\n + \",\" + new String(dayBytes).trim() + \",\" + ByteBuffer.wrap(timeBytes).getInt()\n + \",\" + ByteBuffer.wrap(sensorIdBytes).getInt() + \",\" +\n new String(sensorNameBytes).trim() + \",\" + ByteBuffer.wrap(countsBytes).getInt();\n System.out.println(record);\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n System.out.println();\n }\n\n finishTime = System.nanoTime();\n }catch (FileNotFoundException e) {\n System.err.println(\"File not found \" + e.getMessage());\n }\n finally {\n\n if (inStream != null) {\n inStream.close();\n }\n if (inStream_tree != null){\n inStream_tree.close();\n }\n }\n\n long treeInMilliseconds = (tree_end - tree_start)/constants.MILLISECONDS_PER_SECOND;\n System.out.println(\"Time taken for constructing B+Tree: \" + treeInMilliseconds + \" ms\");\n long timeInMilliseconds = (finishTime - startTime)/constants.MILLISECONDS_PER_SECOND;\n System.out.println(\"Time taken for query: \" + timeInMilliseconds + \" ms\");\n System.out.println(\"Total Time taken: \" + (treeInMilliseconds + timeInMilliseconds) + \" ms\");\n }", "public void traverseInOrder() {\n\t System.out.println(\"============= BTREE NODES ===============\");\n\t\tinOrder(root);\n System.out.println(\"=========================================\");\n\t}", "@Test(timeout = 10000L)\n public void testIdleNodesInformation() throws Exception {\n CommonDriverAdminTests.testIdleNodesInformation(client, nbNodes);\n }", "@Test\n\tpublic void testInsert3() {\n\t\t\n\t\tBTree<Long,String> T = new BTree<Long, String>(3);\n\t\tT.insert(new Long(10), \"Ten\");\n\t\tT.insert(new Long(20), \"Twenty\");\n\t\tT.insert(new Long(30), \"Thirty\");\n\t\t\n\t\tT.insert(new Long(70), \"Seventy\");\n\t\tT.insert(new Long(60), \"Sixty\");\n\t\tT.insert(new Long(80), \"Eighty\");\n\t\t\n\t\tT.insert(new Long(50), \"Fifty\");\n\t\tT.insert(new Long(40), \"Fourty\");\n\t\t\n\t\tassertTrue( T.root instanceof InnerNode);\n\t\t\n\t\tInnerNode<Long,String> root = (InnerNode<Long,String>) T.root;\n\t\tassertEquals(3, root.keys.size());\n\t\tassertEquals(30, (long) root.keys.get(0));\n\t\tassertEquals(50, (long) root.keys.get(1));\n\t\tassertEquals(70, (long) root.keys.get(2));\n\t\t\n\t\tassertEquals(4, root.children.size( ));\n\t\tassertTrue( root.children.get(0) instanceof LeafNode );\n\t\tassertTrue( root.children.get(1) instanceof LeafNode );\n\t\tassertTrue( root.children.get(2) instanceof LeafNode );\n\t\tassertTrue( root.children.get(3) instanceof LeafNode );\n\n\t\tLeafNode<Long, String> child0 = (LeafNode<Long, String>) root.children.get(0);\n\t\tLeafNode<Long, String> child1 = (LeafNode<Long, String>) root.children.get(1);\n\t\tLeafNode<Long, String> child2 = (LeafNode<Long, String>) root.children.get(2);\n\t\tLeafNode<Long, String> child3 = (LeafNode<Long, String>) root.children.get(3);\n\t\t\n\t\tassertEquals(2, child0.children.size());\n\t\tassertEquals(10, (long) child0.children.get(0).key);\n\t\tassertEquals(20, (long) child0.children.get(1).key);\n\n\t\tassertEquals(2, child1.children.size());\n\t\tassertEquals(30, (long) child1.children.get(0).key);\n\t\tassertEquals(40, (long) child1.children.get(1).key);\n\n\t\tassertEquals(2, child2.children.size());\n\t\tassertEquals(50, (long) child2.children.get(0).key);\n\t\tassertEquals(60, (long) child2.children.get(1).key);\n\t\t\n\t\tassertEquals(2, child3.children.size());\n\t\tassertEquals(70, (long) child3.children.get(0).key);\n\t\tassertEquals(80, (long) child3.children.get(1).key);\n\t}", "private void waitFor(long nanos) throws TimeoutException {\n if (done) {\n return;\n }\n\n synchronized (waitObj) {\n long waitTo = System.nanoTime() + nanos;\n while (!done) {\n nanos = waitTo - System.nanoTime();\n if (nanos <= 0) {\n throw new TimeoutException();\n }\n try {\n waitObj.wait(nanos / 1000000, (int) (nanos % 1000000));\n } catch (InterruptedException ex) {\n ex.printStackTrace(System.err);\n }\n }\n }\n if (excpetion != null) {\n throw excpetion;\n }\n }", "@Override\n public void runMovingTest() {\n long now;\n int count, search;\n elapsedTime.clear();\n expandedCells.clear();\n GraphPath<Integer,DefaultWeightedEdge> agentPath=null;\n GraphPath<Integer,DefaultWeightedEdge> targetPath=null;\n //Integer agentNode, targetNode;\n List<Integer> pathToFollow = null;\n for(Point[] p : points){\n pathfinder = new LazyMovingTargetAdaptiveAStarShortestPath<Integer, DefaultWeightedEdge>(map);\n count=0;\n search=0;\n agentNode = p[0].toNode();\n targetNode = p[1].toNode();\n LinkedList<Integer> movingExpCell = new LinkedList<>();\n LinkedList<Long> movingElapsTime = new LinkedList<>();\n targetThread r = new targetThread();\n evadeThread = new Thread(r);\n evadeThread.start();\n while(!agentNode.equals(targetNode)){\n if(pathToFollow==null || !agentPath.getEndVertex().equals(targetNode)) {\n agentPath = pathfinder.getShortestPath(agentNode, targetNode, new OctileDistance());\n if(pathfinder.getElapsedTime() > Long.valueOf(1900))\n continue;\n movingElapsTime.add(pathfinder.getElapsedTime());\n movingExpCell.add(pathfinder.getNumberOfExpandedNodes());\n search++;\n }\n Integer targetNext = null;\n Integer agentNext = null;\n if(count%2==0) {\n /*targetPath = new Trailmax<Integer,DefaultWeightedEdge>(map).getShortestPath(agentNode,targetNode,null);\n pathToFollow = Graphs.getPathVertexList(targetPath);\n if (!pathToFollow.isEmpty()) targetNext = pathToFollow.remove(0);\n if (targetNext.equals(targetNode) && !pathToFollow.isEmpty()) targetNext = pathToFollow.remove(0);\n targetNode = targetNext;*/\n synchronized(moveTarget) {\n moveTarget = new Boolean(true);\n }\n\n try {\n Thread.sleep(12);\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n }\n pathToFollow=Graphs.getPathVertexList(agentPath);\n if(!pathToFollow.isEmpty()){\n int i = pathToFollow.lastIndexOf(agentNode);\n agentNext=pathToFollow.remove(i+1);\n }\n agentNode = agentNext;\n count++;\n //System.out.println(agentNode+\",\"+targetNode);\n\n }\n\n r.terminate();\n try {\n evadeThread.join();\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n pathToFollow=null;\n movingElapsedTime.put(p, movingElapsTime);\n movingExpandedCells.put(p, movingExpCell);\n movesMap.put(p, count);\n searchesMap.put(p, search);\n if(verbose) {\n Long totElaps = Long.valueOf(0);\n Integer totExp = 0;\n for (Long l : movingElapsTime) totElaps += l;\n for (Integer i : movingExpCell) totExp += i;\n System.out.println(\"total elapsed: \" + totElaps + \" total expanded \" + totExp);\n }\n }\n }", "@Test(timeout = 10000L)\n public void testNbIdleNodes() throws Exception {\n CommonDriverAdminTests.testNbIdleNodes(client, nbNodes);\n }", "static boolean bfs(TreeNode root) {\n Queue<TreeNode> queue = new LinkedList<TreeNode>();\n queue.add(root);\n while (!queue.isEmpty()) {\n TreeNode node = (TreeNode) queue.remove();\n if (node == null)\n continue;\n System.out.println(\"Checking node \" + node.data);\n if (isGoal(node)) {\n System.out.println(\"\\nFound goal node \" + node.data);\n return true;\n }\n queue.addAll(node.getChildren());\n // dump(queue);\n }\n return false;\n }", "@Test(timeout = 10000L)\n public void testNbNodes() throws Exception {\n CommonDriverAdminTests.testNbNodes(client, nbNodes);\n }", "public void refreshTree(){\n\r\n\t\ttestCaseVector = db.getTestCases();\r\n\t\tFolderVector = db.getFolders();\r\n\t\trootNode_TC = new DefaultMutableTreeNode(\"Test Cases\");\r\n\t\ts = new MyTreeNode [testCaseVector.size()+FolderVector.size() +2];\r\n\t\tFolder1 = new DefaultMutableTreeNode [testCaseVector.size()+FolderVector.size() +2];\r\n\r\n\r\n\r\n\t\tint x = 1 ; \r\n\t\tfor(Folder f: FolderVector){\r\n\t\t\ts[x] = new MyTreeNode(f.getName(),'f', x, f.getFolderID());\r\n\r\n\t\t\tExpandedID[x] = f.getFolderID();\r\n\t\t\tFolder1[x] = new DefaultMutableTreeNode(s[x]);\r\n\r\n\t\t\tif (f.getParentID() == 0)\r\n\t\t\t{\r\n\t\t\t\trootNode_TC.add(Folder1[x]);\r\n\t\t\t\tx++;\r\n\t\t\t}\r\n\r\n\r\n\r\n\t\t\telse {\r\n\r\n\t\t\t\tfor (int u = 1 ; u < s.length; u++ )\r\n\t\t\t\t{\r\n\t\t\t\t\tif(s[u]!=null)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tif(s[u].getType() == 'f')\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tif(s[u].getID() == f.getParentID())\r\n\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\tFolder1[u].add(Folder1[x]);\r\n\t\t\t\t\t\t\t\tx++;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tint l = x-1;\r\n\t\t\tfor(TestCase tc : testCaseVector)\r\n\t\t\t{\r\n\r\n\t\t\t\tif (tc.getFolderID() == f.getFolderID())\r\n\t\t\t\t{\r\n\t\t\t\t\ts[x] =new MyTreeNode(tc.getName(), 't', x, tc.getId());\r\n\r\n\t\t\t\t\tFolder1[l].add(new DefaultMutableTreeNode(s[x]));\r\n\t\t\t\t\tx++;\r\n\r\n\t\t\t\t}\r\n\r\n\t\t\t}\r\n\r\n\t\t}\r\n\r\n\t\tint y = FolderVector.size()+1;\r\n\t\tfor(TestCase tc : testCaseVector)\r\n\t\t{\r\n\t\t\tif(tc.getFolderID() == 0){\r\n\r\n\r\n\t\t\t\tMyTreeNode s=new MyTreeNode(tc.getName(), 't', y, tc.getId());\r\n\t\t\t\trootNode_TC.add(new DefaultMutableTreeNode(s));\r\n\t\t\t\ty++;\r\n\t\t\t}\r\n\t\t}\r\n\t\tDefaultTreeModel Tree1 = new DefaultTreeModel(rootNode_TC);\r\n\t\toverviewTree.setModel(Tree1);\r\n\t\toverviewTree.setCellRenderer(new TreeRenderer(isExpanded, ExpandedID));\r\n\t\tfor(Folder f: FolderVector)\r\n\t\t{\r\n\t\t\tif(isExpanded[f.getFolderID()]){ // To expand the already expanded folders\r\n\t\t\t\tfor (int u = 1 ; u < s.length; u++ )\r\n\t\t\t\t{\r\n\t\t\t\t\tif(s[u]!=null)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tif(s[u].getType() == 'f')\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tif(s[u].getID() == f.getFolderID())\r\n\t\t\t\t\t\t\t{\r\n\r\n\t\t\t\t\t\t\t\tEnumeration<DefaultMutableTreeNode> e = rootNode_TC.depthFirstEnumeration();\r\n\t\t\t\t\t\t\t\twhile (e.hasMoreElements()) {\r\n\t\t\t\t\t\t\t\t\tDefaultMutableTreeNode node = e.nextElement();\r\n\t\t\t\t\t\t\t\t\tif (node != overviewTree.getModel().getRoot() )\r\n\t\t\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t\t\tMyTreeNode nodeInfo = null ;\r\n\t\t\t\t\t\t\t\t\t\tnodeInfo = (MyTreeNode) node.getUserObject();\r\n\t\t\t\t\t\t\t\t\t\tif (nodeInfo.getName().equalsIgnoreCase(s[u].getName())) \r\n\t\t\t\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t\t\t\tTreePath p = new TreePath(node.getPath());\r\n\t\t\t\t\t\t\t\t\t\t\toverviewTree.expandRow(overviewTree.getRowForPath(p));\r\n\r\n\t\t\t\t\t\t\t\t\t\t}\r\n\r\n\r\n\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\r\n\t\t}\r\n\r\n\r\n\t}", "protected void waitForTracingEvents()\n {\n try\n {\n Stage.TRACING.executor().submit(() -> {}).get();\n }\n catch (Throwable t)\n {\n JVMStabilityInspector.inspectThrowable(t);\n logger.error(\"Failed to wait for tracing events\", t);\n }\n }", "public void refreshOntTreeTable() {\n\t\tJTree changeTree = ontChangeTT.getTree();\r\n\t\tTreeTableNode rootNode = (TreeTableNode) changeTree.getModel().getRoot();\r\n\t\trootNode.children = new Vector();\r\n\t\tthis.ontChangeEdPane.setText(\"\");\r\n\t\t\r\n\t\t// populate node tree\r\n\t\tfor (Iterator changeIter = ontChanges.iterator(); changeIter.hasNext();) {\r\n\t\t\tSwoopChange swc = (SwoopChange) changeIter.next();\r\n\t\t\t\r\n\t\t\t// skip checkpoint related changes\r\n\t\t\tif (!swc.isCheckpointRelated /*&& swc.isCommitted*/) {\r\n\t\t\t\tTreeTableNode changeNode = new TreeTableNode(swc);\r\n\t\t\t\trootNode.addChild(changeNode);\t\t\t\t\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tontChangeTT.getTree().updateUI();\r\n\t\tthis.refreshUI();\t\t\r\n\t}", "@Test\n public void test34(){\n Tree<PermissionDO> tree = permissionService.getTree(16);\n for (Tree<PermissionDO> permissionDOTree : tree.getChildren()) {\n if((boolean)(permissionDOTree.getState().get(\"selected\"))){\n System.out.println(permissionDOTree.getText());\n }\n System.out.println(\"--------------------\");\n }\n }", "public static void main(String[] args) {\n\n Tree tree = new Tree(100);\n for (int i = 0; i < 20; i++) {\n tree.addNode((int)(Math.random()*200));\n }\n\n tree.printTree();\n\n System.out.println(\"\\n\");\n tree.countLeafs();\n }", "void waitAll();", "public void printTree(T root) {\n List<TreeLine> treeLines = buildTreeLines(root);\n printTreeLines(treeLines);\n if(flush) outStream.flush();\n }", "@DISPID(1611006008) //= 0x60060038. The runtime will prefer the VTID if present\n @VTID(83)\n boolean parametersNodeInTree();", "public void RecursiveExpansion() throws TreeTooBigException {\r\n int transIndex; //Index to count transitions\r\n int[] newMarkup; //markup used to create new node\r\n boolean aTransitionIsEnabled = false; //To check for deadlock\r\n //Attribute used for assessing whether a node has occured before\r\n boolean repeatedNode = false; \r\n \r\n boolean allOmegas = false;\r\n \r\n boolean[] enabledTransitions = \r\n tree.dataLayer.getTransitionEnabledStatusArray(markup);\r\n\r\n //For each transition\r\n for (int i = 0; i < enabledTransitions.length; i++) {\r\n if (enabledTransitions[i] == true) {\r\n //Set transArray of to true for this index\r\n transArray[i] = true;\r\n \r\n //System.out.println(\"\\n Transition \" + i + \" Enabled\" );\r\n aTransitionIsEnabled = true;\r\n \r\n //print (\"\\n Old Markup is :\", markup);//debug\r\n \r\n //Fire transition to produce new markup vector\r\n newMarkup = fire(i);\r\n \r\n //print (\"\\n New Markup is :\", newMarkup);//debug\r\n \r\n //Check for safeness. If any of places have > 1 token set variable.\r\n for (int j = 0; j < newMarkup.length; j++) {\r\n if (newMarkup[j] > 1 || newMarkup[j] == -1) {\r\n tree.moreThanOneToken = true;\r\n break;\r\n }\r\n } \r\n \r\n //Create a new node using the new markup vector and attach it to\r\n //the current node as a child.\r\n children[i] = \r\n new myNode(newMarkup, this, tree, depth + 1);\r\n \r\n /* Now need to (a) check if any omegas (represented by -1) need to \r\n * be inserted in the markup vector of the new node, and (b) if the \r\n * resulting markup vector has appeared anywhere else in the tree. \r\n * We must do (a) before (b) as we need to know if the new node \r\n * contains any omegas to be able to compare it with existing nodes. \r\n */ \r\n allOmegas = children[i].InsertOmegas();\r\n \r\n //check if the resulting markup vector has occured anywhere else in the tree\r\n repeatedNode = (tree.root).FindMarkup(children[i]);\r\n \r\n if (tree.nodeCount >= Pipe.MAX_NODES && !tree.tooBig) {\r\n tree.tooBig = true;\r\n throw new TreeTooBigException();\r\n }\r\n \r\n if (!repeatedNode && !allOmegas) {\r\n children[i].RecursiveExpansion();\r\n }\r\n }\r\n }\r\n \r\n if (!aTransitionIsEnabled) {\r\n System.err.println(\"No transition enabled\");\r\n if (!tree.noEnabledTransitions || tree.pathToDeadlock.length < depth-1) {\r\n RecordDeadlockPath();\r\n tree.noEnabledTransitions = true;\r\n } else {\r\n System.err.println(\"Deadlocked node found, but path is not shorter\"\r\n + \" than current path.\");\r\n }\r\n } else {\r\n //System.out.println(\"Transitions enabled.\");\r\n }\r\n }", "public static void main(String[] args) {\n\n MultiChildTreeNode<String> ff = new MultiChildTreeNode<>(\"F\");\n MultiChildTreeNode<String> iff = new MultiChildTreeNode<>(\"I\");\n ff.children.add(iff);\n MultiChildTreeNode<String> kff = new MultiChildTreeNode<>(\"K\");\n ff.children.add(kff);\n MultiChildTreeNode<String> t2 = ff;//Subtree to find\n\n //Main tree\n MultiChildTreeNode<String> t1 = new MultiChildTreeNode<>(\"A\");\n MultiChildTreeNode<String> b = new MultiChildTreeNode<>(\"B\");\n MultiChildTreeNode<String> c = new MultiChildTreeNode<>(\"C\");\n MultiChildTreeNode<String> d = new MultiChildTreeNode<>(\"D\");\n t1.children.add(b);\n t1.children.add(c);\n t1.children.add(d);\n\n MultiChildTreeNode<String> e = new MultiChildTreeNode<>(\"E\");\n MultiChildTreeNode<String> h = new MultiChildTreeNode<>(\"H\");\n e.children.add(h);\n\n MultiChildTreeNode<String> f = new MultiChildTreeNode<>(\"F\");\n b.children.add(f);\n MultiChildTreeNode<String> i = new MultiChildTreeNode<>(\"I\");\n f.children.add(i);\n MultiChildTreeNode<String> j = new MultiChildTreeNode<>(\"J\");\n f.children.add(j);\n\n\n /**\n * A\n * / | \\\n * B C.. D...\n * / |\n *E.. F\n * / \\\n * I J\n * |\n * F\n * / \\\n * I K\n */\n j.children.add(ff); //commenting out this line should give false otherwise true\n\n MultiChildTreeNode<String> k = new MultiChildTreeNode<>(\"K\");\n MultiChildTreeNode<String> g = new MultiChildTreeNode<>(\"G\");\n b.children.add(e);\n\n b.children.add(g);\n MultiChildTreeNode<String> l = new MultiChildTreeNode<>(\"L\");\n c.children.add(k);\n c.children.add(l);\n\n MultiChildTreeNode<String> m = new MultiChildTreeNode<>(\"M\");\n MultiChildTreeNode<String> n = new MultiChildTreeNode<>(\"N\");\n MultiChildTreeNode<String> o = new MultiChildTreeNode<>(\"O\");\n d.children.add(m);\n d.children.add(n);\n d.children.add(o);\n CheckForSubTree<String> checker = new CheckForSubTree<>();\n System.out.println (checker.isSubTree(t1, t2));\n }", "@DISPID(1611006016) //= 0x60060040. The runtime will prefer the VTID if present\n @VTID(92)\n void bodiesUnderOperationsInTree(\n boolean oNodeDisplayed);", "private void buildWaitScene(){\n\t\t//Nothing to do\n\t}", "protected void setTree(JTree newTree) {\n\tif(tree != newTree) {\n\t if(tree != null)\n\t\ttree.removeTreeSelectionListener(this);\n\t tree = newTree;\n\t if(tree != null)\n\t\ttree.addTreeSelectionListener(this);\n\t if(timer != null) {\n\t\ttimer.stop();\n\t }\n\t}\n }" ]
[ "0.5847472", "0.5846232", "0.5809433", "0.58021677", "0.56813866", "0.5671621", "0.55088174", "0.5483346", "0.5479776", "0.537849", "0.5349457", "0.53475034", "0.52518076", "0.5212047", "0.52020395", "0.5201081", "0.51862943", "0.5179422", "0.5140879", "0.51172644", "0.5111157", "0.50914395", "0.50878286", "0.50835603", "0.50761145", "0.50734735", "0.50626796", "0.50509816", "0.5041869", "0.5032289", "0.50227", "0.5013852", "0.50026274", "0.49928284", "0.49865535", "0.49814203", "0.49769202", "0.49760124", "0.49736458", "0.49725893", "0.49683785", "0.4965371", "0.49613288", "0.4926668", "0.49195275", "0.4919462", "0.49187505", "0.4915396", "0.49102813", "0.4907554", "0.4904338", "0.4902172", "0.49", "0.48864746", "0.4884285", "0.48814908", "0.48766655", "0.48749766", "0.48743653", "0.48683316", "0.48655236", "0.48649243", "0.48611337", "0.48608902", "0.48564246", "0.48499894", "0.4844439", "0.4843447", "0.48409843", "0.48393244", "0.48370433", "0.4833992", "0.48316354", "0.48283368", "0.48184192", "0.48024368", "0.48012048", "0.47929025", "0.4781192", "0.4772118", "0.4762752", "0.47598016", "0.47556004", "0.47466192", "0.47458476", "0.47343788", "0.47312343", "0.4730084", "0.4728234", "0.47278693", "0.47196633", "0.47171748", "0.47146466", "0.47142997", "0.4711924", "0.47024545", "0.47001535", "0.46994793", "0.46912608", "0.46898356" ]
0.7183157
0
Creates a generic action context with no provider, with the given context object
public ActionContext createContext(Object contextObject) { return new DefaultActionContext().setContextObject(contextObject); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public ActionContext createContext(ComponentProvider provider, Object contextObject) {\n\t\treturn new DefaultActionContext(provider).setContextObject(contextObject);\n\t}", "Context createContext();", "Context createContext();", "public abstract void makeContext();", "private static Context createContext(final Context context)\r\n throws EscidocException, InternalClientException, TransportException, MalformedURLException {\r\n \t\r\n \t// prepare client object\r\n \tAuthentication auth = new Authentication(new URL(Constants.DEFAULT_SERVICE_URL), Constants.USER_NAME_SYSADMIN, Constants.USER_PASSWORD_SYSADMIN);\r\n \tContextHandlerClient chc = new ContextHandlerClient(auth.getServiceAddress());\r\n \tchc.setHandle(auth.getHandle());\r\n\r\n Context createdContext = chc.create(context);\r\n\r\n return createdContext;\r\n }", "ControllerContext() {\n\t\t// do nothing\n\t}", "Action execute(Context context);", "public Context() {\n }", "public Object createContext(ApplicationRequest request,\n ApplicationResponse response);", "public abstract void addAction(Context context, NAAction action);", "public BadgeActionProvider(Context context) {\n super(context);\n }", "void init(@NotNull ExecutionContext context);", "public ActionButton(Context context) {\n this(context, null);\n Intrinsics.checkNotNullParameter(context, \"context\");\n }", "Context context();", "Context context();", "@Override\n\tpublic void contextCreated(String context, boolean toolPlacement) {\n\t}", "public static OperationContext createOperationCtx(final Task task,\n final SpanClock spanClock,\n final ZipkinContext zipkinContext) {\n\n return API.Match(task.getComponent().getLocalComponent()).of(\n Case($(Predicates.isNull()), () -> {\n throw new RuntimeException(\"local component can not be null\");\n }),\n Case($(\"http\"), HttpOperationContext.create(task, spanClock, zipkinContext)),\n Case($(\"jdbc\"), JdbcOperationContext.create(task, spanClock)),\n Case($(), () -> {\n throw new RuntimeException(\"local component does not exist or not implemented yet\");\n }));\n }", "public ActionBeanContext getContext() {\r\n return context;\r\n }", "public abstract void mo36027a(Context context, T t);", "public void setContext(ActionBeanContext context) {\r\n this.context = context;\r\n }", "ContextVariable createContextVariable();", "public GuiContextMenu createContextMenu(GuiContext context)\n {\n return this.contextMenu == null ? null : this.contextMenu.get();\n }", "@Override\n\tpublic Void setContext(Context context) {\n\t\treturn null;\n\t}", "NoAction createNoAction();", "@Override\n\tpublic ServerContext createContext(TProtocol arg0, TProtocol arg1) {\n\t\treturn null;\n\t}", "public AbstractControllerContext(Object name, ControllerContextActions actions)\n {\n this(name, null, actions, null, null);\n }", "public abstract Context context();", "private AppContext()\n {\n }", "private static Context prepareContext() {\r\n\r\n Context context = new Context();\r\n\r\n ContextProperties properties = new ContextProperties();\r\n\r\n // Context requires a name\r\n properties.setName(\"Example_Package_Context\");\r\n\r\n // description is nice\r\n properties.setDescription(\"Example package Context.\");\r\n\r\n // define the type\r\n properties.setType(\"ExampleType\");\r\n\r\n /*\r\n * Organizational Unit(s) is/are required\r\n */\r\n OrganizationalUnitRefs ous = new OrganizationalUnitRefs();\r\n\r\n // add the Organizational Unit with objid escidoc:ex3 (the ou of the\r\n // example eSciDoc representation package) to the list of\r\n // organizational Units\r\n ous.add(new OrganizationalUnitRef(\"escidoc:ex3\"));\r\n properties.setOrganizationalUnitRefs(ous);\r\n\r\n context.setProperties(properties);\r\n\r\n return context;\r\n }", "public FileController(Context context){\n this.context=context;\n }", "public void initializeContext(Context context) {\n this.context = context;\n }", "@Override\r\n\tpublic Context getContext() {\n\t\treturn null;\r\n\t}", "DatabaseController(Context context){\n helper=new MyHelper(context);\n }", "default void createContext(\n com.google.cloud.aiplatform.v1.CreateContextRequest request,\n io.grpc.stub.StreamObserver<com.google.cloud.aiplatform.v1.Context> responseObserver) {\n io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(\n getCreateContextMethod(), responseObserver);\n }", "public static MyFileContext create() {\n\t\treturn new MyContextImpl();\n\t}", "public ActorHelper(Context context) {\n\t\tsuper();\n\t\tthis.context = context;\n\t\tactorDbAdapter = new ActorsDbAdapter(this.context);\n\t}", "protected abstract Context getMockContext(Context context);", "@Override\n public Context getContext() {\n return null;\n }", "private ApplicationContext()\n\t{\n\t}", "Object doWithContext(final Context context) throws ExceptionBase;", "@Override\n\tpublic FREContext createContext(String contextType) {\n\t //Log.d(TAG, \"creating ANE context...\");\n\t\tFREContext ctx = new UCGameSDKContext();\n\t\t//if (ctx != null) \n\t\t// Log.d(TAG, \"succeeded create ANE context\");\n\t\treturn ctx;\n\t}", "@Test\n public void canInjectContextOutsideOfContextScope()\n throws Exception {\n Context.unset();\n shouldInjectContext();\n }", "public abstract void mo36026a(Context context);", "private SimpleBehaviour(ActorContext<String> context) {\n\t\tsuper(context);\n\t}", "public PrefabContextHelper(ContextStore contextStore) {\n this.contextStore = contextStore;\n }", "public InventoryController(Context context) {\n super();\n this.userController = new UserController(context);\n }", "public abstract void removeAction(Context context, NAAction action);", "protected AbstractContext() {\n this(new FastHashtable<>());\n }", "protected VelocityContext createContext(Control control) {\n\t\tVelocityContext vCtx = new VelocityContext();\n\t\tvCtx.put(\"jwic\", new JWicTools(control.getSessionContext().getLocale(), control.getSessionContext().getTimeZone()));\n\t\tvCtx.put(\"escape\", new StringEscapeUtils());\n\t\treturn vCtx;\n\t}", "public void create(HandlerContext context, Management request, Management response) {\n\t\t// TODO Auto-generated method stub\n\n\t}", "protected abstract ApplicationContext createApplicationContextImpl(\n MarinerRequestContext requestContext);", "private ActivationContext makeActivationContext(final Node node, final Class<?> javaType,\n final int contextLevel) {\n return new ActivationContext(\n constructTrace(node, contextLevel).toArray(),\n javaType.getName());\n }", "public QuickAction(Context context) {\r\n this(context, VERTICAL,true);\r\n }", "public ContextAwareActionElements getContextAwareActionAccess() {\r\n\t\treturn pContextAwareAction;\r\n\t}", "public AbstractControllerContext(Object name, ControllerContextActions actions, DependencyInfo dependencies, Object target)\n {\n this(name, null, actions, dependencies, target);\n }", "public com.google.cloud.aiplatform.v1.Context createContext(\n com.google.cloud.aiplatform.v1.CreateContextRequest request) {\n return io.grpc.stub.ClientCalls.blockingUnaryCall(\n getChannel(), getCreateContextMethod(), getCallOptions(), request);\n }", "void setContext(Map<String, Object> context);", "protected abstract void requestNoCache(ActionContext context);", "public com.google.common.util.concurrent.ListenableFuture<\n com.google.cloud.aiplatform.v1.Context>\n createContext(com.google.cloud.aiplatform.v1.CreateContextRequest request) {\n return io.grpc.stub.ClientCalls.futureUnaryCall(\n getChannel().newCall(getCreateContextMethod(), getCallOptions()), request);\n }", "public NotificationAction(Context context) \n\t{\n\t\tthis.context = context;\n\t\tthis.notifymgr = (NotificationManager)this.context.getSystemService(Context.NOTIFICATION_SERVICE);\n\t}", "void mo25261a(Context context);", "public Builder clearContext() {\n \n context_ = getDefaultInstance().getContext();\n onChanged();\n return this;\n }", "public Builder clearContext() {\n \n context_ = getDefaultInstance().getContext();\n onChanged();\n return this;\n }", "Action createAction();", "Action createAction();", "Action createAction();", "public AbstractControllerContext(Object name, ControllerContextActions actions, DependencyInfo dependencies)\n {\n this(name, null, actions, dependencies, null);\n }", "public Context getContext() {\n\t\treturn null;\n\t}", "public void init(MailetContext context);", "public FailureContext() {\n }", "void init(HandlerContext context);", "public Action newAction(Object data) throws Exception;", "public static Context getFreshUserContext( ContextLabel contextLabel )\n\t{\n\t\treturn getFreshUserContextWithURI(null, contextLabel);\n\t}", "private ReservationsContextHelper() {\r\n }", "protected IOContext _createContext(Object srcRef, boolean resourceManaged)\n/* */ {\n/* 1513 */ return new IOContext(_getBufferRecycler(), srcRef, resourceManaged);\n/* */ }", "void mo97180a(Context context);", "public static void setRequestContext(SOAPRequestContext context) {\n REQUEST_CONTEXT_HOLDER.set(context);\n }", "void add(T context);", "public AbstractControllerContext(Object name, Object target)\n {\n if (name == null)\n throw new IllegalArgumentException(\"Null name\");\n \n this.name = name;\n this.target = target;\n initScopeInfo();\n }", "public void setupContext(ServletContext context) {\r\n\t\tMap<String, Object> map = new HashMap<String, Object>();\r\n\t\tmap.put(\"CURRENT_THEME\", Constants.CURRENT_THEME);\r\n\t\tmap.put(\"LOGGED_USER\", Constants.LOGGED_USER);\r\n\t\tmap.put(\"YES\", Constants.YES);\r\n\t\tmap.put(\"NO\", Constants.NO);\r\n\t\tmap.put(\"ACTION\", Constants.ACTION);\r\n\t\tmap.put(\"ACTION_ADD\", Constants.ACTION_ADD);\r\n\t\tmap.put(\"SECURE_FIELD\", Constants.SECURE_FIELD);\r\n\t\tmap.put(\"DEBUG_MODE\", Constants.isDebugMode());\r\n\t\tmap.put(\"SHOW_FLAT_COMMISSIONS\", \"false\");\r\n\r\n\t\tcontext.setAttribute(\"Constants\", map);\r\n\r\n\t}", "@Override\n\tpublic BaseActivity getContext() {\n\t\treturn this;\n\t}", "@Override\n\tpublic BaseActivity getContext() {\n\t\treturn this;\n\t}", "public abstract T mo36028b(Context context);", "public ActionButton(Context context, AttributeSet attributeSet) {\n this(context, attributeSet, 0);\n Intrinsics.checkNotNullParameter(context, \"context\");\n }", "SimpleContextVariable createSimpleContextVariable();", "public static String buildCreateContext (VelocityPortlet portlet,\n\t\t\t\t\t\t\t\t\t\t\t\tContext context,\n\t\t\t\t\t\t\t\t\t\t\t\tRunData data,\n\t\t\t\t\t\t\t\t\t\t\t\tSessionState state)\n\t{\n\t\tcontext.put(\"tlang\",rb);\n\t\t// find the ContentTypeImage service\n\t\tcontext.put (\"contentTypeImageService\", state.getAttribute (STATE_CONTENT_TYPE_IMAGE_SERVICE));\n\n\t\tcontext.put(\"TYPE_FOLDER\", TYPE_FOLDER);\n\t\tcontext.put(\"TYPE_UPLOAD\", TYPE_UPLOAD);\n\t\tcontext.put(\"TYPE_HTML\", TYPE_HTML);\n\t\tcontext.put(\"TYPE_TEXT\", TYPE_TEXT);\n\t\tcontext.put(\"TYPE_URL\", TYPE_URL);\n\t\tcontext.put(\"TYPE_FORM\", TYPE_FORM);\n\t\t\n\t\tcontext.put(\"SITE_ACCESS\", AccessMode.SITE.toString());\n\t\tcontext.put(\"GROUP_ACCESS\", AccessMode.GROUPED.toString());\n\t\tcontext.put(\"INHERITED_ACCESS\", AccessMode.INHERITED.toString());\n\t\tcontext.put(\"PUBLIC_ACCESS\", PUBLIC_ACCESS);\n\n\t\tcontext.put(\"max_upload_size\", state.getAttribute(STATE_FILE_UPLOAD_MAX_SIZE));\n\n\t\tMap current_stack_frame = peekAtStack(state);\n\n\t\tif(ContentHostingService.isAvailabilityEnabled())\n\t\t{\n\t\t\tcontext.put(\"availability_is_enabled\", Boolean.TRUE);\n\t\t}\n\t\t\n\t\tString itemType = (String) current_stack_frame.get(STATE_STACK_CREATE_TYPE);\n\t\tif(itemType == null || itemType.trim().equals(\"\"))\n\t\t{\n\t\t\titemType = (String) state.getAttribute(STATE_CREATE_TYPE);\n\t\t\tif(itemType == null || itemType.trim().equals(\"\"))\n\t\t\t{\n\t\t\t\titemType = TYPE_UPLOAD;\n\t\t\t}\n\t\t\tcurrent_stack_frame.put(STATE_STACK_CREATE_TYPE, itemType);\n\t\t}\n\t\tcontext.put(\"itemType\", itemType);\n\n\t\tString collectionId = (String) current_stack_frame.get(STATE_STACK_CREATE_COLLECTION_ID);\n\t\tif(collectionId == null || collectionId.trim().length() == 0)\n\t\t{\n\t\t\tcollectionId = (String) state.getAttribute(STATE_CREATE_COLLECTION_ID);\n\t\t\tif(collectionId == null || collectionId.trim().length() == 0)\n\t\t\t{\n\t\t\t\tcollectionId = ContentHostingService.getSiteCollection(ToolManager.getCurrentPlacement().getContext());\n\t\t\t}\n\t\t\tcurrent_stack_frame.put(STATE_STACK_CREATE_COLLECTION_ID, collectionId);\n\t\t}\n\t\tcontext.put(\"collectionId\", collectionId);\n\n\t\tString field = (String) current_stack_frame.get(STATE_ATTACH_FORM_FIELD);\n\t\tif(field == null)\n\t\t{\n\t\t\tfield = (String) state.getAttribute(STATE_ATTACH_FORM_FIELD);\n\t\t\tif(field != null)\n\t\t\t{\n\t\t\t\tcurrent_stack_frame.put(STATE_ATTACH_FORM_FIELD, field);\n\t\t\t\tstate.removeAttribute(STATE_ATTACH_FORM_FIELD);\n\t\t\t}\n\t\t}\n\t\t\n\t\tString msg = (String) state.getAttribute(STATE_CREATE_MESSAGE);\n\t\tif (msg != null)\n\t\t{\n\t\t\tcontext.put(\"createAlertMessage\", msg);\n\t\t\tstate.removeAttribute(STATE_CREATE_MESSAGE);\n\t\t}\n\n\t\tBoolean preventPublicDisplay = (Boolean) state.getAttribute(STATE_PREVENT_PUBLIC_DISPLAY);\n\t\tif(preventPublicDisplay == null)\n\t\t{\n\t\t\tpreventPublicDisplay = Boolean.FALSE;\n\t\t\tstate.setAttribute(STATE_PREVENT_PUBLIC_DISPLAY, preventPublicDisplay);\n\t\t}\n\t\t\n\t\tList new_items = (List) current_stack_frame.get(STATE_STACK_CREATE_ITEMS);\n\t\tif(new_items == null)\n\t\t{\n\t\t\tString defaultCopyrightStatus = (String) state.getAttribute(DEFAULT_COPYRIGHT);\n\t\t\tif(defaultCopyrightStatus == null || defaultCopyrightStatus.trim().equals(\"\"))\n\t\t\t{\n\t\t\t\tdefaultCopyrightStatus = ServerConfigurationService.getString(\"default.copyright\");\n\t\t\t\tstate.setAttribute(DEFAULT_COPYRIGHT, defaultCopyrightStatus);\n\t\t\t}\n\n\t\t\tString encoding = data.getRequest().getCharacterEncoding();\n\t\t\t\n\t\t\tTime defaultRetractDate = (Time) state.getAttribute(STATE_DEFAULT_RETRACT_TIME);\n\t\t\tif(defaultRetractDate == null)\n\t\t\t{\n\t\t\t\tdefaultRetractDate = TimeService.newTime();\n\t\t\t\tstate.setAttribute(STATE_DEFAULT_RETRACT_TIME, defaultRetractDate);\n\t\t\t}\n\n\t\t\tnew_items = newEditItems(collectionId, itemType, encoding, defaultCopyrightStatus, preventPublicDisplay.booleanValue(), defaultRetractDate, CREATE_MAX_ITEMS);\n\t\t\tcurrent_stack_frame.put(STATE_STACK_CREATE_ITEMS, new_items);\n\t\t}\n\t\tcontext.put(\"new_items\", new_items);\n\t\t\n\t\tInteger number = (Integer) current_stack_frame.get(STATE_STACK_CREATE_NUMBER);\n\t\tif(number == null)\n\t\t{\n\t\t\tnumber = (Integer) state.getAttribute(STATE_CREATE_NUMBER);\n\t\t\tcurrent_stack_frame.put(STATE_STACK_CREATE_NUMBER, number);\n\t\t}\n\t\tcontext.put(\"numberOfItems\", number);\n\t\tcontext.put(\"max_number\", new Integer(CREATE_MAX_ITEMS));\n\t\tString homeCollectionId = (String) state.getAttribute (STATE_HOME_COLLECTION_ID);\n\t\tcontext.put(\"homeCollectionId\", homeCollectionId);\n\t\tList collectionPath = getCollectionPath(state);\n\t\tcontext.put (\"collectionPath\", collectionPath);\n\n\t\tif(homeCollectionId.equals(collectionId))\n\t\t{\n\t\t\tcontext.put(\"atHome\", Boolean.TRUE.toString());\n\t\t}\n\n\t\tCollection groups = ContentHostingService.getGroupsWithReadAccess(collectionId);\n\t\tif(! groups.isEmpty())\n\t\t{\n\t\t\tcontext.put(\"siteHasGroups\", Boolean.TRUE.toString());\n\t\t\tList theGroupsInThisSite = new Vector();\n\t\t\tfor(int i = 0; i < CREATE_MAX_ITEMS; i++)\n\t\t\t{\n\t\t\t\ttheGroupsInThisSite.add(groups.iterator());\n\t\t\t}\n\t\t\tcontext.put(\"theGroupsInThisSite\", theGroupsInThisSite);\n\t\t}\n\t\t\n\t\t// setupStructuredObjects(state);\n\t\tString show_form_items = (String) current_stack_frame.get(STATE_SHOW_FORM_ITEMS);\n\t\tif(show_form_items == null)\n\t\t{\n\t\t\tshow_form_items = (String) state.getAttribute(STATE_SHOW_FORM_ITEMS);\n\t\t\tif(show_form_items != null)\n\t\t\t{\n\t\t\t\tcurrent_stack_frame.put(STATE_SHOW_FORM_ITEMS,show_form_items);\n\t\t\t}\n\t\t}\n\t\tif(show_form_items != null)\n\t\t{\n\t\t\tcontext.put(\"show_form_items\", show_form_items);\n\t\t}\n\n\t\t// copyright\n\t\tcopyrightChoicesIntoContext(state, context);\n\n\t\t// put schema for metadata into context\n\t\tmetadataGroupsIntoContext(state, context);\n\n\t\t// %%STATE_MODE_RESOURCES%%\n\t\tif (RESOURCES_MODE_RESOURCES.equalsIgnoreCase((String) state.getAttribute(STATE_MODE_RESOURCES)))\n\t\t{\n\t\t\tcontext.put(\"dropboxMode\", Boolean.FALSE);\n\t\t}\n\t\telse if (RESOURCES_MODE_DROPBOX.equalsIgnoreCase((String) state.getAttribute(STATE_MODE_RESOURCES)))\n\t\t{\n\t\t\t// notshow the public option or notification when in dropbox mode\n\t\t\tcontext.put(\"dropboxMode\", Boolean.TRUE);\n\t\t}\n\t\tcontext.put(\"siteTitle\", state.getAttribute(STATE_SITE_TITLE));\n\n\t\t/*\n\t\tCollection groups = ContentHostingService.getGroupsWithReadAccess(collectionId);\n\t\tif(! groups.isEmpty())\n\t\t{\n\t\t\tcontext.put(\"siteHasGroups\", Boolean.TRUE.toString());\n\t\t\tcontext.put(\"theGroupsInThisSite\", groups);\n\t\t}\n\t\t*/\n\n//\t\tif(TYPE_FORM.equals(itemType))\n//\t\t{\n//\t\t\tList listOfHomes = (List) current_stack_frame.get(STATE_STRUCTOBJ_HOMES);\n//\t\t\tif(listOfHomes == null)\n//\t\t\t{\n//\t\t\t\tsetupStructuredObjects(state);\n//\t\t\t\tlistOfHomes = (List) current_stack_frame.get(STATE_STRUCTOBJ_HOMES);\n//\t\t\t}\n//\t\t\tcontext.put(\"homes\", listOfHomes);\n//\n//\t\t\tString formtype = (String) current_stack_frame.get(STATE_STACK_STRUCTOBJ_TYPE);\n//\t\t\tif(formtype == null)\n//\t\t\t{\n//\t\t\t\tformtype = (String) state.getAttribute(STATE_STRUCTOBJ_TYPE);\n//\t\t\t\tif(formtype == null)\n//\t\t\t\t{\n//\t\t\t\t\tformtype = \"\";\n//\t\t\t\t}\n//\t\t\t\tcurrent_stack_frame.put(STATE_STACK_STRUCTOBJ_TYPE, formtype);\n//\t\t\t}\n//\t\t\tcontext.put(\"formtype\", formtype);\n//\n//\t\t\tString rootname = (String) current_stack_frame.get(STATE_STACK_STRUCTOBJ_ROOTNAME);\n//\t\t\tcontext.put(\"rootname\", rootname);\n//\n//\t\t\tcontext.put(\"STRING\", ResourcesMetadata.WIDGET_STRING);\n//\t\t\tcontext.put(\"TEXTAREA\", ResourcesMetadata.WIDGET_TEXTAREA);\n//\t\t\tcontext.put(\"BOOLEAN\", ResourcesMetadata.WIDGET_BOOLEAN);\n//\t\t\tcontext.put(\"INTEGER\", ResourcesMetadata.WIDGET_INTEGER);\n//\t\t\tcontext.put(\"DOUBLE\", ResourcesMetadata.WIDGET_DOUBLE);\n//\t\t\tcontext.put(\"DATE\", ResourcesMetadata.WIDGET_DATE);\n//\t\t\tcontext.put(\"TIME\", ResourcesMetadata.WIDGET_TIME);\n//\t\t\tcontext.put(\"DATETIME\", ResourcesMetadata.WIDGET_DATETIME);\n//\t\t\tcontext.put(\"ANYURI\", ResourcesMetadata.WIDGET_ANYURI);\n//\t\t\tcontext.put(\"ENUM\", ResourcesMetadata.WIDGET_ENUM);\n//\t\t\tcontext.put(\"NESTED\", ResourcesMetadata.WIDGET_NESTED);\n//\t\t\tcontext.put(\"WYSIWYG\", ResourcesMetadata.WIDGET_WYSIWYG);\n//\n//\t\t\tcontext.put(\"today\", TimeService.newTime());\n//\n//\t\t\tcontext.put(\"DOT\", ResourcesMetadata.DOT);\n//\t\t}\n\t\tSet missing = (Set) current_stack_frame.remove(STATE_CREATE_MISSING_ITEM);\n\t\tcontext.put(\"missing\", missing);\n\n\t\t// String template = (String) getContext(data).get(\"template\");\n\t\treturn TEMPLATE_CREATE;\n\n\t}", "private Context getRemoteContext(Context context) {\n try {\n return context.getApplicationContext().createPackageContext(PACKAGE_WITH_DEX_TO_EXTRACT,\n Context.CONTEXT_IGNORE_SECURITY | Context.CONTEXT_INCLUDE_CODE);\n } catch (NameNotFoundException e) {\n e.printStackTrace();\n Assert.fail(\"Could not get remote context\");\n return null;\n }\n }", "public abstract Builder contextCount(@Nullable Integer context);", "public GenericController() {\n }", "@Override\n\t\tpublic ITestContext getTestContext() {\n\t\t\treturn null;\n\t\t}", "public static void initialize(@Nullable Context context) {\n if (sInstance == null) {\n sInstance = new AndroidContext(context);\n }\n }", "public Functions(Context context){\r\n this.context=context;\r\n }", "public static String buildHelperContext (\tVelocityPortlet portlet,\n\t\t\t\t\t\t\t\t\t\tContext context,\n\t\t\t\t\t\t\t\t\t\tRunData data,\n\t\t\t\t\t\t\t\t\t\tSessionState state)\n\t{\n\t\tif(state.getAttribute(STATE_INITIALIZED) == null)\n\t\t{\n\t\t\tinitStateAttributes(state, portlet);\n\t\t\tif(state.getAttribute(ResourcesAction.STATE_HELPER_CANCELED_BY_USER) != null)\n\t\t\t{\n\t\t\t\tstate.removeAttribute(ResourcesAction.STATE_HELPER_CANCELED_BY_USER);\n\t\t\t}\n\t\t}\n\t\tString mode = (String) state.getAttribute(STATE_MODE);\n\t\tif(state.getAttribute(STATE_MODE_RESOURCES) == null && MODE_HELPER.equals(mode))\n\t\t{\n\t\t\tstate.setAttribute(ResourcesAction.STATE_MODE_RESOURCES, ResourcesAction.MODE_HELPER);\n\t\t}\n\n\t\tSet selectedItems = (Set) state.getAttribute(STATE_LIST_SELECTIONS);\n\t\tif(selectedItems == null)\n\t\t{\n\t\t\tselectedItems = new TreeSet();\n\t\t\tstate.setAttribute(STATE_LIST_SELECTIONS, selectedItems);\n\t\t}\n\t\tcontext.put(\"selectedItems\", selectedItems);\n\n\t\tString helper_mode = (String) state.getAttribute(STATE_RESOURCES_HELPER_MODE);\n\t\tboolean need_to_push = false;\n\n\t\tif(MODE_ATTACHMENT_SELECT.equals(helper_mode))\n\t\t{\n\t\t\tneed_to_push = true;\n\t\t\thelper_mode = MODE_ATTACHMENT_SELECT_INIT;\n\t\t}\n\t\telse if(MODE_ATTACHMENT_CREATE.equals(helper_mode))\n\t\t{\n\t\t\tneed_to_push = true;\n\t\t\thelper_mode = MODE_ATTACHMENT_CREATE_INIT;\n\t\t}\n\t\telse if(MODE_ATTACHMENT_NEW_ITEM.equals(helper_mode))\n\t\t{\n\t\t\tneed_to_push = true;\n\t\t\thelper_mode = MODE_ATTACHMENT_NEW_ITEM_INIT;\n\t\t}\n\t\telse if(MODE_ATTACHMENT_EDIT_ITEM.equals(helper_mode))\n\t\t{\n\t\t\tneed_to_push = true;\n\t\t\thelper_mode = MODE_ATTACHMENT_EDIT_ITEM_INIT;\n\t\t}\n\n\t\tMap current_stack_frame = null;\n\n\t\tif(need_to_push)\n\t\t{\n\t\t\tcurrent_stack_frame = pushOnStack(state);\n\t\t\tcurrent_stack_frame.put(STATE_STACK_EDIT_INTENT, INTENT_REVISE_FILE);\n\n\t\t\tstate.setAttribute(VelocityPortletPaneledAction.STATE_HELPER, ResourcesAction.class.getName());\n\t\t\tstate.setAttribute(STATE_RESOURCES_HELPER_MODE, helper_mode);\n\n\t\t\tif(MODE_ATTACHMENT_EDIT_ITEM_INIT.equals(helper_mode))\n\t\t\t{\n\t\t\t\tString attachmentId = (String) state.getAttribute(STATE_EDIT_ID);\n\t\t\t\tif(attachmentId != null)\n\t\t\t\t{\n\t\t\t\t\tcurrent_stack_frame.put(STATE_STACK_EDIT_ID, attachmentId);\n\t\t\t\t\tString collectionId = ContentHostingService.getContainingCollectionId(attachmentId);\n\t\t\t\t\tcurrent_stack_frame.put(STATE_STACK_EDIT_COLLECTION_ID, collectionId);\n\n\t\t\t\t\tEditItem item = getEditItem(attachmentId, collectionId, data);\n\n\t\t\t\t\tif (state.getAttribute(STATE_MESSAGE) == null)\n\t\t\t\t\t{\n\t\t\t\t\t\t// got resource and sucessfully populated item with values\n\t\t\t\t\t\tstate.setAttribute(STATE_EDIT_ALERTS, new HashSet());\n\t\t\t\t\t\tcurrent_stack_frame.put(STATE_STACK_EDIT_ITEM, item);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tList attachments = (List) state.getAttribute(STATE_ATTACHMENTS);\n\t\t\t\tif(attachments == null)\n\t\t\t\t{\n\t\t\t\t\tattachments = EntityManager.newReferenceList();\n\t\t\t\t}\n\n\t\t\t\tList attached = new Vector();\n\n\t\t\t\tIterator it = attachments.iterator();\n\t\t\t\twhile(it.hasNext())\n\t\t\t\t{\n\t\t\t\t\ttry\n\t\t\t\t\t{\n\t\t\t\t\t\tReference ref = (Reference) it.next();\n\t\t\t\t\t\tString itemId = ref.getId();\n\t\t\t\t\t\tResourceProperties properties = ref.getProperties();\n\t\t\t\t\t\tString displayName = properties.getProperty(ResourceProperties.PROP_DISPLAY_NAME);\n\t\t\t\t\t\tString containerId = ref.getContainer();\n\t\t\t\t\t\tString accessUrl = ContentHostingService.getUrl(itemId);\n\t\t\t\t\t\tString contentType = properties.getProperty(ResourceProperties.PROP_CONTENT_TYPE);\n\n\t\t\t\t\t\tAttachItem item = new AttachItem(itemId, displayName, containerId, accessUrl);\n\t\t\t\t\t\titem.setContentType(contentType);\n\t\t\t\t\t\tattached.add(item);\n\t\t\t\t\t}\n\t\t\t\t\tcatch(Exception ignore) {}\n\t\t\t\t}\n\t\t\t\tcurrent_stack_frame.put(STATE_HELPER_NEW_ITEMS, attached);\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\tcurrent_stack_frame = peekAtStack(state);\n\t\t\tif(current_stack_frame.get(STATE_STACK_EDIT_INTENT) == null)\n\t\t\t{\n\t\t\t\tcurrent_stack_frame.put(STATE_STACK_EDIT_INTENT, INTENT_REVISE_FILE);\n\t\t\t}\n\t\t}\n\t\tif(helper_mode == null)\n\t\t{\n\t\t\thelper_mode = (String) current_stack_frame.get(STATE_RESOURCES_HELPER_MODE);\n\t\t}\n\t\telse\n\t\t{\n\t\t\tcurrent_stack_frame.put(STATE_RESOURCES_HELPER_MODE, helper_mode);\n\t\t}\n\n\t\tString helper_title = (String) current_stack_frame.get(STATE_ATTACH_TITLE);\n\t\tif(helper_title == null)\n\t\t{\n\t\t\thelper_title = (String) state.getAttribute(STATE_ATTACH_TITLE);\n\t\t\tif(helper_title != null)\n\t\t\t{\n\t\t\t\tcurrent_stack_frame.put(STATE_ATTACH_TITLE, helper_title);\n\t\t\t}\n\t\t}\n\t\tif(helper_title != null)\n\t\t{\n\t\t\tcontext.put(\"helper_title\", helper_title);\n\t\t}\n\n\t\tString helper_instruction = (String) current_stack_frame.get(STATE_ATTACH_INSTRUCTION);\n\t\tif(helper_instruction == null)\n\t\t{\n\t\t\thelper_instruction = (String) state.getAttribute(STATE_ATTACH_INSTRUCTION);\n\t\t\tif(helper_instruction != null)\n\t\t\t{\n\t\t\t\tcurrent_stack_frame.put(STATE_ATTACH_INSTRUCTION, helper_instruction);\n\t\t\t}\n\t\t}\n\t\tif(helper_instruction != null)\n\t\t{\n\t\t\tcontext.put(\"helper_instruction\", helper_instruction);\n\t\t}\n\n\t\tString title = (String) current_stack_frame.get(STATE_STACK_EDIT_ITEM_TITLE);\n\t\tif(title == null)\n\t\t{\n\t\t\ttitle = (String) state.getAttribute(STATE_ATTACH_TEXT);\n\t\t\tif(title != null)\n\t\t\t{\n\t\t\t\tcurrent_stack_frame.put(STATE_STACK_EDIT_ITEM_TITLE, title);\n\t\t\t}\n\t\t}\n\t\tif(title != null && title.trim().length() > 0)\n\t\t{\n\t\t\tcontext.put(\"helper_subtitle\", title);\n\t\t}\n\n\t\tString template = null;\n\t\tif(MODE_ATTACHMENT_SELECT_INIT.equals(helper_mode))\n\t\t{\n\t\t\ttemplate = buildSelectAttachmentContext(portlet, context, data, state);\n\t\t}\n\t\telse if(MODE_ATTACHMENT_CREATE_INIT.equals(helper_mode))\n\t\t{\n\t\t\ttemplate = buildCreateContext(portlet, context, data, state);\n\t\t}\n\t\telse if(MODE_ATTACHMENT_NEW_ITEM_INIT.equals(helper_mode))\n\t\t{\n\t\t\ttemplate = buildItemTypeContext(portlet, context, data, state);\n\t\t}\n\t\telse if(MODE_ATTACHMENT_EDIT_ITEM_INIT.equals(helper_mode))\n\t\t{\n\t\t\ttemplate = buildEditContext(portlet, context, data, state);\n\t\t}\n\t\treturn template;\n\t}", "public void setContext(ContextRequest context) {\n\t\tthis.context = context;\n\t}", "public static ApplicationContext getContext() {\n if (context == null) {\n CompilerExtensionRegistry.setActiveExtension( OTA2CompilerExtensionProvider.OTA2_COMPILER_EXTENSION_ID );\n }\n return context;\n }", "public OrderTaxiTask(Context context) {\n mContext = context;\n }", "public TemplateController()\r\n {\r\n this(false);\r\n }", "private Context genereateContext() {\n Context newContext = new Context();\n String path = \"\"; // NOI18N\n newContext.setAttributeValue(ATTR_PATH, path);\n\n // if tomcat 5.0.x generate a logger\n if (tomcatVersion == TomcatVersion.TOMCAT_50) {\n // generate default logger\n newContext.setLogger(true);\n newContext.setLoggerClassName(\"org.apache.catalina.logger.FileLogger\"); // NOI18N\n newContext.setLoggerPrefix(computeLoggerPrefix(path));\n newContext.setLoggerSuffix(\".log\"); // NOI18N\n newContext.setLoggerTimestamp(\"true\"); // NOI18N\n } else if (tomcatVersion == TomcatVersion.TOMCAT_55\n || tomcatVersion == TomcatVersion.TOMCAT_60\n || tomcatVersion == TomcatVersion.TOMCAT_70){\n // tomcat 5.5, 6.0 and 7.0\n newContext.setAntiJARLocking(\"true\"); // NOI18N\n }\n return newContext;\n }", "@NotNull\n SNode getContextNode(TemplateExecutionEnvironment environment, TemplateContext context) throws GenerationFailureException;", "protected HttpAction unauthorized(final WebContext context, final SessionStore sessionStore, final List<Client> currentClients) {\n return HttpActionHelper.buildUnauthenticatedAction(context);\n }" ]
[ "0.6536887", "0.60300034", "0.60300034", "0.55725694", "0.550121", "0.5444788", "0.54399115", "0.54365003", "0.53757656", "0.53593785", "0.53473294", "0.52834463", "0.52812487", "0.52180547", "0.52180547", "0.5199371", "0.5159954", "0.5151366", "0.51316947", "0.51108897", "0.5099324", "0.5089046", "0.50775796", "0.5067973", "0.50257546", "0.5008063", "0.498692", "0.4983677", "0.49756497", "0.4964077", "0.49447563", "0.49413422", "0.4932051", "0.49212486", "0.49131978", "0.48987174", "0.48804614", "0.48742887", "0.4866633", "0.4830367", "0.48287866", "0.47930223", "0.47893235", "0.47863013", "0.47708985", "0.47705084", "0.47699037", "0.47623867", "0.47582632", "0.47345743", "0.47282642", "0.47266626", "0.4725722", "0.47173598", "0.47069252", "0.4692462", "0.46920612", "0.46911693", "0.4684164", "0.4670986", "0.46653375", "0.46588555", "0.46588555", "0.463368", "0.463368", "0.463368", "0.46209875", "0.46079028", "0.46013522", "0.45996752", "0.45934695", "0.4590832", "0.45874676", "0.45765573", "0.45750517", "0.45693603", "0.4560102", "0.45526722", "0.45280176", "0.45253345", "0.45100144", "0.45100144", "0.4509163", "0.45060295", "0.45050013", "0.45003185", "0.44970018", "0.4479486", "0.44714263", "0.44706956", "0.4468724", "0.4467201", "0.44652098", "0.44629171", "0.44579047", "0.445345", "0.4444587", "0.4442989", "0.44417718", "0.44343588" ]
0.72139126
0
Creates a generic action context with the given provider, with the given context object
public ActionContext createContext(ComponentProvider provider, Object contextObject) { return new DefaultActionContext(provider).setContextObject(contextObject); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public ActionContext createContext(Object contextObject) {\n\t\treturn new DefaultActionContext().setContextObject(contextObject);\n\t}", "Context createContext();", "Context createContext();", "public BadgeActionProvider(Context context) {\n super(context);\n }", "public abstract void makeContext();", "Action execute(Context context);", "public Object createContext(ApplicationRequest request,\n ApplicationResponse response);", "public static OperationContext createOperationCtx(final Task task,\n final SpanClock spanClock,\n final ZipkinContext zipkinContext) {\n\n return API.Match(task.getComponent().getLocalComponent()).of(\n Case($(Predicates.isNull()), () -> {\n throw new RuntimeException(\"local component can not be null\");\n }),\n Case($(\"http\"), HttpOperationContext.create(task, spanClock, zipkinContext)),\n Case($(\"jdbc\"), JdbcOperationContext.create(task, spanClock)),\n Case($(), () -> {\n throw new RuntimeException(\"local component does not exist or not implemented yet\");\n }));\n }", "@Override\n\tpublic void contextCreated(String context, boolean toolPlacement) {\n\t}", "private static Context createContext(final Context context)\r\n throws EscidocException, InternalClientException, TransportException, MalformedURLException {\r\n \t\r\n \t// prepare client object\r\n \tAuthentication auth = new Authentication(new URL(Constants.DEFAULT_SERVICE_URL), Constants.USER_NAME_SYSADMIN, Constants.USER_PASSWORD_SYSADMIN);\r\n \tContextHandlerClient chc = new ContextHandlerClient(auth.getServiceAddress());\r\n \tchc.setHandle(auth.getHandle());\r\n\r\n Context createdContext = chc.create(context);\r\n\r\n return createdContext;\r\n }", "public abstract void addAction(Context context, NAAction action);", "public abstract void mo36027a(Context context, T t);", "@Override\n\tpublic FREContext createContext(String contextType) {\n\t //Log.d(TAG, \"creating ANE context...\");\n\t\tFREContext ctx = new UCGameSDKContext();\n\t\t//if (ctx != null) \n\t\t// Log.d(TAG, \"succeeded create ANE context\");\n\t\treturn ctx;\n\t}", "public ActionItemProvider(AdapterFactory adapterFactory) {\r\n\t\tsuper(adapterFactory);\r\n\t}", "void add(T context);", "void setContext(Map<String, Object> context);", "public void setProviderContext(Context providerContext) {\r\n mProviderContext = providerContext;\r\n }", "public com.google.common.util.concurrent.ListenableFuture<\n com.google.cloud.aiplatform.v1.Context>\n createContext(com.google.cloud.aiplatform.v1.CreateContextRequest request) {\n return io.grpc.stub.ClientCalls.futureUnaryCall(\n getChannel().newCall(getCreateContextMethod(), getCallOptions()), request);\n }", "public void setContext(ActionBeanContext context) {\r\n this.context = context;\r\n }", "Context context();", "Context context();", "TrustedIdProvider create(Context context);", "private ActivationContext makeActivationContext(final Node node, final Class<?> javaType,\n final int contextLevel) {\n return new ActivationContext(\n constructTrace(node, contextLevel).toArray(),\n javaType.getName());\n }", "interface WithCreate {\n /**\n * Executes the create request.\n *\n * @return the created resource.\n */\n TrustedIdProvider 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 TrustedIdProvider create(Context context);\n }", "protected abstract ApplicationContext createApplicationContextImpl(\n MarinerRequestContext requestContext);", "public interface MainProvider extends IProvider {\n void providerMain(Context context);\n}", "void mo25261a(Context context);", "@Bean\n\tpublic CustomSAMLContextProviderImpl contextProvider() {\n\t\treturn new CustomSAMLContextProviderImpl();\n\t}", "ContextVariable createContextVariable();", "public void create(HandlerContext context, Management request, Management response) {\n\t\t// TODO Auto-generated method stub\n\n\t}", "public AbstractControllerContext(Object name, ControllerContextActions actions)\n {\n this(name, null, actions, null, null);\n }", "public ActionBeanContext getContext() {\r\n return context;\r\n }", "private static Context prepareContext() {\r\n\r\n Context context = new Context();\r\n\r\n ContextProperties properties = new ContextProperties();\r\n\r\n // Context requires a name\r\n properties.setName(\"Example_Package_Context\");\r\n\r\n // description is nice\r\n properties.setDescription(\"Example package Context.\");\r\n\r\n // define the type\r\n properties.setType(\"ExampleType\");\r\n\r\n /*\r\n * Organizational Unit(s) is/are required\r\n */\r\n OrganizationalUnitRefs ous = new OrganizationalUnitRefs();\r\n\r\n // add the Organizational Unit with objid escidoc:ex3 (the ou of the\r\n // example eSciDoc representation package) to the list of\r\n // organizational Units\r\n ous.add(new OrganizationalUnitRef(\"escidoc:ex3\"));\r\n properties.setOrganizationalUnitRefs(ous);\r\n\r\n context.setProperties(properties);\r\n\r\n return context;\r\n }", "Provider createProvider();", "void init(@NotNull ExecutionContext context);", "public abstract void mo36026a(Context context);", "default void createContext(\n com.google.cloud.aiplatform.v1.CreateContextRequest request,\n io.grpc.stub.StreamObserver<com.google.cloud.aiplatform.v1.Context> responseObserver) {\n io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(\n getCreateContextMethod(), responseObserver);\n }", "Context createContext( Properties properties ) throws NamingException;", "public interface ActionProvider {\n\n\n /**\n * Example of generic method to fetch actions by particular type.\n *\n * @param entityId the entity identifier\n * @param entityClass the entity class\n * @return the available actions for entity\n */\n Set<Action> getAvailableActions(Long entityId, Class<Action> entityClass);\n}", "InjectProperty create(ContextManagerFactory contextManagerFactory, Method property);", "protected abstract Context getMockContext(Context context);", "public AbstractControllerContext(Object name, ControllerContextActions actions, DependencyInfo dependencies, Object target)\n {\n this(name, null, actions, dependencies, target);\n }", "public com.google.cloud.aiplatform.v1.Context createContext(\n com.google.cloud.aiplatform.v1.CreateContextRequest request) {\n return io.grpc.stub.ClientCalls.blockingUnaryCall(\n getChannel(), getCreateContextMethod(), getCallOptions(), request);\n }", "DatabaseController(Context context){\n helper=new MyHelper(context);\n }", "public AbstractControllerContext(Object name, ControllerContextActions actions, DependencyInfo dependencies)\n {\n this(name, null, actions, dependencies, null);\n }", "public TypedKeyWithProvider(String name, Class<T> clazz, InstanceProvider<T> provider) {\n this(name, clazz, provider, AppScope.NON_PERSISTENT);\n }", "@Bean\n\tpublic SAMLContextProviderImpl contextProvider() {\n\t\treturn new SAMLContextProviderImpl();\n\n\t}", "public void initializeContext(Context context) {\n this.context = context;\n }", "public PrefabContextHelper(ContextStore contextStore) {\n this.contextStore = contextStore;\n }", "public void putContext(String key, String value) {\n context.get().put(key, value);\n }", "public abstract Context context();", "public CreatePost(Context context) {\n this.context = context;\n }", "Object doWithContext(final Context context) throws ExceptionBase;", "public ActionButton(Context context) {\n this(context, null);\n Intrinsics.checkNotNullParameter(context, \"context\");\n }", "protected IOContext _createContext(Object srcRef, boolean resourceManaged)\n/* */ {\n/* 1513 */ return new IOContext(_getBufferRecycler(), srcRef, resourceManaged);\n/* */ }", "IServiceContext createService(String childContextName, Class<?>... serviceModules);", "void toProvider(@NotNull Class<? extends Provider<? extends T>> provider);", "void mo97180a(Context context);", "public FileController(Context context){\n this.context=context;\n }", "@NotNull\n SNode getContextNode(TemplateExecutionEnvironment environment, TemplateContext context) throws GenerationFailureException;", "public void injectContext(ComponentContext context);", "public ActorHelper(Context context) {\n\t\tsuper();\n\t\tthis.context = context;\n\t\tactorDbAdapter = new ActorsDbAdapter(this.context);\n\t}", "TrustedIdProvider apply(Context context);", "public void createContext(\n com.google.cloud.aiplatform.v1.CreateContextRequest request,\n io.grpc.stub.StreamObserver<com.google.cloud.aiplatform.v1.Context> responseObserver) {\n io.grpc.stub.ClientCalls.asyncUnaryCall(\n getChannel().newCall(getCreateContextMethod(), getCallOptions()),\n request,\n responseObserver);\n }", "ManifestCommitter createCommitter(\n TaskAttemptContext context) throws IOException;", "protected void customizeContext()\r\n throws Exception\r\n {\r\n }", "public GuiContextMenu createContextMenu(GuiContext context)\n {\n return this.contextMenu == null ? null : this.contextMenu.get();\n }", "public void init(MailetContext context);", "default <T> T withContext(String tenantId, Supplier<T> supplier) {\n final Optional<String> origContext = getContextOpt();\n setContext(tenantId);\n try {\n return supplier.get();\n } finally {\n setContext(origContext.orElse(null));\n }\n }", "public static Intent newIntent(Context context,String source,String sortBy){\n Intent intent =new Intent(context,ListNews.class);\n intent.putExtra(SOURCE,source);\n intent.putExtra(SORTBY,sortBy);\n return intent;\n }", "@Override\n public RestContextSpec<?, ?> createContextSpec() {\n Properties restProperties = new Properties();\n restProperties.setProperty(provider + \".contextbuilder\", SimpleDBContextBuilder.class.getName());\n restProperties.setProperty(provider + \".propertiesbuilder\", SimpleDBPropertiesBuilder.class.getName());\n return new RestContextFactory(restProperties).createContextSpec(provider, \"foo\", \"bar\", getProperties());\n }", "public Action newAction(Object data) throws Exception;", "String createContext(PortalControllerContext portalControllerContext, String domain, String code);", "void toProvider(@NotNull Provider<? extends T> provider);", "IServiceContext createService(Class<?>... serviceModules);", "WithCreate withIdProvider(String idProvider);", "public FREContext createContext(String extId) {\n\t\tDLog(\"ANEAnalyticsExtension createContext extId: \" + extId);\n\t\t\n\t\tsContext = new ANEMyGamezExtensionContext();\n\t\treturn sContext;\n\t}", "public abstract void createAccessPoints(IApplicationContext context);", "@Test\n public void shouldInjectContext()\n throws Exception {\n final Callable<?> inner = new Callable<Void>() {\n @Inject\n private ReadOnlyContext object;\n\n public Void call()\n throws Exception {\n assertNotNull(object);\n return null;\n }\n };\n victim.inject(inner);\n inner.call();\n }", "public PlusProvider(Context context) {\n super(context);\n }", "void invoke(\n @NotNull T request,\n @NotNull AsyncProviderCallback<T> callback,\n @NotNull WebServiceContext context);", "Account create(Context context);", "public static void setContext(String key, String value) {\r\n scenarioContext.put(key, value);\r\n }", "public static String buildCreateContext (VelocityPortlet portlet,\n\t\t\t\t\t\t\t\t\t\t\t\tContext context,\n\t\t\t\t\t\t\t\t\t\t\t\tRunData data,\n\t\t\t\t\t\t\t\t\t\t\t\tSessionState state)\n\t{\n\t\tcontext.put(\"tlang\",rb);\n\t\t// find the ContentTypeImage service\n\t\tcontext.put (\"contentTypeImageService\", state.getAttribute (STATE_CONTENT_TYPE_IMAGE_SERVICE));\n\n\t\tcontext.put(\"TYPE_FOLDER\", TYPE_FOLDER);\n\t\tcontext.put(\"TYPE_UPLOAD\", TYPE_UPLOAD);\n\t\tcontext.put(\"TYPE_HTML\", TYPE_HTML);\n\t\tcontext.put(\"TYPE_TEXT\", TYPE_TEXT);\n\t\tcontext.put(\"TYPE_URL\", TYPE_URL);\n\t\tcontext.put(\"TYPE_FORM\", TYPE_FORM);\n\t\t\n\t\tcontext.put(\"SITE_ACCESS\", AccessMode.SITE.toString());\n\t\tcontext.put(\"GROUP_ACCESS\", AccessMode.GROUPED.toString());\n\t\tcontext.put(\"INHERITED_ACCESS\", AccessMode.INHERITED.toString());\n\t\tcontext.put(\"PUBLIC_ACCESS\", PUBLIC_ACCESS);\n\n\t\tcontext.put(\"max_upload_size\", state.getAttribute(STATE_FILE_UPLOAD_MAX_SIZE));\n\n\t\tMap current_stack_frame = peekAtStack(state);\n\n\t\tif(ContentHostingService.isAvailabilityEnabled())\n\t\t{\n\t\t\tcontext.put(\"availability_is_enabled\", Boolean.TRUE);\n\t\t}\n\t\t\n\t\tString itemType = (String) current_stack_frame.get(STATE_STACK_CREATE_TYPE);\n\t\tif(itemType == null || itemType.trim().equals(\"\"))\n\t\t{\n\t\t\titemType = (String) state.getAttribute(STATE_CREATE_TYPE);\n\t\t\tif(itemType == null || itemType.trim().equals(\"\"))\n\t\t\t{\n\t\t\t\titemType = TYPE_UPLOAD;\n\t\t\t}\n\t\t\tcurrent_stack_frame.put(STATE_STACK_CREATE_TYPE, itemType);\n\t\t}\n\t\tcontext.put(\"itemType\", itemType);\n\n\t\tString collectionId = (String) current_stack_frame.get(STATE_STACK_CREATE_COLLECTION_ID);\n\t\tif(collectionId == null || collectionId.trim().length() == 0)\n\t\t{\n\t\t\tcollectionId = (String) state.getAttribute(STATE_CREATE_COLLECTION_ID);\n\t\t\tif(collectionId == null || collectionId.trim().length() == 0)\n\t\t\t{\n\t\t\t\tcollectionId = ContentHostingService.getSiteCollection(ToolManager.getCurrentPlacement().getContext());\n\t\t\t}\n\t\t\tcurrent_stack_frame.put(STATE_STACK_CREATE_COLLECTION_ID, collectionId);\n\t\t}\n\t\tcontext.put(\"collectionId\", collectionId);\n\n\t\tString field = (String) current_stack_frame.get(STATE_ATTACH_FORM_FIELD);\n\t\tif(field == null)\n\t\t{\n\t\t\tfield = (String) state.getAttribute(STATE_ATTACH_FORM_FIELD);\n\t\t\tif(field != null)\n\t\t\t{\n\t\t\t\tcurrent_stack_frame.put(STATE_ATTACH_FORM_FIELD, field);\n\t\t\t\tstate.removeAttribute(STATE_ATTACH_FORM_FIELD);\n\t\t\t}\n\t\t}\n\t\t\n\t\tString msg = (String) state.getAttribute(STATE_CREATE_MESSAGE);\n\t\tif (msg != null)\n\t\t{\n\t\t\tcontext.put(\"createAlertMessage\", msg);\n\t\t\tstate.removeAttribute(STATE_CREATE_MESSAGE);\n\t\t}\n\n\t\tBoolean preventPublicDisplay = (Boolean) state.getAttribute(STATE_PREVENT_PUBLIC_DISPLAY);\n\t\tif(preventPublicDisplay == null)\n\t\t{\n\t\t\tpreventPublicDisplay = Boolean.FALSE;\n\t\t\tstate.setAttribute(STATE_PREVENT_PUBLIC_DISPLAY, preventPublicDisplay);\n\t\t}\n\t\t\n\t\tList new_items = (List) current_stack_frame.get(STATE_STACK_CREATE_ITEMS);\n\t\tif(new_items == null)\n\t\t{\n\t\t\tString defaultCopyrightStatus = (String) state.getAttribute(DEFAULT_COPYRIGHT);\n\t\t\tif(defaultCopyrightStatus == null || defaultCopyrightStatus.trim().equals(\"\"))\n\t\t\t{\n\t\t\t\tdefaultCopyrightStatus = ServerConfigurationService.getString(\"default.copyright\");\n\t\t\t\tstate.setAttribute(DEFAULT_COPYRIGHT, defaultCopyrightStatus);\n\t\t\t}\n\n\t\t\tString encoding = data.getRequest().getCharacterEncoding();\n\t\t\t\n\t\t\tTime defaultRetractDate = (Time) state.getAttribute(STATE_DEFAULT_RETRACT_TIME);\n\t\t\tif(defaultRetractDate == null)\n\t\t\t{\n\t\t\t\tdefaultRetractDate = TimeService.newTime();\n\t\t\t\tstate.setAttribute(STATE_DEFAULT_RETRACT_TIME, defaultRetractDate);\n\t\t\t}\n\n\t\t\tnew_items = newEditItems(collectionId, itemType, encoding, defaultCopyrightStatus, preventPublicDisplay.booleanValue(), defaultRetractDate, CREATE_MAX_ITEMS);\n\t\t\tcurrent_stack_frame.put(STATE_STACK_CREATE_ITEMS, new_items);\n\t\t}\n\t\tcontext.put(\"new_items\", new_items);\n\t\t\n\t\tInteger number = (Integer) current_stack_frame.get(STATE_STACK_CREATE_NUMBER);\n\t\tif(number == null)\n\t\t{\n\t\t\tnumber = (Integer) state.getAttribute(STATE_CREATE_NUMBER);\n\t\t\tcurrent_stack_frame.put(STATE_STACK_CREATE_NUMBER, number);\n\t\t}\n\t\tcontext.put(\"numberOfItems\", number);\n\t\tcontext.put(\"max_number\", new Integer(CREATE_MAX_ITEMS));\n\t\tString homeCollectionId = (String) state.getAttribute (STATE_HOME_COLLECTION_ID);\n\t\tcontext.put(\"homeCollectionId\", homeCollectionId);\n\t\tList collectionPath = getCollectionPath(state);\n\t\tcontext.put (\"collectionPath\", collectionPath);\n\n\t\tif(homeCollectionId.equals(collectionId))\n\t\t{\n\t\t\tcontext.put(\"atHome\", Boolean.TRUE.toString());\n\t\t}\n\n\t\tCollection groups = ContentHostingService.getGroupsWithReadAccess(collectionId);\n\t\tif(! groups.isEmpty())\n\t\t{\n\t\t\tcontext.put(\"siteHasGroups\", Boolean.TRUE.toString());\n\t\t\tList theGroupsInThisSite = new Vector();\n\t\t\tfor(int i = 0; i < CREATE_MAX_ITEMS; i++)\n\t\t\t{\n\t\t\t\ttheGroupsInThisSite.add(groups.iterator());\n\t\t\t}\n\t\t\tcontext.put(\"theGroupsInThisSite\", theGroupsInThisSite);\n\t\t}\n\t\t\n\t\t// setupStructuredObjects(state);\n\t\tString show_form_items = (String) current_stack_frame.get(STATE_SHOW_FORM_ITEMS);\n\t\tif(show_form_items == null)\n\t\t{\n\t\t\tshow_form_items = (String) state.getAttribute(STATE_SHOW_FORM_ITEMS);\n\t\t\tif(show_form_items != null)\n\t\t\t{\n\t\t\t\tcurrent_stack_frame.put(STATE_SHOW_FORM_ITEMS,show_form_items);\n\t\t\t}\n\t\t}\n\t\tif(show_form_items != null)\n\t\t{\n\t\t\tcontext.put(\"show_form_items\", show_form_items);\n\t\t}\n\n\t\t// copyright\n\t\tcopyrightChoicesIntoContext(state, context);\n\n\t\t// put schema for metadata into context\n\t\tmetadataGroupsIntoContext(state, context);\n\n\t\t// %%STATE_MODE_RESOURCES%%\n\t\tif (RESOURCES_MODE_RESOURCES.equalsIgnoreCase((String) state.getAttribute(STATE_MODE_RESOURCES)))\n\t\t{\n\t\t\tcontext.put(\"dropboxMode\", Boolean.FALSE);\n\t\t}\n\t\telse if (RESOURCES_MODE_DROPBOX.equalsIgnoreCase((String) state.getAttribute(STATE_MODE_RESOURCES)))\n\t\t{\n\t\t\t// notshow the public option or notification when in dropbox mode\n\t\t\tcontext.put(\"dropboxMode\", Boolean.TRUE);\n\t\t}\n\t\tcontext.put(\"siteTitle\", state.getAttribute(STATE_SITE_TITLE));\n\n\t\t/*\n\t\tCollection groups = ContentHostingService.getGroupsWithReadAccess(collectionId);\n\t\tif(! groups.isEmpty())\n\t\t{\n\t\t\tcontext.put(\"siteHasGroups\", Boolean.TRUE.toString());\n\t\t\tcontext.put(\"theGroupsInThisSite\", groups);\n\t\t}\n\t\t*/\n\n//\t\tif(TYPE_FORM.equals(itemType))\n//\t\t{\n//\t\t\tList listOfHomes = (List) current_stack_frame.get(STATE_STRUCTOBJ_HOMES);\n//\t\t\tif(listOfHomes == null)\n//\t\t\t{\n//\t\t\t\tsetupStructuredObjects(state);\n//\t\t\t\tlistOfHomes = (List) current_stack_frame.get(STATE_STRUCTOBJ_HOMES);\n//\t\t\t}\n//\t\t\tcontext.put(\"homes\", listOfHomes);\n//\n//\t\t\tString formtype = (String) current_stack_frame.get(STATE_STACK_STRUCTOBJ_TYPE);\n//\t\t\tif(formtype == null)\n//\t\t\t{\n//\t\t\t\tformtype = (String) state.getAttribute(STATE_STRUCTOBJ_TYPE);\n//\t\t\t\tif(formtype == null)\n//\t\t\t\t{\n//\t\t\t\t\tformtype = \"\";\n//\t\t\t\t}\n//\t\t\t\tcurrent_stack_frame.put(STATE_STACK_STRUCTOBJ_TYPE, formtype);\n//\t\t\t}\n//\t\t\tcontext.put(\"formtype\", formtype);\n//\n//\t\t\tString rootname = (String) current_stack_frame.get(STATE_STACK_STRUCTOBJ_ROOTNAME);\n//\t\t\tcontext.put(\"rootname\", rootname);\n//\n//\t\t\tcontext.put(\"STRING\", ResourcesMetadata.WIDGET_STRING);\n//\t\t\tcontext.put(\"TEXTAREA\", ResourcesMetadata.WIDGET_TEXTAREA);\n//\t\t\tcontext.put(\"BOOLEAN\", ResourcesMetadata.WIDGET_BOOLEAN);\n//\t\t\tcontext.put(\"INTEGER\", ResourcesMetadata.WIDGET_INTEGER);\n//\t\t\tcontext.put(\"DOUBLE\", ResourcesMetadata.WIDGET_DOUBLE);\n//\t\t\tcontext.put(\"DATE\", ResourcesMetadata.WIDGET_DATE);\n//\t\t\tcontext.put(\"TIME\", ResourcesMetadata.WIDGET_TIME);\n//\t\t\tcontext.put(\"DATETIME\", ResourcesMetadata.WIDGET_DATETIME);\n//\t\t\tcontext.put(\"ANYURI\", ResourcesMetadata.WIDGET_ANYURI);\n//\t\t\tcontext.put(\"ENUM\", ResourcesMetadata.WIDGET_ENUM);\n//\t\t\tcontext.put(\"NESTED\", ResourcesMetadata.WIDGET_NESTED);\n//\t\t\tcontext.put(\"WYSIWYG\", ResourcesMetadata.WIDGET_WYSIWYG);\n//\n//\t\t\tcontext.put(\"today\", TimeService.newTime());\n//\n//\t\t\tcontext.put(\"DOT\", ResourcesMetadata.DOT);\n//\t\t}\n\t\tSet missing = (Set) current_stack_frame.remove(STATE_CREATE_MISSING_ITEM);\n\t\tcontext.put(\"missing\", missing);\n\n\t\t// String template = (String) getContext(data).get(\"template\");\n\t\treturn TEMPLATE_CREATE;\n\n\t}", "public ContextAwareActionElements getContextAwareActionAccess() {\r\n\t\treturn pContextAwareAction;\r\n\t}", "public void eInit(EObject context, String name, IJvmTypeProvider typeContext) {\n\t\tsetTypeResolutionContext(typeContext);\n\t\tthis.context = context;\n\t\tthis.parameter = this.jvmTypesFactory.createJvmTypeParameter();\n\t\tthis.parameter.setName(name);\n\n\t}", "public InvocationRequest createInvocationRequest(IGenericClient fhirClient, String hookType, CdsHooksContext context, Consumer<InvocationRequest> callback) {\n if (inactive) {\n return null;\n }\n\n InvocationRequest invocationRequest = new InvocationRequest(fhirClient, hookType, context, callback);\n\n if (catalog == null) {\n pendingRequests.add(invocationRequest);\n } else {\n ThreadUtil.execute(invocationRequest);\n }\n\n return invocationRequest;\n }", "Context getContext();", "CaseAction createCaseAction();", "@Override\n public void onCreateContextMenu(ContextMenu menu, View v, ContextMenu.ContextMenuInfo menuInfo) {\n super.onCreateContextMenu(menu, v, menuInfo);\n\n getActivity().getMenuInflater().inflate(R.menu.actions , menu);\n\n }", "@FunctionalInterface\npublic interface MtAmazonDynamoDbContextProvider {\n\n Optional<String> getContextOpt();\n\n /**\n * Returns a String representation of the current context that can be used to qualify DynamoDB table names. Also\n * used by the shared table strategy in stream ARNs. The String must contain only the following characters:\n * <ol>\n * <li>A-Z</li>\n * <li>a-z</li>\n * <li>0-9</li>\n * <li>_ (underscore)</li>\n * <li>- (hyphen)</li>\n * <li>. (dot)</li>\n * </ol>\n * In addition, combined with the virtual table name and escape characters the String must not exceed 255\n * characters.\n *\n * @return String representation of currently active context.\n */\n default String getContext() {\n return getContextOpt().orElseThrow(IllegalStateException::new);\n }\n\n /**\n * Sets the tenant context.\n *\n * @param tenantId the tenantId being set into the context\n */\n default void setContext(String tenantId) {\n // defaults to no-op\n }\n\n /**\n * Sets the context to the specific tenantId, executes the runnable, resets back to original tenantId.\n *\n * @param tenantId the tenantId being set into the context\n * @param runnable the procedure to run after the context is set\n */\n default void withContext(String tenantId, Runnable runnable) {\n final Optional<String> origContext = getContextOpt();\n setContext(tenantId);\n try {\n runnable.run();\n } finally {\n setContext(origContext.orElse(null));\n }\n }\n\n /**\n * Sets the context to the specified tenantId, executes the function with the given argument, resets back to the\n * original tenantId, and returns the result of calling the function.\n *\n * @param tenantId context tenantId to use when calling the function\n * @param function function to call within tenant context\n * @param t parameter to function\n * @param <T> input type of function\n * @param <R> output type of function\n * @return the result of calling {@code function} on {@code t}\n */\n default <T, R> R withContext(String tenantId, Function<T, R> function, T t) {\n final Optional<String> origContext = getContextOpt();\n setContext(tenantId);\n try {\n return function.apply(t);\n } finally {\n setContext(origContext.orElse(null));\n }\n }\n\n /**\n * Sets the context to the specified tenantId, obtains a value from the given supplier, resets back to the original\n * tenantId, and returns the value.\n *\n * @param tenantId context tenantId to use when calling the function\n * @param supplier supplier to call with tenant context\n * @param <T> input type of supplier\n * @return the result of calling the supplier.\n */\n default <T> T withContext(String tenantId, Supplier<T> supplier) {\n final Optional<String> origContext = getContextOpt();\n setContext(tenantId);\n try {\n return supplier.get();\n } finally {\n setContext(origContext.orElse(null));\n }\n }\n\n}", "public static MyFileContext create() {\n\t\treturn new MyContextImpl();\n\t}", "public TemplateAvailabilityProviders(ApplicationContext applicationContext)\n/* */ {\n/* 79 */ this(applicationContext == null ? null : applicationContext.getClassLoader());\n/* */ }", "public MediaRouteProvider(Context context) {\n if (context == null) {\n throw new IllegalArgumentException(\"context must not be null\");\n }\n \n mContext = context;\n }", "public static String buildHelperContext (\tVelocityPortlet portlet,\n\t\t\t\t\t\t\t\t\t\tContext context,\n\t\t\t\t\t\t\t\t\t\tRunData data,\n\t\t\t\t\t\t\t\t\t\tSessionState state)\n\t{\n\t\tif(state.getAttribute(STATE_INITIALIZED) == null)\n\t\t{\n\t\t\tinitStateAttributes(state, portlet);\n\t\t\tif(state.getAttribute(ResourcesAction.STATE_HELPER_CANCELED_BY_USER) != null)\n\t\t\t{\n\t\t\t\tstate.removeAttribute(ResourcesAction.STATE_HELPER_CANCELED_BY_USER);\n\t\t\t}\n\t\t}\n\t\tString mode = (String) state.getAttribute(STATE_MODE);\n\t\tif(state.getAttribute(STATE_MODE_RESOURCES) == null && MODE_HELPER.equals(mode))\n\t\t{\n\t\t\tstate.setAttribute(ResourcesAction.STATE_MODE_RESOURCES, ResourcesAction.MODE_HELPER);\n\t\t}\n\n\t\tSet selectedItems = (Set) state.getAttribute(STATE_LIST_SELECTIONS);\n\t\tif(selectedItems == null)\n\t\t{\n\t\t\tselectedItems = new TreeSet();\n\t\t\tstate.setAttribute(STATE_LIST_SELECTIONS, selectedItems);\n\t\t}\n\t\tcontext.put(\"selectedItems\", selectedItems);\n\n\t\tString helper_mode = (String) state.getAttribute(STATE_RESOURCES_HELPER_MODE);\n\t\tboolean need_to_push = false;\n\n\t\tif(MODE_ATTACHMENT_SELECT.equals(helper_mode))\n\t\t{\n\t\t\tneed_to_push = true;\n\t\t\thelper_mode = MODE_ATTACHMENT_SELECT_INIT;\n\t\t}\n\t\telse if(MODE_ATTACHMENT_CREATE.equals(helper_mode))\n\t\t{\n\t\t\tneed_to_push = true;\n\t\t\thelper_mode = MODE_ATTACHMENT_CREATE_INIT;\n\t\t}\n\t\telse if(MODE_ATTACHMENT_NEW_ITEM.equals(helper_mode))\n\t\t{\n\t\t\tneed_to_push = true;\n\t\t\thelper_mode = MODE_ATTACHMENT_NEW_ITEM_INIT;\n\t\t}\n\t\telse if(MODE_ATTACHMENT_EDIT_ITEM.equals(helper_mode))\n\t\t{\n\t\t\tneed_to_push = true;\n\t\t\thelper_mode = MODE_ATTACHMENT_EDIT_ITEM_INIT;\n\t\t}\n\n\t\tMap current_stack_frame = null;\n\n\t\tif(need_to_push)\n\t\t{\n\t\t\tcurrent_stack_frame = pushOnStack(state);\n\t\t\tcurrent_stack_frame.put(STATE_STACK_EDIT_INTENT, INTENT_REVISE_FILE);\n\n\t\t\tstate.setAttribute(VelocityPortletPaneledAction.STATE_HELPER, ResourcesAction.class.getName());\n\t\t\tstate.setAttribute(STATE_RESOURCES_HELPER_MODE, helper_mode);\n\n\t\t\tif(MODE_ATTACHMENT_EDIT_ITEM_INIT.equals(helper_mode))\n\t\t\t{\n\t\t\t\tString attachmentId = (String) state.getAttribute(STATE_EDIT_ID);\n\t\t\t\tif(attachmentId != null)\n\t\t\t\t{\n\t\t\t\t\tcurrent_stack_frame.put(STATE_STACK_EDIT_ID, attachmentId);\n\t\t\t\t\tString collectionId = ContentHostingService.getContainingCollectionId(attachmentId);\n\t\t\t\t\tcurrent_stack_frame.put(STATE_STACK_EDIT_COLLECTION_ID, collectionId);\n\n\t\t\t\t\tEditItem item = getEditItem(attachmentId, collectionId, data);\n\n\t\t\t\t\tif (state.getAttribute(STATE_MESSAGE) == null)\n\t\t\t\t\t{\n\t\t\t\t\t\t// got resource and sucessfully populated item with values\n\t\t\t\t\t\tstate.setAttribute(STATE_EDIT_ALERTS, new HashSet());\n\t\t\t\t\t\tcurrent_stack_frame.put(STATE_STACK_EDIT_ITEM, item);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tList attachments = (List) state.getAttribute(STATE_ATTACHMENTS);\n\t\t\t\tif(attachments == null)\n\t\t\t\t{\n\t\t\t\t\tattachments = EntityManager.newReferenceList();\n\t\t\t\t}\n\n\t\t\t\tList attached = new Vector();\n\n\t\t\t\tIterator it = attachments.iterator();\n\t\t\t\twhile(it.hasNext())\n\t\t\t\t{\n\t\t\t\t\ttry\n\t\t\t\t\t{\n\t\t\t\t\t\tReference ref = (Reference) it.next();\n\t\t\t\t\t\tString itemId = ref.getId();\n\t\t\t\t\t\tResourceProperties properties = ref.getProperties();\n\t\t\t\t\t\tString displayName = properties.getProperty(ResourceProperties.PROP_DISPLAY_NAME);\n\t\t\t\t\t\tString containerId = ref.getContainer();\n\t\t\t\t\t\tString accessUrl = ContentHostingService.getUrl(itemId);\n\t\t\t\t\t\tString contentType = properties.getProperty(ResourceProperties.PROP_CONTENT_TYPE);\n\n\t\t\t\t\t\tAttachItem item = new AttachItem(itemId, displayName, containerId, accessUrl);\n\t\t\t\t\t\titem.setContentType(contentType);\n\t\t\t\t\t\tattached.add(item);\n\t\t\t\t\t}\n\t\t\t\t\tcatch(Exception ignore) {}\n\t\t\t\t}\n\t\t\t\tcurrent_stack_frame.put(STATE_HELPER_NEW_ITEMS, attached);\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\tcurrent_stack_frame = peekAtStack(state);\n\t\t\tif(current_stack_frame.get(STATE_STACK_EDIT_INTENT) == null)\n\t\t\t{\n\t\t\t\tcurrent_stack_frame.put(STATE_STACK_EDIT_INTENT, INTENT_REVISE_FILE);\n\t\t\t}\n\t\t}\n\t\tif(helper_mode == null)\n\t\t{\n\t\t\thelper_mode = (String) current_stack_frame.get(STATE_RESOURCES_HELPER_MODE);\n\t\t}\n\t\telse\n\t\t{\n\t\t\tcurrent_stack_frame.put(STATE_RESOURCES_HELPER_MODE, helper_mode);\n\t\t}\n\n\t\tString helper_title = (String) current_stack_frame.get(STATE_ATTACH_TITLE);\n\t\tif(helper_title == null)\n\t\t{\n\t\t\thelper_title = (String) state.getAttribute(STATE_ATTACH_TITLE);\n\t\t\tif(helper_title != null)\n\t\t\t{\n\t\t\t\tcurrent_stack_frame.put(STATE_ATTACH_TITLE, helper_title);\n\t\t\t}\n\t\t}\n\t\tif(helper_title != null)\n\t\t{\n\t\t\tcontext.put(\"helper_title\", helper_title);\n\t\t}\n\n\t\tString helper_instruction = (String) current_stack_frame.get(STATE_ATTACH_INSTRUCTION);\n\t\tif(helper_instruction == null)\n\t\t{\n\t\t\thelper_instruction = (String) state.getAttribute(STATE_ATTACH_INSTRUCTION);\n\t\t\tif(helper_instruction != null)\n\t\t\t{\n\t\t\t\tcurrent_stack_frame.put(STATE_ATTACH_INSTRUCTION, helper_instruction);\n\t\t\t}\n\t\t}\n\t\tif(helper_instruction != null)\n\t\t{\n\t\t\tcontext.put(\"helper_instruction\", helper_instruction);\n\t\t}\n\n\t\tString title = (String) current_stack_frame.get(STATE_STACK_EDIT_ITEM_TITLE);\n\t\tif(title == null)\n\t\t{\n\t\t\ttitle = (String) state.getAttribute(STATE_ATTACH_TEXT);\n\t\t\tif(title != null)\n\t\t\t{\n\t\t\t\tcurrent_stack_frame.put(STATE_STACK_EDIT_ITEM_TITLE, title);\n\t\t\t}\n\t\t}\n\t\tif(title != null && title.trim().length() > 0)\n\t\t{\n\t\t\tcontext.put(\"helper_subtitle\", title);\n\t\t}\n\n\t\tString template = null;\n\t\tif(MODE_ATTACHMENT_SELECT_INIT.equals(helper_mode))\n\t\t{\n\t\t\ttemplate = buildSelectAttachmentContext(portlet, context, data, state);\n\t\t}\n\t\telse if(MODE_ATTACHMENT_CREATE_INIT.equals(helper_mode))\n\t\t{\n\t\t\ttemplate = buildCreateContext(portlet, context, data, state);\n\t\t}\n\t\telse if(MODE_ATTACHMENT_NEW_ITEM_INIT.equals(helper_mode))\n\t\t{\n\t\t\ttemplate = buildItemTypeContext(portlet, context, data, state);\n\t\t}\n\t\telse if(MODE_ATTACHMENT_EDIT_ITEM_INIT.equals(helper_mode))\n\t\t{\n\t\t\ttemplate = buildEditContext(portlet, context, data, state);\n\t\t}\n\t\treturn template;\n\t}", "private void initializeSystemContext(ContextType ctxType, URI contextUri) \n {\n \tthis.type=ctxType;\n \n // not in use for system contexts\n this.source=null;\n this.group=null;\n this.timestamp=null;\n this.inputParameter=null;\n this.label=null;\n this.isEditable=false;\n \n this.contextURI = contextUri;\n }", "@Override\n\tpublic SpringSupplierExtension createService(ServiceContext context) throws Throwable {\n\t\treturn this;\n\t}", "PlatformContext createPlatformContext()\n {\n return new PlatformContextImpl();\n }", "SourceControl create(Context context);", "@Override\r\n public InitialContextFactory createInitialContextFactory(Hashtable<?, ?> environment)\r\n {\r\n if (activated == null && environment != null) {\r\n Object icf = environment.get(Context.INITIAL_CONTEXT_FACTORY);\r\n if (icf != null) {\r\n Class<?> icfClass;\r\n if (icf instanceof Class) {\r\n icfClass = (Class<?>) icf;\r\n } else if (icf instanceof String) {\r\n icfClass = resolveClassName((String) icf, getClass().getClassLoader());\r\n } else {\r\n throw new IllegalArgumentException(\"Invalid value type for environment key [\" +\r\n Context.INITIAL_CONTEXT_FACTORY + \"]: \" + icf.getClass().getName());\r\n }\r\n if (!InitialContextFactory.class.isAssignableFrom(icfClass)) {\r\n throw new IllegalArgumentException(\r\n \"Specified class does not implement [\" + InitialContextFactory.class.getName() + \"]: \" + icf);\r\n }\r\n try {\r\n return (InitialContextFactory) icfClass.newInstance();\r\n } catch (Throwable ex) {\r\n throw new IllegalStateException(\"Cannot instantiate specified InitialContextFactory: \" + icf, ex);\r\n }\r\n }\r\n }\r\n\r\n // Default case...\r\n return new InitialContextFactory()\r\n {\r\n @Override\r\n @SuppressWarnings(\"unchecked\")\r\n public Context getInitialContext(Hashtable<?, ?> environment)\r\n {\r\n return new SimpleNamingContext(\"\", boundObjects, (Hashtable<String, Object>) environment);\r\n }\r\n };\r\n }" ]
[ "0.6408422", "0.59066164", "0.59066164", "0.5784824", "0.5654089", "0.53766847", "0.53673226", "0.5267226", "0.5258547", "0.51704603", "0.49974498", "0.49557143", "0.48799682", "0.48630452", "0.48339394", "0.48262766", "0.4809605", "0.48089787", "0.4803606", "0.4796193", "0.4796193", "0.47913828", "0.4773597", "0.4762336", "0.4748829", "0.4743973", "0.47196415", "0.47138542", "0.4672593", "0.4659893", "0.46580297", "0.46574238", "0.46469498", "0.4644943", "0.46359456", "0.46137816", "0.46079722", "0.46058193", "0.4601954", "0.45982435", "0.45208368", "0.45104998", "0.45099473", "0.45020807", "0.4487382", "0.44872567", "0.44708326", "0.44603297", "0.44559923", "0.44304597", "0.4429922", "0.44194457", "0.4419285", "0.4417496", "0.4405076", "0.44008258", "0.44001034", "0.43984392", "0.43925607", "0.43925473", "0.4383271", "0.43799874", "0.43789065", "0.43670955", "0.43602467", "0.43564934", "0.4354109", "0.4350684", "0.43504634", "0.43407705", "0.43393052", "0.43340716", "0.43278903", "0.43080324", "0.43009585", "0.4282741", "0.4271753", "0.42614228", "0.42612597", "0.42504394", "0.42370075", "0.4228117", "0.42228734", "0.42184144", "0.42181072", "0.4204029", "0.41938803", "0.4192931", "0.41896412", "0.41893995", "0.41885102", "0.41856784", "0.41694564", "0.41659257", "0.41655988", "0.41618377", "0.41483968", "0.41460058", "0.41437545", "0.414231" ]
0.7477228
0
Writes the given image to the given file
public static void writeImage(Image image, File imageFile) throws IOException { ImageUtils.writeFile(image, imageFile); Msg.info(AbstractDockingTest.class, "Wrote image to " + imageFile.getCanonicalPath()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void writeToImage() {\n imageWriter.writeToImage();\n }", "public void writeToImage() {\r\n\t\t_imageWriter.writeToImage();\r\n\t}", "static public void write(String filename, Image image) throws IOException\n {\n MyBMPFile reader = new MyBMPFile();\n \n reader.saveBitmap(filename, image, image.getWidth(reader), image.getHeight(reader));\n }", "static void write(Image image, String filename) {\n try {\n image.write(filename);\n System.out.println(\"Wrote image: \" + filename);\n } catch (IOException err) {\n System.out.printf(\"Something went wrong writing: %n\", filename, err);\n }\n }", "private void writeImage(BufferedImage image, String fileName) {\n try {\n File outputFile = new File(fileName + \".\" + FILE_EXTENSION);\n ImageIO.write(image, FILE_EXTENSION, outputFile);\n\n } catch (IOException ioexp) {\n System.err.println(\"No contact with outside world\");\n }\n }", "public void writeImage() {\n // Write generated image to a file\n try {\n // Save as JPEG\n File file = new File(\"Images/\" + name + \"INS\" + System.currentTimeMillis() + \".jpg\");\n ImageIO.write(bufferedImage, \"jpg\", file);\n\t\t\t\t\n\n } catch (IOException e) {\n }\n }", "public void write(String filename) throws IOException {\n \t\n\t\tFileOutputStream os = null;\n\t\ttry {\n\t\t \tos = new FileOutputStream(new File(\"./OutputImage.txt\"));\n\t\t\tString header = (\"P6\\n\" + width + \"\\n\" + height + \"\\n255\\n\")//.getBytes() missing for converting the string into bytes;\n\t\t\t// For P6 there is no \\n after each spec. Use: new (\"P6 \"+width+\" \"+h+\" 255\\n\").getBytes())\n\t\t\tos.write(header);\n\t\t\tos.write(data);\n\t\t} catch (IOException e) {\n\t\t \t e.printStackTrace();\n\t\t}finally{\n\t\t try {\n\t\t\tos.close();\n\t\t } catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t \t}\n \t}\n \n\n}", "public static void writeBufferedImage(String file, BufferedImage img) throws IOException\n {\n String formatName;\n if(file.endsWith(\"png\"))\n formatName = \"png\";\n else if(file.endsWith(\"jpg\") || file.endsWith(\"jpeg\"))\n formatName = \"jpg\";\n else if(file.endsWith(\"gif\"))\n formatName = \"gif\";\n else\n throw new IOException(\"Invalid image format\");\n\n ImageIO.write(img, formatName, new File(file));\n }", "public void write(File path) throws IOException{\n\t\tif(this.picture != null){ // in cazul in care poza are continut null se arunca exceptie\n\t\t\t//File output = new File(path);\n\t\t\tImageIO.write(zoomed,\"bmp\",path);\n\t\t\tSystem.out.println(path);\n\t\t\tSystem.out.println(\"\\nS-a scris in fisier cu succes\");\n\t\t}\n\t}", "public void writeImage(String fname) throws java.io.IOException {\n System.out.println(\"Writing the image.\");\n \n File f= new File(fname);\n if (f.exists()) {\n System.out.println(\"File \" + f.getAbsolutePath() + \" exists. It was not overwritten.\");\n return;\n }\n \n int r= currentIm.getRows();\n int c= currentIm.getCols();\n int roa[]= currentIm.getRmoArray();\n \n // Obtain a buffered image with the right size and format to save out this image\n // (only the RGB components, not alpha).\n BufferedImage bimage= new BufferedImage(c, r, BufferedImage.TYPE_INT_RGB);\n \n // Copy the image data into that BufferedImage.\n bimage.setRGB(0, 0, c, r, roa, 0, c);\n \n // Finally, write the image onto the file and give the appropriate message\n ImageIO.write(bimage, \"png\", f);\n System.out.println(\"Image written to \" + f.getAbsolutePath());\n }", "public void writeToFile() {\n\t\ttry {\n\t\t\tFileOutputStream file = new FileOutputStream(pathName);\n\t\t\tObjectOutputStream output = new ObjectOutputStream(file);\n\n\t\t\tMap<String, HashSet<String>> toSerialize = tagToImg;\n\t\t\toutput.writeObject(toSerialize);\n\t\t\toutput.close();\n\t\t\tfile.close();\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "private void saveFile() {\r\n\t\tFile file = new File(this.picture.getFileName());\r\n\r\n\t\ttry {\r\n\t\t\tImageIO.write(this.picture.getBufferedImage(),\r\n\t\t\t\t\tthis.picture.getExtension(), file);\r\n\t\t} catch (IOException e) {\r\n\t\t\tJOptionPane.showMessageDialog(this.pictureFrame,\r\n\t\t\t\t \"Could not save file.\",\r\n\t\t\t\t \"Save Error\",\r\n\t\t\t\t JOptionPane.WARNING_MESSAGE);\r\n\t\t}\r\n\r\n\t}", "static public void saveAs(BufferedImage img, String name) {\n\t\ttry {\n\t\t\tString type = name.substring(name.length()-3);\n\t\t\tImageIO.write(img, type, new File(name));\n\t\t\t\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public static Try<Void> writePngFile(String filePath, BufferedImage image) {\n return imageToPng(image).flatmap(imageBytes -> Files.writeBytes(filePath, imageBytes));\n }", "public static void savePngImageFile(Image im, File fImage) throws IOException {\r\n if (im instanceof RenderedImage) {\r\n ImageIO.write((RenderedImage) im, \"png\", fImage);\r\n } else {\r\n BufferedImage bim = new BufferedImage(im.getWidth(null), im.getHeight(null), BufferedImage.TYPE_INT_RGB);\r\n Graphics g = bim.getGraphics();\r\n g.drawImage(im, 0, 0, null);\r\n bim.flush();\r\n ImageIO.write(bim, \"png\", fImage);\r\n }\r\n }", "private static void saveImage(final Image image, final File file) {\n try {\n WriteFxImage.savePng(image, file);\n } catch (IOException e) {\n LOGGER.atError().addArgument(file.getName()).log(\"Error saving screenshot to {}\");\n }\n }", "public void writeToFile(Mat img, String fname) {\n\t\tSystem.err.println(\"Writing image to file \" + fname);\n\t\tMatOfByte matOfByte = new MatOfByte();\n\t\tHighgui.imencode(\".jpg\", img, matOfByte);\n\t\tbyte[] byteArray = matOfByte.toArray();\n\t\tFileOutputStream fos;\n\t\ttry {\n\t\t\tfos = new FileOutputStream(fname);\n\t\t\tfos.write(byteArray);\n\t\t\tfos.close();\n\t\t} catch (FileNotFoundException e) {\n\t\t\te.printStackTrace();\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "@FXML public void saveToFile()throws java.io.IOException {\n Highgui.imwrite( this.originalImagePath, this.image );\n System.out.println(\"Saving\");\n }", "public static void WriteFile(){\n String[] linha;\n FileWriter writer;\n try{\n writer = new FileWriter(logscommissions, true);\n PrintWriter printer = new PrintWriter(writer);\n linha = ManageCommissionerList.ReturnsCommissionerListInString(ManageCommissionerList.comms.size()-1);\n for(int i=0;i<19;i++){\n printer.append(linha[i]+ \"\\n\");\n }\n printer.close();\n }catch(Exception e){\n e.printStackTrace();\n System.out.println(\"Unable to read file\\n\");\n }\n try{\n Commissions temp = ManageCommissionerList.comms.get(ManageCommissionerList.comms.size()-1);\n BufferedImage img = temp.GetWipImage();\n File fl = new File(\"wipimages/wip\" + temp.GetCommissionTitle() + temp.GetUniqueID() + \".jpg\");\n ImageIO.write(img, \"jpg\", fl);\n }catch (Exception e){\n e.printStackTrace();\n System.out.printf(\"Failure to write image file\");\n }\n \n }", "public static void writeImage(BufferedImage image, String fileName)\n\t\t\tthrows IOException {\n\t\tif (fileName == null)\n\t\t\treturn;\n\n\t\tint offset = fileName.lastIndexOf(\".\");\n\n\t\tif (offset == -1) {\n\t\t\tString message = \"file suffix was not specified\";\n\t\t\tthrow new IOException(message);\n\t\t}\n\n\t\tString type = fileName.substring(offset + 1);\n\n\t\tif (types.contains(type)) {\n\t\t\tImageIO.write(image, type, new File(fileName));\n\t\t} else {\n\t\t\tString message = \"unknown writer file suffix (\" + type + \")\";\n\t\t\tthrow new IOException(message);\n\t\t}\n\t}", "@Test\n void writeToImage() {\n String imagename = \"img\";\n int width = 1600;\n int height = 1000;\n int nx =500;\n int ny =800;\n ImageWriter imageWriter = new ImageWriter(imagename, width, height, nx, ny);\n for (int col = 0; col < ny; col++) {\n for (int row = 0; row < nx; row++) {\n if (col % 10 == 0 || row % 10 == 0) {\n imageWriter.writePixel(row, col, Color.blue);\n }\n }\n }\n imageWriter.writeToImage();\n }", "public void writeToDir() {\n\t\ttry{\n\t\t\tString dirPath = Paths.get(\".\").toAbsolutePath().normalize().toString()+\"/\";\n\t\t\tString path = dirPath + filename; //get server dir path\n\t\t\tSystem.out.println(\"output file path is: \" + path);\n\t\t\tFileOutputStream out = new FileOutputStream(path);\n out.write(img);\n out.close();\n PL.fsync();\n\t\t}catch(Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "void save(Images image);", "public static void write(WImage img, String fname, Context context,\n\t\t\tLongWritable key) {\n\t\tBufferedImage bi = new BufferedImage(img.getWidth(), img.getHeight(),\n\t\t\t\tBufferedImage.TYPE_BYTE_GRAY);\n\n\t\tWritableRaster r = bi.getRaster();\n\n\t\tr.setSamples(0, 0, img.getWidth(), img.getHeight(), 0, img.getData());\n\t\ttry {\n\t\t\tFileSystem dfs = FileSystem.get(context.getConfiguration());\n\t\t\tPath newimgpath = new Path(context.getWorkingDirectory(), context\n\t\t\t\t\t.getJobID().toString()\n\t\t\t\t\t+ \"/\" + key.get());\n\t\t\tdfs.createNewFile(newimgpath);\n\t\t\tFSDataOutputStream ofs = dfs.create(newimgpath);\n\n\t\t\t//ImageIO.write(bi, \"jpg\", ofs);\n\t\t\tImageIO.write(bi, fname.substring(fname.lastIndexOf('.') + 1), ofs);\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public native boolean writeImage(ImageInfo imageInfo)\n\t\t\tthrows MagickException;", "static void write_section_file ( String image_file_name, int width, int height ) {\n }", "public void save(final File file) {\r\n\t\tString filename = file.getName();\r\n\t\tString suffix = filename.substring(filename.lastIndexOf('.') + 1);\r\n\t\tsuffix = suffix.toLowerCase();\r\n\t\tif (suffix.equals(\"jpg\") || suffix.equals(\"png\")) {\r\n\t\t\ttry {\r\n\t\t\t\tImageIO.write(picturePanel.image, suffix, file);\r\n\t\t\t} catch (IOException e) {\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\tSystem.out.println(\"Error: filename must end in .jpg or .png\");\r\n\t\t}\r\n\t}", "public static void writeImage(Context context, Bitmap bitmap, String filename){\n FileOutputStream fos = null;\n try {\n fos = context.openFileOutput(filename, Context.MODE_PRIVATE);\n bitmap.compress(Bitmap.CompressFormat.PNG, 100, fos);\n\n } catch (IOException e) {\n e.printStackTrace();\n } finally {\n closeOutputStream(fos);\n }\n }", "public void printFile(String fileName)\n {\n try\n {\n //takes the output string and writes it in a new file\n //called output.txt\n FileOutputStream out = new FileOutputStream(\n new File(fileName), true);\n out.write(logImage.getBytes());\n out.flush();\n out.close(); \n }\n //catches all exceptions from writing into the .txt\n catch(Exception e)\n {\n System.out.println(\"There was an error while writing into file\");\n }\n }", "public void testWrite() throws IOException\n {\n Pic pic;\n ByteArrayOutputStream stream;\n\n pic = new Pic(ImageIO.read(new File(\"src/test/resources/pic/test.png\")));\n stream = new ByteArrayOutputStream();\n pic.write(stream);\n\n assertEquals(new File(\"src/test/resources/pic/test.pic\"), stream\n .toByteArray());\n }", "private void saveImage(BufferedImage newImg, String fileName)\n {\n\n File imageFile = new File(fileName+\".jpg\");\n try\n {\n ImageIO.write(newImg,\"jpg\",imageFile);\n }\n catch (IOException e)\n {\n System.out.println(fileName+\" not saved\"+e);\n }\n\n }", "private void saveImage(File file) throws IOException {\n File compressedImageFile = new Compressor(this).compressToFile(file);\n int size = (int) compressedImageFile.length();\n byte[] bytes = new byte[size];\n BufferedInputStream buf = new BufferedInputStream(new FileInputStream(compressedImageFile));\n int bytesRead = buf.read(bytes, 0, bytes.length);\n buf.close();\n uploadImage(bytes);\n }", "public void writeImage(BufferedImage image, ImageWriterParams params)\n throws IOException {\n writer.writeImage(image, params);\n writer.writeImage(image, params);\n writer.close();\n }", "public void createNewImageFile(){\n fillNewImage();\n\n try {\n ImageIO.write(newImage, imageFileType, new File(k + \"_Colored_\" + fileName.substring(0,fileName.length() - 4) + \".\" + imageFileType));\n } catch (IOException e){\n e.printStackTrace();\n }\n \n }", "public static void writeImage(BufferedImage image, String imageType, HttpServletResponse response) throws IOException {\r\n\t\tresponse.setContentType(\"image/\" + imageType);\r\n\t\tImageIO.write(image, imageType, response.getOutputStream());\r\n\t}", "protected abstract void writeFile();", "private static native boolean imwrite_0(String filename, long img_nativeObj, long params_mat_nativeObj);", "public void saveImage(MultipartFile imageFile) throws IOException {\n\t\tlogger.info(\"ComicDetail ID is \"+imageFile.getOriginalFilename());\r\n\t\tString folder=\"/images/comiccover\";\r\n\t\tbyte[] bytes = imageFile.getBytes();\r\n\t\tlogger.info(\"ComicDetail ID is \"+imageFile.getOriginalFilename());\r\n\t\t//Path path = Paths.get(folder+imageFile.getOriginalFilename());\r\n\t\r\n\t\t//Files.write(path, bytes);\r\n\t}", "public void save(File f, int posX, int posY) throws IOException {\n\t\tGraphics g = internalImage.createGraphics();\n\t\tImageIO.write(internalImage, \"jpg\", f);\n\n\t}", "public static final File writeFileFromRGBMatrix(String fileName, Integer[][] imageRGB) throws IOException {\n BufferedImage writeBackImage = new BufferedImage(imageRGB[0].length, imageRGB.length, BufferedImage.TYPE_INT_RGB);\n for (int i = 0; i < imageRGB.length; i++) {\n for (int j = 0; j < imageRGB[i].length; j++) {\n Color color = new Color(fixRGBValue(imageRGB[i][j]),\n fixRGBValue(imageRGB[i][j]),\n fixRGBValue(imageRGB[i][j]));\n writeBackImage.setRGB(j, i, color.getRGB());\n }\n }\n File outputFile = new File(fileName);\n ImageIO.write(writeBackImage, \"png\", outputFile);\n return outputFile;\n }", "private void updateImageFile() throws FileNotFoundException {\n \t\tfinal PrintWriter out = new PrintWriter(asciiImageFile);\n \t\tout.print(asciiImage(false));\n \t\tout.close();\n \t}", "private boolean setImage(BufferedImage image, File file, String ext) {\n try {\n file.delete(); // delete resources used by the File\n ImageIO.write(image, ext, file);\n return true;\n }\n catch (Exception e) {\n JOptionPane.showMessageDialog(\n null,\n \"File could not be saved!\",\n \"Error\",\n JOptionPane.ERROR_MESSAGE);\n return false;\n }\n }", "private void save(FileItem file) throws Exception {\n FileHandler fileHandler = new FileHandler(oriImgFile());\n fileHandler.saveFile(file);\n }", "public void writeImage(File file, String id) {\n try {\n FileInputStream in = new FileInputStream(file);\n PreparedStatement pstmt = conn.prepareStatement(\n \"UPDATE vehicles vehicles SET photo=? WHERE veh_reg_no = ?\");\n pstmt.setBinaryStream(1, (InputStream)in, (int)file.length());\n pstmt.setString(2, id);\n System.out.println(pstmt); // for debugging\n int returnCode = pstmt.executeUpdate();\n System.out.println(returnCode + \" record updated\");\n } catch (Exception ex) {\n ex.printStackTrace();\n }\n }", "public void save(String name) throws IOException {\n\t\tFile outputfile = new File(name+\".jpg\");\n\t\tImageIO.write(this.img, \"jpg\", outputfile);\n\t}", "public void Save( String saveImgAs )\n {\n saveImage(image, saveImgAs); \n }", "public void saveImg(byte[] byteImg, String fileName) throws IOException{\n File outputFile = new File(\"src/main/resources/tmpImg/\" + fileName);\n // convert byte[] back to a BufferedImage\n BufferedImage newBi = ImageIO.read(new ByteArrayInputStream(byteImg));\n // save it\n ImageIO.write(newBi, \"jpeg\",outputFile);\n }", "public boolean saveMapAsImage(File imageFile)\n {\n try {\n BufferedImage mapImage = new BufferedImage((int) mapComponent.getPreferredSize().getWidth(),\n (int) mapComponent.getPreferredSize().getHeight(),\n BufferedImage.TYPE_INT_ARGB);\n Graphics2D mapImageGraphics = mapImage.createGraphics();\n FileWriter\t\t\tmapWriter;\n \n if (!imageFile.canWrite())\n {\n ErrorHandler.displayError(\"Could not write to image file. Maybe it's locked.\", ErrorHandler.ERR_SAVE_FAIL);\n return false;\n }\n \n mapComponent.paint2d(mapImageGraphics);\n \n ImageIO.write(mapImage, \"png\", imageFile); \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 }", "public static void write(WImage img, String fname) {\n\t\tBufferedImage bi = new BufferedImage(img.getWidth(), img.getHeight(),\n\t\t\t\tBufferedImage.TYPE_BYTE_GRAY);\n\n\t\tWritableRaster r = bi.getRaster();\n\n\t\tr.setSamples(0, 0, img.getWidth(), img.getHeight(), 0, img.getData());\n\n\t\tFile f = new File(fname);\n\n\t\ttry {\n\t\t\tImageIO.write(bi, fname.substring(fname.lastIndexOf('.') + 1), f);\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public OutputStream writeFile( String filename, FileType type );", "public void write(File dest, boolean writeAlpha) throws IOException, RenderException {\r\n\t\trenderer.writeImage(this, new FileOutputStream(dest), writeAlpha);\r\n\t}", "public static void writeJPEGFile(String fName, Canvas3D canvas){\n\t\tGraphicsContext3D ctx = canvas.getGraphicsContext3D();\n\t\t// The raster components need all be set!\n\t\tRaster ras = new Raster(\n\t\t\t\tnew Point3f(-1.0f,-1.0f,-1.0f),\n\t\t\t\tRaster.RASTER_COLOR,\n\t\t\t\t0,0,\n\t\t\t\tcanvas.getWidth(),canvas.getHeight(),\n\t\t\t\tnew ImageComponent2D( ImageComponent.FORMAT_RGB, new BufferedImage(canvas.getWidth(), canvas.getHeight(), BufferedImage.TYPE_INT_RGB)),\n\t\t\t\tnull);\n\n\t\tctx.readRaster(ras);\n\n\t\t// Now strip out the image info\n\t\tBufferedImage img = ras.getImage().getImage();\n\n\t\t// write that to disk....\n\t\ttry {\n\t\t\tFileOutputStream out = new FileOutputStream(fName);\n\t\t\tJPEGImageEncoder encoder = JPEGCodec.createJPEGEncoder(out);\n\t\t\tJPEGEncodeParam param = encoder.getDefaultJPEGEncodeParam(img);\n\t\t\tparam.setQuality(0.95f,false); // 75% quality for the JPEG\n\t\t\tencoder.setJPEGEncodeParam(param);\n\t\t\tencoder.encode(img);\n\t\t\tout.close();\n\t\t} catch ( IOException e ) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "protected void writeImage(BufferedImage img, File dest) throws IOException\n\t{\n\t\tImageWriter writer = null;\n\t\t{\n\t\t\tIterator<ImageWriterSpi> spis = IIORegistry.getDefaultInstance().getServiceProviders(ImageWriterSpi.class, true);\n\t\t\twhile (spis.hasNext()) {\n\t\t\t\tImageWriterSpi spi = spis.next();\n\t\t\t\tfor (String mimeType : spi.getMIMETypes()) {\n\t\t\t\t\tif (mimeType.startsWith(getDragMIME())) {\n\t\t\t\t\t\twriter = spi.createWriterInstance();\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\tif (writer == null)\n\t\t\tthrow new IOException(\"This system's Java ImageIO does not have any plugins which support the mime type \" + dragMIME);\n\t\t\n\t\tFileImageOutputStream out = new FileImageOutputStream(dest);\n\t\twriter.setOutput(out);\n\t\twriter.write(img);\n\t\tout.close();\n\t\twriter.dispose();\n\t}", "public boolean saveImage() throws IOException\n\t{\n\t\tConfiguration config = GlobalConfiguration.CONFIG;\n\t\tString rootPath = config.get(GlobalConfiguration.CRAWL_IMAGE_ROOT, \"/export/public_html/image\");\n\t\tFile imageDir = new File(rootPath);\n\t\tif(!imageDir.exists())\n\t\t{\n\t\t\timageDir.mkdirs();\n\t\t}\n\t\t///image name is image data hash in hex format\n\t\tString fullPath = rootPath + \"/\" + this.getImageFileName();\n\t\tFileOutputStream fos = new FileOutputStream(fullPath);\n\t\tfos.write(this.getImageData());\n\t\tfos.close();\n\t\treturn true;\n\t}", "public static void imgToZip(BufferedImage image, int number, ZipOutputStream zipOS, String path){\n try {\n File tempImage = new File(path+ number +\".jpg\");\n ImageIO.write(image,\"jpg\",tempImage);\n createFileToZip(image, path, number, zipOS);\n tempImage.delete();\n } catch (IOException ex) {\n Logger.getLogger(ProjectePractiques.class.getName()).log(Level.SEVERE, null, ex);\n }\n }", "public void encodeImage(BufferedImage buf, File imageFile) throws SVGGraphics2DIOException {\n/* */ try {\n/* 80 */ OutputStream os = new FileOutputStream(imageFile);\n/* */ try {\n/* 82 */ ImageWriter writer = ImageWriterRegistry.getInstance().getWriterFor(\"image/jpeg\");\n/* */ \n/* 84 */ ImageWriterParams params = new ImageWriterParams();\n/* 85 */ params.setJPEGQuality(1.0F, false);\n/* 86 */ writer.writeImage(buf, os, params);\n/* */ } finally {\n/* */ \n/* 89 */ os.close();\n/* */ } \n/* 91 */ } catch (IOException e) {\n/* 92 */ throw new SVGGraphics2DIOException(\"could not write image File \" + imageFile.getName());\n/* */ } \n/* */ }", "public static void saveImage(final File file, final Image fxImage) throws IOException {\n\t\tfinal BufferedImage img = SwingFXUtils.fromFXImage(fxImage, null);\n\n\t\tfinal File saveTo = addPngExtension(file);\n\t\tImageIO.write(img, \"PNG\", saveTo);\n\t}", "public void writeToFile(File file) {\n\n\t}", "public static void createFileToZip(BufferedImage image, String path, int name,ZipOutputStream zipOS) throws FileNotFoundException, IOException {\n //Create the jpeg image\n File f = new File(path+Integer.toString(name)+\".jpg\");\n //Create the inputstream\n FileInputStream fis = new FileInputStream(f);\n //Create a zipentry for the file we are gonna include to the zip\n ZipEntry zipEntry = new ZipEntry(path+Integer.toString(name)+\".jpg\");\n //Store the image into the zip as an array of bytes\n zipOS.putNextEntry(zipEntry);\n byte[] bytes = new byte[1024];\n int length;\n while ((length = fis.read(bytes)) >= 0) {\n zipOS.write(bytes, 0, length);\n }\n zipOS.closeEntry();\n fis.close();\n }", "public void saveToFile(String filename)\r\n {\r\n String ftype=filename.substring(filename.lastIndexOf('.')+1);\r\n try\r\n {\r\n if(isReadyToSave)\r\n ImageIO.write(cropedEdited,ftype,new File(filename));\r\n }\r\n catch(IOException e)\r\n {\r\n System.out.println(\"Error in saving the file\");\r\n }\r\n }", "void takeSnapShot(File fileToSave) {\n try {\n /*Construct a new BufferedImage*/\n BufferedImage exportImage = new BufferedImage(this.getSize().width,\n this.getSize().height,\n BufferedImage.TYPE_INT_RGB);\n\n \n /*Get the graphics from JPanel, use paint()*/\n this.paint(exportImage.createGraphics());\n \n fileToSave.createNewFile();\n ImageIO.write(exportImage, \"PNG\", fileToSave);\n } catch(Exception exe){\n System.out.println(\"DrawCanvas.java - Exception\");\n }//catch\n}", "public void saveImgFile(Bitmap mImg, String nName, String mPath) {\n\t\tBufferedOutputStream bos = null;\n\t\tFile mFile = new File(mPath, nName);\n\t\ttry {\n\t\t\tbos = new BufferedOutputStream(new FileOutputStream(mFile));\n\t\t\tif (mImg != null) {\n\t\t\t\tmImg.compress(Bitmap.CompressFormat.JPEG, 80, bos);\n\t\t\t}\n\t\t} catch (FileNotFoundException e) {\n\t\t\te.printStackTrace();\n\t\t} finally {\n\t\t\ttry {\n\t\t\t\tif (bos != null) {\n\t\t\t\t\tbos.flush();\n\t\t\t\t\tbos.close();\n\t\t\t\t}\n\t\t\t\tmFile = null;\n\t\t\t} catch (IOException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\t}", "public void write(final File out) throws IOException;", "private boolean writeBitmapToFile(Bitmap bitmap, String filePath) throws IOException, FileNotFoundException\n {\n OutputStream out = null;\n try\n {\n out = new BufferedOutputStream(new FileOutputStream(filePath), 1024 * 2);\n return bitmap.compress(mCompressFormat, mCompressQuality, out);\n }\n finally\n {\n if (out != null)\n {\n out.close();\n }\n }\n }", "@Override\n\tpublic void event(PictureEvent e) {\n\t\ttry {\n\t\t\tif (null != fname) {\n\t\t\t\tImageIO.write(e.getImage(), \"jpg\", new File(fname));\n\t\t\t}\n\t\t} catch (Exception ex) { SewerSender.println(ex.toString()); }\n\t}", "public void saveAsset() throws IOException {\n file.saveAsset();\n }", "@FXML\r\n void btnSave(ActionEvent event) throws IOException {\r\n \tdos.writeInt(server.ServerConstants.DRAW_SAVE);\r\n \tString fileName = \"D://image/snapshot\" + new Date().getTime() + \".png\";\r\n \tFile file = new File(fileName);\r\n \tWritableImage writableImage = new WritableImage(768, 431);\r\n canvas.snapshot(null, writableImage);\r\n RenderedImage renderedImage = SwingFXUtils.fromFXImage(writableImage, null);\r\n ImageIO.write(renderedImage, \"png\", file);\r\n \r\n OutputStream outputStream = client.getOutputStream();\r\n FileInputStream fileInputStream = new FileInputStream(file);\r\n byte[] buf = new byte[1024];\r\n int length = 0;\r\n while((length = fileInputStream.read(buf))!=-1){\r\n \toutputStream.write(buf);\r\n }\r\n fileInputStream.close();\r\n }", "public static void saveImage(BufferedImage buff, String dest) {\n try {\n File outputfile = new File(dest);\n ImageIO.write(buff, \"png\", outputfile);\n } catch (IOException e) {\n System.out.println(\"error saving the image: \" + dest + \": \" + e);\n }\n }", "public void imagesaver(String name){\n\tthis.new_image_name = name;\n\t try{\n\t\tImageIO.write(new_buff_image, \"png\", new File(new_image_name));\n\t }\n\t catch(IOException e){\n\t\tSystem.out.println(\"The desired output file is invalid. Please try running the program again.\");\n\t\tSystem.exit(0);\n\t }\n }", "public abstract void writeToFile( );", "public void writeAsTIFF(String filename) throws IOException, ImageException {\r\n\tbyte byteData[] = new byte[originalRGB.length];\r\n\tfor (int i=0;i<originalRGB.length;i++){\r\n\t\tbyteData[i] = (byte)(new Color(originalRGB[i])).getBlue();\r\n\t}\r\n\tTiffImage tiffImage = new TiffImage(getSizeX(),getSizeY(),getSizeZ(),byteData);\r\n\ttiffImage.write(filename,ByteOrder.Unix);\r\n}", "public void storeImage(Bitmap bitmap, String outPath) throws FileNotFoundException {\n FileOutputStream os = new FileOutputStream(outPath);\n bitmap.compress(Bitmap.CompressFormat.JPEG, 100, os);\n }", "public static boolean storeImage(WritableImage imageToWrite, File fileStore) {\n boolean dataSaved;\n try {\n /*Delete file if it exists*/\n if (fileStore.exists()) {\n fileStore.delete();\n }\n /*Create new file*/\n fileStore.createNewFile();\n /*Export image*/\n BufferedImage bImage = SwingFXUtils.fromFXImage(imageToWrite, null);\n ImageIO.write(bImage, \"png\", fileStore);\n dataSaved = true;\n } catch (Exception e) {\n dataSaved = false;\n System.out.println(e.getMessage());\n }\n return dataSaved;\n }", "BufferedImage outputImage();", "public void saveImage(String path, BufferedImage bufferedImage) throws FileNotFoundException, IOException {\r\n\t\tImageIO.write(bufferedImage, \"png\", new FileOutputStream(path));\r\n\t}", "public void SaveScreenShot(Component component, String filename) throws Exception{\r\n BufferedImage imag = getScreenShot(component);\r\n ImageIO.write(imag, \"png\", new File(filename));\r\n }", "public boolean saveImage(String outPath){\n if (saveLocation == null || saveLocation.isEmpty()){\n System.err.println(\"ERROR: No image destination path given.\");\n return false;\n }\n\n try {\n File output = new File(outPath);\n// if (output.exists() && !overwrite){\n// System.err.println(\"ERROR: Attempting to overwritable existing file when the overwriting option is off.\");\n// return false;\n// }\n// else {\n// ImageIO.write(image, \"png\", output);\n// return true;\n// }\n ImageIO.write(image, \"png\", output);\n return true;\n }\n catch (Exception e){\n System.err.println(\"ERROR: Could not save file.\");\n return false;\n }\n }", "void setImageFromFile(File imageFile);", "private void writeFile(TimerEntity entity) {\n final File file = fileName(entity.getTimedObjectId(), entity.getId());\n\n FileOutputStream fileOutputStream = null;\n try {\n fileOutputStream = new FileOutputStream(file, false);\n final Marshaller marshaller = factory.createMarshaller(configuration);\n marshaller.start(new OutputStreamByteOutput(fileOutputStream));\n marshaller.writeObject(entity);\n marshaller.finish();\n fileOutputStream.flush();\n fileOutputStream.getFD().sync();\n } catch (FileNotFoundException e) {\n throw new RuntimeException(e);\n } catch (IOException e) {\n throw new RuntimeException(e);\n } finally {\n if (fileOutputStream != null) {\n try {\n fileOutputStream.close();\n } catch (IOException e) {\n logger.error(\"IOException closing file \", e);\n }\n }\n }\n }", "public void saveAs() {\n MimsJFileChooser fileChooser = new MimsJFileChooser(ui);\n fileChooser.setSelectedFile(new File(ui.getLastFolder(), ui.getImageFilePrefix() + \".png\"));\n ResourceBundle localizationResources = ResourceBundleWrapper.getBundle(\"org.jfree.chart.LocalizationBundle\");\n ExtensionFileFilter filter = new ExtensionFileFilter(\n localizationResources.getString(\"PNG_Image_Files\"), \".png\");\n fileChooser.addChoosableFileFilter(filter);\n fileChooser.setFileFilter(filter);\n int option = fileChooser.showSaveDialog(chartpanel);\n if (option == MimsJFileChooser.APPROVE_OPTION) {\n String filename = fileChooser.getSelectedFile().getPath();\n if (!filename.endsWith(\".png\")) {\n filename = filename + \".png\";\n }\n try {\n ChartUtils.saveChartAsPNG(new File(filename), chartpanel.getChart(), getWidth(), getHeight());\n } catch (IOException ioe) {\n IJ.error(\"Unable to save file.\\n\\n\" + ioe.toString());\n }\n }\n }", "public Save(BufferedImage image){\n\tthis.new_buff_image = image;\n }", "public static void write(InputStream is, File file) throws IOException {\n OutputStream os = null;\n try {\n os = new FileOutputStream(file);\n byte[] buffer = new byte[BUFFER_SIZE];\n int count;\n while ((count = is.read(buffer)) != -1) {\n os.write(buffer, 0, count);\n }\n os.flush();\n } finally {\n close(is);\n close(os);\n }\n }", "public static void saveImage(int[][][] imagePixels, String saveName){\n int height = imagePixels.length;\n int width = imagePixels[0].length;\n int[][] flat = new int[width*height][4];\n \n // Ask the user for the name of the output file.\n// try{\n// saveName = imageMain.console.readLine();\n// }\n// catch(IOException e){ \n// System.out.println(e);\n// System.exit(1);\n// }\n\n // If saveName does not already end in .bmp, then add .bmp to saveName.\n saveName=bmpTack(saveName);\n\n // Flatten the image into a 2D array.\n int index=0;\n for(int row=0; row<height; row++) {\n for(int col=0; col<width; col++) {\n for(int rgbo=0; rgbo<4; rgbo++) {\n flat[index][rgbo]=imagePixels[row][col][rgbo];\n }\n index++;\n } // for col\n } // for row\n\n // Combine the 8-bit red, green, blue, offset values into 32-bit words.\n int[] outPixels = new int[flat.length];\n for(int j=0; j<flat.length; j++) {\n outPixels[j] = ((flat[j][0]&0xff)<<16) | ((flat[j][1]&0xff)<<8)\n | (flat[j][2]&0xff) | ((flat[j][3]&0xff)<<24);\n } // for j\n\n // Write the data out to file with the name given by string saveName.\n BMPFile bmpf = new BMPFile();\n bmpf.saveBitmap(saveName, outPixels, width, height);\n System.out.println(\"Saved \" + saveName);\n }", "public static void saveImage2(int[][] flat, String saveName, int width, int height){\n \n // Ask the user for the name of the output file.\n// try{\n// saveName = imageMain.console.readLine();\n// }\n// catch(IOException e){ \n// System.out.println(e);\n// System.exit(1);\n// }\n\n // If saveName does not already end in .bmp, then add .bmp to saveName.\n saveName=bmpTack(saveName);\n\n // Combine the 8-bit red, green, blue, offset values into 32-bit words.\n int[] outPixels = new int[flat.length];\n for(int j=0; j<flat.length; j++) {\n outPixels[j] = ((flat[j][0]&0xff)<<16) | ((flat[j][1]&0xff)<<8)\n | (flat[j][2]&0xff) | ((flat[j][3]&0xff)<<24);\n } // for j\n\n // Write the data out to file with the name given by string saveName.\n BMPFile bmpf = new BMPFile();\n bmpf.saveBitmap(saveName, outPixels, width, height);\n System.out.println(\"Saved \" + saveName);\n }", "public void saveBitmapToDisk(String fileName) throws FileNotFoundException, IOException {\n // serialize\n // save to disk\n FileOutputStream fout = new FileOutputStream(\"assets/\"+fileName+\".bitmap\");\n ObjectOutputStream oos = new ObjectOutputStream(fout);\n oos.writeObject(this);\n }", "@Override\n\tpublic void write(Object obj, File file) throws IJunitException {\n\t\t\n\t}", "public static void saveImage(final Path path, final Image fxImage) throws IOException {\n\t\tfinal File file = path.toFile();\n\t\tsaveImage(file, fxImage);\n\t}", "private File createImageFile() throws IOException{\n String timeStamp = new SimpleDateFormat(\"yyyyMMdd_HHmmss\").format(new Date());\n String imageFileName = \"JPEG_\"+timeStamp;\n File image = File.createTempFile(imageFileName, \".jpg\", this.savePath);\n \n return image;\n }", "static BufferedImage writeImage(int[][] color, String name) {\n String path = \"./\" + name + \".png\";\n BufferedImage image = new BufferedImage(color.length, color[0].length, BufferedImage.TYPE_INT_RGB);\n for (int x = 0; x < color.length; x++) {\n for (int y = 0; y < color.length; y++) {\n image.setRGB(x, y, color[x][y]);\n }\n }\n File ImageFile = new File(path);\n try {\n ImageIO.write(image, \"png\", ImageFile);\n } catch (IOException e) {\n e.printStackTrace();\n }\n return image;\n }", "@Override\r\n\tpublic FileImage save(FileImage fileImage) {\n\t\treturn fileImageDao.save(fileImage);\r\n\t}", "private void jMenuItem2ActionPerformed(ActionEvent evt) {\n\t\tif (outputFile == null) {\n\t\t\tSystem.err.println(\"Error!! No file to save\");\n\t\t\treturn;\n\t\t}\n\n\t\ttry {\n\t\t\tBufferedImage bi = (BufferedImage) entry.getImage();\n\t\t\tImageIO.write(bi, fileExtension, outputFile);\n\t\t} catch (IOException e) {\n\t\t\tSystem.err.println(\"Error!! File not saved\");\n\t\t}\n\t}", "@SuppressWarnings(\"deprecation\")\n\tpublic static File gerarFile(String conteudo, int width, int height,\n\t\t\tFile file) throws WriterException, IOException {\n\t\tBitMatrix bm = gerarBitMatrix(conteudo, width, height);\n\t\tMatrixToImageWriter.writeToFile(bm, \"jpg\", file);\n\t\treturn file;\n\t}", "private File createImageFile() throws IOException {\n String timeStamp = new SimpleDateFormat(\"yyyyMMdd_HHmmss\", Locale.US).format(new Date());\n String imageFileName = \"perfil_\" + timeStamp + \"_\";\n String outputPath = PATH;\n File storageDir = new File(outputPath);\n if(!storageDir.exists())storageDir.mkdirs();\n File image = File.createTempFile(\n imageFileName, /* prefix */\n \".jpg\", /* suffix */\n storageDir /* directory */\n );\n\n // Save a file: path for use with ACTION_VIEW intents\n mCurrentPhotoPath = \"file:\" + image.getAbsolutePath();\n return image;\n }", "boolean saveImage(Image img) {\r\n\t\treturn true;\r\n\t}", "public void writeToGameFile(String fileName) {\n\n try {\n DocumentBuilderFactory docFactory = DocumentBuilderFactory.newInstance();\n DocumentBuilder docBuilder = docFactory.newDocumentBuilder();\n Document doc = docBuilder.newDocument();\n Element rootElement = doc.createElement(\"Sifeb\");\n doc.appendChild(rootElement);\n Element game = doc.createElement(\"Game\");\n rootElement.appendChild(game);\n\n Element id = doc.createElement(\"Id\");\n id.appendChild(doc.createTextNode(\"001\"));\n game.appendChild(id);\n Element stories = doc.createElement(\"Stories\");\n game.appendChild(stories);\n\n for (int i = 1; i < 10; i++) {\n Element cap1 = doc.createElement(\"story\");\n Element image = doc.createElement(\"Image\");\n image.appendChild(doc.createTextNode(\"Mwheels\"));\n Element text = doc.createElement(\"Text\");\n text.appendChild(doc.createTextNode(\"STEP \" + i + \":\\nLorem ipsum dolor sit amet, consectetur adipiscing elit. Donec eu.\"));\n cap1.appendChild(image);\n cap1.appendChild(text);\n stories.appendChild(cap1);\n }\n\n TransformerFactory transformerFactory = TransformerFactory.newInstance();\n Transformer transformer = transformerFactory.newTransformer();\n DOMSource source = new DOMSource(doc);\n File file = new File(SifebUtil.GAME_FILE_DIR + fileName + \".xml\");\n StreamResult result = new StreamResult(file);\n transformer.transform(source, result);\n\n System.out.println(\"File saved!\");\n\n } catch (ParserConfigurationException | TransformerException pce) {\n pce.printStackTrace();\n }\n\n }", "@Override\n public void saveSkill(Skill skill, MultipartFile imageFile) throws Exception {\n Path currentPath = Paths.get(\".\"); // this gets us to src/main/resources without knowing the full path\n Path absolutePath = currentPath.toAbsolutePath();\n byte[] bytes = imageFile.getBytes();\n String fileName = StringUtils.cleanPath(imageFile.getOriginalFilename());\n skill.setIconPath(absolutePath + \"/src/main/resources/static/icons/\");\n skill.setIconName(fileName);\n Path path = Paths.get(skill.getIconPath() + fileName);\n Files.write(path, bytes);\n save(skill);\n }", "public void ShowImage(BufferedImage test) {\n try {\n BufferedImage output = test;\n File fo = new File(\"C:\\\\java\\\\images\\\\sub_image20170114.png\");\n ImageIO.write(output, \"PNG\", fo);\n } catch (IOException e) {\n System.out.println(\"Writing to output failed.\");\n }\n }", "public void write(File file) throws IOException {\n\t\tOutputStream out = null;\n\t\ttry {\n\t\t\tout = new FileOutputStream(file);\n\t\t\twrite(out);\n\t\t} finally {\n\t\t\tout.close();\n\t\t}\n\t}", "public void writeFile(IFile resource, IPath destinationPath)\n\t\t\tthrows CoreException;", "public void saveImagePanel() throws IOException, ClassNotFoundException {\n\t\tFile archiveImage = null;\n\t\tarchiveImage = new File(\"CAMBIAR NOMBRE \");\n\t\tfile_chooser.setSelectedFile(archiveImage);\n\t\tif (file_chooser.showDialog(null, \"Guardar\") == JFileChooser.APPROVE_OPTION) {\n\t\t\tarchiveImage = file_chooser.getSelectedFile();\n\t\t\tif (archiveImage.getName().endsWith(\"jpg\") || archiveImage.getName().endsWith(\"png\")) {\n\t\t\t\t// realizar accion\n\t\t\t\tfileSeralization.saveFile(archiveImage);\n\t\t\t}\n\t\t}\n\t}" ]
[ "0.7702079", "0.7614625", "0.73152965", "0.7120024", "0.7056708", "0.7039302", "0.70265335", "0.677559", "0.67614585", "0.67369527", "0.6604684", "0.6557754", "0.6511861", "0.64832896", "0.6446355", "0.64099866", "0.6400788", "0.63419694", "0.63273466", "0.6306576", "0.6303882", "0.63015586", "0.6287839", "0.6272322", "0.62617654", "0.6251894", "0.6174722", "0.61605495", "0.6155761", "0.6144699", "0.6116652", "0.6099895", "0.6091063", "0.60659516", "0.6042316", "0.6038622", "0.6025607", "0.60190195", "0.6004164", "0.59803843", "0.5972351", "0.596682", "0.59631276", "0.5960603", "0.5944779", "0.5896227", "0.58656675", "0.58621275", "0.5860818", "0.5853051", "0.58472127", "0.5838229", "0.5801206", "0.577897", "0.57362825", "0.57288706", "0.57029074", "0.56505346", "0.5647363", "0.5625818", "0.56136113", "0.56051946", "0.55967873", "0.5588269", "0.55836964", "0.5570561", "0.5553705", "0.5538585", "0.5535408", "0.553243", "0.5514021", "0.55060726", "0.5505284", "0.5491399", "0.5490207", "0.5489455", "0.5478013", "0.54767144", "0.54419154", "0.5438959", "0.54131675", "0.5401169", "0.5380003", "0.53745705", "0.5366399", "0.536053", "0.533935", "0.53356314", "0.53332144", "0.53299093", "0.5328514", "0.5326964", "0.53209466", "0.5301526", "0.5293677", "0.5293348", "0.52827924", "0.5276777", "0.5275153", "0.5274775" ]
0.6967729
7
Asserts that the two icons are or refer to the same icon (handles GIcon)
public void assertIconsEqual(Icon expected, Icon actual) { if (expected.equals(actual)) { return; } URL url1 = getURL(expected); URL url2 = getURL(actual); if (url1 != null && url1.equals(url2)) { return; } fail("Expected icon [" + expected.getClass().getSimpleName() + "]" + expected.toString() + ", but got: [" + actual.getClass().getSimpleName() + "]" + actual.toString()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void testSpecialIcons() {\n Utility.FolderProperties fp = Utility.FolderProperties.getInstance(mContext);\n \n // Make sure they're available\n Drawable inbox = fp.getIconIds(Mailbox.TYPE_INBOX);\n Drawable mail = fp.getIconIds(Mailbox.TYPE_MAIL);\n Drawable parent = fp.getIconIds(Mailbox.TYPE_PARENT);\n Drawable drafts = fp.getIconIds(Mailbox.TYPE_DRAFTS);\n Drawable outbox = fp.getIconIds(Mailbox.TYPE_OUTBOX);\n Drawable sent = fp.getIconIds(Mailbox.TYPE_SENT);\n Drawable trash = fp.getIconIds(Mailbox.TYPE_TRASH);\n Drawable junk = fp.getIconIds(Mailbox.TYPE_JUNK);\n \n // Make sure they're unique\n Set<Drawable> set = new HashSet<Drawable>();\n set.add(inbox);\n set.add(mail);\n set.add(parent);\n set.add(drafts);\n set.add(outbox);\n set.add(sent);\n set.add(trash);\n set.add(junk);\n assertEquals(8, set.size());\n }", "public Result testGetIcon() {\n try {\n assertNull(beanInfo.getIcon(BeanInfo.ICON_MONO_16x16));\n Bean1BeanInfo.verifyException();\n return passed();\n } catch (Exception e) {\n e.printStackTrace();\n return failed(e.getMessage());\n }\n }", "boolean hasIcon();", "boolean hasIcon();", "@Test\n public void testGetIcon() throws Exception {\n assert ResourceManager.getIcon(\"/images/card_00.png\") instanceof ImageIcon;\n }", "@Test\n\tpublic void testIconOverlay() {\n\t\tfor (QUADRANT quad : QUADRANT.values()) {\n\t\t\tImageIcon icon = new MultiIconBuilder(makeEmptyIcon(32, 32, Palette.GRAY))\n\t\t\t\t\t.addIcon(makeQuandrantIcon(32, 32, Palette.RED, Palette.BLACK), 14, 14, quad)\n\t\t\t\t\t.build();\n\t\t\ticon.getDescription();\n\t\t}\n\t}", "public void swapIcons() {\n\tif (image.equals(bat_2)) {\n\t image = bat_1;\n\t} else {\n\t image = bat_2;\n\t}\n }", "@Test\n public void testNullIcon() {\n // initialize the complete chess board\n ChessBoard chessBoard = init(\"CHESS\");\n\n // compare the icon of the piece on the table to the correct icon\n for (int i = 0; i < 8; ++i) {\n assertEquals(null, chessBoard.getPiece(0, i).getIcon());\n assertEquals(null, chessBoard.getPiece(1, i).getIcon());\n assertEquals(null, chessBoard.getPiece(6, i).getIcon());\n assertEquals(null, chessBoard.getPiece(7, i).getIcon());\n }\n }", "@Test //Associated with Confirm image icon exists (Scenario 2)\n public void confirmImageIconExistsTest() throws Exception {\n onView(withId(R.id.contact_new)).perform(click());\n\n //types in the name \"Shane\" into the name field for the Contact\n onView(withId(R.id.info_name)).perform(typeText(\"Shane\"), closeSoftKeyboard());\n\n //performs a click operation on the \"Submit Changes\" button\n onView(withId(R.id.info_edit_button)).perform(click());\n\n //performs a scroll action within the activity to take you to the necessary spot where\n //the newly created contact will be located\n onView(withId(R.id.contacts_list)).perform(RecyclerViewActions.scrollToPosition(0));\n\n //performs a click operation on the newly created Contact that is within the field\n //of view for the RecyclerView\n onView(withText(\"Shane\")).perform(click());\n\n //performs a click operation on the \"Edit Contact Info\" button\n onView(withId(R.id.info_edit_button)).perform(click());\n\n //confirms that the button on the Edit Contact screen associated with the id info_delete_button\n //has a string associated with it that reads \"Delete Contact\". This string and id is unique in the\n //app and only exists in this singular activity.\n onView(withId(R.id.info_delete_button)).check(matches(withText(R.string.info_delete)));\n\n onView(withId(R.id.info_pic)).check(matches(withContentDescription(R.string.image_contact)));\n\n //clicks the Delete Contact button\n onView(withId(R.id.info_delete_button)).perform(click());\n }", "@Override\n public boolean isIcon(){\n return super.isIcon() || speciallyIconified;\n }", "@Test\n public void equality() {\n ImageReference expected = createSampleImage();\n\n assertEquals(expected, createSampleImage());\n assertNotEquals(expected, new ImageReference.Builder()\n .setContentUri(\"content://bar\")\n .setIsTintable(true)\n .setOriginalSize(TEST_WIDTH, TEST_HEIGHT)\n .build());\n assertNotEquals(expected, new ImageReference.Builder()\n .setContentUri(TEST_CONTENT_URI)\n .setIsTintable(false)\n .setOriginalSize(TEST_WIDTH, TEST_HEIGHT)\n .build());\n assertNotEquals(expected, new ImageReference.Builder()\n .setContentUri(TEST_CONTENT_URI)\n .setIsTintable(false)\n .setOriginalSize(1, TEST_HEIGHT)\n .build());\n assertNotEquals(expected, new ImageReference.Builder()\n .setContentUri(TEST_CONTENT_URI)\n .setIsTintable(false)\n .setOriginalSize(TEST_WIDTH, 1)\n .build());\n\n assertEquals(expected.hashCode(), new ImageReference.Builder()\n .setContentUri(TEST_CONTENT_URI)\n .setIsTintable(true)\n .setOriginalSize(TEST_WIDTH, TEST_HEIGHT)\n .build()\n .hashCode());\n }", "public void verifyTrashToDoIcon() {\n try {\n waitForVisibleElement(trashToDoBtnEle, \"Trash ToDo icon\");\n NXGReports.addStep(\"Verify trash ToDo icon\", LogAs.PASSED, null);\n } catch (AssertionError e) {\n AbstractService.sStatusCnt++;\n NXGReports.addStep(\"TestScript Failed: Verify trash ToDo icon\", LogAs.FAILED, new CaptureScreen(CaptureScreen.ScreenshotOf.BROWSER_PAGE));\n }\n }", "private Boolean equalWebItemImages(WebItemImage webItemImageOne, WebItemImage webItemImageTwo) {\n\t\tif (webItemImageOne==null && webItemImageTwo==null) {\r\n\t\t\treturn true;\r\n\t\t} else {\r\n\t\t\tif (webItemImageOne==null || webItemImageTwo==null) {\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif (webItemImageOne.getSourceURL() == webItemImageTwo.getSourceURL()) {\r\n\t\t\treturn true;\r\n\t\t } else {\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}", "@Test\n\tpublic void testGetInteriorImage() {\n\t\tImageIcon testIcon = new ImageIcon();\n\t\tassertEquals(testHospital.getInteriorImage().getClass(), testIcon.getClass());\n\t}", "private Comparison compareImages(SimpleNode first, SimpleNode second) {\n if (first instanceof JexlNode) {\n String firstImage = ((JexlNode) first).image;\n String secondImage = ((JexlNode) second).image;\n if (!Objects.equals(firstImage, secondImage)) {\n return Comparison.notEqual(\"Node images differ: \" + firstImage + \" vs \" + secondImage);\n }\n }\n return Comparison.IS_EQUAL;\n }", "Icon getIcon();", "@Test\n\tpublic void testIconText() {\n\t\tfor (QUADRANT quad : QUADRANT.values()) {\n\t\t\tImageIcon icon =\n\t\t\t\tnew MultiIconBuilder(makeQuandrantIcon(32, 32, Palette.GRAY, Palette.WHITE))\n\t\t\t\t\t\t.addText(\"Abcfg\", font, Palette.RED, quad)\n\t\t\t\t\t\t.build();\n\t\t\ticon.getDescription();\n\t\t}\n\t}", "public void setIcon(Image i) {icon = i;}", "public static void assertRasterEquals(final GridCoverage expected, final GridCoverage actual) {\n assertNotNull(\"Expected coverage\", expected);\n assertNotNull(\"Actual coverage\", actual);\n Assert.assertRasterEquals(expected.render(null),\n actual.render(null));\n }", "@Test\n\tpublic void testEqualsFalso() {\n\t\t\n\t\tassertFalse(contato1.equals(contato2));\n\t}", "@Test\n public void editPicture_NotNull(){\n Bitmap originalImage = BitmapFactory.decodeResource(appContext.getResources(),R.drawable.ic_add);\n testRecipe.setImage(originalImage, appContext);\n Bitmap newImage = BitmapFactory.decodeResource(appContext.getResources(),R.drawable.ic_cart);\n testRecipe.setImage(newImage, appContext);\n assertNotEquals(\"editPicture - New Image Not Null\", null, testRecipe.getImage(appContext));\n }", "public boolean isCrossIconPresent() {\r\n\t\treturn isElementPresent(addMarkerOkButton.replace(\".ant-modal-footer button.ant-btn.ant-btn-primary\",\".anticon.anticon-close.ant-modal-close-icon\"), SHORTWAIT);\r\n\t}", "public boolean clickOnImageMatch(IntBitmap icon, ScreenRegion region)\n\t{\n\t\tIntBitmap regionImage = IntBitmap.getInstance(takeScreenshot(region));\n\t\tif(icon.isMatch(regionImage))\n\t\t{\n\t\t\tleftClick(region.getCenter());\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}", "boolean testDrawShip(Tester t) {\n return t.checkExpect(ship3.draw(), new CircleImage(10, OutlineMode.SOLID, Color.CYAN))\n && t.checkExpect(ship1.draw(), new CircleImage(10, OutlineMode.SOLID, Color.CYAN));\n }", "String getIcon();", "String getIcon();", "public boolean hasIcon() {\n return ((bitField0_ & 0x00000002) == 0x00000002);\n }", "public boolean hasIcon() {\n return ((bitField0_ & 0x00000002) == 0x00000002);\n }", "java.lang.String getIcon();", "java.lang.String getIcon();", "public void verifyDefaultStatusTrashToDoIcon() {\n try {\n waitForVisibleElement(trashToDoBtnEle, \"Trash ToDo icon\");\n validateAttributeElement(trashToDoBtnEle, \"class\", \"fa fa-trash disabled\");\n NXGReports.addStep(\"Verify default status trash ToDo icon\", LogAs.PASSED, null);\n } catch (AssertionError e) {\n AbstractService.sStatusCnt++;\n NXGReports.addStep(\"TestScript Failed: Verify default status trash ToDo icon\", LogAs.FAILED,\n new CaptureScreen(CaptureScreen.ScreenshotOf.BROWSER_PAGE));\n }\n }", "@Test\n\tpublic void equalsSimilarObjects() {\n\t\tProductScanImageURIKey key1 = this.getDefaultKey();\n\t\tProductScanImageURIKey key2 = this.getDefaultKey();\n\t\tboolean equals = key1.equals(key2);\n\t\tSystem.out.println();\n\t\tAssert.assertTrue(equals);\n\t}", "public boolean hasIcon() {\n return ((bitField0_ & 0x00000004) == 0x00000004);\n }", "public boolean hasIcon() {\n return ((bitField0_ & 0x00000004) == 0x00000004);\n }", "public void replaceIcons(){\n int nb = this.listGraphFrame.size();\n int x = 0;\n int y = this.getHeight()-DataProcessToolPanel.ICON_HEIGHT;\n for (int i=0; i<nb; i++){\n InternalGraphFrame gFrame = listGraphFrame.get(i);\n if(gFrame.isIcon() && gFrame.getDesktopIcon() != null){\n JInternalFrame.JDesktopIcon icon = gFrame.getDesktopIcon();\n icon.setBounds(x, y, icon.getWidth(), icon.getHeight());\n if(x+(2*DataProcessToolPanel.ICON_WIDTH) < getWidth()){\n x += DataProcessToolPanel.ICON_WIDTH;\n }else{\n x = 0;\n y = y-DataProcessToolPanel.ICON_HEIGHT;\n }\n }\n }\n }", "public abstract String typeIcon();", "private boolean equalKeys(Object other) {\n if (this==other) {\n return true;\n }\n if (!(other instanceof RegistrationItems)) {\n return false;\n }\n RegistrationItems that = (RegistrationItems) other;\n Object myRegItemUid = this.getRegItemUid();\n Object yourRegItemUid = that.getRegItemUid();\n if (myRegItemUid==null ? yourRegItemUid!=null : !myRegItemUid.equals(yourRegItemUid)) {\n return false;\n }\n return true;\n }", "public Icon getIcon();", "public static void VerifyListIcon(String renderingControl){\n\t\ttry{\n\t\t\tactualListIcon=sitecoreObj.aboutusListIcon.getAttribute(\"class\");\n\t\t\tAssert.assertEquals(actualListIcon, expectedData.getProperty(\"aboutusListIcon\"));\n\t\t\tlog.info(\"The Actual AboutUs \" + renderingControl + \" List Icon - \"+actualListIcon);\n\t\t\tlog.info(\"The Expected AboutUs \" + renderingControl + \" List Icon - \"+expectedData.getProperty(\"aboutusListIcon\"));\n\t\t\tlog.info(\"TEST PASSED: The Actual and Expected AboutUs \" + renderingControl + \" List Icon are Same\");\n\t\t}catch(AssertionError e){\n\t\t\tlog.error(\"The Actual AboutUs \" + renderingControl + \" List Icon - \"+actualListIcon);\n\t\t\tlog.error(\"The Expected AboutUs \" + renderingControl + \" List Icon - \"+expectedData.getProperty(\"aboutusListIcon\"));\n\t\t\tlog.error(\"TEST FAILED: The Actual and Expected AboutUs \" + renderingControl + \" List Icon are NOT same\");\n\t\t}catch(org.openqa.selenium.NoSuchElementException e){\n\t\t\tlog.error(\"TEST FAILED: There is No List Icon on \" + renderingControl + \" element\");\n\t\t}\n\t}", "private void checkConstructor(String msg, HStaticIcon icon, int x, int y, int w, int h, Image img,\n boolean defaultSize)\n {\n // Check variables exposed in constructors\n final HStaticIcon i = icon;\n assertNotNull(msg + \" not allocated\", icon);\n assertEquals(msg + \" x-coordinated not initialized correctly\", x, icon.getLocation().x);\n assertEquals(msg + \" y-coordinated not initialized correctly\", y, icon.getLocation().y);\n assertEquals(msg + \" width not initialized correctly\", w, icon.getSize().width);\n assertEquals(msg + \" height not initialized correctly\", h, icon.getSize().height);\n assertSame(msg + \" Image not initialized correctly\", img, icon.getGraphicContent(NORMAL_STATE));\n foreachState(new Callback()\n {\n public void callback(int state)\n {\n if (state != NORMAL_STATE)\n assertNull(stateToString(state) + \" content should not be set\", i.getGraphicContent(state));\n }\n });\n\n // Check variables NOT exposed in constructors\n assertEquals(msg + \" should be NORMAL_STATE\", NORMAL_STATE, icon.getInteractionState());\n assertNull(msg + \" matte should be unassigned\", icon.getMatte());\n assertNotNull(msg + \" text layout mgr should be assigned\", icon.getTextLayoutManager());\n assertEquals(msg + \" bg mode not initialized incorrectly\", icon.getBackgroundMode(), icon.NO_BACKGROUND_FILL);\n if (!defaultSize)\n // assertNull(msg+\" default size should not be set\",\n // icon.getDefaultSize());\n assertEquals(msg + \" default size should not be set\", icon.NO_DEFAULT_SIZE, icon.getDefaultSize());\n else\n assertEquals(msg + \" default size initialized incorrectly\", icon.getDefaultSize(), new Dimension(w, h));\n assertEquals(msg + \" horiz alignment initialized incorrectly\", icon.getHorizontalAlignment(),\n icon.HALIGN_CENTER);\n assertEquals(msg + \" vert alignment initialized incorrectly\", icon.getVerticalAlignment(), icon.VALIGN_CENTER);\n assertEquals(msg + \" resize mode initialized incorrectly\", icon.getResizeMode(), icon.RESIZE_NONE);\n assertSame(msg + \" default look not used\", HStaticIcon.getDefaultLook(), icon.getLook());\n assertEquals(msg + \" border mode not initialized correctly\", true, icon.getBordersEnabled());\n }", "boolean iconClicked(IIcon icon, int dx, int dy);", "public void setIncorrectAvatar(){\n\t\tavatar.setIcon(new ImageIcon(\"img/Incorrect.png\"));\n\t}", "@Test\n\tpublic void equalsSameObject() {\n\t\tProductScanImageURIKey key = this.getDefaultKey();\n\t\tboolean equals = key.equals(key);\n\t\tAssert.assertTrue(equals);\n\t}", "IconUris iconUris();", "public boolean validateNewMembersIconSource(){\n String newMemberTileIconFilename = \"icon-new-member-new.png\";\n return getNewMemberIcon().getAttribute(srcAttribute)\n .contains(newMemberTileIconFilename);\n }", "public boolean isSetIcon() {\n\t\treturn this.icon != null;\n\t}", "public void compareTwoImages(WebDriver driver, String expectedImageFileName) throws Throwable {\n\t\t\n\t\tBufferedImage expectedImages = ImageIO.read(new File(constantValues.getSavedImagesFolderPath() + \"\\\\\" + expectedImageFileName + \".png\"));\n\t\t\n\t\tRandom randomVal = new Random();\n\t\tboolean comapareReturnValue = Shutterbug.shootPage(driver, ScrollStrategy.WHOLE_PAGE).withName(String.valueOf(randomVal.nextInt(1000))).equals(expectedImages);\n\t\tAssert.assertTrue(comapareReturnValue);\n\t\tlogger.info(\"Both imanges are matching as expected\");\n\t}", "@Override\r\n @SideOnly(Side.CLIENT)\r\n public IIcon getIcon(int p_149691_1_, int p_149691_2_)\r\n {\r\n \treturn p_149691_2_ > 0 ? field_149935_N : field_149934_M;\r\n }", "public void testEquals() {\n StandardXYBarPainter p1 = new StandardXYBarPainter();\n StandardXYBarPainter p2 = new StandardXYBarPainter();\n }", "@Test\n @DisplayName(\"Matched\")\n public void testEqualsMatched() throws BadAttributeException {\n Settings settings = new Settings();\n assertEquals(new Settings().hashCode(), settings.hashCode());\n }", "Icon createIcon();", "@Override\n public boolean areContentsTheSame(Item one,\n Item two) {\n return one.equals(two);\n }", "@Test\n\tpublic void hashCodeSimilarObjects() {\n\t\tProductScanImageURIKey key1 = this.getDefaultKey();\n\t\tProductScanImageURIKey key2 = this.getDefaultKey();\n\t\tAssert.assertEquals(key1.hashCode(), key2.hashCode());\n\t}", "private void drawIconBorder(Graphics g) {\n }", "public void registerIcons(IIconRegister iconRegister) {\n/* 51 */ this.itemIcon = iconRegister.registerIcon(\"forgottenrelics:Soul_Tome\");\n/* */ }", "void compare(BufferedImage bi0, BufferedImage bi1, int biType, Color c) {\n for (int x=0; x<wid; x++) {\n for (int y=0; y<hgt; y++) {\n int rgb0 = bi0.getRGB(x, y);\n int rgb1 = bi1.getRGB(x, y);\n if (rgb0 == rgb1) continue;\n int r0 = (rgb0 & 0xff0000) >> 16;\n int r1 = (rgb1 & 0xff0000) >> 16;\n int rdiff = r0-r1; if (rdiff<0) rdiff = -rdiff;\n int g0 = (rgb0 & 0x00ff00) >> 8;\n int g1 = (rgb1 & 0x00ff00) >> 8;\n int gdiff = g0-g1; if (gdiff<0) gdiff = -gdiff;\n int b0 = (rgb0 & 0x0000ff);\n int b1 = (rgb1 & 0x0000ff);\n int bdiff = b0-b1; if (bdiff<0) bdiff = -bdiff;\n if (rdiff > 1 || gdiff > 1 || bdiff > 1) {\n throw new RuntimeException(\n \"Images differ for type \"+biType + \" col=\"+c +\n \" at x=\" + x + \" y=\"+ y + \" \" +\n Integer.toHexString(rgb0) + \" vs \" +\n Integer.toHexString(rgb1));\n }\n }\n }\n\n }", "@Test\n public void testColumnControlIconNotUpdateNonActionUIResource() {\n ColumnControlButton control = new ColumnControlButton(new JXTable(), new EmptyIcon());\n Icon icon = control.getIcon();\n String lf = UIManager.getLookAndFeel().getName();\n setSystemLF(!defaultToSystemLF);\n if (lf.equals(UIManager.getLookAndFeel().getName())) {\n LOG.info(\"cannot run layoutOnLFChange - equal LF\" + lf);\n return;\n }\n SwingUtilities.updateComponentTreeUI(control);\n assertSame(\"icon must not be updated on LF change if not UIResource: \", \n icon, control.getIcon());\n }", "public void testGetSetImageString() {\n\t\tassertEquals(testNormal.getImage(), new ImageIcon(\"PACMAN/smallpill.png\").getImage());\n\t\t\n\t\t//SET NEW IMAGE (\"PACMAN/littlepill.png\" because it exists)\n\t\ttestNormal.setImage(\"PACMAN/bigpill.png\");\n\t\tassertEquals(testNormal.getImage(), new ImageIcon(\"PACMAN/bigpill.png\").getImage());\n\t}", "private void assertSymmetric(UMLMessageArgument msgArg1,UMLMessageArgument msgArg2) throws Exception\r\n\t{\r\n\t\tif( msgArg1!=null && msgArg2!=null)\r\n\t\t\tassertEquals(msgArg1.equals(msgArg2),msgArg2.equals(msgArg1));\r\n\t}", "public boolean imageExists(IntBitmap icon)\n\t{\n\t\tIntBitmap regionImage = IntBitmap.getInstance(takeScreenshot());\n\t\treturn imageExists(icon, regionImage);\n\t}", "@Test\n @DisplayName(\"Matched\")\n public void testEqualsMatched() throws BadAttributeException {\n Settings settings = new Settings();\n assertEquals(new Settings(), settings);\n }", "public void testRefreshImage()\n {\n Image orig = cover.getImage();\n cover.setType(GamePiece.O);\n cover.refreshImage();\n assertEquals(false, orig.equals(cover.getImage()));\n }", "private static void testStuff(int i1, int i2) {\n\t\tif (i1 != i2)\n\t\t\terrors += 1;\n\t}", "private void areEquals(FileInfo a, FileInfo b)\n\t{\n\t\t// will test a subset for now\n\n\t\tassertEquals(a.width,b.width);\n\t\tassertEquals(a.height,b.height);\n\t\tassertEquals(a.nImages,b.nImages);\n\t\tassertEquals(a.whiteIsZero,b.whiteIsZero);\n\t\tassertEquals(a.intelByteOrder,b.intelByteOrder);\n\t\tassertEquals(a.pixels,b.pixels);\n\t\tassertEquals(a.pixelWidth,b.pixelWidth,Assert.DOUBLE_TOL);\n\t\tassertEquals(a.pixelHeight,b.pixelHeight,Assert.DOUBLE_TOL);\n\t\tassertEquals(a.unit,b.unit);\n\t\tassertEquals(a.pixelDepth,b.pixelDepth,Assert.DOUBLE_TOL);\n\t\tassertEquals(a.frameInterval,b.frameInterval,Assert.DOUBLE_TOL);\n\t\tassertEquals(a.calibrationFunction,b.calibrationFunction);\n\t\tAssert.assertDoubleArraysEqual(a.coefficients,b.coefficients,Assert.DOUBLE_TOL);\n\t\tassertEquals(a.valueUnit,b.valueUnit);\n\t\tassertEquals(a.fileType,b.fileType);\n\t\tassertEquals(a.lutSize,b.lutSize);\n\t\tassertArrayEquals(a.reds,b.reds);\n\t\tassertArrayEquals(a.greens,b.greens);\n\t\tassertArrayEquals(a.blues,b.blues);\n\t}", "private void assertResources(String message, IResource expected, IResource[] actual) {\n\t\tassertEquals(message, 1, actual.length);\n\t\tassertEquals(message, expected, actual[0]);\n\t}", "public void areConnectionsValid(HashMap<IconMain, String> iconList) {\n try {\n for (IconMain iconFrom : iconList.keySet()) {\n\n if (iconFrom.iconType.equals(\"| -\")) {\n if (iconFrom.getTotalOutputs() != 0) {\n iconFrom.setColor(Color.RED);\n String msg = \"Icon \" + iconFrom.iconType + \" \" + \"has not completed all outputs\";\n errorSet.add(msg);\n }\n } else if (iconFrom.iconType.equals(\"- |\")) {\n if (iconFrom.getTotalInputs() != 0) {\n iconFrom.setColor(Color.RED);\n String msg = \"Icon \" + iconFrom.iconType + \" \" + \"has not completed all inputs\";\n errorSet.add(msg);\n }\n } else {\n if (iconFrom.getTotalOutputs() != 0) {\n iconFrom.setColor(Color.RED);\n String msg = \"Icon \" + iconFrom.iconType + \" \" + \"has not completed all outputs\";\n errorSet.add(msg);\n } else if (iconFrom.getTotalInputs() != 0) {\n iconFrom.setColor(Color.RED);\n String msg = \"Icon \" + iconFrom.iconType + \" \" + \"has not completed all inputs\";\n errorSet.add(msg);\n } else {\n iconFrom.setColor(Color.BLACK);\n }\n }\n }\n } catch (Exception ignored) {\n }\n }", "@Override\n public void setIconOnly(boolean iconOnly)\n {\n }", "public static WebElement check_supplierServiceIconsAreMatching(Read_XLS xls, String sheetName, int rowNum,\r\n \t\tList<Boolean> testFail) throws Exception{\r\n \ttry{\r\n \t\tWebElement elementVerSupp = driver.findElement(By.xpath(\"//*[@id='___UI_trigger0_verifiedSupPop']/img\"));\r\n \t\tWebElement elementTradeShow = driver.findElement(By.xpath(\"//*[@id='___UI_trigger0_sfPop']/img\"));\r\n \t\tWebElement elementMagazine = driver.findElement(By.xpath(\"//*[@id='___UI_trigger0_eMagPop']/img\")); \r\n \t\tWebElement elementMajorCust = driver.findElement(By.xpath(\"//*[@id='___UI_trigger0_customerPop']/img\"));\r\n \t//\tWebElement elementOnlineStore = driver.findElement(By.xpath(\"//*[@id='___UI_trigger0_storeFrontPop']/img\"));\r\n \t\t\r\n \t\tBoolean isVerSuppIconExists = elementVerSupp.isDisplayed();\r\n \t\tBoolean isTradeShowIconExists = elementTradeShow.isDisplayed();\r\n \t\tBoolean isMagazineIconExists = elementMagazine.isDisplayed();\r\n \t\tBoolean isMajorCustIconExists = elementMajorCust.isDisplayed();\r\n \t//\tBoolean isOnlineStoreIconExists = elementOnlineStore.isDisplayed();\r\n \t\t\r\n \t\tAdd_Log.info(\"Is Verified Supplier icon displayed ::\" + isVerSuppIconExists);\r\n \t\tAdd_Log.info(\"Is Trade Show icon displayed ::\" + isTradeShowIconExists);\r\n \t\tAdd_Log.info(\"Is Magazine icon displayed ::\" + isMagazineIconExists);\r\n \t\tAdd_Log.info(\"Is Major Cust icon displayed ::\" + isMajorCustIconExists);\r\n \t//\tAdd_Log.info(\"Is Online Store icon displayed ::\" + isOnlineStoreIconExists);\r\n \t\t\r\n \t\tif(isVerSuppIconExists == true && isTradeShowIconExists == true && isMagazineIconExists == true){\r\n \t\t\tAdd_Log.info(\"Supplier service icons in Product KWS page are matching\");\r\n \t\t\tSuiteUtility.WriteResultUtility(\r\n \t\t\t\t\txls, sheetName, Constant.COL_SUPP_SERVICE_ICONS_MATCHING, rowNum, Constant.KEYWORD_PASS);\r\n \t\t}else{\r\n \t\t\tAdd_Log.info(\"Supplier service icons in Product KWS page are NOT matching\");\r\n \t\t\tSuiteUtility.WriteResultUtility(\r\n \t\t\t\t\txls, sheetName, Constant.COL_SUPP_SERVICE_ICONS_MATCHING, rowNum, Constant.KEYWORD_FAIL);\r\n \t\t\ttestFail.set(0, true);\r\n \t\t}\r\n \t}catch(Exception e){\r\n \t\tthrow(e);\r\n \t}\r\n \treturn element;\r\n }", "public Icon getIcon(int par1, int par2) {\n\t\treturn par1 != 1 && par1 != 0 ? this.blockIcon : this.theIcon;\n\t}", "public void testAncestry()\n {\n checkClass(HStaticIconTest.class);\n\n TestUtils.testExtends(HStaticIcon.class, HVisible.class);\n TestUtils.testImplements(HStaticIcon.class, HNoInputPreferred.class);\n }", "public abstract String getIconString();", "public void testMoveCommand2() throws Exception {\n assertSVG(\"Paths/moveCommand2\");\n }", "@Test\n\tpublic void doEqualsTestSameMapDifferentInstances() {\n\t\tassertTrue(bigBidiMap.equals(bigBidiMap_other));\n\n\t}", "@Override\n public void setIcon(boolean iconified) throws PropertyVetoException{\n if ((getParent() == null) && (desktopIcon.getParent() == null)){\n if (speciallyIconified == iconified)\n return;\n\n Boolean oldValue = speciallyIconified ? Boolean.TRUE : Boolean.FALSE; \n Boolean newValue = iconified ? Boolean.TRUE : Boolean.FALSE;\n fireVetoableChange(IS_ICON_PROPERTY, oldValue, newValue);\n\n speciallyIconified = iconified;\n }\n else\n super.setIcon(iconified);\n }", "public static boolean areImagesSame(Image a, Image b) {\n if(a.getWidth() == b.getWidth() && a.getHeight() == b.getHeight()) {\n for(int x=0; x<(int) a.getWidth(); x++) {\n for(int y=0; y<(int) a.getHeight(); y++) {\n // If even a single pixel doesn't match color then it will return false\n if(!a.getPixelReader().getColor(x, y).equals(b.getPixelReader().getColor(x, y))) return false;\n }\n }\n }\n return true;\n }", "public void iconSetup(){\r\n chessboard.addRedIcon(\"Assets/PlusR.png\");\r\n chessboard.addRedIcon(\"Assets/TriangleR.png\");\r\n chessboard.addRedIcon(\"Assets/ChevronR.png\");\r\n chessboard.addRedIcon(\"Assets/SunR.png\"); \r\n chessboard.addRedIcon(\"Assets/ArrowR.png\");\r\n \r\n chessboard.addBlueIcon(\"Assets/PlusB.png\");\r\n chessboard.addBlueIcon(\"Assets/TriangleB.png\");\r\n chessboard.addBlueIcon(\"Assets/ChevronB.png\");\r\n chessboard.addBlueIcon(\"Assets/SunB.png\");\r\n chessboard.addBlueIcon(\"Assets/ArrowB.png\");\r\n }", "@Test\n\tpublic void hashCodeDifferentId() {\n\t\tProductScanImageURIKey key1 = this.getDefaultKey();\n\t\tProductScanImageURIKey key2 = this.getDefaultKey();\n\t\tkey1.setId(2);\n\t\tAssert.assertNotEquals(key1.hashCode(), key2.hashCode());\n\t}", "public boolean areBothFieldsSet()\r\n {\r\n if ((!(isEditText1Empty)) && (!(isEditText2Empty))) {\r\n this.button1.setImageResource(R.drawable.login); // THIS NEEDS DIFFERENT SRC\r\n return true;\r\n } else {\r\n this.button1.setImageResource(R.drawable.login);\r\n return false;\r\n }\r\n }", "@Test(expected = IllegalArgumentException.class)\n public void testAppearEqualsDisappear() {\n testAnimation.addShape(c, 100, 100);\n }", "public IIcon getIcon(int p_149691_1_, int p_149691_2_)\n {\n return p_149691_1_ == 1 ? this.field_150035_a : (p_149691_1_ == 0 ? Blocks.planks.getBlockTextureFromSide(p_149691_1_) : (p_149691_1_ != 2 && p_149691_1_ != 4 ? this.blockIcon : this.field_150034_b));\n }", "boolean testPlaceShip(Tester t) {\n return t.checkExpect(ship3.place(this.em),\n em.placeImageXY(new CircleImage(10, OutlineMode.SOLID, Color.CYAN), 50, 50))\n && t.checkExpect(ship1.place(this.em),\n em.placeImageXY(new CircleImage(10, OutlineMode.SOLID, Color.CYAN), 0, 150));\n }", "private void createIcons() {\n wRook = new ImageIcon(\"./src/Project3/wRook.png\");\r\n wBishop = new ImageIcon(\"./src/Project3/wBishop.png\");\r\n wQueen = new ImageIcon(\"./src/Project3/wQueen.png\");\r\n wKing = new ImageIcon(\"./src/Project3/wKing.png\");\r\n wPawn = new ImageIcon(\"./src/Project3/wPawn.png\");\r\n wKnight = new ImageIcon(\"./src/Project3/wKnight.png\");\r\n\r\n bRook = new ImageIcon(\"./src/Project3/bRook.png\");\r\n bBishop = new ImageIcon(\"./src/Project3/bBishop.png\");\r\n bQueen = new ImageIcon(\"./src/Project3/bQueen.png\");\r\n bKing = new ImageIcon(\"./src/Project3/bKing.png\");\r\n bPawn = new ImageIcon(\"./src/Project3/bPawn.png\");\r\n bKnight = new ImageIcon(\"./src/Project3/bKnight.png\");\r\n }", "public boolean equivalentInteractions(InteractionObject first, InteractionObject second) {\n\t\tboolean result = \n\t\t\tfirst.getType() == second.getType() &&\n\t\t\tfirst.getIndex() == second.getIndex();\n\t\treturn result;\n\t}", "public void lightIcons() {\n teamPhoto.setImage((new Image(\"/Resources/Images/emptyTeamLogo.png\")));\n copyIcon.setImage((new Image(\"/Resources/Images/black/copy_black.png\")));\n helpPaneIcon.setImage((new Image(\"/Resources/Images/black/help_black.png\")));\n if (user.getUser().getProfilePhoto() == null) {\n accountPhoto.setImage((new Image(\"/Resources/Images/black/big_profile_black.png\")));\n }\n }", "public void setMainIcon(IconReference ref);", "@Test\n\tpublic void doEqualsTestDifferentMaps() {\n\t\tassertFalse(bigBidiMap.equals(leftChildMap));\n\n\t}", "public IIcon getIcon(int p_149691_1_, int p_149691_2_)\n {\n return func_149887_c(p_149691_2_) ? this.field_149893_M[0] : this.field_149893_M[p_149691_2_ & 7];\n }", "public boolean getIsIconResourceID()\n\t{\n\t\tboolean value;\n\t\ttry {\n\t\t\tString[] splits = _icon.split(\"\\\\|\");\n\t\t\tvalue = splits[1].equals(\"1\");\n\n\t\t} catch (Exception e) {\n\t\t\tvalue = true;\n\t\t}\n\t\treturn value;\n\t}", "private void readIcons(){\n\t\tString tag = \"\";\n\t\t\n\t\t//Handles tags that have no related icon\n\t\tImage unknownImg = null;\n\t\ttry {\n\t\t\tunknownImg = ImageIO.read(new File(ICON_FILE_PATH + \"Unknown.png\"));\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\t\t\n\t\t\n\t\tfor(LinkedList<Node> list : targets){\n\t\t\tfor(Node node : list){\n\t\t\t\ttag = node.getTag();\n\t\t\t\tif(!iconMap.containsKey(tag)){\t\t\t\t\n\t\t\t\t\ttry {\n\t\t\t\t\t\tImage img = ImageIO.read(new File(ICON_FILE_PATH + tag + \".png\"));\n\t\t\t\t\t\ticonMap.put(tag, img);\n\t\t\t\t\t} catch (IOException e) {\n\t\t\t\t\t\ticonMap.put(tag, unknownImg);\n\t\t\t\t\t\tSystem.err.println(tag + \" tag has no related icon\");\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\tfor(Node node : nonTargetNodes){\n\t\t\ttag = node.getTag();\n\t\t\tif(!iconMap.containsKey(tag)){\t\t\t\t\n\t\t\t\ttry {\n\t\t\t\t\tImage img = ImageIO.read(new File(ICON_FILE_PATH + tag + \".png\"));\n\t\t\t\t\ticonMap.put(tag, img);\n\t\t\t\t} catch (IOException e) {\n\t\t\t\t\ticonMap.put(tag, unknownImg);\n\t\t\t\t\tSystem.err.println(tag + \" tag has no related icon\");\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "@Test\n public void equals_DifferentObjects_Test() {\n Assert.assertFalse(bq1.equals(ONE));\n }", "public void changeIcon(Icon icon) {\r\n this.iconId = icon.getId();\r\n }", "@Test\n public void Test13_2() {\n component = new DamageEffectComponent(EffectEnum.DAMAGE_BUFF, 3, 40);\n DamageEffectComponent another = new DamageEffectComponent(EffectEnum.DAMAGE_BUFF, 4, 40);\n // Then test the method\n assertFalse(component.equals(another));\n }", "public boolean getUseCustomColorForIcon() {\n boolean value;\n try {\n String[] splits = _icon.split(\"\\\\|\");\n value = splits[2].equals(\"1\");\n\n } catch (Exception e) {\n value = false;\n }\n return value;\n }", "public boolean isEqualArrow()\n {\n return Operators.isEqualArrow(getContent());\n }", "@Test\n public void testEquals_differentParameters() {\n CellIdentityNr cellIdentityNr =\n new CellIdentityNr(PCI, TAC, NRARFCN, BANDS, MCC_STR, MNC_STR, NCI,\n ALPHAL, ALPHAS, Collections.emptyList());\n CellIdentityNr anotherCellIdentityNr =\n new CellIdentityNr(PCI, TAC, NRARFCN, BANDS, MCC_STR, MNC_STR, NCI + 1,\n ALPHAL, ALPHAS, Collections.emptyList());\n\n // THEN this two objects are different\n assertThat(cellIdentityNr).isNotEqualTo(anotherCellIdentityNr);\n }", "public static void compareImage( BufferedImage expectedImage, BufferedImage calculatedImage) {\n\n // take buffer data from botm image files //\n DataBuffer dbA = expectedImage.getData().getDataBuffer();\n int dataTypeSizeA= dbA.getDataTypeSize(DataBuffer.TYPE_BYTE);\n\n DataBuffer dbB =calculatedImage.getData().getDataBuffer();\n int dataTypeSizeB = dbB.getDataTypeSize(DataBuffer.TYPE_BYTE);\n\n\n //validate the image size\n Assert.assertEquals(dataTypeSizeA, dataTypeSizeB);\n Assert.assertEquals(dbA.getSize(), dbB.getSize());\n\n\n if (expectedImage.getWidth() == calculatedImage.getWidth() && expectedImage.getHeight() == calculatedImage.getHeight()) {\n for (int x = 0; x < calculatedImage.getWidth(); x++) {\n for (int y = 0; y < calculatedImage.getHeight(); y++) {\n Assert.assertEquals(expectedImage.getRGB(x, y), calculatedImage.getRGB(x, y));\n\n }\n }\n }\n\n\n }", "public void testEquals()\r\n\t{\r\n\t\tIrClassType irClassType1 = new IrClassType();\r\n\t\tirClassType1.setName(\"irClassTypeName\");\r\n\t\tirClassType1.setDescription(\"irClassTypeDescription\");\r\n\t\tirClassType1.setId(55l);\r\n\t\tirClassType1.setVersion(33);\r\n\t\t\r\n\t\tIrClassType irClassType2 = new IrClassType();\r\n\t\tirClassType2.setName(\"irClassTypeName2\");\r\n\t\tirClassType2.setDescription(\"irClassTypeDescription2\");\r\n\t\tirClassType2.setId(55l);\r\n\t\tirClassType2.setVersion(33);\r\n\r\n\t\t\r\n\t\tIrClassType irClassType3 = new IrClassType();\r\n\t\tirClassType3.setName(\"irClassTypeName\");\r\n\t\tirClassType3.setDescription(\"irClassTypeDescription\");\r\n\t\tirClassType3.setId(55l);\r\n\t\tirClassType3.setVersion(33);\r\n\t\t\r\n\t\tassert irClassType1.equals(irClassType3) : \"Classes should be equal\";\r\n\t\tassert !irClassType1.equals(irClassType2) : \"Classes should not be equal\";\r\n\t\t\r\n\t\tassert irClassType1.hashCode() == irClassType3.hashCode() : \"Hash codes should be the same\";\r\n\t\tassert irClassType2.hashCode() != irClassType3.hashCode() : \"Hash codes should not be the same\";\r\n\t}", "private void updateResultIcons(boolean firstWin, boolean drawGame)\n {\n if (firstWin)\n {\n firstCup.setVisibility(View.VISIBLE);\n secondCup.setVisibility(View.INVISIBLE);\n drawIcon.setVisibility(View.INVISIBLE);\n }\n else\n {\n if (drawGame)\n {\n firstCup.setVisibility(View.INVISIBLE);\n secondCup.setVisibility(View.INVISIBLE);\n drawIcon.setVisibility(View.VISIBLE);\n }\n else\n {\n firstCup.setVisibility(View.INVISIBLE);\n secondCup.setVisibility(View.VISIBLE);\n drawIcon.setVisibility(View.INVISIBLE);\n }\n }\n }", "@Test\n public void equal() {\n assertTrue(commandItem.equals(commandItemCopy));\n assertTrue(commandItem.isSameCommand(commandItemCopy));\n //not commanditem return false\n assertFalse(commandItem.equals(commandWord));\n }", "public void clickOnTrashIcon() {\n try {\n waitForVisibleElement(trashToDoBtnEle, \"Trash ToDo icon\");\n hoverElement(trashToDoBtnEle, \"Hover trash icon \");\n clickElement(trashToDoBtnEle, \"Click on trash icon\");\n NXGReports.addStep(\"Click on trash ToDo icon\", LogAs.PASSED, null);\n } catch (AssertionError e) {\n AbstractService.sStatusCnt++;\n NXGReports.addStep(\"TestScript Failed: Can not click on trash ToDo icon\", LogAs.FAILED,\n new CaptureScreen(CaptureScreen.ScreenshotOf.BROWSER_PAGE));\n }\n }" ]
[ "0.71214324", "0.6946155", "0.65009296", "0.65009296", "0.645788", "0.63518304", "0.6261465", "0.62113947", "0.59666157", "0.5939686", "0.58773935", "0.58188784", "0.5701431", "0.56823456", "0.568007", "0.567066", "0.56444985", "0.5596612", "0.5562253", "0.5556511", "0.5534315", "0.5518457", "0.5517289", "0.54785824", "0.54093957", "0.54093957", "0.540624", "0.5400058", "0.53968114", "0.53968114", "0.53760505", "0.53757477", "0.5374256", "0.5361143", "0.5360816", "0.5302707", "0.5288329", "0.52867776", "0.528224", "0.5281571", "0.5274459", "0.52660346", "0.5261939", "0.524604", "0.52444804", "0.52385783", "0.5227096", "0.5213142", "0.5201401", "0.5197202", "0.519042", "0.5172103", "0.5156548", "0.5155999", "0.51556545", "0.5117473", "0.5116474", "0.5115007", "0.5112791", "0.51076144", "0.5105047", "0.5102646", "0.5098845", "0.5096703", "0.5084667", "0.5082297", "0.50756335", "0.506109", "0.5059708", "0.5059016", "0.50576943", "0.5043984", "0.5039893", "0.503763", "0.5036582", "0.50337917", "0.5028097", "0.50083846", "0.5004483", "0.5002115", "0.5001696", "0.49986595", "0.49974105", "0.4996956", "0.49951896", "0.49835223", "0.49821246", "0.49817258", "0.49722403", "0.49580324", "0.4949866", "0.49447125", "0.49395096", "0.49391723", "0.4937808", "0.49355313", "0.49347818", "0.4934106", "0.49339247", "0.4929907" ]
0.8221608
0
Gets the URL for the given icon
public URL getURL(Icon icon) { if (icon instanceof UrlImageIcon urlIcon) { return urlIcon.getUrl(); } if (icon instanceof GIcon gIcon) { return gIcon.getUrl(); } return null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "java.lang.String getGameIconUrl();", "public URL getIcon()\r\n {\r\n\treturn icon;\r\n }", "@Override\n\tpublic ToolIconURL getIconURL() {\n\t\treturn iconURL;\n\t}", "public String getIconUrl() {\n return iconUrl;\n }", "URL getIconURL(String iconId, IconSize medium);", "public String getIconUrl() {\r\n return iconUrl;\r\n }", "protected String getIconUri() {\n return getResourceUrl(ComponentConstants.ICON_RESOURCE);\n }", "public @Nullable IIconData getIcon(@Nullable URL url);", "Icon getIcon();", "Icon getIcon(URI activityType);", "com.google.protobuf.ByteString\n getGameIconUrlBytes();", "java.lang.String getIcon();", "java.lang.String getIcon();", "public static String getIconUrl(long id, String icon) {\n String url = \"http://pic.qiushibaike.com/system/avtnew/%s/%s/thumb/%s\";\n return String.format(url, id / 10000, id, icon);\n }", "String getIcon();", "String getIcon();", "public Icon getIcon();", "public java.lang.String getGameIconUrl() {\n java.lang.Object ref = gameIconUrl_;\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 gameIconUrl_ = s;\n return s;\n }\n }", "public ResourceLocation getIcon() {\n return icon;\n }", "public java.lang.String getGameIconUrl() {\n java.lang.Object ref = gameIconUrl_;\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 gameIconUrl_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "IconUris iconUris();", "java.lang.String getCouponIconUrl();", "protected Icon getIcon() {\n return getConnection().getIcon(getIconUri());\n }", "public URI getIconUri() {\n return this.iconUri;\n }", "public com.google.protobuf.ByteString\n getGameIconUrlBytes() {\n java.lang.Object ref = gameIconUrl_;\n if (ref instanceof String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (java.lang.String) ref);\n gameIconUrl_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "public java.lang.String getIcon() {\n java.lang.Object ref = icon_;\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 icon_ = s;\n }\n return s;\n }\n }", "public java.lang.String getIcon() {\n java.lang.Object ref = icon_;\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 icon_ = s;\n }\n return s;\n }\n }", "@NotNull\n SVGResource getIcon();", "public String getIcon() {\n\t\treturn \"icon\";\n\t}", "Texture getIcon();", "public com.google.protobuf.ByteString\n getGameIconUrlBytes() {\n java.lang.Object ref = gameIconUrl_;\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 gameIconUrl_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "public String getIconURL(int preferredSize)\n {\n \treturn getIconURL(); \n }", "public java.lang.String getIcon() {\n java.lang.Object ref = icon_;\n if (!(ref instanceof java.lang.String)) {\n java.lang.String s = ((com.google.protobuf.ByteString) ref)\n .toStringUtf8();\n icon_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "public java.lang.String getIcon() {\n java.lang.Object ref = icon_;\n if (!(ref instanceof java.lang.String)) {\n java.lang.String s = ((com.google.protobuf.ByteString) ref)\n .toStringUtf8();\n icon_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "public String getIconURL()\n {\n return null; \n }", "public void setIcon(URL icon)\r\n {\r\n\tthis.icon = icon;\r\n }", "public String getIcon() {\n return icon;\n }", "public String getIcon() {\n return icon;\n }", "public String getIcon() {\n return icon;\n }", "public String getIcon() {\n return icon;\n }", "String getIconFile();", "com.google.protobuf.ByteString\n getCouponIconUrlBytes();", "public byte[] getIcon(String url) {\n return mIconUrlToIconMap.get(url);\n }", "public ImageIcon getIcon(Location loc){\r\n return loc.getImage(pointer);\r\n }", "public abstract String getIconPath();", "private String downloadIcon(String iconUrl) {\n String[] urlArr = iconUrl.split(\"/\");\n String iconFileName = urlArr[urlArr.length - 1];\n // Files array from app personal storage\n String[] files = fileList();\n\n // If icon file name is present in personal storage return icon name\n for (String fileName : files) {\n if (fileName.equals(iconFileName)) return iconFileName;\n }\n\n // Else download the icon\n try {\n URL url = new URL(iconUrl);\n URLConnection connection = url.openConnection();\n connection.connect();\n InputStream input = new BufferedInputStream(url.openStream());\n FileOutputStream fileOutputStream = openFileOutput(iconFileName, Context.MODE_PRIVATE);\n\n byte tmpBuffer[] = new byte[1024];\n int read = input.read(tmpBuffer);\n\n while (read != -1) {\n fileOutputStream.write(tmpBuffer, 0, read);\n read = input.read(tmpBuffer);\n }\n\n fileOutputStream.flush();\n fileOutputStream.close();\n\n } catch (MalformedURLException e) {\n e.printStackTrace();\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n return iconFileName;\n }", "public abstract Drawable getIcon();", "@Override\n\tpublic void setIconURL(ToolIconURL iconURL) {\n\t\tthis.iconURL = iconURL;\n\t}", "com.google.protobuf.ByteString\n getIconBytes();", "com.google.protobuf.ByteString\n getIconBytes();", "public java.lang.String getCouponIconUrl() {\n java.lang.Object ref = couponIconUrl_;\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 couponIconUrl_ = s;\n return s;\n }\n }", "public ImageDescriptor getIcon();", "public Icon getIcon() {\r\n\r\n if (icon == null && this.getIconString() != null) {\r\n InputStream in = this.getClass().getResourceAsStream(this.getIconString());\r\n BufferedImage img = null;\r\n Image scaledImg = null;\r\n try {\r\n img = ImageIO.read(in);\r\n scaledImg = img.getScaledInstance(this.useToolIconSize ? PirolPlugInSettings.StandardToolIconWidth : PirolPlugInSettings.StandardPlugInIconWidth, this.useToolIconSize ? PirolPlugInSettings.StandardToolIconHeight : PirolPlugInSettings.StandardPlugInIconHeight, img.getType());\r\n } catch (IOException e) {\r\n e.printStackTrace();\r\n img = null;\r\n icon = null;\r\n }\r\n if (scaledImg != null) {\r\n icon = new ImageIcon(scaledImg);\r\n }\r\n }\r\n return icon;\r\n }", "public String getIcon(){\n\t\t\t\t\n\t\treturn inCity.getWeather().get(0).getIcon();\n\t}", "public com.google.protobuf.ByteString\n getIconBytes() {\n java.lang.Object ref = icon_;\n if (ref instanceof String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (java.lang.String) ref);\n icon_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "public com.google.protobuf.ByteString\n getIconBytes() {\n java.lang.Object ref = icon_;\n if (ref instanceof String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (java.lang.String) ref);\n icon_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "@Nullable\n final public String getIconImageUrl() {\n return mIconImageUrl;\n }", "public org.netbeans.modules.j2ee.dd.api.common.Icon getIcon(){return null;}", "@Nullable private String getHyperlink() {\n final String url = getLogoFromUIInfo();\n\n if (null == url) {\n return null;\n }\n\n try {\n final URI theUrl = new URI(url);\n final String scheme = theUrl.getScheme();\n\n if (!\"http\".equals(scheme) && !\"https\".equals(scheme) && !\"data\".equals(scheme)) {\n log.warn(\"The logo URL '{}' contained an invalid scheme (expected http:, https: or data:)\", url);\n return null;\n }\n } catch (final URISyntaxException e) {\n //\n // Could not encode\n //\n log.warn(\"The logo URL '{}' was not a URL \", url, e);\n return null;\n }\n\n final String encodedURL = HTMLEncoder.encodeForHTMLAttribute(url);\n final String encodedAltTxt = HTMLEncoder.encodeForHTMLAttribute(getAltText());\n final StringBuilder sb = new StringBuilder(\"<img src=\\\"\");\n sb.append(encodedURL).append('\"');\n sb.append(\" alt=\\\"\").append(encodedAltTxt).append('\"');\n addClassAndId(sb);\n sb.append(\"/>\");\n return sb.toString();\n }", "public FSIcon getIcon() {\n return icon;\n }", "public java.lang.String getCouponIconUrl() {\n java.lang.Object ref = couponIconUrl_;\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 couponIconUrl_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "public Icon getIcon(Object object);", "public AwesomeIcon icon() {\n\t\treturn icon;\n\t}", "public com.google.protobuf.ByteString\n getIconBytes() {\n java.lang.Object ref = icon_;\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 icon_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "public com.google.protobuf.ByteString\n getIconBytes() {\n java.lang.Object ref = icon_;\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 icon_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "public String getURL() {\n\t\treturn RequestConstants.BASE_IMAGE_URL+_url;\n\t}", "public interface IconManager {\n\n\t/**\n\t * Fetch an icon\n\t * \n\t * @param id\n\t * Icon id\n\t * @param size\n\t * Required icon size\n\t * @return Icon\n\t */\n\tIcon getIcon(String id, IconSize size);\n\n\t/**\n\t * Returns the URL to an icon.\n\t * \n\t * @param id\n\t * Icon id\n\t * @param size\n\t * Required icon size\n\t * @return URL to the icon\n\t */\n\tURL getIconURL(String iconId, IconSize medium);\n\n}", "public abstract ImageDescriptor getIcon();", "protected URL getResource(String filename)\n {\n URL iconURL = getClass().getResource(filename);\n if (iconURL == null)\n {\n LOGGER.warn(\"Icon not found: \" + filename);\n }\n return iconURL;\n }", "public AppIcon getAppIcon () ;", "public String getImg(String icon)\n {\n // New <img>\n XML img = new XML(\"img\",false);\n \n // Check specified icon property\n if (icon == null) \n { \n icon = \"\"; \n }\n \n // Set src attribute\n img.addAttribute(\"src\",icon);\n \n // return <img>\n return img.toString();\n }", "Icon getMenuIcon();", "public com.google.protobuf.ByteString\n getCouponIconUrlBytes() {\n java.lang.Object ref = couponIconUrl_;\n if (ref instanceof String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (java.lang.String) ref);\n couponIconUrl_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "public byte[] getIcon()\r\n {\r\n return icon;\r\n }", "public int getIcon()\n\t{\n\t\treturn getClass().getAnnotation(AccuAction.class).icon();\n\t}", "public String getIconString() {\n return theIconStr;\n }", "public com.google.protobuf.ByteString\n getCouponIconUrlBytes() {\n java.lang.Object ref = couponIconUrl_;\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 couponIconUrl_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "Icon getSplashImage();", "Icon createIcon();", "public Icon getIcon() {\n \t\treturn null;\n \t}", "Uri getUrl();", "public URL getURL()\n/* */ {\n/* 135 */ return ResourceUtils.getResourceAsURL(this, this);\n/* */ }", "java.lang.String getPackageImageURL();", "B itemIcon(ITEM item, Resource icon);", "public Icon getTabIcon();", "public void addIcon(String url, byte[] icon) {\n mIconUrlToIconMap.put(url, icon);\n }", "public Icon getIcon() {\n\t\treturn null;\n\t}", "java.lang.String getUrl();", "java.lang.String getUrl();", "java.lang.String getUrl();", "java.lang.String getUrl();", "java.lang.String getUrl();", "java.lang.String getUrl();", "java.net.URL getUrl();", "@Nullable\n public final Drawable getIcon() {\n return mIcon;\n }", "public abstract String getIconString();", "java.lang.String getClickURL();", "URL getUrl();", "String getURL(FsItem f);", "public static int getNotificationIcon(Context cxt, String icon){\n int imageResource = 0;\n if(!icon.isEmpty()) {\n imageResource = cxt.getResources().getIdentifier(icon, \"drawable\", cxt.getPackageName());\n if (imageResource != 0) {\n return imageResource;\n }\n }\n\n imageResource = cxt.getResources().getIdentifier(\"ic_stat_pushprime\", \"drawable\", cxt.getPackageName());\n if(imageResource != 0){\n return imageResource;\n }\n return R.drawable.ic_stat_pushprime_fallback;\n }" ]
[ "0.778002", "0.77055186", "0.7263253", "0.72397643", "0.7239205", "0.72120774", "0.7204768", "0.71219563", "0.70882034", "0.70850694", "0.68533367", "0.68338007", "0.68338007", "0.680127", "0.6744923", "0.6744923", "0.67429394", "0.67120343", "0.6663191", "0.6660578", "0.66071796", "0.6595056", "0.6553228", "0.64760053", "0.6462856", "0.64510053", "0.64510053", "0.64395326", "0.64083743", "0.6398802", "0.63914686", "0.6388118", "0.63854915", "0.63854915", "0.63827753", "0.63688624", "0.63221765", "0.63221765", "0.63221765", "0.63221765", "0.6321107", "0.6277029", "0.62740237", "0.6197866", "0.61826986", "0.617046", "0.610444", "0.6086546", "0.60608464", "0.60608464", "0.60552096", "0.604041", "0.6034894", "0.6028614", "0.6028093", "0.6028093", "0.602014", "0.6004263", "0.6000096", "0.59991187", "0.5991892", "0.5980046", "0.5951029", "0.59464103", "0.59464103", "0.5940586", "0.5939752", "0.59391993", "0.59258986", "0.58877844", "0.5870948", "0.5870923", "0.58695936", "0.58567715", "0.5827843", "0.58224887", "0.5811832", "0.5807472", "0.57983255", "0.5790586", "0.57793695", "0.577696", "0.5767731", "0.5765079", "0.57610744", "0.57565117", "0.5750222", "0.57359666", "0.57359666", "0.57359666", "0.57359666", "0.57359666", "0.57359666", "0.5730134", "0.5728479", "0.5714646", "0.57044244", "0.56925726", "0.56898206", "0.5683748" ]
0.7830529
0
Gets the frame count of this animation.
public int getTotalFrames() { int frame = 0; for (MOFPartPolyAnimEntry entry : getEntryList().getEntries()) frame += entry.getDuration(); return frame; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public int getFrameCount() {\n return frameCount;\n }", "int getFramesCount();", "int getNumberFrames();", "public int getFrames() {\r\n return frames;\r\n }", "@java.lang.Override\n public com.google.protobuf.UInt64Value getFramesCount() {\n return framesCount_ == null ? com.google.protobuf.UInt64Value.getDefaultInstance() : framesCount_;\n }", "public static int getTimeFrames() {\n return Atlantis.getBwapi().getFrameCount();\n }", "public com.google.protobuf.UInt64Value getFramesCount() {\n if (framesCountBuilder_ == null) {\n return framesCount_ == null ? com.google.protobuf.UInt64Value.getDefaultInstance() : framesCount_;\n } else {\n return framesCountBuilder_.getMessage();\n }\n }", "public int getNumFrames() {\n if ( dofs == null ) return 0;\n return dofs.length;\n }", "@XmlElement(name = \"numberOfFrames\")\n public int getNumberOfFramesSerialize() {\n return timeManager.numberOfFrames;\n }", "public native int getNumFrames() throws MagickException;", "public int getFrame() {\r\n return frame;\r\n }", "public int getFrameLength() {\n return frameLength;\n }", "int getSubframesCount();", "public com.google.protobuf.UInt64ValueOrBuilder getFramesCountOrBuilder() {\n if (framesCountBuilder_ != null) {\n return framesCountBuilder_.getMessageOrBuilder();\n } else {\n return framesCount_ == null ?\n com.google.protobuf.UInt64Value.getDefaultInstance() : framesCount_;\n }\n }", "int getFrame() {\n return currFrame;\n }", "public int getFrame()\n\t{\n\t\treturn currFrame;\n\t}", "@java.lang.Override\n public int getSubframesCount() {\n return instance.getSubframesCount();\n }", "public int getWidth() {\r\n return frameWidth;\r\n }", "@java.lang.Override\n public com.google.protobuf.UInt64ValueOrBuilder getFramesCountOrBuilder() {\n return getFramesCount();\n }", "public int getFrameNumber()\n {\n\treturn frameNumber;\n }", "public int FrameIndex() {\r\n return frameIndex;\r\n }", "@Override\n\t\tpublic int getCount() {\n\t\t\treturn FRAMES_COUNT;\n\t\t}", "protected int getFramesPased() {\r\n\t\treturn framesPassed;\r\n\t}", "@java.lang.Override\n public com.google.protobuf.UInt64Value getFrameInputsCount() {\n return frameInputsCount_ == null ? com.google.protobuf.UInt64Value.getDefaultInstance() : frameInputsCount_;\n }", "public int getFrameByteCount() {\n return mMetaData[0] * mMetaData[1] * 4;\n }", "public double getFrameDuration();", "public synchronized int getFPS() {\n return fps;\n }", "@java.lang.Override\n public int getSubframesCount() {\n return subframes_.size();\n }", "public com.google.protobuf.UInt64Value getFrameInputsCount() {\n if (frameInputsCountBuilder_ == null) {\n return frameInputsCount_ == null ? com.google.protobuf.UInt64Value.getDefaultInstance() : frameInputsCount_;\n } else {\n return frameInputsCountBuilder_.getMessage();\n }\n }", "public int getAnimation() {\n\t\t\treturn animation;\n\t\t}", "public int getFrameInterval() {\n if (mPresentationEngine == null) {\n return 0;\n }\n return mPresentationEngine.getFrameInterval();\n }", "public int getScore() {\n int totalScore = 0;\n for (Frame current : frames) {\n totalScore += current.getScore();\n }\n return totalScore;\n }", "Integer getFrameRate() {\n return frameRate;\n }", "public int getFPS() {\n\t\treturn renderer.getFps();\n\t}", "public int getHeight() {\r\n return frameHeight;\r\n }", "public int getMaxFrameNumber() {\r\n return rotationFrames.size() - 1;\r\n }", "public int getFrameID() {\n\t\treturn frameNumber;\n\t}", "public com.google.protobuf.UInt64Value getRegionFramesCount() {\n if (regionFramesCountBuilder_ == null) {\n return regionFramesCount_ == null ? com.google.protobuf.UInt64Value.getDefaultInstance() : regionFramesCount_;\n } else {\n return regionFramesCountBuilder_.getMessage();\n }\n }", "public int[] getFrameSequence() {\n return frameSequence;\n }", "public float getFramesPerSecond() {\n return 1 / frametime;\n }", "public int getFrameLimit() {\n\t\treturn frameLimit;\n\t}", "public com.google.protobuf.UInt64ValueOrBuilder getFrameInputsCountOrBuilder() {\n if (frameInputsCountBuilder_ != null) {\n return frameInputsCountBuilder_.getMessageOrBuilder();\n } else {\n return frameInputsCount_ == null ?\n com.google.protobuf.UInt64Value.getDefaultInstance() : frameInputsCount_;\n }\n }", "@java.lang.Override\n public com.google.protobuf.UInt64Value getRegionFramesCount() {\n return regionFramesCount_ == null ? com.google.protobuf.UInt64Value.getDefaultInstance() : regionFramesCount_;\n }", "public double getFrameTime() {\n\n\t\t// Convert from milliseconds to seconds\n\t\treturn getInteger(ADACDictionary.FRAME_TIME) / 1000;\n\n\t}", "public double getAnimationSeconds()\n\t{\n\t\treturn seconds_passed;\n\t}", "public int getKeyFrame() {\n return keyFrame;\n }", "public long getSampleFrameLength() {\n\t\treturn ais.getFrameLength();\n\t}", "public Number getFileCount() {\r\n\t\treturn (this.fileCount);\r\n\t}", "public double getFPS() {\n return fps;\n }", "@java.lang.Override\n public com.google.protobuf.UInt64ValueOrBuilder getFrameInputsCountOrBuilder() {\n return getFrameInputsCount();\n }", "public int getFigureCount() {\n if (figureBuilder_ == null) {\n return figure_.size();\n } else {\n return figureBuilder_.getCount();\n }\n }", "@Override\n public int getFrameLength() {\n return clip.getFrameLength();\n }", "public int getImageCount() {\n return imageCount;\n }", "@Override\n\tpublic float getFrameRate() {\n\t\treturn fps;\n\t}", "public int getFaceCount() {\r\n return faceCount;\r\n\t}", "public int getBallCount() {\r\n\t\treturn ballCount;\r\n\t}", "public static int getTimeSeconds() {\n return Atlantis.getBwapi().getFrameCount() / 30;\n }", "public void incrementFrameNumber()\n {\n\tframeNumber++;\n }", "public int getNumPageFrames() {\n return ram.length;\n }", "public double getFps() {\n return fps;\n }", "public int getCount(){\r\n return sequence.getValue();\r\n }", "public int getCameraCount() {\n if (cameraBuilder_ == null) {\n return camera_.size();\n } else {\n return cameraBuilder_.getCount();\n }\n }", "public com.google.protobuf.UInt64ValueOrBuilder getRegionFramesCountOrBuilder() {\n if (regionFramesCountBuilder_ != null) {\n return regionFramesCountBuilder_.getMessageOrBuilder();\n } else {\n return regionFramesCount_ == null ?\n com.google.protobuf.UInt64Value.getDefaultInstance() : regionFramesCount_;\n }\n }", "public int getMediaCount() {\n return instance.getMediaCount();\n }", "public boolean hasFramesCount() {\n return framesCountBuilder_ != null || framesCount_ != null;\n }", "private com.google.protobuf.SingleFieldBuilderV3<\n com.google.protobuf.UInt64Value, com.google.protobuf.UInt64Value.Builder, com.google.protobuf.UInt64ValueOrBuilder> \n getFramesCountFieldBuilder() {\n if (framesCountBuilder_ == null) {\n framesCountBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<\n com.google.protobuf.UInt64Value, com.google.protobuf.UInt64Value.Builder, com.google.protobuf.UInt64ValueOrBuilder>(\n getFramesCount(),\n getParentForChildren(),\n isClean());\n framesCount_ = null;\n }\n return framesCountBuilder_;\n }", "public int getGamesReceivedCount() {\n\t\treturn mGamesReceivedCount;\n\t}", "public int getDuration() {\n return animationDuration;\n }", "@java.lang.Override\n public boolean hasFramesCount() {\n return framesCount_ != null;\n }", "public int getMaxFPS() {\n return getValue(PROP_MAX_FPS);\n }", "@Basic\n\tpublic int getWidth() {\n\t\treturn getCurrentSprite().getWidth();\n\t}", "public int getNumberOfCameras() {\n\t\treturn numberOfCameras;\n\t}", "public double getFrameWidth() { return isRSS()? getFrame().width : getWidth(); }", "private int mRead() {\n\t\t// read in a full buffer of bytes from the file\n\t\tint bytesRead = rawBytes.length;\n\t\tif (loop) {\n\t\t\treadBytesLoop();\n\t\t} else {\n\t\t\tbytesRead = readBytes();\n\t\t}\n\t\t// convert them to floating point\n\t\tint frameCount = bytesRead / format.getFrameSize();\n\t\tsynchronized (buffer) {\n\t\t\tbuffer.setSamplesFromBytes(rawBytes, 0, format, 0, frameCount);\n\t\t}\n\n\t\treturn frameCount;\n\t}", "public int stackCount() {\r\n\t\t return count;\r\n\t }", "public int getPlayerCount() {\n \n \treturn playerCount;\n \t\n }", "public com.google.protobuf.UInt64Value.Builder getFramesCountBuilder() {\n \n onChanged();\n return getFramesCountFieldBuilder().getBuilder();\n }", "final public int getAnimationDuration()\n {\n return ComponentUtils.resolveInteger(getProperty(ANIMATION_DURATION_KEY), 1000);\n }", "public int getTargetFPS() {\r\n return fps;\r\n }", "public int getFrameDelay() {\n\t\treturn frameDelay;\n\t}", "public int getNumberOfCameras() {\r\n int num = 1;\r\n try {\r\n if (mMethodGetNumberOfCamerasLevel9 != null) {\r\n Integer integer = (Integer) mMethodGetNumberOfCamerasLevel9.invoke(null);\r\n num = integer.intValue();\r\n }\r\n } catch (Exception e) {\r\n Log.w(LOG_TAG, \"CameraHideMethods:mMethodGetNumberOfCamerasLevel9()\", e);\r\n }\r\n\r\n return num;\r\n }", "public int getPreviewFrameRate() {\n return getInt(\"preview-frame-rate\");\n }", "public int getNumTimes();", "public int get_count() {\n return (int)getUIntBEElement(offsetBits_count(), 16);\n }", "public int getNumPlayed()\n\t{\n\t\treturn numPlayed;\n\t}", "public int getCount() {\n\t\treturn channelCountMapper.getCount();\n\t}", "public int getCardCount() {\n\t\treturn this.cardsInhand.size();\n\t}", "public int getRepeatCount()\n\t{\n\t\treturn repeatCnt;\n\t}", "public int getPlayerCount() {\n\t\treturn playerCount;\n\t}", "@HaxeMethodBody(\n\t\t\"{% if extra.fps %}return {{ extra.fps }};{% else %}return 60;{% end %}\"\n\t)\n\tpublic static int getFramesPerSecond() {\n\t\treturn 60;\n\t}", "public int rectangleCount() {\n return this.root.rectangleCount();\n }", "public long getSampleCount() {\r\n\t\tif (audioFile != null) {\r\n\t\t\treturn audioFile.getEffectiveDurationSamples();\r\n\t\t}\r\n\t\treturn 0;\r\n\t}", "public int count() {\n return this.count;\n }", "public static int getCount()\n\t{\n\t\treturn projectileCount;\n\t}", "public int getCardCount() {\r\n\t\treturn this.cards;\r\n\t}", "public static final int getCameraCount(){\n if( !libraryLoaded() )\n return -1;\n return LIBRARY.CLEyeGetCameraCount();\n }", "public static int getNumStarted() {\n return numStarted;\n }", "public int getFps() {\n\t\treturn fpsTemp;\n\t}", "public int getFaceCount() {\n\t\tint count = 0;\n\n\t\tfor (int i = 0; i < getSegmentCount(); i++) {\n\t\t\tcount += getIndexCountInSegment(i);\n\t\t}\n\n\t\treturn count;\n\t}", "public int count() {\n\t\treturn count;\n\t}" ]
[ "0.8162913", "0.81130964", "0.798784", "0.79122394", "0.75433165", "0.7484507", "0.7336143", "0.7295862", "0.7021395", "0.6984544", "0.6964896", "0.69488436", "0.6936657", "0.69312406", "0.6918082", "0.6883501", "0.6875748", "0.687384", "0.6798663", "0.6777526", "0.6701158", "0.6673739", "0.6609254", "0.660166", "0.6590704", "0.65489197", "0.6496652", "0.6484738", "0.6440095", "0.6391511", "0.6380324", "0.63770634", "0.6367388", "0.6358478", "0.63163716", "0.62260157", "0.6225831", "0.62057686", "0.61616874", "0.6140961", "0.6127154", "0.610769", "0.6093398", "0.6051851", "0.6036383", "0.60164106", "0.601584", "0.6002847", "0.59993243", "0.59749854", "0.59745425", "0.59670734", "0.5954824", "0.5949369", "0.58794963", "0.5873574", "0.5862397", "0.58526635", "0.5836149", "0.58305717", "0.5820264", "0.5804265", "0.5800148", "0.57999235", "0.57902306", "0.5789907", "0.57890576", "0.57811886", "0.5780511", "0.57759416", "0.5760124", "0.5752365", "0.5746967", "0.5738039", "0.5719549", "0.57182115", "0.57118", "0.5711403", "0.57060224", "0.56971717", "0.56958795", "0.56936115", "0.5690741", "0.5678149", "0.56680626", "0.56550145", "0.5647202", "0.5635566", "0.56343484", "0.5631641", "0.5623504", "0.5623206", "0.5622292", "0.56221807", "0.5617242", "0.5616736", "0.56123585", "0.56110203", "0.5604553", "0.5599309" ]
0.7715307
4
Created by MVISION on 11/2/2017 AD.
public interface RewardContract { interface View extends BaseView { void setUpViewReward(ArrayList<ModelRewardMerge> modelList); } interface Presenter { void getReward(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public final void mo51373a() {\n }", "@Override\n public void func_104112_b() {\n \n }", "private void m50366E() {\n }", "@Override\n public void perish() {\n \n }", "protected boolean func_70814_o() { return true; }", "private stendhal() {\n\t}", "public void mo38117a() {\n }", "protected MetadataUGWD() {/* intentionally empty block */}", "public void mo4359a() {\n }", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "@Override\n public int describeContents() { return 0; }", "public final void mo91715d() {\n }", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\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\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 anularFact() {\n\t\t\r\n\t}", "@Override\n\tprotected void interr() {\n\t}", "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "public void mo12628c() {\n }", "private MetallicityUtils() {\n\t\t\n\t}", "public void mo6081a() {\n }", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\n\tprotected void initialize() {\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 init() {\n\t\t\n\t}", "public void m23075a() {\n }", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "private void m50367F() {\n }", "public void mo12930a() {\n }", "@Override\n\tprotected void getExras() {\n\n\t}", "public void mo21779D() {\n }", "protected void mo6255a() {\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 protected void initialize() {\n }", "private void init() {\n\n\t}", "private void kk12() {\n\n\t}", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "public void mo1531a() {\n }", "@Override\r\n\tpublic void init() {}", "@Override\n\tpublic void anular() {\n\n\t}", "private Rekenhulp()\n\t{\n\t}", "@Override\n\tprotected void initialize() {\n\n\t}", "protected boolean func_70041_e_() { return false; }", "public void method_4270() {}", "@Override\n protected void init() {\n }", "@Override public int describeContents() { return 0; }", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "public void mo115190b() {\n }", "public abstract void mo70713b();", "public void gored() {\n\t\t\n\t}", "@Override\n public void init() {\n\n }", "public void mo55254a() {\n }", "private static void cajas() {\n\t\t\n\t}", "@Override\n public void init() {\n }", "public void mo21877s() {\n }", "public void mo9848a() {\n }", "@Override\r\n\tprotected void initialize() {\r\n\t\t\r\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() {\n\t\t\r\n\t}", "@Override\n public void init() {}", "public abstract void mo56925d();", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "@Override\n\t\tpublic void init() {\n\t\t}", "public void mo21878t() {\n }", "private void poetries() {\n\n\t}", "@Override\r\n\tprotected void doF4() {\n\t\t\r\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 initialize() \n {\n \n }", "public void mo21793R() {\n }", "private TMCourse() {\n\t}", "@Override\n void init() {\n }", "@Override\n protected void initialize() {\n\n \n }", "@Override\r\n\tpublic void init()\r\n\t{\n\t}", "public void mo3376r() {\n }", "@Override\n\tpublic int mettreAJour() {\n\t\treturn 0;\n\t}", "public void mo21794S() {\n }", "@Override\n\tpublic void one() {\n\t\t\n\t}", "@Override\n\tprotected void initialize() {\n\t}", "@Override\n\tprotected void initialize() {\n\t}", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "public void mo21792Q() {\n }" ]
[ "0.59874356", "0.57317364", "0.5687838", "0.56848365", "0.56776065", "0.56531674", "0.56325233", "0.55918515", "0.55583215", "0.5482285", "0.54665226", "0.5454265", "0.54500645", "0.5434473", "0.5429664", "0.54263407", "0.54125607", "0.54125607", "0.54125607", "0.54125607", "0.54125607", "0.54125607", "0.54125607", "0.5408012", "0.5408012", "0.5397145", "0.53817433", "0.53717947", "0.53633666", "0.5342111", "0.53413737", "0.5336547", "0.5336547", "0.5321241", "0.5321241", "0.5321241", "0.5321241", "0.5321241", "0.53123987", "0.53091544", "0.53064203", "0.5304294", "0.52945936", "0.5287262", "0.52864873", "0.52818906", "0.52818906", "0.52818906", "0.52818906", "0.52818906", "0.52818906", "0.5278943", "0.52745", "0.52716106", "0.52627856", "0.5262665", "0.5262548", "0.52625465", "0.52586937", "0.52546185", "0.525105", "0.52507895", "0.5249958", "0.52470356", "0.52434564", "0.5240529", "0.5231634", "0.52293926", "0.5220322", "0.5219704", "0.52168447", "0.52164626", "0.5213795", "0.5210236", "0.5210083", "0.5210083", "0.5210083", "0.5207326", "0.5203362", "0.5202765", "0.5201774", "0.5201278", "0.51897156", "0.5188551", "0.518448", "0.518448", "0.518448", "0.518225", "0.5177843", "0.5168374", "0.5166732", "0.51597357", "0.5154501", "0.5151466", "0.5143369", "0.5141528", "0.5137836", "0.5133837", "0.5133837", "0.5133482", "0.5132197" ]
0.0
-1
TODO maybe we need something else here? Create new Player
public Player(@NotNull String name, String region) { this.name = name; Cell cell = new Cell("",0,0, Color.BLUE,new RoundRectangle2D.Float()); cells.add(cell); if (log.isInfoEnabled()) { log.info(toString() + " created"); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Player createPlayer();", "void createPlayer(Player player);", "Player(String playerName) {\n this.playerName = playerName;\n }", "public Player(String name) {\r\n this.name = name;\r\n }", "public Player() {}", "public Player() {}", "public Player() {}", "public Player() {}", "public Player(){}", "public Player(){}", "Player getPlayer();", "protected Player getPlayer() { return player; }", "public void createPlayer(String name, double x, double y) {\n Player player = (Player) players.get(name);\r\n if (player == null) {\r\n// System.out.println(\"Create online player \" + name);\r\n player = new OnlinePlayer(name, x, y);\r\n players.put(name, player);\r\n }\r\n }", "public void generatePlayer()\n {\n board.getTile(8,0).insertPlayer(this.player);\n }", "Player(String name){\n\t\tthis.name = name;\n\t}", "public Player(String name)\n\t{\n\t\tthis.name = name;\n\t}", "public void createOwnerPlayer(String name, double x, double y) {\n Player player = (Player) players.get(name);\r\n if (player == null) {\r\n// System.out.println(\"Create owner player \" + name);\r\n player = new Player(name, x, y);\r\n inPlayer = player;\r\n players.put(name, player);\r\n }\r\n }", "@Override\n\tpublic void loadPlayer() {\n\t\t\n\t}", "public Player() {\t\n\t}", "public Player(String type){\n \n this.type = type;\n }", "public Player(){\r\n\r\n }", "public Player(String name) {\n this.name = name;\n this.points = 0;\n }", "private Player addNewPlayer(String username) {\n if (!playerExists(username)) {\n Player p = new Player(username);\n System.out.println(\"Agregado jugador \" + username);\n players.add(p);\n return p;\n }\n return null;\n }", "Player getCurrentPlayer();", "Player getCurrentPlayer();", "private void createHumanPlayer() {\n humanPlayer = new Player(\"USER\");\n players[0] = humanPlayer;\n }", "public void initPlayer();", "Player() {\r\n setPlayerType(\"HUMAN\");\r\n\t}", "public Player(String name) {\n this.NAME = name;\n this.ownedCountries = new ArrayList<>();\n this.totArmyCount = 0;\n this.PlayerTurn = false;\n }", "public Player(){\n\n }", "public void preparePlayer1()\n {\n Player1 p1 = new Player1();\n addObject(p1, 200, 600);\n }", "public Player(String name) {\n setName(name);\n setId(++idCounter);\n setHealthPoints(100);\n setYourTurn(false);\n }", "void addPlayer(Player newPlayer);", "public Player(String name)\n\t{\n\t\tthis.money = START_MONEY;\n\t\tthis.name = name;\n\t}", "@Override\n \tpublic void createAndAddNewPlayer( int playerID )\n \t{\n \t\t//add player with default name\n \t\tPlayer newPlayer = new Player( playerID, \"Player_\"+playerID );\n \t\tgetPlayerMap().put( playerID, newPlayer );\n \t}", "public Player getPlayer();", "public Player getPlayer();", "private void spawnPlayer() {\n\t\tplayer.show(true);\n\t\tplayer.resetPosition();\n\t\tplayerDead = false;\n\t\tplayerDeadTimeLeft = 0.0;\n\t}", "public Player getPlayer() { return player;}", "public Player_ex1(String playerName){\n this.name = playerName;\n winner = false;\n }", "public Player(String name) {\r\n this.name = name;\r\n// Maxnum = 0;\r\n special = 0;\r\n index = 0;\r\n }", "Player attackingPlayer(int age, int overall, int potential) {\r\n Player newPlayer = new Player(this.nameGenerator.generateName(), age, overall, potential, 'C' , 'F');\r\n\r\n\r\n\r\n\r\n }", "private void createPlayers() {\n\tGlobal.camera_player1 = new Camera(new OrthographicCamera());\n\tGlobal.camera_player2 = new Camera(new OrthographicCamera());\n\tGlobal.camera_ui = new OrthographicCamera();\n\tGlobal.player1 = new Plane(Global.player1_respawn.x,\n\t\tGlobal.player1_respawn.y, 0, new Planetype(PlaneTypes.F35),\n\t\tEntityType.PLAYER1);\n\tGlobal.player2 = new Plane(Global.player2_respawn.x,\n\t\tGlobal.player2_respawn.y, 0, new Planetype(PlaneTypes.F35),\n\t\tEntityType.PLAYER2);\n }", "public Player getPlayer() { return player; }", "void createNewGame(Player player);", "void initializePlayer();", "public void addPlayer(Player player) {\n //int id = Repository.getNextUniqueID();\n this.player = player;\n }", "public Player(String name)\n {\n // initialise instance variables\n this.name = name;\n // start out with $100 in your wallet\n wallet = new Wallet(100);\n inventory = new HashMap<String, Item>();\n currentRoom = null;\n olcc = new OLCC();\n\n }", "private void createPlayer() {\n Entity entity = engine.createEntity();\n B2dBodyComponent b2dbody = engine.createComponent(B2dBodyComponent.class);\n TransformComponent position = engine.createComponent(TransformComponent.class);\n TextureComponent texture = engine.createComponent(TextureComponent.class);\n PlayerComponent player = engine.createComponent(PlayerComponent.class);\n CollisionComponent colComp = engine.createComponent(CollisionComponent.class);\n TypeComponent type = engine.createComponent(TypeComponent.class);\n StateComponent stateCom = engine.createComponent(StateComponent.class);\n\n // create the data for the components and add them to the components\n b2dbody.body = bodyFactory.makeCirclePolyBody(10,10,1, BodyFactory.STONE, BodyType.DynamicBody,true);\n // set object position (x,y,z) z used to define draw order 0 first drawn\n position.position.set(10,10,0);\n texture.region = atlas.findRegion(\"player\");\n type.type = TypeComponent.PLAYER;\n stateCom.set(StateComponent.STATE_NORMAL);\n b2dbody.body.setUserData(entity);\n\n // add the components to the entity\n entity.add(b2dbody);\n entity.add(position);\n entity.add(texture);\n entity.add(player);\n entity.add(colComp);\n entity.add(type);\n entity.add(stateCom);\n\n // add the entity to the engine\n engine.addEntity(entity);\n }", "public Player(){\n reset();\n }", "public Player(){\n default_init();\n }", "public void createPlayers() {\n\t\t\n\t\twhite = new Player(Color.WHITE);\n\t\twhite.initilizePieces();\n\t\tcurrentTurn = white;\n\t\t\n\t\tblack = new Player(Color.BLACK);\n\t\tblack.initilizePieces();\n\t}", "private void createPlayers() {\n // create human player first\n Player human = new Player(\"Player 1\", true);\n players.add(human);\n \n // create remaining AI Players\n for (int i = 0; i < numAIPlayers; i++) {\n Player AI = new Player(\"AI \" + (i + 1), false);\n players.add(AI);\n }\n }", "public void setPlayer(Player player) {\n this.player = player;\n }", "public Player(String name) {\n this(name, null);\n }", "Player currentPlayer();", "public void createNewPlayer()\n\t{\n\t\t// Set up all badges.\n\t\tm_badges = new byte[42];\n\t\tfor(int i = 0; i < m_badges.length; i++)\n\t\t\tm_badges[i] = 0;\n\t\tm_isMuted = false;\n\t}", "public GamePlayer() {}", "public Player getPlayer()\r\n {\r\n return player;\r\n }", "private void createPlayer() {\r\n try {\r\n mRadioPlayer = new RadioPlayer(getApplication(), mDeezerConnect,\r\n new WifiAndMobileNetworkStateChecker());\r\n mRadioPlayer.addPlayerListener(this);\r\n setAttachedPlayer(mRadioPlayer);\r\n } catch (DeezerError e) {\r\n handleError(e);\r\n } catch (TooManyPlayersExceptions e) {\r\n handleError(e);\r\n }\r\n }", "private void setPlayer() {\n player = Player.getInstance();\n }", "public Player2(){\n super();\n name=\"110\";\n }", "public void welcomePlayer(Player p);", "public void setPlayer(Player player) {\r\n this.player = player;\r\n }", "public Player(String name) {\n this.name = name;\n gameDeck = new Deck(false);\n wonDeck = new Deck(false);\n }", "public HumanPlayer(String name) {\n super(name);\n }", "@Override\n\tpublic void setPlayer(Player player) {\n\n\t}", "Player getDormantPlayer();", "public Player(String name) {\n this.name = name;\n this.badges = new LinkedList<>();\n }", "Player(int id, String name){\n\t\tthis();\n\t\tthis.id = id;\n\t\tthis.name = name;\n\t}", "public Player createPlayer(String playerName) {\n Player player = new Player(playerName);\n gamePlayers.add(player);\n notifier.broadcastPlayerJoined(playerName);\n if (allPlayersJoined()) {\n startGame();\n }\n return player;\n }", "void addPlayer(IPlayer player);", "public void setPlayer(Player player) {\n this.player = player;\n }", "public Player(String name, int playerIndex) {\r\n\t\tthis.name = name;\r\n\t\tthis.playerIndex = playerIndex;\r\n }", "public void setPlayer(String player) {\r\n this.player = player;\r\n }", "public PlayerSetup() {\n\t\tgetNumPlayers();\n\t\tcreatePlayers();\n\t\t\n\t\tSystem.out.println(\"\\n\" + Players.getInstance().toString() );\n\t}", "public Player(Game game){\r\n this.game = game;\r\n }", "private static void testPlayer() {\r\n\t\t\tnew AccessChecker(Player.class).pM(\"getName\").pM(\"getMark\").pM(\"toString\").checkAll();\r\n\t\t\tPlayer p = new Player(\"Test\", 'X');\r\n\t\t\tcheckEq(p.getName(), \"Test\", \"Player.getName\");\r\n\t\t\tcheckEq(p.getMark(), 'X', \"Player.getMark\");\r\n\t\t\tcheckEqStr(p, \"Test(X)\", \"Player.toString\");\t\t\r\n\t\t}", "public Player(String name) {\n\t\tthis.name = name;\n\t\tscore = 0;\n\t}", "public Player()\r\n\t{\r\n\t\tscore = 0;\r\n\t\tsetPlayerName();\r\n\t}", "public Player() {\n\n\t\tnumberOfPlayers++;\n\t\tthis.playerNumber = \"Player \" + numberOfPlayers; \n\t\tthis.balance = 500.00; \n\t\tthis.numberOfLoans = 0;\n\t\tthis.score = 0;\n\t\tthis.inRound = true; \n\t}", "public void preparePlayer2()\n {\n Player2 p2 = new Player2();\n addObject(p2, 878, 600);\n }", "public Player getPlayer() {\r\n return player;\r\n }", "public Player getPlayer() {\n return player;\n }", "boolean InitialisePlayer (String path_name);", "public void setUpPlayers() {\n this.players.add(new Player(\"Diogo\"));\n this.players.add(new Player(\"Hayden\"));\n this.players.add(new Player(\"Gogo\"));\n }", "public Multi_Player()\r\n {\r\n \r\n }", "public Player getPlayer(){\r\n return player;\r\n }", "public Player createPlayer(Player player) {\n // check whether unique player can be created or not\n if (playerRepository.existsByUsername(player.getUsername())) {\n return null;\n }\n if (playerRepository.existsByEmailAddress(player.getEmailAddress())) {\n return null;\n }\n player.setPassword(encryption.encoder().encode(player.getPassword()));\n return playerRepository.save(player);\n }", "private void initPlayers() {\n this.playerOne = new Player(1, 5, 6);\n this.playerTwo = new Player(2, 0, 1);\n this.currentPlayer = playerOne;\n\n }", "public UserPlayer(){\n this.playerNum = 0;\n this.isLead = false;\n this.playerHand = new Hand();\n this.suitUserChose = null;\n }", "public void createPlayers() {\r\n\t\tPlayerList playerlist = new PlayerList();\r\n\t\tPlayer p = new Player();\r\n\t\tfor (int x = 0; x <= players; x++) {\r\n\t\t\tplayerlist.createPlayer(p);\r\n\t\t}\r\n\r\n\t\tScanner nameScanner = new Scanner(System.in);\r\n\r\n\t\tfor (int createdPlayers = 1; createdPlayers < players; createdPlayers++) {\r\n\t\t\tSystem.out.println(\"Enter next player's name:\");\r\n\t\t\tplayerlist.namePlayer(createdPlayers, nameScanner.nextLine());\r\n\t\t}\r\n\t\tnameScanner.close();\r\n\t}", "private static Player create(String playername) throws GameException {\n\t\ttry {\n\t\t\treturn (Player) createObject(playername);\n\t\t} catch (Exception e) {\n\t\t\tthrow new GameException(\"Player \" + playername + \" not found\");\n\t\t}\n\t}", "public Player() {\n this(\"\", \"\", \"\");\n }", "PlayerBean create(String name);", "public Player(String name)\n {\n this.name = name;\n cash = 0;\n }", "public Player(String name){\r\n\t\tthis.name = name;\r\n\t\tDie die = new Die();\r\n\t\tthis.die = die;\r\n\t}", "private void createHumanPlayer(PlayerId pId) {\n\t\tplayers.put(pId, new GraphicalPlayerAdapter());\n\t\tplayerNames.put(pId, texts.get(pId.ordinal() * 2).getText().isEmpty() ? defaultNames[pId.ordinal()] : texts.get(pId.ordinal() * 2).getText());\n\t}", "public PlayerInterface createPlayer(String godName, PlayerInterface p) {\n God god = find(godName);\n p = addEffects(p, god.getEffects());\n return p;\n }", "Player getPlayer(UUID playerId);", "public Player getPlayer() {\n return player;\n }" ]
[ "0.8248438", "0.80824184", "0.77868056", "0.7562344", "0.7520023", "0.7520023", "0.7520023", "0.7520023", "0.7486525", "0.7486525", "0.7441992", "0.7388351", "0.7386495", "0.7385497", "0.7376056", "0.7375258", "0.73290014", "0.7324519", "0.73106146", "0.7250791", "0.72244257", "0.72106045", "0.72053695", "0.7196284", "0.7196284", "0.7191255", "0.7161283", "0.7149979", "0.71474415", "0.71408343", "0.7139751", "0.7139634", "0.71033275", "0.70962286", "0.7084054", "0.7076548", "0.7076548", "0.7068751", "0.7038909", "0.7036445", "0.70324326", "0.7024287", "0.7016467", "0.70158803", "0.69818175", "0.6979523", "0.6977092", "0.697099", "0.69675684", "0.69569105", "0.6951163", "0.6923011", "0.69224095", "0.69166154", "0.6914019", "0.69093573", "0.6908709", "0.6908108", "0.69077396", "0.6905707", "0.69054204", "0.6891936", "0.68911296", "0.6889823", "0.68853", "0.688338", "0.68793374", "0.68727374", "0.6856071", "0.685281", "0.68526244", "0.6851758", "0.68440855", "0.68261087", "0.6821276", "0.6816488", "0.68140835", "0.6812238", "0.6809395", "0.6808301", "0.6802856", "0.6800399", "0.67901456", "0.6787956", "0.6787127", "0.677013", "0.67643446", "0.6763663", "0.6751767", "0.674651", "0.6744049", "0.6739749", "0.67384887", "0.6731979", "0.6723593", "0.67215216", "0.672027", "0.6702469", "0.67008936", "0.6698979", "0.6694476" ]
0.0
-1
Here we are calling the test to click random item from the displayed list, the result is updated in the excel sheet. We are making use of assertion helper class
@Test public void randomItem() throws InterruptedException { productpage = new ProductPage(driver); productpage.clickOnSomePrompt(); productdetails = productpage.clickOnRandomItem(); boolean status = productdetails.isProductDEtailsPageDisplayed(); AssertionHelper.updateTestStatus(status); TestBaseRunner.result = TestBaseRunner.passOrFail(status); ExcelReadWrtite.updateResult("testData.xlsx", "TestScripts", "randomItem", result); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void AddItemFavList( ){\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:- Favourite List Link should be clicked\");\r\n\t\ttry{\r\n\r\n\t\t\tsleep(1000);\r\n\t\t\twaitforElementVisible(returnByValue(getValue(\"FavouriteListLink\")));\r\n\t\t\tclick(returnByValue(getValue(\"FavouriteListLink\")));\r\n\t\t\twaitForPageToLoad(100);\r\n\r\n\t\t\twaitforElementVisible(locator_split(\"btnAdditemtocart\"));\r\n\t\t\tclick(locator_split(\"btnAdditemtocart\"));\r\n\t\t\twaitForPageToLoad(20);\r\n\r\n\t\t\tReporter.log(\"PASS_MESSAGE:- Favourite List and Add Item button clicked\");\r\n\t\t}\r\n\t\tcatch(Exception e){\r\n\t\t\tReporter.log(\"FAIL_MESSAGE:- FavList Link is not clicked \"+elementProperties.getProperty(\"FavouriteListLink\"));\r\n\t\t\tthrow new NoSuchElementException(\"The element with \"\r\n\t\t\t\t\t+ elementProperties.getProperty(\"FavouriteListLink\").toString().replace(\"By.\", \" \")\r\n\t\t\t\t\t+ elementProperties.getProperty(\"btnAdditemtocart\").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}", "@Then(\"^items displayed as per choice made$\")\n\tpublic void items_displayed_as_per_choice_made() throws Throwable {\n\t\tString str = driver.findElement(By.xpath(\"//*[@id=\\\"center_column\\\"]/h1/span[2]\")).getText();\n\t\tassertEquals(\"7 results have been found.\", str);\n\t\tdriver.quit();\n\t}", "@Test\r\n\tpublic void test_7and8_AddToList() throws Exception {\n\t\texecutor = (JavascriptExecutor) driver;\r\n\t\texecutor.executeScript(\"window.scrollTo(0, 600)\");\r\n\t\t// click on add to list button\r\n\t\tdriver.findElement(By.id(\"add-to-wishlist-button-submit\")).click();\r\n\t\tThread.sleep(3000);\r\n\r\n\t\t// get selected item \r\n\t\tWebElement element = driver.findElement(By.xpath(\"//span[@id='productTitle']\"));\r\n\t\tselectedItem = element.getText();\r\n\t\t// click on view the wish list\r\n\t\tdriver.findElement(By.cssSelector(\"span.w-button-text\")).click();\r\n\t\tThread.sleep(3000);\r\n\r\n\t\t// test 8\r\n\t\t// create an array of product titles to get items in wish list\r\n\t\t// get the product title in wish list then compare with selected item\r\n\t\tList<WebElement> productTitles = driver.findElements(By.xpath(\"//div[@id='g-items']//h5\")); \r\n\t\tfor(WebElement productTitle : productTitles) {\r\n\t\t\t// compare selected item and any item in wish list\r\n\t\t\tString listedItem = productTitle.getText(); \r\n\t\t\tif (listedItem.equals(selectedItem)) {\r\n\t\t\t\tSystem.out.println(listedItem + \" is added to wish list\");\r\n\t\t\t\tAssert.assertTrue(listedItem.equals(selectedItem));\r\n\t\t\t}\t\t\r\n\t\t}\r\n\t}", "@Test\n\t public void scrollAndClick() throws InterruptedException\n\t {\n\t\t \n\t\t productpage = new ProductPage(driver);\n\t\t productpage.clickOnSomePrompt();\n\t\t int num = productpage.numberOfItemsDisplayed();\n\t\t log.info(\"number of items\" +num);\n\t\t productdetails = productpage.clickOnLastItem();\n\t\t boolean status = productdetails.isProductDEtailsPageDisplayed();\n\t\t\tAssertionHelper.updateTestStatus(status);\n\t\t\tTestBaseRunner.result = TestBaseRunner.passOrFail(status);\n\t\t\tExcelReadWrtite.updateResult(\"testData.xlsx\", \"TestScripts\", \"scrollAndClick\", result);\n\t }", "@Test(priority=3)\n\t\tpublic void addToWishlist() throws Exception{\n\t\t\t\n//'**********************************************************\n//Calling method to click on 'Add to Wishlist' link and verify success toast is displayed\n//'**********************************************************\n\t\t\tThread.sleep(1500);\n\t\t\tgalaxyPage.clickOnAddToWishlist();\n\t\t\tThread.sleep(1500);\n\t\t\tAssert.assertTrue(galaxyPage.getSuccessMessage().contains(\"Success\"), \"Product is not added to Wishlist\");\n\t\t\textentTest.log(LogStatus.PASS,\"Success: You have added Samsung Galaxy Tab 10.1 to your wish list!\");\n//'**********************************************************\n//Calling method to close the success toast\n//'**********************************************************\n\t\t\tgalaxyPage.closeSuccesstoast();\n//'**********************************************************\n//Calling method to click on 'Wishlist' link and check user is redirected to 'My Wishlist' page\n//'**********************************************************\n\t\t\tmyWishlistPage = galaxyPage.clickOnWishlist();\n\t\t\t\n\t\t\tAssert.assertTrue(myWishlistPage.getTitle().equals(\"My Wish List\"), \"User is not redirected to wishlist page\");\n\t\t\textentTest.log(LogStatus.PASS,\"User is redirected to My Wishlist Page\");\n\t\t\t\n//'**********************************************************\n//Verifying count in 'Wishlist' link is equal to number of products in the page\n//'**********************************************************\n\t\t\tAssert.assertEquals(myWishlistPage.valueInWishlistLink(), myWishlistPage.numOfProductsInTable(), \"Value shown in wishlist link is different from number of records in the table\");\n\t\t\textentTest.log(LogStatus.PASS,\"Product added: Value shown in wishlist link is equal to number of records in the table\");\n\t\t\t\n\t\t\t}", "@Test(dataProvider=\"getExcelData\", priority=1)\n\t \n\t public void clientQuickLinks(String OrigionLocation, String Dest, String Item, String Count, String Weight, String Volume, String Client_Order, String Busunit, String GeneralLedger) throws InterruptedException, IOException {\n\t\tTC001_LoginOTM.getDriver().manage().timeouts().implicitlyWait(30,TimeUnit.SECONDS);\n\t\t \n\t\t TC001_LoginOTM.getDriver().switchTo().defaultContent();\n\t\t System.out.println(\"before sidebar\");\n\t\t TC001_LoginOTM.getDriver().switchTo().frame(\"sidebar\");\n\t\t System.out.println(\"After sidebar\");\n\t\t //click on client quick links \n\t\t TC001_LoginOTM.getDriver().findElement(By.xpath(\"//a[contains(text(),'Client Quick Links')]\")).click(); \t \n\t\t \n\t\t //click on FOE screen\n\t\t TC001_LoginOTM.getDriver().findElement(By.xpath(\"//a[text()='Fast Order Entry']\")).click();\n\t\t \t\t \n\t\t //Internal Login screen\n\t\t TC001_LoginOTM.getDriver().switchTo().defaultContent();\n\t\t TC001_LoginOTM.getDriver().switchTo().frame(\"mainBody\");\n\t\t\t\t \n\t\t //Internal username\n\t\t TC001_LoginOTM.getDriver().findElement(By.xpath(\"//*[@id='orderentryui-1928791928']/div/div[2]/div/div[1]/div/div/div/div[2]/div/div/div/div[2]/div/div/table/tbody/tr[1]/td[3]/input\")).clear();\n\t\t TC001_LoginOTM.getDriver().findElement(By.xpath(\"//*[@id='orderentryui-1928791928']/div/div[2]/div/div[1]/div/div/div/div[2]/div/div/div/div[2]/div/div/table/tbody/tr[1]/td[3]/input\")).sendKeys(\"MENLO.CLIENTA370\");\n\t\t \n\t\t //Internal password\n\t\t TC001_LoginOTM.getDriver().findElement(By.xpath(\"//*[@id=\\\"orderentryui-1928791928\\\"]/div/div[2]/div/div[1]/div/div/div/div[2]/div/div/div/div[2]/div/div/table/tbody/tr[2]/td[3]/input\")).clear();\n\t\t TC001_LoginOTM.getDriver().findElement(By.xpath(\"//*[@id=\\\"orderentryui-1928791928\\\"]/div/div[2]/div/div[1]/div/div/div/div[2]/div/div/div/div[2]/div/div/table/tbody/tr[2]/td[3]/input\")).sendKeys(\"Year2012??\");\n\t\t \n\t\t TC001_LoginOTM.getDriver().findElement(By.xpath(\"//html/body/div/div/div[2]/div/div[1]/div/div/div/div[2]/div/div/div/div[3]/div/div/span/span\")).click();\n \n\t\t \n\t\t //fast order entry screen\n\t\t TC001_LoginOTM.getDriver().switchTo().defaultContent();\n\t\t TC001_LoginOTM.getDriver().switchTo().frame(\"mainBody\");\n\t\t WebElement Origion = TC001_LoginOTM.getDriver().findElement(By.xpath(\"//html/body/div/div/div[2]/div/div[2]/div/div/div[2]/div/div[1]/div/div[2]/div/div/div[2]/div/div/div/div[2]/div/input\"));\n\t\t Origion.sendKeys(OrigionLocation);\n\t\t Thread.sleep(5000);\n\t\t //Origion.sendKeys(Keys.TAB);\n\t\t TC001_LoginOTM.getDriver().findElement(By.xpath(\"//html/body/div/div/div[2]/div/div[2]/div/div/div[2]/div/div[1]/div/div[2]/div/div/div[3]/div/div/div/div[2]/div/input\")).sendKeys(Dest);\n\t\t Thread.sleep(5000);\n\t\t \n\t\t TC001_LoginOTM.getDriver().findElement(By.xpath(\"//html/body/div/div/div[2]/div/div[2]/div/div/div[2]/div/div[1]/div/div[2]/div/div/div[7]/div/div/div/div[2]/div/div/div/div[1]/div/div/div/div[1]/div/div/div/div[1]/div/input\")).sendKeys(Item);\n\t\t Thread.sleep(5000);\n\t\t TC001_LoginOTM.getDriver().findElement(By.xpath(\"//html/body/div[3]/div/div/div/div[3]/div/div/div[2]/div/div/div[1]/div/div/div[2]/div[1]/table/tbody/tr[1]/td[1]/div\")).click();\n\t\t Thread.sleep(8000);\n\t\t \t\t \n\t\t //to enter count\n\t\t \n\t\t TC001_LoginOTM.getDriver().findElement(By.xpath(\"//html/body/div/div/div[2]/div/div[2]/div/div/div[2]/div/div[1]/div/div[2]/div/div/div[7]/div/div/div/div[2]/div/div/div/div[1]/div/div/div/div[1]/div/div/div/div[4]/div/input\")).sendKeys(Count);\n\t\t Thread.sleep(2000);\n\t\t TC001_LoginOTM.getDriver().findElement(By.xpath(\"//html/body/div/div/div[2]/div/div[2]/div/div/div[2]/div/div[1]/div/div[2]/div/div/div[7]/div/div/div/div[2]/div/div/div/div[1]/div/div/div/div[1]/div/div/div/div[5]/div/input\")).sendKeys(Weight);\n\t\t TC001_LoginOTM.getDriver().findElement(By.xpath(\"//html/body/div/div/div[2]/div/div[2]/div/div/div[2]/div/div[1]/div/div[2]/div/div/div[7]/div/div/div/div[2]/div/div/div/div[1]/div/div/div/div[1]/div/div/div/div[7]/div/input\")).sendKeys(Volume);\n\t\t Thread.sleep(9000);\n\t\t //changing date format\n\t\t //Create object of SimpleDateFormat class and decide the format\n\t\t DateFormat dateFormat = new SimpleDateFormat(\"M/d/yy\");\n\t\t //get current date time with Date()\n\t\t Date date = new Date();\n\t\t // Now format the date\n\t\t String date1= dateFormat.format(date);\n\t\t // to add 4 days to codays date\n\t\t Calendar cal = Calendar.getInstance();\n\t\t cal.setTime(date);\n\t\t cal.add(Calendar.DATE, 4); //minus number would decrement the days\n\t\t Date date2 = cal.getTime();\n\t\t String date3 = dateFormat.format(date2);\t\t \n\t\t \t\t \t\t \n\t\t //entering todays date fields\n\t\t TC001_LoginOTM.getDriver().findElement(By.xpath(\"//html/body/div/div/div[2]/div/div[2]/div/div/div[2]/div/div[1]/div/div[2]/div/div/div[9]/div/div/div/div[2]/div/div/div/div[2]/div/div/input\")).sendKeys(date1);\n\t\t // entering todays date +4 days\n\t\t Thread.sleep(2000);\n\t\t TC001_LoginOTM.getDriver().findElement(By.xpath(\"//html/body/div/div/div[2]/div/div[2]/div/div/div[2]/div/div[1]/div/div[2]/div/div/div[10]/div/div/div/div[3]/div/div/div/div[2]/div/div/input\")).sendKeys(date3);\n\t\t Thread.sleep(2000);\n\t\t TC001_LoginOTM.getDriver().findElement(By.xpath(\"//html/body/div/div/div[2]/div/div[2]/div/div/div[2]/div/div[1]/div/div[2]/div/div/div[12]/div/div/div/div/div[2]/div/input\")).sendKeys(Client_Order);\n\t\t Thread.sleep(2000);\n\t\t //selecting from combo box\n\t\t System.out.println(\"before selection element\");\n\t\t WebElement BusUnitElement = TC001_LoginOTM.getDriver().findElement(By.xpath(\"//html/body/div/div/div[2]/div/div[2]/div/div/div[2]/div/div[1]/div/div[2]/div/div/div[12]/div/div/div/div/div[6]/div/div/input\"));\n\t\t BusUnitElement.sendKeys(Busunit);\n\t \n\t\t //Select BusUnit = new Select(BusUnitElement);\n\t\t //BusUnit.selectByVisibleText(\"TRS\");\n\t\t System.out.println(\"After selection element\");\n\t\t Thread.sleep(5000);\n\t\t System.out.println(\"before premium check box element\");\n\t\t TC001_LoginOTM.getDriver().findElement(By.xpath(\"//*[@id=\\\"gwt-uid-3\\\"]\")).click();\n\t\t \n\t\t //select premium reason from combo box\n\t\t Thread.sleep(2000);\n\t\t WebElement PreReasonElement = TC001_LoginOTM.getDriver().findElement(By.xpath(\"//html/body/div/div/div[2]/div/div[2]/div/div/div[2]/div/div[1]/div/div[2]/div/div/div[12]/div/div/div/div/div[22]/div/div/select\"));\n\t\t Select PreReason = new Select(PreReasonElement);\n\t\t PreReason.selectByIndex(2);\n\t\t \n\t\t Thread.sleep(9000);\n\t\t \n\t\t //General Ledger from combo box\n\t\t WebElement GenLedElement = TC001_LoginOTM.getDriver().findElement(By.xpath(\"//html/body/div/div/div[2]/div/div[2]/div/div/div[2]/div/div[1]/div/div[2]/div/div/div[15]/div/div/div/div[2]/div/div/input\"));\n\t\t //Select GenLed = new Select(GenLedElement);\n\t\t //GenLed.selectByVisibleText(\"143-16400-000\");\n\t\t GenLedElement.sendKeys(GeneralLedger);\n\t\t Thread.sleep(5000);\n\t\t GenLedElement.sendKeys(Keys.ARROW_DOWN.ENTER);\n\t\t \n\t\t Thread.sleep(9000);\n\t\t \n\t\t //click on create button\n\t\t TC001_LoginOTM.getDriver().findElement(By.xpath(\"//html/body/div/div/div[2]/div/div[2]/div/div/div[2]/div/div[1]/div/div[2]/div/div/div[25]/div/div/div/div[1]/div/div/div/div[1]/div/div/div/div[1]/div/div/span/span\")).click();\n\t\t Thread.sleep(9000);\n\t\t \n\t\t \n\t\t \n\t\t //String message = \"//html/body/div/div/div[2]/div/div[2]/div/div/div[2]/div/div[1]/div/div[2]/div/div/div[25]/div/div/div/div[1]/div/div/div/div[2]/div/div/div/div[1]/div/div\";\n\t\t System.out.println(\"Before popup window\");\n\t\t new WebDriverWait(TC001_LoginOTM.getDriver(),30).until(ExpectedConditions.elementToBeClickable(By.xpath(\"//html/body/div/div/div[2]/div/div[2]/div/div/div[2]/div/div[1]/div/div[2]/div/div/div[25]/div/div/div/div[1]/div/div/div/div[2]/div/div\")));\n\t\t \n\t\t System.out.println(\"After popup window\");\n\t\t Thread.sleep(9000);\n\t\t \t\t \n\t\t \n\t\t String element_text = TC001_LoginOTM.getDriver().findElement(By.xpath(\"//html/body/div/div/div[2]/div/div[2]/div/div/div[2]/div/div[1]/div/div[2]/div/div/div[25]/div/div/div/div[1]/div/div/div/div[2]/div/div\")).getText();\n\t\t //splitting on the basis of space and taking index 1 to take order no \n\t\t String element_text_actual = element_text.split(\" \")[1];\n\t\t System.out.println(element_text_actual);\t\n\t\t \n\t\t\n\t\t try {\n\t\t\t //writing order no to Excel file\n\t\t\t // HSSFWorkbook wb = new HSSFWorkbook(); \n\t\t\t //CreationHelper createHelper = wb.getCreationHelper();\n\t\t\t //Sheet sheet = wb.createSheet(\"Sheet1\");\n\t\t\t \n\t\t\t //HSSFRow row = (HSSFRow) sheet.createRow(1);\n\t\t //HSSFCell cell;\n\t\t //Creating rows and filling them with data \n\t\t // cell = row.createCell(1);\n\t\t // cell.setCellValue(createHelper.createRichTextString(element_text_actual));\n\t\t\t // FileOutputStream fileOut;\n // fileOut = new FileOutputStream(\"Testdata/FOE_output.xls\");\n\t\t\t // wb.write(fileOut);\n\t\t\t // fileOut.close(); \n\t\t\t//create an object of Workbook and pass the FileInputStream object into it to create a pipeline between the sheet and eclipse.\n\t\t\t\tFileInputStream fis = new FileInputStream(\"Testdata/FOE_output.xlsx\");\n\t\t\t\tXSSFWorkbook workbook = new XSSFWorkbook(fis);\n\t\t\t\t//call the getSheet() method of Workbook and pass the Sheet Name here. \n\t\t\t\t//In this case I have given the sheet name as “TestData” \n\t\t //or if you use the method getSheetAt(), you can pass sheet number starting from 0. Index starts with 0.\n\t\t\t\tXSSFSheet sheet = workbook.getSheet(\"sheet1\");\n\t\t\t\t//XSSFSheet sheet = workbook.getSheetAt(0);\n\t\t\t\t//Now create a row number and a cell where we want to enter a value. \n\t\t\t\t//Here im about to write my test data in the cell B2. It reads Column B as 1 and Row 2 as 1. Column and Row values start from 0.\n\t\t\t\t//The below line of code will search for row number 2 and column number 2 (i.e., B) and will create a space. \n\t\t //The createCell() method is present inside Row class.\n\t\t XSSFRow row = sheet.createRow(1);\n\t\t\t\tCell cell = row.createCell(1);\n\t\t\t\t//Now we need to find out the type of the value we want to enter. \n\t\t //If it is a string, we need to set the cell type as string \n\t\t //if it is numeric, we need to set the cell type as number\n\t\t\t\tcell.setCellType(cell.CELL_TYPE_STRING);\n\t\t\t\tcell.setCellValue(element_text_actual);\n\t\t\t\tFileOutputStream fos = new FileOutputStream(\"Testdata/FOE_output.xlsx\");\n\t\t\t\tworkbook.write(fos);\n\t\t\t\tfos.close();\n\t\t\t\tSystem.out.println(\"END OF WRITING DATA IN EXCEL\");\n\t\t} catch (FileNotFoundException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t\t\n\t\t} \n\t\t\n\t\t Assert.assertTrue(element_text.contains(\"Order\"));\t\t \n\t\t \n\t }", "public void ClickAddtoCartiteminCustomersalsoViewed(){\r\n\t\tString[] ExpText = getValue(\"CustomeralsoViewedtitle\").split(\",\", 2);\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:- Add to Cart button should be clicked in CustomeralsoViewed table\");\r\n\t\ttry{\r\n\t\t\tList<WebElement> ele = listofelements(locator_split(\"imgitemCustomeralsoOrderedViewed\"));\r\n\t\t\t((JavascriptExecutor) driver).executeScript(\"arguments[0].click();\", ele.get(Integer.valueOf(ExpText[0])-1));\r\n\t\t\tSystem.out.println(\"Add to Cart button is clicked in CustomeralsoOrdered table\");\r\n\t\t\tReporter.log(\"PASS_MESSAGE:- Add to Cart button is clicked in CustomeralsoOrdered table\");\r\n\r\n\t\t}\r\n\t\tcatch(NoSuchElementException e){\r\n\t\t\tReporter.log(\"FAIL_MESSAGE:- Add to Cart button is not clicked in CustomeralsoViewed table\");\r\n\t\t\tthrow new NoSuchElementException(\"The element with \"\r\n\t\t\t\t\t+ elementProperties.getProperty(\"imgitemCustomeralsoOrderedViewed\").toString()\r\n\t\t\t\t\t+ \" not found\");\r\n\t\t}\r\n\t}", "@Test\n public void clickListTest() {\n\n onView(withId(R.id.rv_list)).perform(RecyclerViewActions.actionOnItemAtPosition(0, click()));\n }", "@Test\n public void myNeighboursList_selectAction_shouldShowDetailsActivity(){\n onView(ViewMatchers.withId(R.id.list_neighbours)).check(withItemCount(ITEMS_COUNT));\n //When : perform a click on RecyclerView item position 0\n onView(allOf(isDisplayed(), withId(R.id.list_neighbours)))\n .perform(RecyclerViewActions.actionOnItemAtPosition(0, click()));\n //Then : TextView for neighbour name in Details Activity is displayed\n onView(ViewMatchers.withId(R.id.user_details_name)).check(matches(isDisplayed()));\n }", "@Test\r\n public void clickOnGift()\r\n {WebDriverWait wait = new WebDriverWait(driver, 60);\r\n// driver.navigate().back();\r\n driver.findElement(By.id(\"il.co.mintapp.buyme:id/skipButton\")).click();\r\n driver.findElement(By.id(\"il.co.mintapp.buyme:id/skipTitle\")).click();\r\n wait.until(ExpectedConditions.visibilityOfElementLocated(By.id(\"il.co.mintapp.buyme:id/t_title\")));\r\n List<MobileElement> category = driver.findElementsByAndroidUIAutomator(\"new UiSelector().resourceId(\\\"il.co.mintapp.buyme:id/t_title\\\")\");\r\n category.get(0).click();\r\n /************scroll****************************************/\r\n// TouchAction action=new TouchAction(driver);\r\n// Duration threeSecondsDuration= Duration.ofSeconds(5);//AppsExamples(3);\r\n /**************************************************************/\r\n List<MobileElement> buisness = driver.findElementsByAndroidUIAutomator(\"new UiSelector().resourceId(\\\"il.co.mintapp.buyme:id/t_title\\\")\");\r\n //buisness.get(4).click();\r\n buisness.get(buisness.size() - 1).click();\r\n System.out.println(\"buisness.size() \"+ buisness.size());\r\n List<MobileElement> optionsInBuisness = driver.findElementsByAndroidUIAutomator(\"new UiSelector().resourceId(\\\"il.co.mintapp.buyme:id/businessName\\\")\");\r\n optionsInBuisness.get(optionsInBuisness.size() - 1).click();\r\n System.out.println(\"optionsInBuisness.size() \"+ optionsInBuisness.size());\r\n\r\n WebElement price = driver.findElementByAndroidUIAutomator(\"new UiSelector().resourceId(\\\"il.co.mintapp.buyme:id/priceEditText\\\")\"); //il.co.mintapp.buyme:id/priceEditText\r\n price.sendKeys(\"100\");\r\n WebElement purchesButton = driver.findElementByAndroidUIAutomator(\"new UiSelector().resourceId(\\\"il.co.mintapp.buyme:id/purchaseButton\\\")\"); //il.co.mintapp.buyme:id/priceEditText\r\n purchesButton.click();\r\n //il.co.mintapp.buyme:id/purchaseButton\r\n// \"il.co.mintapp.buyme:id/businessImage\"\"\r\n// System.out.println(element.get(0).getText());\r\n\r\n }", "public void ClickAddtoCartiteminCustomersalsoOrdered(){\r\n\t\tString[] ExpText = getValue(\"CustomeralsoOrderedtitle\").split(\",\", 2);\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:- Add to Cart button should be clicked in CustomeralsoOrdered table\");\r\n\t\ttry{\r\n\t\t\tList<WebElement> ele = listofelements(locator_split(\"imgitemCustomeralsoOrderedViewed\"));\r\n\t\t\t((JavascriptExecutor) driver).executeScript(\"arguments[0].click();\", ele.get(Integer.valueOf(ExpText[0])-1));\r\n\t\t\tSystem.out.println(\"Add to Cart button is clicked in CustomeralsoOrdered table\");\r\n\t\t\tReporter.log(\"PASS_MESSAGE:- Add to Cart button is clicked in CustomeralsoOrdered table\");\r\n\r\n\t\t}\r\n\t\tcatch(NoSuchElementException e){\r\n\t\t\tReporter.log(\"FAIL_MESSAGE:- Add to Cart button is not clicked in CustomeralsoOrdered table\");\r\n\t\t\tthrow new NoSuchElementException(\"The element with \"\r\n\t\t\t\t\t+ elementProperties.getProperty(\"imgitemCustomeralsoOrderedViewed\").toString()\r\n\t\t\t\t\t+ \" not found\");\r\n\t\t}\r\n\t}", "@Test\n public void bookAddedToWishlistSuccessfully() throws InterruptedException {\n //WebElement Books Link\n clickOnElement(By.xpath(\"//ul[@class='top-menu notmobile']//li[5]/a\"));\n\n //WebElement Position dropdown box\n selectByIndexFromDropDown(By.cssSelector(\"select#products-orderby\"),1);\n\n //Scroll down page\n windowScrollUpOrDown(0,500);\n sleepMethod(2000);\n\n //WebElement for wishlist button\n clickOnElement(By.xpath(\"//div[@class='item-grid']//div[1]//div[1]//div[2]//div[3]//div[2]//input[3]\"));\n\n String expectedTxt = \"The product has been added to your wishlist\";\n String actualTxt = getTextFromElement(By.xpath(\"//p[@class='content']\"));\n Assert.assertEquals(expectedTxt, actualTxt);\n }", "@Test\n public void testDAM31401001() {\n\n // Data preparation\n {\n clearAndCreateTestDataForBook();\n }\n // Index page\n DAM3IndexPage dam3IndexPage = new DAM3IndexPage(driver);\n\n TodoListPage todoListPage = dam3IndexPage.dam31401001Click();\n\n // Confirmation of database state before any update\n assertThat(todoListPage.getCompletedTodoCount(), equalTo(\"3\"));\n assertThat(todoListPage.getIncompletTodoCount(), equalTo(\"7\"));\n assertThat(todoListPage.getTotalTodoCount(), equalTo(\"10\"));\n\n todoListPage.setTodoTitleContent(\"T\");\n todoListPage.setCutOffDate(\"2016/12/30\");\n\n todoListPage = todoListPage.downloadCSVUsingResHndlr();\n // path of downloaded csv.\n String csvPath = todoListPage.getResultHandlerCSVPath();\n\n assertThat(csvPath.isEmpty(), is(false));\n\n // The data displayed as list is extracted form the CSV file and\n // sent back to the client side.\n assertThat(todoListPage.getCompletedTodoCount(), equalTo(\"3\"));\n assertThat(todoListPage.getIncompletTodoCount(), equalTo(\"7\"));\n assertThat(todoListPage.getTotalTodoCount(), equalTo(\"10\"));\n\n TodoDetailsPage todoDetailsPage = todoListPage.displayTodoDetail(\n \"0000000010\");\n\n assertThat(todoDetailsPage.getTodoTitle(), equalTo(\"Todo 10\"));\n assertThat(todoDetailsPage.getTodoID(), equalTo(\"0000000010\"));\n assertThat(todoDetailsPage.getTodoCategory(), equalTo(\"CA5\"));\n assertThat(todoDetailsPage.getTodoStatus(), equalTo(\"true\"));\n assertThat(todoDetailsPage.getTodoCreatedDate(), equalTo(\"2016/12/29\"));\n assertThat(todoDetailsPage.getTodoVersion(), equalTo(\"1\"));\n\n // Back to list page:\n todoListPage = todoDetailsPage.showTodoListPage();\n todoListPage.setTodoTitleContent(\"T\");\n todoListPage.setCutOffDate(\"2016/12/30\");\n\n todoListPage = todoListPage.downloadCSVUsingResHndlr();\n\n todoDetailsPage = todoListPage.displayTodoDetail(\"0000000001\");\n // assert all the properties of fetched record.\n assertThat(todoDetailsPage.getTodoTitle(), equalTo(\"Todo 1\"));\n assertThat(todoDetailsPage.getTodoID(), equalTo(\"0000000001\"));\n assertThat(todoDetailsPage.getTodoCategory(), equalTo(\"CA1\"));\n assertThat(todoDetailsPage.getTodoStatus(), equalTo(\"false\"));\n assertThat(todoDetailsPage.getTodoCreatedDate(), equalTo(\"2016/12/24\"));\n assertThat(todoDetailsPage.getTodoVersion(), equalTo(\"1\"));\n\n }", "@Test\n public void testDAM30902001() {\n // Data preparation\n {\n clearAndCreateTestDataForBook();\n }\n\n // Index page\n DAM3IndexPage dam3IndexPage = new DAM3IndexPage(driver);\n\n TodoListPage todoListPage = dam3IndexPage.dam30902001Click();\n\n // Confirmation of database state before batch update\n assertThat(todoListPage.getCompletedTodoCount(), equalTo(\"3\"));\n assertThat(todoListPage.getIncompletTodoCount(), equalTo(\"7\"));\n assertThat(todoListPage.getTotalTodoCount(), equalTo(\"10\"));\n\n // add one sample todo which has some unique title from those of the\n // above\n // this is used to have some unique combination satisfying the choose\n // element other branch\n // Open todo registration page\n TodoRegisterPage registerTodoPage = todoListPage.registerTodo();\n\n // input todo details\n registerTodoPage.setTodoId(\"0000000025\");\n registerTodoPage.setTodoCategory(\"CA2\");\n registerTodoPage.setTodoTitle(\"sample todo\");\n\n registerTodoPage.addTodo();\n\n webDriverOperations.displayPage(getPackageRootUrl());\n\n dam3IndexPage = new DAM3IndexPage(driver);\n\n todoListPage = dam3IndexPage.dam30102002Click();\n\n todoListPage.setTodoTitleContent(\"Todo 1\");\n\n todoListPage.setTodoCreationDate(\"2016-12-30\");\n\n todoListPage = todoListPage.chooseElementUsageSearch();\n\n // Confirm the todos when title is specified from the choose element\n\n // Confirmation of database state before batch update\n assertThat(todoListPage.getCompletedTodoCount(), equalTo(\"1\"));\n assertThat(todoListPage.getIncompletTodoCount(), equalTo(\"1\"));\n assertThat(todoListPage.getTotalTodoCount(), equalTo(\"2\"));\n\n webDriverOperations.displayPage(getPackageRootUrl());\n\n dam3IndexPage = new DAM3IndexPage(driver);\n\n todoListPage = dam3IndexPage.dam30102002Click();\n\n todoListPage.setTodoCreationDate(\"2016-12-30\");\n\n todoListPage = todoListPage.chooseElementUsageSearch();\n\n // Confirm the todos when title is not specified from the choose\n // element.\n // here it takes default value specified in otherwise tag of choose\n // (sample)\n\n // Confirmation of database state before batch update\n assertThat(todoListPage.getCompletedTodoCount(), equalTo(\"0\"));\n assertThat(todoListPage.getIncompletTodoCount(), equalTo(\"1\"));\n assertThat(todoListPage.getTotalTodoCount(), equalTo(\"1\"));\n }", "@Test\n public void testDAM31801002() {\n // Data preparation\n {\n clearAndCreateTestDataForBook();\n }\n\n // Index page\n DAM3IndexPage dam3IndexPage = new DAM3IndexPage(driver);\n\n TodoListPage todoListPage = dam3IndexPage.dam31801002Click();\n\n todoListPage.setTodoTitleContent(\"Todo 1\");\n\n todoListPage.setTodoCreationDate(\"2016/12/30\");\n\n todoListPage = todoListPage.searchUsingOverwrittenTypeAliasName();\n\n // Assert the todo record count from DB table\n assertThat(todoListPage.getCompletedTodoCount(), equalTo(\"1\"));\n assertThat(todoListPage.getIncompletTodoCount(), equalTo(\"1\"));\n assertThat(todoListPage.getTotalTodoCount(), equalTo(\"2\"));\n\n boolean isTodoPresent = todoListPage.isTodoDisplayed(\"0000000001\");\n assertThat(isTodoPresent, is(true));\n\n isTodoPresent = todoListPage.isTodoDisplayed(\"0000000010\");\n assertThat(isTodoPresent, is(true));\n\n // this todo does not meets the criteria.Hence not displayed.\n isTodoPresent = todoListPage.isTodoDisplayed(\"0000000002\");\n assertThat(isTodoPresent, is(false));\n }", "public void ClickOrderByItemLink(){\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:- OrderByItem Link should be clicked\");\r\n\t\ttry{\r\n\t\t\tsleep(1000);\r\n\t\t\twaitforElementVisible(returnByValue(getValue(\"OrderbyItemLinkText\")));\r\n\t\t\tclick(returnByValue(getValue(\"OrderbyItemLinkText\")));\r\n\t\t\twaitForPageToLoad(100);\r\n\t\t\tSystem.out.println(\"OrderByItem Link is clicked\");\r\n\t\t\tReporter.log(\"PASS_MESSAGE:- OrderByItem is clicked\");\r\n\t\t}\r\n\t\tcatch(Exception e){\r\n\t\t\tReporter.log(\"FAIL_MESSAGE:- OrderByItem Link is not clicked\");\r\n\t\t\tthrow new NoSuchElementException(\"The element with \"\r\n\t\t\t\t\t+ elementProperties.getProperty(getValue(\"OrderbyItemLinkText\")).toString().replace(\"By.\", \" \")\r\n\t\t\t\t\t+ \" not found\");\r\n\r\n\t\t}\r\n\r\n\t}", "@Test\n public void testDAM32001002() {\n // Index page\n DAM3IndexPage dam3IndexPage = new DAM3IndexPage(driver);\n\n OrderMB3PageListPage orderMB3PageListPage = dam3IndexPage\n .dam32001002Click();\n\n orderMB3PageListPage.checkITM0000001();\n\n orderMB3PageListPage = orderMB3PageListPage.clickItemCodeSearch();\n\n String expectedOrdeDetails = \"Order accepted, ITM0000001\\nITM0000002, Orange juice\\nNotePC, CTG0000001\\nCTG0000002, Drink\\nPC, dummy7\";\n\n // get the details of the specified order in a single string\n String actualOrderDetails = orderMB3PageListPage.getOrderDetails(7);\n\n assertThat(actualOrderDetails, is(expectedOrdeDetails));\n\n expectedOrdeDetails = \"Order accepted, ITM0000001, Orange juice, CTG0000001, Drink, dummy4\";\n actualOrderDetails = orderMB3PageListPage.getOrderDetails(4);\n assertThat(actualOrderDetails, is(expectedOrdeDetails));\n }", "@Test\n public void seeInfoAboutItemAisleAfterAddingToList(){\n String itemTest = \"Potatoes\";\n String aisleCheck = \"Aisle: 2\";\n String aisleDescriptionCheck = \"Aisle Description: Between Aisle 1 and Frozen Aisle\";\n onView(withId(R.id.navigation_search)).perform(click());\n onView(withId(R.id.SearchView)).perform(typeText(itemTest));\n onData(anything()).inAdapterView(withId(R.id.myList)).atPosition(0).perform(click());\n onView(withText(\"ADD TO LIST\")).perform(click());\n onView(withId(R.id.navigation_list)).perform(click());\n onView(withId(R.id.item_list_recycler_view)).perform(RecyclerViewActions.actionOnItemAtPosition(3, click()));\n onView(withText(\"YES\")).perform(click());\n onView(withId(android.R.id.message)).check(matches(allOf(withSubstring(aisleCheck), isDisplayed())));\n onView(withId(android.R.id.message)).check(matches(allOf(withSubstring(aisleDescriptionCheck), isDisplayed())));\n }", "@Test (priority=1)\n\t\tpublic static void QuestionType1 () throws InterruptedException, IOException {\t\n\t\t SoftAssert assertion1 = new SoftAssert();\n\t\t FileInputStream finput = new FileInputStream(src);\n\t workbook = new HSSFWorkbook(finput);\n\t sheet= workbook.getSheetAt(0); //preview sheet\n\t for(int i=2; i<=sheet.getLastRowNum(); i++)\n\t {\t\n\t \tLogin();\t \t\n\t\t\t \tdriver.findElement(By.xpath(\"//*[@id=\\\"batch\\\"]\")).click(); //click new batch icon\n\t\t\t\tdriver.findElement(By.xpath(\"//*[contains(text(),'New Master')]\")).click(); //Click master batch icon\n\t\t\t//Fill basic details\n\t\t\t\tcell = sheet.getRow(i).getCell(1);\n\t\t cell.setCellType(Cell.CELL_TYPE_STRING);\n\t\t\t\tdriver.findElement(By.xpath(\"//*[@id=\\\"type_name\\\"]\")).sendKeys(cell.getStringCellValue());\n\t\t\t\tcell = sheet.getRow(i).getCell(2);\n\t\t cell.setCellType(Cell.CELL_TYPE_STRING);\n\t\t\t\tSelect templateCategory =new Select(driver.findElement(By.xpath(\"//*[@id=\\\"type_category\\\"]\")));\n\t\t\t\ttemplateCategory.selectByVisibleText(cell.getStringCellValue());\n\t\t\t\tcell = sheet.getRow(i).getCell(3);\n\t\t cell.setCellType(Cell.CELL_TYPE_STRING);\n\t\t\t\tSelect templateType =new Select(driver.findElement(By.xpath(\"//*[@id=\\\"template_type\\\"]\")));\n\t\t\t\ttemplateType.selectByVisibleText(cell.getStringCellValue());\n\t\t\t\tcell = sheet.getRow(i).getCell(4);\n\t\t cell.setCellType(Cell.CELL_TYPE_STRING);\n\t\t\t\tdriver.findElement(By.xpath(\"//*[@id=\\\"type_purpose\\\"]\")).clear();\n\t\t\t\tdriver.findElement(By.xpath(\"//*[@id=\\\"type_purpose\\\"]\")).sendKeys(cell.getStringCellValue());\n\t\t\t\tcell = sheet.getRow(i).getCell(5);\n\t\t cell.setCellType(Cell.CELL_TYPE_STRING);\n\t\t\t\tdriver.findElement(By.xpath(\"//*[@id=\\\"type_document\\\"]\")).clear();\n\t\t\t\tdriver.findElement(By.xpath(\"//*[@id=\\\"type_document\\\"]\")).sendKeys(cell.getStringCellValue());\n\t\t\t\t//save\n\t\t\t\tdriver.findElement(By.xpath(\"//*[@id=\\\"masterSave\\\"]\")).click();\n\t\t\t\t//upload assert\n\t\t\t\tcell = sheet.getRow(i).getCell(6);\n\t\t cell.setCellType(Cell.CELL_TYPE_STRING);\n\t\t\t\tdriver.findElement(By.xpath(\"//*[@id=\\\"type_name1\\\"]\")).sendKeys(cell.getStringCellValue()); //enter assert master record name\n\t\t\t\tThread.sleep(5000);\n\t\t\t\t\n\t\t\t\tString file = \"//home//s4cchinpc105//Desktop//ZImage//download1.jpeg\";\n\t\t\t\tdriver.findElement(By.xpath(\"//*[@id=\\\"asset_files\\\"]\")).sendKeys(file); //upload file\n\t\t\t\tThread.sleep(3000);\n\t\t\t\tWebElement uploadedfile1 = driver.findElement(By.xpath(\"//*[@id=\\\"assetTable\\\"]/tr[1]/td/label\"));\n\t\t\t\tString uploadedfile1text = uploadedfile1.getText();\n\t\t\t\tString expectuploadedfile1text = \"download1.jpeg\";\n\t\t\t\t//assertion1.assertEquals(expectuploadedfile1text, uploadedfile1text); \n\t\t\t\tThread.sleep(3000);\n\t\t \t\tdriver.findElement(By.xpath(\"//*[@id=\\\"fileSave\\\"]\")).click(); // click continue\n\t\t \t\tThread.sleep(3000);\n\t\t\t \t\t\n\t\t\t\t//Form Builder - single input\n\t\t\t driver.findElement(By.xpath(\"//img[contains(@src,'/Survey-portlet/images/Add question icon.svg')]\")).click();\n\t\t\t Thread.sleep(5000);\n\t\t\t driver.findElement(By.xpath(\"//*[@class=\\\"svd_toolbox_item svd-light-border-color svdToolboxItem svd_toolbox_item_icon-text\\\"]\")).click(); //single input\n\t\t\t Thread.sleep(5000);\n\t\t\t driver.findElement(By.xpath(\"//*[@class=\\\"sv_qstn question_actions svd_question svd-dark-bg-color svd_q_design_border svd_q_selected svd-main-border-color\\\"]/div[3]/question-actions/div/span\")).click(); //click properties icon \n\t\t\t Thread.sleep(6000);\n\t ((JavascriptExecutor)driver).executeScript(\"arguments[0].scrollIntoView();\", driver.findElement(By.xpath(\"//span[contains(text(), 'Title')]/parent::td/parent::tr/td[2]/div/div[2]/input\")));\n\t cell = sheet.getRow(i).getCell(7);\n\t\t cell.setCellType(Cell.CELL_TYPE_STRING);\n\t\t\t driver.findElement(By.xpath(\"//span[contains(text(), 'Title')]/parent::td/parent::tr/td[2]/div/div[2]/input\")).sendKeys(cell.getStringCellValue());\n\t\t\t \n\t\t\t //Form Builder - dropdown\n\t\t\t driver.findElement(By.xpath(\"//img[contains(@src,'/Survey-portlet/images/Add question icon.svg')]\")).click();\n\t\t\t Thread.sleep(5000);\n\t\t\t driver.findElement(By.xpath(\"//span[contains(text(),'Dropdown')]\")).click(); //Dropdown\n\t\t\t Thread.sleep(5000);\n\t\t\t driver.findElement(By.xpath(\"//*[@class=\\\"sv_qstn question_actions svd_question svd-dark-bg-color svd_q_design_border svd_q_selected svd-main-border-color\\\"]/div[3]/question-actions/div/span\")).click(); //click properties icon \n\t\t\t Thread.sleep(6000);\n\t ((JavascriptExecutor)driver).executeScript(\"arguments[0].scrollIntoView();\", driver.findElement(By.xpath(\"//span[contains(text(), 'Title')]/parent::td/parent::tr/td[2]/div/div[2]/input\")));\n\t cell = sheet.getRow(i).getCell(8);\n\t\t cell.setCellType(Cell.CELL_TYPE_STRING);\n\t\t\t driver.findElement(By.xpath(\"//span[contains(text(), 'Title')]/parent::td/parent::tr/td[2]/div/div[2]/input\")).sendKeys(cell.getStringCellValue());\n\t\t\t Thread.sleep(5000);\n\n\t\t\t //Form Builder - dynamic matrix\n\t \t\tdriver.findElement(By.xpath(\"//img[contains(@src,'/Survey-portlet/images/Add question icon.svg')]\")).click();\n\t \t\tThread.sleep(5000);\n\t \t\tdriver.findElement(By.xpath(\"//span[contains(text(),'Matrix (dynamic rows)')]\")).click(); //Matrix (dynamic rows)\n\t\t\t Thread.sleep(5000);\n\t \t\tdriver.findElement(By.xpath(\"//*[@class=\\\"sv_qstn question_actions svd_question svd-dark-bg-color svd_q_design_border svd_q_selected svd-main-border-color\\\"]/div[3]/question-actions/div/span[1]/img\")).click(); //click properties icon\n\t \t\t((JavascriptExecutor)driver).executeScript(\"arguments[0].scrollIntoView();\", driver.findElement(By.xpath(\"//span[contains(text(), 'Title')]/parent::td/parent::tr/td[2]/div/div[2]/input\")));\n\t cell = sheet.getRow(i).getCell(9);\n\t\t cell.setCellType(Cell.CELL_TYPE_STRING);\n\t\t\t driver.findElement(By.xpath(\"//span[contains(text(), 'Title')]/parent::td/parent::tr/td[2]/div/div[2]/input\")).sendKeys(cell.getStringCellValue());\n\t\t\t Thread.sleep(5000);\n\n\t\t\t //Add second page\n\t\t\t driver.findElement(By.xpath(\"//*[@title=\\\"Add New Page\\\"]\")).click(); \n\t\t\t\t\n\t\t\t//Form Builder - rating\n\t\t \tdriver.findElement(By.xpath(\"//img[contains(@src,'/Survey-portlet/images/Add question icon.svg')]\")).click();\n\t\t \tThread.sleep(5000);\n\t\t \tdriver.findElement(By.xpath(\"//span[contains(text(),'Rating')]\")).click(); //Rating\t\t\n\t\t \tThread.sleep(5000);\n\t\t \tdriver.findElement(By.xpath(\"//*[@class=\\\"sv_qstn question_actions svd_question svd-dark-bg-color svd_q_design_border svd_q_selected svd-main-border-color\\\"]/div[3]/question-actions/div/span\")).click(); //click properties icon\n\t\t \t((JavascriptExecutor)driver).executeScript(\"arguments[0].scrollIntoView();\", driver.findElement(By.xpath(\"//span[contains(text(), 'Title')]/parent::td/parent::tr/td[2]/div/div[2]/input\")));\n\t cell = sheet.getRow(i).getCell(10);\n\t\t cell.setCellType(Cell.CELL_TYPE_STRING);\n\t\t\t driver.findElement(By.xpath(\"//span[contains(text(), 'Title')]/parent::td/parent::tr/td[2]/div/div[2]/input\")).sendKeys(cell.getStringCellValue());\n\t\t\t Thread.sleep(5000);\n\n\t\t\t//Form Builder - matrix single choice\n\t\t \tdriver.findElement(By.xpath(\"//img[contains(@src,'/Survey-portlet/images/Add question icon.svg')]\")).click();\n\t\t \tThread.sleep(5000);\n\t\t \tdriver.findElement(By.xpath(\"//*[@class=\\\"svd_toolbox_item svd-light-border-color svdToolboxItem svd_toolbox_item_icon-matrix\\\"]/span[2]\")).click(); //single choice\n\t\t\t Thread.sleep(5000);\n\t\t \tdriver.findElement(By.xpath(\"//*[@class=\\\"sv_qstn question_actions svd_question svd-dark-bg-color svd_q_design_border svd_q_selected svd-main-border-color\\\"]/div[3]/question-actions/div/span\")).click(); //click properties icon\n\t\t \t((JavascriptExecutor)driver).executeScript(\"arguments[0].scrollIntoView();\", driver.findElement(By.xpath(\"//span[contains(text(), 'Title')]/parent::td/parent::tr/td[2]/div/div[2]/input\")));\n\t cell = sheet.getRow(i).getCell(11);\n\t\t cell.setCellType(Cell.CELL_TYPE_STRING);\n\t\t\t driver.findElement(By.xpath(\"//span[contains(text(), 'Title')]/parent::td/parent::tr/td[2]/div/div[2]/input\")).sendKeys(cell.getStringCellValue());\n\t\t\t Thread.sleep(5000);\n\n\t\t\t driver.findElement(By.xpath(\"//*[@id=\\\"saveSurvey\\\"]\")).click(); //save\n\t \tThread.sleep(5000); \n\t \t\n\t\t ((JavascriptExecutor)driver).executeScript(\"arguments[0].scrollIntoView();\", driver.findElement(By.xpath(\"//*[contains(text(), 'Complete')]\"))); \n\t\t\t driver.findElement(By.xpath(\"//*[contains(text(), 'Complete')]\")).click(); //complete\n\t\t\t Thread.sleep(5000);\n\t\t\n\t\t\t String thirdques = driver.findElement(By.xpath(\"//*[@class=\\\"sv_p_root\\\"]/div[4]/div/div/h5/span[3]\")).getText();\n\t\t String expectthirdques = \"Dynamic Matrix Question\";\n\t\t AssertJUnit.assertEquals(expectthirdques, thirdques); \n\t\t\n\t\t Thread.sleep(6000);\n\t\t ((JavascriptExecutor)driver).executeScript(\"arguments[0].scrollIntoView();\", driver.findElement(By.xpath(\"//*[@id=\\\"surveyElement\\\"]/div/form/div[2]/div/div[4]/input[2]\")));\n\t \n\t\t driver.findElement(By.xpath(\"//*[@id=\\\"surveyElement\\\"]/div/form/div[2]/div/div[4]/input[2]\")).click(); //click next\n\t\t Thread.sleep(5000);\n\t\t String fifthques = driver.findElement(By.xpath(\"//*[@class=\\\"sv_p_root\\\"]/div[3]/div/div/h5/span[3]\")).getText();\n\t\t String expectfifthques = \"Single Matrix Question\";\n\t\t AssertJUnit.assertEquals(expectfifthques, fifthques); \n\t\t assertion1.assertAll();\n\t\t \t\t\n\t\t driver.findElement(By.xpath(\"//*[@id=\\\"surveyElement\\\"]/div/form/div[2]/div/div[4]/input\")).click(); //click previous\n\t\t \tThread.sleep(2000);\n\t\t \tClose();\n\t }\n\t }", "@Test\n public void testDAM32101001() {\n // Index page\n DAM3IndexPage dam3IndexPage = new DAM3IndexPage(driver);\n\n OrderMB3ListPage orderMB3ListPage = dam3IndexPage.dam32101001Click();\n\n String expectedOrdeDetails = \"Order accepted, ITM0000001, Orange juice, CTG0000001, Drink, dummy1\";\n\n // get the details of the specified order in a single string\n String actualOrderDetails = orderMB3ListPage.getOrderDetails(1);\n\n // confirm the details of the order fetched from various tables\n assertThat(actualOrderDetails, is(expectedOrdeDetails));\n\n orderMB3ListPage.setItemCode(\"ITM0000001\");\n\n orderMB3ListPage = orderMB3ListPage.fetchRelatedEntity();\n\n // Expected related entity category details\n String expRelatedEntityDet = \"CTG0000001, Drink\";\n\n String actRelatedEntityDet = orderMB3ListPage\n .getRelatedEntityCategoryDeatils(1);\n\n // confirmed realted entity details\n assertThat(actRelatedEntityDet, is(expRelatedEntityDet));\n\n }", "@Test(dependsOnMethods = {\"login\"})\n\tpublic void searchItem() {\n\t\thome.searchItem(data.readData(\"searchItem\"));\n\t\t// generating random number from total search result display using random number generator\n\t\tint index=data.randomeNum(getElementsCount(By.id(home.selectItem)));\n\t\t// storing title and price of searched item from search screen to verify later\n\t\ttitle= home.getTitle(index);\n\t\tprice=home.getPrice(index);\n\t\telementByIndex(By.id(home.selectItem), index).click();\n\t\twaitForElement(By.xpath(item.review));\n\t\t//Scrolling till we see addtocart button\n\t\tscrollPage();\n\t\tboolean actual = elementDisplay(By.xpath(item.addToCar));\n\t\tAssert.assertEquals(actual, true,\"Add to cart button not display\");\n\t}", "@Test(groups = \"regression\")\n\t public void product()throws Throwable{\n\t ExcelUtility eLib = new ExcelUtility();\n\t String Pname1 = eLib.getExcelData(\"Product\", 8, 2);\n\t String Pname2 = eLib.getExcelData(\"Product\", 8, 3)+ JavaUtility.getRanDomNum();\n\t String Unit = eLib.getExcelData(\"Product\", 8, 4);\n\t String Qtys = eLib.getExcelData(\"Product\", 8, 5);\n\t String Qtyu = eLib.getExcelData(\"Product\", 8, 6);\n\t String Reorder = eLib.getExcelData(\"Product\", 8, 7);\n\t String Group = eLib.getExcelData(\"Product\", 8, 8);\n\t String Qtyd = eLib.getExcelData(\"Product\", 8, 9);\n\t\n\t /*step 3 : navigate to Products Page*/\n\n\t driver.findElement(By.xpath(\"//a[text()='Products']\")).click();\n\t /*step 4 : navigate to create Product Page*/\n\t List <WebElement> noofrows = driver.findElements(By.xpath(\"//table[@class=\\\"lvt small\\\"]/tbody/tr\")); \n\t //selecting existing product from the table. \n\t int rownum = noofrows.size();\t \n\t List <WebElement> element = driver.findElements(By.xpath(\"//a[@title=\\\"Products\\\"]\")); \n\t for (int i = 0; i<element.size();i++) \n\t {\n\t\t if(element.get(i).getText().equalsIgnoreCase(Pname1)) \n\t\t {\n\t\t\t element.get(i).click();\n\n\t\t\t break;\n\t\t }\n\n\t }\n\t //clickicg on edit option.\n\t driver.findElement(By.xpath(\"//input[@name=\\\"Edit\\\"]\")).click();\n\n\t //clearing old name and entering new name.\n\t driver.findElement(By.xpath(\"//input[@name='productname']\")).clear();\n\t driver.findElement(By.xpath(\"//input[@name='productname']\")).sendKeys(Pname2);\n\t //selecting unit to be used.\n\t WebElement dd = driver.findElement(By.xpath(\"//select[@name=\\\"usageunit\\\"]\"));\n\t wLib.select(dd,Unit);\n\t //\t\t\t\n\t //clearing texboxes and entering new data.\n\t driver.findElement(By.xpath(\"//input[@id=\\\"qtyinstock\\\"]\")).clear();\n\t driver.findElement(By.xpath(\"//input[@id=\\\"qtyinstock\\\"]\")).sendKeys(Qtys); \n\t driver.findElement(By.xpath(\"//input[@id=\\\"qty_per_unit\\\"]\")).clear();\n\t driver.findElement(By.xpath(\"//input[@id=\\\"qty_per_unit\\\"]\")).sendKeys(Qtyu);\n\t driver.findElement(By.xpath(\"//input[@id=\\\"reorderlevel\\\"]\")).clear();\n\t driver.findElement(By.xpath(\"//input[@id=\\\"reorderlevel\\\"]\")).sendKeys(Reorder);\n\t //selecting group from dropdown\n\t driver.findElement(By.xpath(\"//input[@value=\\\"T\\\"]\")).click();\n\t WebElement dd1 = driver.findElement(By.xpath(\"//select[@name=\\\"assigned_group_id\\\"]\"));\n\t wLib.select(dd1, Group);\n\n\t //updating quantity in demand.\n\t driver.findElement(By.xpath(\"//input[@id=\\\"qtyindemand\\\"]\")).clear();\n\t driver.findElement(By.xpath(\"//input[@id=\\\"qtyindemand\\\"]\")).sendKeys(Qtyd);\n\t //saving the changes by clicking save button.\n\t driver.findElement(By.xpath(\"//input[@title=\\\"Save [Alt+S]\\\"]\")).click();\n\n\t /*step 5: verify*/\n\t String actSuccessFullMsg = driver.findElement(By.xpath(\"//span[@class='lvtHeaderText']\")).getText();\n\t if(actSuccessFullMsg.contains(Pname2)) {\n\t\t System.out.println(Pname2 + \"==>Product editd successfully==>PASS\");\n\t }else {\n\t\t System.out.println(Pname2 + \"==>Product not Edited ==>Fail\");\n\n\t } \n }", "@Test\n public void testDAM32001001() {\n // Index page\n DAM3IndexPage dam3IndexPage = new DAM3IndexPage(driver);\n\n // This call brings te order details from various tables into single entity using join\n OrderMB3ListPage orderMB3ListPage = dam3IndexPage.dam32001001Click();\n\n // Expected order details\n // the string is of the format\n // ORDER STATUS NAME, ITEM CODE, ITEM NAME, CATEGORY CODE, CATEGORY NAME, MEMO\n String expectedOrdeDetails = \"Order accepted, ITM0000001, Orange juice, CTG0000001, Drink, dummy1\";\n\n // get the details of the specified order in a single string\n String actualOrderDetails = orderMB3ListPage.getOrderDetails(1);\n\n // confirm the details of the order fetched from various tables\n assertThat(actualOrderDetails, is(expectedOrdeDetails));\n\n // confirmation for some more order details....\n\n expectedOrdeDetails = \"Stock checking, ITM0000002, NotePC, CTG0000002, PC, \";\n actualOrderDetails = orderMB3ListPage.getOrderDetails(2);\n assertThat(actualOrderDetails, is(expectedOrdeDetails));\n\n expectedOrdeDetails = \"Item Shipped, ITM0000003, Car, CTG0000003, Hot selling, dummy3\";\n actualOrderDetails = orderMB3ListPage.getOrderDetails(3);\n assertThat(actualOrderDetails, is(expectedOrdeDetails));\n\n expectedOrdeDetails = \"Order accepted, ITM0000001, Orange juice, CTG0000001, Drink, dummy4\";\n actualOrderDetails = orderMB3ListPage.getOrderDetails(4);\n assertThat(actualOrderDetails, is(expectedOrdeDetails));\n }", "@Test\n public void checkListView(){\n //assert awaiting approval view\n View awaitingApprovalView = solo.getView(\"awaiting_approval\");\n assertTrue(solo.waitForText(\"Awaiting Approval\",1,2000));\n //Check for list of awaiting approvals\n View awaitingApprovalListView = solo.getView(\"books_awaiting_list\");\n //click on list of borrowed books\n solo.clickOnView(awaitingApprovalListView);\n solo.assertCurrentActivity(\"Wrong Activity\", Host.class);\n\n\n }", "@Test\n public void rentClientMatch() throws UiObjectNotFoundException {\n device.findObject(new UiSelector().resourceId(Utils.PACKAGE_NAME_PREFIX + \"btn_create_post\")).click();\n device.findObject(new UiSelector().resourceId(Utils.PACKAGE_NAME_PREFIX + \"lbl_rental_client\")).click();\n device.findObject(new UiSelector().resourceId(Utils.PACKAGE_NAME_PREFIX + \"txt_name\")\n .childSelector(new UiSelector().className(Utils.EDIT_TEXT_CLASS))).setText(\"Icon Windsor Rent\");\n device.findObject(new UiSelector().resourceId(Utils.PACKAGE_NAME_PREFIX + \"dd_configuration\")).click();\n device.findObject(By.text(\"3 BHK\")).click();\n clickButton(device);\n device.wait(Until.findObject(By.text(\"No\")), 2000);\n device.findObject(By.text(\"No\")).click();\n device.findObject(new UiSelector().resourceId(Utils.PACKAGE_NAME_PREFIX + \"dd_furnishing\")).click();\n device.findObject(By.text(\"Fully-Furnished\")).click();\n clickButton(device);\n device.findObject(new UiSelector().resourceId(Utils.PACKAGE_NAME_PREFIX + \"txt_pricing\")\n .childSelector(new UiSelector().index(1))).click();\n device.findObject(By.text(\"2\")).click();\n device.findObject(By.text(\"5\")).click();\n device.findObject(By.text(\"0\")).click();\n device.findObject(By.text(\"0\")).click();\n device.findObject(By.text(\"0\")).click();\n clickButton(device);\n device.wait(Until.findObject(By.text(\"Building Names\")), 2000);\n device.findObject(By.text(\"ADD BUILDING\")).click();\n device.findObject(new UiSelector().resourceId(Utils.PACKAGE_NAME_PREFIX + \"input_search\")).setText(\"Icon\");\n device.wait(Until.findObject(By.text(\"Icon Windsor Park\")), 10000);\n device.findObject(By.text(\"Icon Windsor Park\")).click();\n clickButton(device);\n UiScrollable postView = new UiScrollable(new UiSelector().scrollable(true));\n UiSelector postSelector = new UiSelector().text(\"POST\");\n postView.scrollIntoView(postSelector);\n device.findObject(postSelector).click();\n device.wait(Until.findObject(By.text(\"POST\").enabled(true)), 10000);\n String matchNameString = device.findObject(By.textContains(\"matches\")).getText().split(\" \")[0];\n device.findObject(By.text(\"POST\")).click();\n device.wait(Until.findObject(By.text(\"RENTAL CLIENT\")), 9000);\n Assert.assertNotEquals(\"Test Case Failed...No Match found\", \"no\", matchNameString.toLowerCase());\n String postMatchName = device.findObject(new UiSelector().resourceId(Utils.PACKAGE_NAME_PREFIX + \"lbl_name\")).getText();\n Assert.assertEquals(\"Test Case Failed...Match should have had been found with\", \"dialectic test\", postMatchName.toLowerCase());\n\n device.findObject(new UiSelector().resourceId(Utils.PACKAGE_NAME_PREFIX + \"btn_close\")).click();\n Utils.markPostExpired(device);\n }", "public static WebElement check_btnAddedIsSeen_selectedPdtChkbxHidden(Read_XLS xls, String sheetName, int rowNum, \r\n \t\tList<Boolean> testFail) throws Exception{\r\n \ttry{\r\n\r\n\t\t\t// Verify all chkbx those are odd number \r\n\t\t\tList<WebElement> chkbx = driver.findElements(\r\n\t\t\t\t\tBy.xpath(\"//*[contains(@class, 'majorPP_check')]//input[@type='checkbox']\"));\r\n\t\t\tfor(int i=1; i<chkbx.size(); i=i+2){\r\n\t\t\t\t\r\n\t\t \t//\tString btnAddedToBasket = driver.findElement(\r\n\t\t \t//\t\t\tBy.xpath(\"//*[contains(@class, 'mt5')]//a[contains(text(),'Added to Basket')]\")).getText();\r\n\t\t \tString btnAdded = driver.findElement(\r\n\t\t \t\t\tBy.xpath(\"//*[contains(@class, 'majorPP_funR')]//a[contains(text(),'Added')]\")).getText();\r\n\t\t \tAdd_Log.info(\"Print button text ::\" + btnAdded);\r\n\t\t \t\r\n\t\t \tBoolean isChkbxHidden = driver.findElement(\r\n\t\t \t\t\tBy.xpath(\"//*[contains(@class, 'majorPP_check')]//input[@type='checkbox']\")).isDisplayed();\r\n\t\t \tAdd_Log.info(\"Does chkbx still available ::\" + isChkbxHidden);\r\n\t\t \t\t \t\t\r\n\t\t \tif(btnAdded.equals(\"Added\") && isChkbxHidden == false){\r\n\t\t \t\tAdd_Log.info(\"Button value is changed from 'Add' to 'Added'.\");\r\n\t\t \t\tAdd_Log.info(\"Chkbx of those selected products are removed\");\r\n\t\t \t\tSuiteUtility.WriteResultUtility(\r\n\t\t \t\t\t\txls, sheetName, Constant.COL_PDT_INQ_ADDED_TO_BASKET_EXISTS, rowNum, Constant.KEYWORD_PASS);\r\n\t\t \t\tSuiteUtility.WriteResultUtility(\r\n\t\t \t\t\t\txls, sheetName, Constant.COL_PDT_INQ_CHKBX_REMOVED, rowNum, Constant.KEYWORD_PASS);\r\n\t\t \t}else{\r\n\t\t \t\tAdd_Log.info(\"Button value is NOT changed from 'Add' to 'Added'.\");\r\n\t\t \t\tAdd_Log.info(\"Chkbx of those selected products are NOT removed\");\r\n\t\t \t\tSuiteUtility.WriteResultUtility(\r\n\t\t \t\t\t\txls, sheetName, Constant.COL_PDT_INQ_ADDED_TO_BASKET_EXISTS, rowNum, Constant.KEYWORD_FAIL);\r\n\t\t \t\tSuiteUtility.WriteResultUtility(\r\n\t\t \t\t\t\txls, sheetName, Constant.COL_PDT_INQ_CHKBX_REMOVED, rowNum, Constant.KEYWORD_FAIL);\r\n\t\t \t\ttestFail.set(0, true);\r\n\t\t \t}\r\n\t\t\t}\r\n\r\n \t}catch(Exception e){\r\n \t\tthrow(e);\r\n \t}\r\n \treturn element;\r\n }", "@Test (groups = {\"smokeTest\"})\n public void checkTheStatusOfItem() {\n purchases.switchTab(\"Incoming Products\");\n List<WebElement> statusValues = $$(byXpath(\"//td[@class='o_data_cell o_readonly_modifier']\"));\n int totalNumOfStatusValues = statusValues.size();\n //System.out.println(\"The total number of status values: \" + totalNumOfStatusValues);\n int counter =0;\n for (WebElement statusValue : statusValues) {\n String statusText=statusValue.getText();\n counter++;\n Assert.assertTrue((statusText.equals(\"Available\")||statusText.equals(\"Waiting Availability\")) && (!statusText.isEmpty()), \"The status of an item is not displayed.\");\n }\n //System.out.println(\"The number of status values found by counter: \" + counter);\n Assert.assertEquals(totalNumOfStatusValues, counter, \"The total number of status values doesn't match with counter.\");\n\n\n }", "@Test\n public void testDAM30603001() {\n // Data preparation\n {\n clearTestDataForBook();\n }\n\n // Index page\n DAM3IndexPage dam3IndexPage = new DAM3IndexPage(driver);\n\n TodoListPage todoListPage = dam3IndexPage.dam30603001Click();\n\n todoListPage = todoListPage.batchRegister();\n\n String cntOfRegisteredTodo = todoListPage\n .getCountOfBatchRegisteredTodos();\n\n assertThat(cntOfRegisteredTodo, equalTo(\n \"Total Todos Registered/Updated in Batch : 10\"));\n\n assertThat(todoListPage.getCompletedTodoCount(), equalTo(\"5\"));\n assertThat(todoListPage.getIncompletTodoCount(), equalTo(\"5\"));\n assertThat(todoListPage.getTotalTodoCount(), equalTo(\"10\"));\n\n // confirm for some todos as present and some as not present.\n boolean isTodoPresent = todoListPage.isTodoDisplayed(\"0000000001\");\n assertThat(isTodoPresent, is(true));\n\n isTodoPresent = todoListPage.isTodoDisplayed(\"0000000005\");\n assertThat(isTodoPresent, is(true));\n\n isTodoPresent = todoListPage.isTodoDisplayed(\"0000000010\");\n assertThat(isTodoPresent, is(true));\n\n isTodoPresent = todoListPage.isTodoDisplayed(\"0000000011\");\n assertThat(isTodoPresent, is(false));\n }", "@Test(priority=4)\n\t\tpublic void addToCart() throws Exception{\n//Calling method to get the unit prices of product and write to text file\n//'**********************************************************\n\t\t\tfor(String price: myWishlistPage.storeUnitPrices()){\n//'**********************************************************\n/*WriteData is the library class created to write data to text file\n * Created object of WriteData class and passed file name to create in specified location\n */\n//'**********************************************************\n\t\t\t\tWriteData writeData = new WriteData(\"unitprices\");\n\t\t\t\twriteData.writeTextToFile(price);\n\t\t\t}\t\t\n//'**********************************************************\n//Calling method to add product to cart and verifying the success toast\n//'**********************************************************\n\t\t\tmyWishlistPage.addToCart();\n\t\t\tThread.sleep(1500);\n\t\t\tAssert.assertTrue(myWishlistPage.isSuccessToastDisplayed(), \"Success message is not displayed\");\n\t\t\textentTest.log(LogStatus.PASS,\"Add to cart: Success message is displayed\");\n\t\t\tThread.sleep(3000);\n//'**********************************************************\n//Calling method to close the success toast\n//'**********************************************************\n\t\t\tmyWishlistPage.closeSuccessToast();\n\t\t\tThread.sleep(3000);\n//'**********************************************************\n//Verifying the success toast is closed or not\n//'**********************************************************\n\t\t\ttry{\n\t\t\tAssert.assertTrue(myWishlistPage.isSuccessToastDisplayed());\n\t\t\t}catch(org.openqa.selenium.NoSuchElementException e){\n\t\t\t\textentTest.log(LogStatus.PASS,\"Add to cart: Success Message is closed\");\n\t\t\t}\n//'**********************************************************\n//Calling method to remove product from the list and click on continue\n//'**********************************************************\n\t\t\tmyWishlistPage.removeProductFromWishlistAndContinue();\n\t\t\textentTest.log(LogStatus.PASS, \"Product is removed from the Wishlist\");\n\t\t}", "public static WebElement check_supplierServiceIconsAreMatching(Read_XLS xls, String sheetName, int rowNum,\r\n \t\tList<Boolean> testFail) throws Exception{\r\n \ttry{\r\n \t\tWebElement elementVerSupp = driver.findElement(By.xpath(\"//*[@id='___UI_trigger0_verifiedSupPop']/img\"));\r\n \t\tWebElement elementTradeShow = driver.findElement(By.xpath(\"//*[@id='___UI_trigger0_sfPop']/img\"));\r\n \t\tWebElement elementMagazine = driver.findElement(By.xpath(\"//*[@id='___UI_trigger0_eMagPop']/img\")); \r\n \t\tWebElement elementMajorCust = driver.findElement(By.xpath(\"//*[@id='___UI_trigger0_customerPop']/img\"));\r\n \t//\tWebElement elementOnlineStore = driver.findElement(By.xpath(\"//*[@id='___UI_trigger0_storeFrontPop']/img\"));\r\n \t\t\r\n \t\tBoolean isVerSuppIconExists = elementVerSupp.isDisplayed();\r\n \t\tBoolean isTradeShowIconExists = elementTradeShow.isDisplayed();\r\n \t\tBoolean isMagazineIconExists = elementMagazine.isDisplayed();\r\n \t\tBoolean isMajorCustIconExists = elementMajorCust.isDisplayed();\r\n \t//\tBoolean isOnlineStoreIconExists = elementOnlineStore.isDisplayed();\r\n \t\t\r\n \t\tAdd_Log.info(\"Is Verified Supplier icon displayed ::\" + isVerSuppIconExists);\r\n \t\tAdd_Log.info(\"Is Trade Show icon displayed ::\" + isTradeShowIconExists);\r\n \t\tAdd_Log.info(\"Is Magazine icon displayed ::\" + isMagazineIconExists);\r\n \t\tAdd_Log.info(\"Is Major Cust icon displayed ::\" + isMajorCustIconExists);\r\n \t//\tAdd_Log.info(\"Is Online Store icon displayed ::\" + isOnlineStoreIconExists);\r\n \t\t\r\n \t\tif(isVerSuppIconExists == true && isTradeShowIconExists == true && isMagazineIconExists == true){\r\n \t\t\tAdd_Log.info(\"Supplier service icons in Product KWS page are matching\");\r\n \t\t\tSuiteUtility.WriteResultUtility(\r\n \t\t\t\t\txls, sheetName, Constant.COL_SUPP_SERVICE_ICONS_MATCHING, rowNum, Constant.KEYWORD_PASS);\r\n \t\t}else{\r\n \t\t\tAdd_Log.info(\"Supplier service icons in Product KWS page are NOT matching\");\r\n \t\t\tSuiteUtility.WriteResultUtility(\r\n \t\t\t\t\txls, sheetName, Constant.COL_SUPP_SERVICE_ICONS_MATCHING, rowNum, Constant.KEYWORD_FAIL);\r\n \t\t\ttestFail.set(0, true);\r\n \t\t}\r\n \t}catch(Exception e){\r\n \t\tthrow(e);\r\n \t}\r\n \treturn element;\r\n }", "@Test(priority = 4)\n\tpublic void select() throws InterruptedException {\n\t\tThread.sleep(800);\t\t\n\t\tWebElement click = driver.findElement(By.xpath(\"/html/body/div[1]/div[3]/div/div/div/div/ul/li[2]/a\"));\n\t\tclick.click();\n\t\tSystem.out.println(click.getText());\n\n\t\tWebElement item = driver.findElement(By.xpath(\"/html/body/div[2]/div/div/div/div/div/div/div[11]/div/div[2]/div/div/div[1]/div\"));\n\t\titem.click();\n\t\tThread.sleep(800);\n\t\t\n\t\tWebElement data = driver.findElement(By.xpath(\"/html/body/div[2]/div/div/div/div/div/div/div[12]/div/div/div[2]/div[2]\"));\n\t\tdata.click(); \n\t\tSystem.out.println(data.getText());\n\t\t\n\t\tThread.sleep(1000);\n\t\tWebElement expandsize = driver.findElement(By.id(\"headingOne265\"));\n\t\texpandsize.click();\n\t\n\t\tThread.sleep(2000);\n\t\tWebElement expandextra = driver.findElement(By.id(\"heading265\"));\n\t\texpandextra.click();\n\t\t\n\t\tThread.sleep(2000);\n\t\tWebElement closeitem = driver.findElement(By.xpath(\"/html/body/div[2]/div/div/div/div/div/div/div[12]/div/div/div[1]/button\"));\n\t\tcloseitem.click();\n\n\t\tJavascriptExecutor js = (JavascriptExecutor) driver;\n\t\tjs.executeScript(\"window.scrollBy(0,-800)\");\n\n\t\t// *********** changing the language of digital menu ***********\n\n\t\tWebElement restaurantlanguage = driver.findElement(By.xpath(\"/html/body/div[1]/div[1]/div/div/div/div[1]/a\"));\n\t\trestaurantlanguage.click();\n\t\tThread.sleep(800);\n\t\tclosedialog();\n\t\tThread.sleep(1000);\n\t\tjs.executeScript(\"window.scrollBy(0,1500)\");\n\n\t\t// *********** downloading the App ***********\n\n/**\t\tThread.sleep(800);\n\t\tWebElement downloadapp = driver.findElement(By.xpath(\"/html/body/div[3]/div[1]/div/section/div/div[4]/a[2]/img\"));\n\t\tdownloadapp.click();\n**/\n\n\t}", "@Test\r\n\tpublic void randomTest() {\r\n\t\tItem item = new Item();\r\n\t\ttry {\r\n\t\t\tItem tempSet[] = item.getRandom(0);\r\n\t\t\tassertNotSame(tempSet.length, 0);\r\n\t\t} catch (SQLException e) {\r\n\t\t\tfail(\"Failed to execute search of random items: SQLException\");\r\n\t\t}\r\n\t}", "@Test\n\t public void testleadEdit() throws InterruptedException {\n\t\t List <WebElement> options = driver.findElement(By.id(\"tree_menu\")).findElements(By.className(\" close\"));\n\t\t System.out.println(\"The left pane has '\" + options.size() + \"' Options\");\t\t \n\t\t System.out.println(\"The option selected is:\" + options.get(7).getText());\n\t\t options.get(7).findElement(By.tagName(\"span\")).click();\n\t\t \n\t\t //Clicking on Edit Leads link\n\t\t System.out.println(\"Click on the '\" + driver.findElement(By.id(\"editLeads\")).getText() + \"' Link\" );\n\t\t driver.findElement(By.id(\"editLeads\")).click();\n\t\t \n\t\t //Verifying whether the required page is loaded or not\n\t\t System.out.println(\"Page loaded is:\" + driver.findElement(By.id(\"container\")).findElement(By.tagName(\"h1\")).getText());\n\t\t \n\t\t //Selecting no.of entries for the table\n\t\t driver.findElement(By.id(\"example_length\")).click();\n\t\t List <WebElement> entries = driver.findElement(By.name(\"example_length\")).findElements(By.tagName(\"option\"));\n\t\t Thread.sleep(4000);\n\t\t System.out.println(entries.size());\n\t\t Random r = new Random();\n\t\t int opt = r.nextInt(entries.size());\n\t\t entries.get(opt).click();\n\t\t System.out.println(\"No.of Entries selected for the page:\" + entries.get(opt).getText());\n\t\t \n\t\t //Verifying no.of leads in the page\n\t\t List <WebElement> leads = driver.findElement(By.id(\"example\")).findElement(By.tagName(\"tbody\")).findElements(By.tagName(\"tr\"));\n\t\t System.out.println(\"No. of leads in the Lead Edit Table:\" + leads.size());\n\t\t \n\t\t //Checking for the Track it and Edit buttons for each lead\n\t\t int edit=0, trackit=0;\n\t\t for(int i=0; i<leads.size(); i++) {\n\t\t\tif((leads.get(i).findElement(By.className(\"analyse\")).isEnabled()) && (leads.get(i).findElement(By.className(\"edit\")).isEnabled())) {\n\t\t\t edit++;\n\t\t\t trackit++;\n\t\t\t}\t \n\t\t }\n\t\t if((edit==leads.size()) && (trackit==leads.size()))\n\t\t\t System.out.println(\"Trackit and Edit buttons are enabled for all leads.\");\n\t\t \n\t\t //Validating the Track it button\n\t\t Random r1 = new Random();\n\t\t int opt1 = r1.nextInt(leads.size());\n\t\t leads.get(3).findElement(By.className(\"analyse\")).click();\n\t\t \n\t\t \n\t\t \n\t\t //Printing the details of the table\n\t\t String details = driver.findElement(By.tagName(\"table\")).findElement(By.tagName(\"tbody\")).getText();\n\t\t System.out.println(details);\n\t\t \n\t\t driver.findElement(By.id(\"editLeads\")).click();\n\t\t driver.findElement(By.name(\"example_length\")).findElements(By.tagName(\"option\")).get(3).click();\n\t\t sleep(5);\n\t\t driver.findElement(By.id(\"example\")).findElement(By.tagName(\"tbody\")).findElements(By.tagName(\"tr\")).get(opt1).findElement(By.className(\"edit\")).click();\n\t\t sleep(5);\n\t\t System.out.println(driver.findElement(By.cssSelector(\"span.ui-dialog-title\")).getText());\n\t\t \n\t\t \n\t \n\t \n\t \n\t }", "@Test\n public void booksArrangedInAscendingOrderAtoZ() throws InterruptedException {\n\n //WebElement Books Link\n clickOnElement(By.xpath(\"//ul[@class='top-menu notmobile']//li[5]/a\"));\n\n //WebElement Position dropdown box\n selectByIndexFromDropDown(By.cssSelector(\"select#products-orderby\"),1);\n sleepMethod(2000);\n\n //Scroll down page\n windowScrollUpOrDown(0,500);\n sleepMethod(2000);\n\n arrayListForEachLoopAssertEqualsForString(By.xpath(\"//div[@class='product-grid']//h2/a\"));\n\n }", "@Test\n public void testClickingOnStepLoadsCorrectStepDetails() {\n onView(ViewMatchers.withId(R.id.recipeRecyclerView))\n .perform(RecyclerViewActions.actionOnItemAtPosition(0,\n click()));\n\n //Click on a Step tab on Tab Layout\n onView(withText(\"Steps\")).perform(click());\n\n //Click on each of the item of steps recycle view and verify the detailed step description\n //this logic works for both phone and tablet\n for(int i=0;i<stepsOfNutellaPie.length;i++){\n\n onView(withId(R.id.stepRecyclerView)).perform(\n RecyclerViewActions.actionOnItemAtPosition(i,click()));\n\n //do below only for phone - landscape\n if(!phone_landscape){\n onView(withId(R.id.description))\n .check(matches(withStepDetailedDescription(detailedStepsOfNutellaPie[i])));\n }\n\n //do below only for phones and not tablet\n if(phone_landscape || phone_portrait){\n //go back to previous screen\n Espresso.pressBack();\n }\n }\n\n\n }", "@SuppressWarnings(\"resource\")\r\n\tpublic void Menu_Jobs() throws Exception{\r\n\t\t\t\t\r\n\t\twait = new WebDriverWait(driver,50); \r\n\t\twait.until(ExpectedConditions.visibilityOf(user_role.getAcceptCookies()));\r\n\t\tuser_role.getAcceptCookies().click();\r\n\t/*\r\n\t * Description :- This code Snippet checks the Menu items of Header navigation Menu from Array list. \r\n\t */\t\t \r\n\t\tList<WebElement> menuItems = driver.findElements(By.xpath(\"//ul[@class='tb-megamenu-nav nav level-0 items-5']/li\"));\r\n\t\t String[] expected = {\"JOBS\", \"TEFL\", \"TEACHER CERTIFICATION\", \"COURSES\", \"HIRE TEACHERS\"};\r\n\t\t \r\n\t\t\tfor (int i = 0; i < expected.length; i++) {\r\n\t\t\t String elementsValue = menuItems.get(i).getText();\r\n\t\t\t System.out.println(elementsValue);\r\n\t\t\t if (elementsValue.equals(expected[i])) {\r\n\t\t\t System.out.println(\"passed on: \" + menuItems);\r\n\t\t\t } else {\r\n\t\t\t System.out.println(\"failed on: \" + menuItems);\r\n\t\t\t }\r\n\t\t\t}\r\n\t/*\r\n\t * Description :- This code Snippet checks the Menu items of Header navigation Menu from Excel file. \r\n\t */\t\t\r\n\t\t\r\n\t\t/* FileInputStream file1 = new FileInputStream(\"C:\\\\Users\\\\sachinsehgal2\\\\Downloads\\\\MenuItems.xlsx\");\r\n\t\t @SuppressWarnings(\"resource\")\r\n\t\t XSSFWorkbook wbSh1 = null;\r\n\t\t wbSh1 = new XSSFWorkbook(file1);\r\n\t\t XSSFSheet SheetOne = wbSh1.getSheet(\"Sheet1\");\r\n\t\t int rowCount = SheetOne.getLastRowNum()-SheetOne.getFirstRowNum();\r\n\t\t \r\n\t\tList<WebElement> menuItemsExcel = driver.findElements(By.xpath(\"//ul[@class='tb-megamenu-nav nav level-0 items-5']/li\"));\r\n\t\t \r\n\t\tfor (int i = 0; i < rowCount+1; i++)\r\n\t\t{\r\n\t\t\tRow row= SheetOne.getRow(i);\r\n\t\t\t\r\n\t\t\tfor (int j = 0; j < row.getLastCellNum(); j++) {\r\n\t\t\t\t\r\n\t\t\t\trow.getCell(j).getStringCellValue();\r\n\t\t\t\tString elementsValue = menuItemsExcel.get(i).getText();\r\n\t\t\t\t\r\n\t\t\t\tif (elementsValue.equals(row.getCell(j).getStringCellValue())) {\r\n\t\t\t System.out.println(\"passed on: \" + menuItemsExcel);\r\n\t\t\t }\r\n\t\t\t\telse {\r\n\t\t\t System.out.println(\"failed on: \" + menuItemsExcel);\r\n\t\t\t }\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t\t}*/\r\n\t\t\t\t \r\n\t\t wait.until(ExpectedConditions.visibilityOf(user_role.getClickMenuJob()));\r\n\t\t user_role.getClickMenuJob().click();\r\n\t\t/*\r\n\t\t * Description :- This code Snippet checks the Menu items of Jobs from Array list. \r\n\t\t */\t\t\t \r\n\t\t List<WebElement> menuItemsJobs = driver.findElements(By.xpath(\"//ul[@class='tb-megamenu-subnav mega-nav level-1 items-6']/li\"));\r\n\t\t String[] expectedMenu = {\"Job Board\", \"Destinations\", \"Featured Programs\", \"Job Openings\", \"Teach in the US\",\"Community\"};\r\n\t\t System.out.println(expectedMenu.length);\r\n\t\t \r\n\t\t for (int a = 0; a < expectedMenu.length; a++) {\r\n\t\t\t String elementsValueJobs = menuItemsJobs.get(a).getText();\r\n\t\t\t System.out.println(elementsValueJobs);\r\n\t\t\t if (elementsValueJobs.equals(expectedMenu[a])) {\r\n\t\t\t System.out.println(\"passed on: \" + menuItemsJobs);\r\n\t\t\t } else {\r\n\t\t\t System.out.println(\"failed on: \" + menuItemsJobs);\r\n\t\t\t }\r\n\t\t\t}\r\n\t\t \r\n\t\t wait.until(ExpectedConditions.visibilityOf(user_role.getClickMenuJobBoard()));\r\n\t\t user_role.getClickMenuJobBoard().click();\r\n\t\t\r\n\t\t String ExpectedTitle = \"Teaching Jobs - Teaching Jobs Abroad - Overseas Jobs - International Teaching Jobs - Page 1\";\r\n\t\t softAssertion.assertTrue(ExpectedTitle.equals(driver.getTitle()), \"Title does not match\");\r\n\t\t \r\n\t\t wait.until(ExpectedConditions.visibilityOf(user_role.getClickMenuJob()));\r\n\t\t user_role.getClickMenuJob().click();\r\n\t\t \r\n\t\t wait.until(ExpectedConditions.visibilityOf(user_role.getClickMenuJobDestinations()));\r\n\t\t user_role.getClickMenuJobDestinations().click();\r\n\t\t \r\n\t\t if (user_role.getCheckCountriesTitle().getText().toString().contains(\"Countries\") ){\r\n\t\t\t\t\r\n\t\t\t System.out.println(\"Countries label in Destination sub menu is present \\n\");\r\n\t\t}\r\n\t\t \t\telse{\r\n\t\t\t \r\n\t\t\t System.out.println(\"Countries label in Destination sub menu is not present \\n\");\r\n\t\t }\r\n\t\t \t\t \r\n\t\t softAssertion.assertAll();\r\n \r\n\t}", "@Test\n\tpublic void testTaxinearu() throws Exception {\n\t\tAssert.assertTrue(Constant.TITLE.contains(driver.getTitle()));\n\t\tThread.sleep(5000);\n\t\tLog.info(\"TITLE IS MATCHED\");\n\n\t\t// click on the LOGIN./SIGNUP\n\t\tdriver.findElement(By.xpath(\"//*[@id='loginsignuplink']\")).click();\n\t\tThread.sleep(5000);\n\n\t\t// click on the SignUp\n\t\tdriver.findElement(By.id(\"btnSignup\")).click();\n\t\tThread.sleep(5000);\n int row=12;\n\t\t// passing value for firstName\n\t\tdriver.findElement(By.id(\"firstName\")).sendKeys(ExcelUtils.getCellData(row, 1, Constant.SHEET_NAME4));\n\t\t// passing value for second name\n\t\tdriver.findElement(By.id(\"lastName\")).sendKeys(ExcelUtils.getCellData(row, 2, Constant.SHEET_NAME4));\n\t\t// passing value for contact number\n\t\tdriver.findElement(By.id(\"contactNo\")).sendKeys(ExcelUtils.getCellData(row, 3, Constant.SHEET_NAME4));\n\t\t// passing value for email address\n\t\tdriver.findElement(By.id(\"emailId\")).sendKeys(ExcelUtils.getCellData(row, 4, Constant.SHEET_NAME4));\n\t\t// passing value for password\n\t\tdriver.findElement(By.id(\"password\")).sendKeys(ExcelUtils.getCellData(row, 5, Constant.SHEET_NAME4));\n\t\t// passing value for con pass\n\t\tdriver.findElement(By.id(\"confPassword\")).sendKeys(ExcelUtils.getCellData(row, 6, Constant.SHEET_NAME4));\n\t\t\n\t\t// selecting security question\n\t\tFunction.dropDown(driver, row, 7, Constant.SHEET_NAME4);\n\n\t\t// passing value for security question 1\n\t\tdriver.findElement(By.id(\"ans1\")).sendKeys(ExcelUtils.getCellData(row, 8, Constant.SHEET_NAME4));\n\n\t\t// selecting security question 2\n\t\tFunction.dropDown(driver, row, 9, Constant.SHEET_NAME4);\n\n\t\t// passing value for security question 2\n\t\tdriver.findElement(By.id(\"ans2\")).sendKeys(ExcelUtils.getCellData(row, 10, Constant.SHEET_NAME4));\n\n\t\t// click on the check box\n\t\tdriver.findElement(By.xpath(\"//html/body/div[3]/div/div/div/div[2]/div/form/div[11]/div/div/input\")).click();\n\n\t\tThread.sleep(2000);\n\n\t\t// click on the submit button ,so that we can check the errors\n\t\tdriver.findElement(By.id(\"btnUsrSignUp\")).click();\n\t\tThread.sleep(2000);\n\n\t\t// passing vaule of check to true\n\t\tcheck = true;\n\n\t}", "@Test\r\npublic void AT3() throws IOException \r\n{\r\n\t// driver initialisation\r\n\tdriver=Driver_Initialisation();\r\n\tPage_Object_Model o=new Page_Object_Model(driver);\r\n\to.getmobile().click();\r\n\tArrayList<String> list1=new ArrayList<String>();\r\n\tint count=0;\r\n\tint size=o.getnames().size();\r\n\t\r\n\t//fetching all the elements in the list\r\n\tfor(int i=0;i<size;i++)\r\n {\r\n \tString element=o.getnames().get(i).getText();\r\n \tlist1.add(element);\r\n \t\r\n }\r\n\t\r\n\t//Selecting option from drop down using select class\r\n Select s=new Select(o.getdropdown());\r\n s.selectByVisibleText(\"Name\");\r\n ArrayList<String> list2=new ArrayList<String>();\r\n for(int i=0;i<size;i++)\r\n {\r\n \tString element=o.getnames().get(i).getText();\r\n \tlist2.add(element);\r\n \t\r\n }\r\n \r\n //sorting the elements of list\r\n Collections.sort(list1);\r\n \r\n //validating whether the elements are matching or not after sorting\r\n for(int i=0;i<size;i++)\r\n {\r\n \t\r\n \tif(list1.get(i).equalsIgnoreCase(list2.get(i)))\r\n \t{\r\n \t\t count=count + 1;\r\n \t}\r\n }\r\n \r\n //verifying the count\r\n Assert.assertEquals(3, count);\r\n \r\n}", "public void DisplayBestSellerFromCollection() {\r\n\tSystem.out.println(\"Items under BestSeller SubMenu are :-\");\r\n System.out.println(\"\\n\"); \r\n\r\n\t\tdriver.findElement(By.xpath(\"/html/body/div[1]/header/div[2]/div/nav/div/ul/li[10]/span\")).click();\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\tWebDriverWait wait1 = new WebDriverWait(driver,30);\r\n\t\twait1.until(ExpectedConditions.visibilityOfElementLocated(By.xpath(\"/html/body/div[1]/header/div[2]/div/nav/div/ul/li[10]/div/div/ul/li[3]/div/a\")));\r\n\t\t\r\n\t\t\r\n\t\tList<WebElement> lst = driver.findElements(By.xpath(\"/html/body/div[1]/header/div[2]/div/nav/div/ul/li[10]/div/div/ul/li[3]/ul/li/a/span\"));\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\tfor(int i=0;i<7;i++)\r\n\t\t{\r\n\t\t\tSystem.out.println(lst.get(i).getText());\r\n\t\t\t\r\n\t\t\t\r\n\t\t}\r\n\t\tSystem.out.println(\"\\r\\n\"\r\n\t\t\t\t+ \"===============================================\");\r\n\t\t\r\n\t\t\r\n\t}", "@Test\n public void testDAM31801001() {\n // Data preparation\n {\n clearAndCreateTestDataForBook();\n }\n\n // Index page\n DAM3IndexPage dam3IndexPage = new DAM3IndexPage(driver);\n\n TodoListPage todoListPage = dam3IndexPage.dam31801001Click();\n\n todoListPage.setTodoTitleContent(\"Todo 1\");\n\n todoListPage.setTodoCreationDate(\"2016/12/30\");\n\n todoListPage = todoListPage.searchUsingClassTypeAlias();\n\n // Assert the todo record count from DB table\n assertThat(todoListPage.getCompletedTodoCount(), equalTo(\"1\"));\n assertThat(todoListPage.getIncompletTodoCount(), equalTo(\"1\"));\n assertThat(todoListPage.getTotalTodoCount(), equalTo(\"2\"));\n\n boolean isTodoPresent = todoListPage.isTodoDisplayed(\"0000000001\");\n assertThat(isTodoPresent, is(true));\n\n isTodoPresent = todoListPage.isTodoDisplayed(\"0000000010\");\n assertThat(isTodoPresent, is(true));\n\n // this todo does not meets the criteria.Hence not displayed.\n isTodoPresent = todoListPage.isTodoDisplayed(\"0000000002\");\n assertThat(isTodoPresent, is(false));\n }", "public void giftOverviewInitialPage(WebDriver driver) throws InvalidFormatException, InterruptedException\r\n\t{\r\n\t\ttry\r\n\t\t{\r\n\t\t\tExcelLib xllib = new ExcelLib();\r\n\t\t\t\r\n\t\t\trowCount= xllib.getRowCount(\"GiftOverview\");\r\n\t\t\tlog.info(\"*********************Gift Overview Logger Initialized***********************************************************************************************************************************************************************\");\r\n\t\t\tlog.info(\"Purchaser Email ||\"+\" Amount ||\" + \" Reason ||\" + \" Add Credits || \" + \" Subtract Credits || \" + \" Credit Status ||\" + \" First Name || \" + \" Last Name || \" + \" Credit Type || \" + \" Amount(Credited/Redeem) || \" + \" Sub Category || \" + \" Credit Time ||\" + \" Source\");\r\n\t \t\tlog.info(\"********************************************************************************************************************************************************************************************************************************\");\r\n\t\t\tfor (i = 1; i <= rowCount; i++) \r\n\t\t\t{\t\t\t\t\r\n\t\t\t\t//Reading View Edit Tickets values\r\n\t\t\t\tpurchaserEmail = xllib.getExcelData(\"GiftOverview\", i, 0);\r\n\t\t \t\tcode = xllib.getExcelData(\"GiftOverview\", i, 1);\r\n\t\t \t\t\r\n\t\t \t\t//Search criteria\r\n\t\t\t\tsearchCriteria(driver);\r\n\t\t\t\t\r\n\t\t \t\t//Calling gift Overview Actions method\r\n\t\t\t\trefundGiftActions(driver);\r\n\t\t \t\t\r\n\t\t\t\t//Calling clicking on go back link method\r\n\t\t\t\t//clickingOnGoBackLink(driver);\r\n\t\t\t\t\r\n\t\t \t\tif(verifyRefundStatus)\r\n\t\t\t\t{\r\n\t\t\t\t\tisTestPassed=\"PASS\";\r\n\t\t\t\t\txllib.writeToExcel(\"GiftOverview\", i, 2, isTestPassed);\r\n\t\t\t\t\txllib.writeToExcel(\"GiftOverview\", i, 3, membershipRefundID);\r\n\t\t\t\t\txllib.writeToExcel(\"GiftOverview\", i, 4, chargeID);\r\n\t\t\t\t\txllib.writeToExcel(\"GiftOverview\", i, 5, totalCashToRefund);\r\n\t\t\t\t\t\r\n\t\t\t\t\tif(verifyCreditsRefundID)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\txllib.writeToExcel(\"GiftOverview\", i, 6, creditsRefundID);\r\n\t\t\t\t\t}\r\n\t\t\t\t}else\r\n\t\t\t\t{\r\n\t\t\t\t\tisTestPassed=\"FAIL\";\r\n\t\t\t\t\txllib.writeToExcel(\"GiftOverview\", i, 2, isTestPassed);\r\n\t\t\t\t\txllib.writeToExcel(\"GiftOverview\", i, 3, isTestPassed);\r\n\t\t\t\t\txllib.writeToExcel(\"GiftOverview\", i, 4, isTestPassed);\r\n\t\t\t\t\txllib.writeToExcel(\"GiftOverview\", i, 5, isTestPassed);\r\n\t\t\t\t\txllib.writeToExcel(\"GiftOverview\", i, 6, isTestPassed);\r\n\t\t\t\t}\r\n\t\t\t }//End of FOR LOOP\r\n\t\t }catch(NullPointerException e)\r\n\t\t {\r\n\t\t\t e.printStackTrace();\r\n\t\t }\r\n\t}", "@Test\n\t public void quote() throws InterruptedException {\n\t\t List <WebElement> option = driver.findElement(By.id(\"tree_menu\")).findElements(By.className(\" close\"));\n\t\t System.out.println(\"The left pane has '\" + option.size() + \"' Options\");\n\t\t System.out.println(\"The option selected is:\" + option.get(5).getText());\n\t\t option.get(5).findElement(By.tagName(\"span\")).click();\n\t\t System.out.println(\"Click on the '\" + driver.findElement(By.id(\"quoteupload\")).getText() + \"' Link\" );\n\t\t driver.findElement(By.id(\"quoteupload\")).click();\n\t\t \n\t\t //Verifying whether the required page is loaded or not\n\t\t System.out.println(\"Page loaded is:\" + driver.findElement(By.id(\"container\")).findElement(By.tagName(\"h1\")).getText());\n\t\t \n\t\t if(driver.findElement(By.id(\"example_info\")).getText().equals(\"Showing 0 to 0 of 0 entries\"))\n\t\t\t System.out.println(driver.findElement(By.className(\"dataTables_empty\")).getText());\n\t\t \n\t\t else {\n\t\t\t //Verifying no.of leads in the page\n\t\t\t List <WebElement> leads = driver.findElement(By.id(\"example\")).findElement(By.tagName(\"tbody\")).findElements(By.tagName(\"tr\"));\n\t\t\t System.out.println(\"No. of leads in the Lead Edit Table:\" + leads.size());\n\t\t\t \n\t\t\t //Checking for the upload button for each lead\n\t\t\t int upload=0;\n\t\t\t for(int i=0; i<leads.size(); i++) {\n\t\t\t\tif(leads.get(i).findElement(By.className(\"upload\")).isEnabled()) {\n\t\t\t\t upload++;\n\t\t\t\t}\t \n\t\t\t }\n\t\t\t if(upload==leads.size()) \n\t\t\t\t System.out.println(\"Upload button is enabled for all \" + upload + \" leads.\");\n\t\t \n\t\t\t //Clicking on Upload button of a Lead opens a Quote Upload Page\n\t\t\t Random r = new Random();\n\t\t\t int opt = r.nextInt(leads.size());\n\t\t\t leads.get(opt).findElement(By.className(\"upload\")).click();\n\t\t\t sleep(5);\n\t\t\t System.out.println(driver.findElement(By.cssSelector(\"span.ui-dialog-title\")).getText());\n\t\t\t \n\t\t\t //Entering details to the fields in Quote Upload page\n\t\t\t driver.findElement(By.name(\"quotename\")).sendKeys(\"Quote Name\");\n\t\t\t driver.findElement(By.id(\"button\")).click();\n\t\t\t driver.findElement(By.name(\"quotedescription\")).sendKeys(\"Quote Description\");\n\t\t\t driver.findElement(By.id(\"button\")).click();\n\t\t\t driver.findElement(By.name(\"quote\")).sendKeys(\"E:\\\\abc2.txt\");\n\t\t\t \n\t\t\t //driver.findElement(By.id(\"button\")).click();\n\t\t\t Thread.sleep(4000);\n\t\t\t //Verifying the Success message displayed on the page after uploading the Proposal\n\t\t\t //System.out.println(driver.findElement(By.id(\"result_msg_div\")).findElement(By.className(\"success_msg\")).getText());\n\t\t\t \n\t\t\t //Closing the Quote Upload page\n\t\t\t driver.findElement(By.cssSelector(\"span.ui-button-icon-primary.ui-icon.ui-icon-closethick\")).click();\n\t\t\t \n\t\t\t sleep(3);\n\t\t\t//Collapsing Quote Uploads option\n\t\t\t driver.findElement(By.id(\"tree_menu\")).findElement(By.className(\" open\")).findElement(By.className(\" symbol-open\")).click();\n\t\t }\n\t\t \n\t }", "public void CRe4_987_988() throws Exception {\n\n\t\t// ----------IEC Admin Login------------//\n\t\tGlobalMethods.Admin_Login();\n\t\tWebElement Manage_IEC1 = GWait.Wait_GetElementByXpath(\"html/body/div[3]/div/div[2]/ul/li[4]/a\");\n\t\tManage_IEC1.click();\n\n\t\tWebElement Manage_IECMembers1 = GWait.Wait_GetElementByXpath(\"//li[4]/ul/li[7]/a\");\n\t\tManage_IECMembers1.click();\n\n\t\tFileInputStream fi1 = new FileInputStream(\"C:\\\\Selenium_Files\\\\Create4_v2\\\\CReATE4_Data.xls\");\n\t\tWorkbook wb1 = Workbook.getWorkbook(fi1);\n\t\tSheet r1 = wb1.getSheet(\"ManageIEC\");\n\t\tString IECMemList_data = r1.getCell(2, 124).getContents();\n\t\tString EditIECMemList_data = r1.getCell(3, 124).getContents();\n\t\tString AlertFirstName_data = r1.getCell(4, 124).getContents();\n\t\tString AlertLastName_data = r1.getCell(5, 124).getContents();\n\n\t\t// ----IEC members List----//\n\t\tWebElement IECMembers_Header = GWait.Wait_GetElementByXpath(\"//div[1]/div/div[2]/div[4]/h3\");\n\t\t// Assert.assertEquals(IECMembers_Header.getText(), IECMemList_data);\n\t\tif (IECMembers_Header.getText().equalsIgnoreCase(IECMemList_data)) {\n\t\t\tSystem.out.println(IECMembers_Header.getText().equalsIgnoreCase(IECMemList_data));\n\t\t} else {\n\t\t\tSystem.out.println(\"Test Fail IEC members List\");\n\t\t}\n\n\t\tWebElement IECMembers_EditLink = GWait.Wait_GetElementByCSS(\".fa.fa-edit\");\n\t\tIECMembers_EditLink.click();\n\n\t\t// ----Edit IEC members List----//\n\t\tWebElement IECMembers_EditHeader = GWait.Wait_GetElementByXpath(\"//div[4]/div/div[1]/div[2]/h3\");\n\t\tAssert.assertEquals(IECMembers_EditHeader.getText().trim(), EditIECMemList_data);\n\n\t\tFirstName_Clear.clear();\n\t\tMiddleName_Clear.clear();\n\t\tLastName_Clear.clear();\n\t\tEmp_Clear.clear();\n\t\tDOB_Clear.clear();\n\t\tConNum_Clear.clear();\n\t\tSelect Rtype = new Select(Depart_Clear);\n\t\tRtype.selectByVisibleText(\"Select department types\");\n\t\tSelect Rtype1 = new Select(Design_Clear);\n\t\tRtype1.selectByVisibleText(\"Select designation types\");\n\t\tDateOfTrainingSOP_Clear.clear();\n\t\tIssueDate_Clear.clear();\n\t\tDocumentGCP_Clear.clear();\n\t\tTitle_Clear.clear();\n\t\tDateOfTraingEthic_Clear.clear();\n\t\tUpdateBUtton.click();\n\n\t\t// ----Check Alert in edit IEC members List----//\n\n\t\tWebElement Alert_FirstName = GWait.Wait_GetElementByXpath(\"//div[2]/form/div[1]/div/div[1]/div/div/label\");\n\t\tAssert.assertEquals(Alert_FirstName.getText().trim(), AlertFirstName_data);\n\n\t\tWebElement Alert_LastName = GWait.Wait_GetElementByXpath(\"//div[2]/form/div[1]/div/div[3]/div/div/label\");\n\t\tAssert.assertEquals(Alert_LastName.getText().trim(), AlertLastName_data);\n\t\t\n\t\tWebElement LogOut = GWait.Wait_GetElementByCSS(\".logout\");\n\t\tLogOut.click();\n\t}", "public void testCase04_EditFavoriteToFavorite() {\n boolean find = false;\n float frequency = 0;\n int stationInList = 0;\n String preFavoritaFreq = \"\";\n ListView listView = (ListView) mFMRadioFavorite.findViewById(R.id.station_list);\n FMRadioTestCaseUtil.sleep(SLEEP_TIME);\n assertTrue((listView != null) && (listView.getCount() > 0));\n ListAdapter listAdapter = listView.getAdapter();\n int count = listView.getCount();\n for (int i = 0; i < count; i++) {\n int favoriateCount = 0;\n View view = listAdapter.getView(i, null, listView);\n TextView textView = (TextView) view.findViewById(R.id.lv_station_freq);\n String frequencyStr = textView.getText().toString();\n try {\n frequency = Float.parseFloat(frequencyStr);\n } catch (NumberFormatException e) {\n e.printStackTrace();\n }\n stationInList = (int) (frequency * CONVERT_RATE);\n boolean canAddTo = FMRadioStation.getStationCount(mFMRadioFavorite, FMRadioStation.STATION_TYPE_FAVORITE) < FMRadioStation.MAX_FAVORITE_STATION_COUNT;\n if (FMRadioStation.isFavoriteStation(mFMRadioFavorite, stationInList)) {\n favoriateCount += 1;\n preFavoritaFreq = frequencyStr;\n }\n // add to favoriate\n if (!FMRadioStation.isFavoriteStation(mFMRadioFavorite, stationInList) && canAddTo) {\n mSolo.clickLongOnText(frequencyStr);\n mSolo.clickOnText(FMRadioTestCaseUtil.getProjectString(mContext, R.string.add_to_favorite1, R.string.add_to_favorite));\n mInstrumentation.waitForIdleSync();\n InputMethodManager inputMethodManager = (InputMethodManager)mSolo.getCurrentActivity().getSystemService(Context.INPUT_METHOD_SERVICE);\n inputMethodManager.toggleSoftInput(0, 0);\n mSolo.clickOnButton(mContext.getString(R.string.btn_ok));\n mInstrumentation.waitForIdleSync();\n sleep(SLEEP_TIME);\n assertTrue(FMRadioStation.isFavoriteStation(mFMRadioFavorite, stationInList));\n // edit favoriate to exist favorite\n if (favoriateCount > 0) {\n mSolo.clickLongOnText(frequencyStr);\n mSolo.clickOnText(mContext.getString(R.string.contmenu_item_edit));\n EditText editText = (EditText) mSolo.getView(R.id.dlg_edit_station_name_text);\n mSolo.clearEditText(editText);\n mSolo.enterText(editText, preFavoritaFreq);\n mInstrumentation.waitForIdleSync();\n InputMethodManager inputMethodManager2 = (InputMethodManager)mSolo.getCurrentActivity().getSystemService(Context.INPUT_METHOD_SERVICE);\n inputMethodManager2.toggleSoftInput(0, 0);\n mSolo.clickOnButton(mContext.getString(R.string.btn_ok));\n mInstrumentation.waitForIdleSync();\n sleep(SLEEP_TIME);\n assertEquals(preFavoritaFreq, FMRadioStation.getStationName(mFMRadioFavorite, stationInList, FMRadioStation.STATION_TYPE_FAVORITE));\n break;\n }\n }\n }\n testCase03_DeleteFromFavorite();\n }", "@Test\n public void testDAM32102002() {\n // Index page\n DAM3IndexPage dam3IndexPage = new DAM3IndexPage(driver);\n\n OrderMB3ListPage orderMB3ListPage = dam3IndexPage.dam32102002Click();\n\n String expectedOrdeDetails = \"Order accepted, ITM0000001, Orange juice, CTG0000001, Drink, dummy1\";\n\n // get the details of the specified order in a single string\n String actualOrderDetails = orderMB3ListPage.getOrderDetails(1);\n\n // confirm the details of the order fetched from various tables\n assertThat(actualOrderDetails, is(expectedOrdeDetails));\n\n orderMB3ListPage.setItemCode(\"ITM0000001\");\n\n orderMB3ListPage = orderMB3ListPage.fetchRelatedEntityLazy();\n\n // Expected related entity category details\n String expRelatedEntityDet = \"CTG0000001, Drink\";\n\n String actRelatedEntityDet = orderMB3ListPage\n .getRelatedEntityCategoryDeatils(1);\n\n // confirmed realted entity details\n assertThat(actRelatedEntityDet, is(expRelatedEntityDet));\n }", "public void clickOnfirstSearchItem(){\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:- first item link should be clicked\");\r\n\t\ttry{\r\n\r\n\t\t\tclick(locator_split(\"ByeleSearchItems1\"));\r\n\t\t\twaitForPageToLoad(20);\r\n\t\t\tsleep(6000);\r\n\t\t\tSystem.out.println(\"first item link clicked\");\r\n\t\t\tReporter.log(\"PASS_MESSAGE:- first item link is clicked\");\r\n\t\t}\r\n\t\tcatch(Exception e){\r\n\t\t\tReporter.log(\"FAIL_MESSAGE:- first item link is not clicked\");\r\n\t\t\tthrow new NoSuchElementException(\"The element with \"\r\n\t\t\t\t\t+ elementProperties.getProperty(\"ByeleSearchItems1\").toString().replace(\"By.\", \" \")\r\n\t\t\t\t\t+ \" not found\");\r\n\r\n\t\t}\r\n\r\n\t}", "@Test\n public void testDAM30301001() {\n // Data preparation\n {\n clearAndCreateTestDataForBook();\n }\n\n // Index page\n DAM3IndexPage dam3IndexPage = new DAM3IndexPage(driver);\n\n TodoListPage todoListPage = dam3IndexPage.dam30301001Click();\n\n // Register a ToDo : Insert action\n TodoRegisterPage registerTodoPage = todoListPage.registerTodo();\n\n registerTodoPage.setTodoCategory(\"CA2\");\n registerTodoPage.setTodoId(\"0000000025\");\n registerTodoPage.setTodoTitle(\"Todo Insert Test\");\n\n // Call the insert operation\n TodoDetailsPage todoDetailsPage = registerTodoPage.addTodo();\n\n // assert all the properties of fetched record.\n assertThat(todoDetailsPage.getTodoTitle(), equalTo(\"Todo Insert Test\"));\n assertThat(todoDetailsPage.getTodoID(), equalTo(\"0000000025\"));\n assertThat(todoDetailsPage.getTodoCategory(), equalTo(\"CA2\"));\n assertThat(todoDetailsPage.getTodoStatus(), equalTo(\"In-Complete\"));\n assertThat(todoDetailsPage.getTodoCreatedDate(), equalTo(\"2016/12/28\"));\n // initial version is 0\n assertThat(todoDetailsPage.getTodoVersion(), equalTo(\"0\"));\n\n // Now update the title of the above todo\n webDriverOperations.displayPage(getPackageRootUrl());\n dam3IndexPage = new DAM3IndexPage(driver);\n todoListPage = dam3IndexPage.dam30301001Click();\n\n // Select Action\n TodoUpdatePage todoUpdatePage = todoListPage.updateTodo(\"0000000025\");\n\n assertThat(todoUpdatePage.getTodoTitle(), equalTo(\"Todo Insert Test\"));\n assertThat(todoUpdatePage.getTodoID(), equalTo(\"0000000025\"));\n assertThat(todoUpdatePage.getTodoCategory(), equalTo(\"CA2\"));\n assertThat(todoUpdatePage.getTodoStatus(), equalTo(\"false\"));\n assertThat(todoUpdatePage.getTodoCreatedDate(), equalTo(\"2016/12/28\"));\n\n todoUpdatePage.setTodoTitle(\":Update\");\n // Update action\n todoDetailsPage = todoUpdatePage.updateTodo();\n assertThat(todoDetailsPage.getTodoTitle(), equalTo(\n \"Todo Insert Test:Update\"));\n assertThat(todoDetailsPage.getTodoID(), equalTo(\"0000000025\"));\n assertThat(todoDetailsPage.getTodoCategory(), equalTo(\"CA2\"));\n assertThat(todoDetailsPage.getTodoStatus(), equalTo(\"false\"));\n assertThat(todoDetailsPage.getTodoCreatedDate(), equalTo(\"2016/12/28\"));\n // initial version is 0\n assertThat(todoDetailsPage.getTodoVersion(), equalTo(\"1\"));\n\n // Delete Action\n webDriverOperations.displayPage(getPackageRootUrl());\n dam3IndexPage = new DAM3IndexPage(driver);\n todoListPage = dam3IndexPage.dam30301001Click();\n\n todoUpdatePage = todoListPage.updateTodo(\"0000000025\");\n\n // delete action\n todoListPage = todoUpdatePage.deleteTodo();\n\n boolean isTodoPresent = todoListPage.isTodoDisplayed(\"0000000025\");\n\n assertThat(isTodoPresent, is(false));\n\n }", "public void clickFirstQviewbutton(){\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:- Qview First Buy button should be clicked\");\r\n\t\ttry{\r\n\r\n\t\t\t/*List<WebElement> eles=driver.findElements((locator_split(\"btnQview\")));\r\n\t\t\tSystem.out.println(eles.size());\r\n\t\t\teles.get(0).click();*/\r\n\r\n\t\t\tclick(locator_split(\"btnQview\"));\t\t\t\t\r\n\t\t\tSystem.out.println(\"Clicked on the First Buy button\");\r\n\t\t\tReporter.log(\"PASS_MESSAGE:- First Buy Button is clicked\");\r\n\t\t}\r\n\t\tcatch(Exception e){\r\n\t\t\tReporter.log(\"FAIL_MESSAGE:- Qview First Buy button is not clicked or Not Available\");\r\n\t\t\tthrow new NoSuchElementException(\"The element with\"\r\n\t\t\t\t\t+ elementProperties.getProperty(\"btnQview\")\r\n\t\t\t\t\t+ \" not found\");\r\n\r\n\t\t}\r\n\r\n\t}", "@Test\n\t public void sampleTest()\n\t {\n\t MobileElement el8 = (MobileElement) driver.findElementById(\"displ.mobydocmarathi.com:id/txtdocname\");\n\t el8.sendKeys(\"hari\");\n\t MobileElement el9 = (MobileElement) driver.findElementById(\"displ.mobydocmarathi.com:id/txtpname\");\n\t el9.click();\n\t el9.sendKeys(\"123\");\n\t MobileElement el10 = (MobileElement) driver.findElementById(\"displ.mobydocmarathi.com:id/checkBox1\");\n\t el10.click();\n\t MobileElement el11 = (MobileElement) driver.findElementById(\"displ.mobydocmarathi.com:id/button4\");\n\t el11.click();\n\t MobileElement el12 = (MobileElement) driver.findElementByAccessibilityId(\"Open drawer\");\n\t el12.click();\n\t MobileElement el13 = (MobileElement) driver.findElementById(\"displ.mobydocmarathi.com:id/txvw_title\");\n\t el13.click();\n\t MobileElement el14 = (MobileElement) driver.findElementByXPath(\"/hierarchy/android.widget.FrameLayout/android.widget.LinearLayout/android.widget.FrameLayout/android.widget.LinearLayout/android.widget.FrameLayout/android.support.v4.widget.DrawerLayout/android.widget.LinearLayout/android.widget.FrameLayout/android.widget.LinearLayout/android.widget.RelativeLayout[2]/android.support.v7.widget.RecyclerView/android.widget.FrameLayout[6]/android.widget.LinearLayout\");\n\t el14.click();\n\t }", "@Test\r\n\tpublic void questionTest() throws Throwable {\n\t\tString category=eUtil.getExcelData(\"smoke\", 1, 2);\r\n\t\tString subcategory=eUtil.getExcelData(\"smoke\", 1, 3);\r\n\t\tString question_title=eUtil.getExcelData(\"smoke\", 1, 4);\r\n\t\tString description=eUtil.getExcelData(\"smoke\", 1, 5);\r\n\t\tString expectedresult=eUtil.getExcelData(\"smoke\", 1, 6);\r\n\r\n\t\t//Navigate to QuestionPage\r\n\t\tQuestionsPage questionpage=new QuestionsPage(driver);\r\n\t\tquestionpage.questionPage(category, subcategory, question_title, description);\r\n\t\t\r\n\t\t//Verification\r\n\t\tString actual = questionpage.questionsLink();\r\n\t\tAssert.assertTrue(actual.contains(expectedresult));\r\n\t}", "@Test(priority = 8)\n @Parameters(\"browser\")\n public void TC08_VERIFY_BUTTON_TIEPTHEO(String browser) throws IOException {\n String excel_BtnTiepTheo = null;\n excel_BtnTiepTheo = global.Read_Data_From_Excel(excelPath,\"ELEMENTS\",7,2);\n if(excel_BtnTiepTheo == null){\n System.out.println(\"ERROR - Cell or Row No. is wrong.\");\n exTest.log(LogStatus.ERROR, \"ERROR - Cell or Row No. is wrong.\" );\n }\n // Locate element by Xpath\n WebElement ele_BtnTiepTheo = null;\n ele_BtnTiepTheo = global.Find_Element_By_XPath(driver, excel_BtnTiepTheo);\n if(ele_BtnTiepTheo == null){\n exTest.log(LogStatus.FAIL,\"::[\" + browser + \"]:: TC08 - Button Tiep theo is not displayed.\");\n } else {\n exTest.log(LogStatus.PASS,\"::[\" + browser + \"]:: TC08 - Button Tiep theo is displayed.\");\n }\n // Get text from Element.\n String textBtnTieptheo = \"Tiếp theo\";\n String textGetFromEle_BtnTieptheo = ele_BtnTiepTheo.getText();\n System.out.println(\"DEBUG --- \" + textGetFromEle_BtnTieptheo);\n if(textGetFromEle_BtnTieptheo != null && textGetFromEle_BtnTieptheo.equals(textBtnTieptheo)){\n exTest.log(LogStatus.PASS,\"::[\" + browser + \"]:: TC08.1 - Button Tiep theo is correct.\");\n } else {\n exTest.log(LogStatus.FAIL,\"::[\" + browser + \"]:: TC08.1 - Link Tao Tai Khoan is not correct.\");\n }\n }", "public ChosenItemPage rememberElementAndFindIt(){\n showxButton.click(); //делает выпадющее меню количества выбора показываемых товаров\n waitVisibilityOf(showx12Button); \n showx12Button.click(); //выбираем показывать по 12\n WebElement firstItem=results.get(0);\n waitVisibilityOf(firstItem);\n String name=firstItem.getText(); //name of the product in the first item\n\n Assert.assertEquals(\"Показывать по 12 не установлено\",\n \"Показывать по 12\", showx.getText());\n\n Stash.put(Stash.firstItemName, name); //remeber first item\n fillField(name,headerSearch);\n headerSearch.sendKeys(Keys.ENTER);\n return new ChosenItemPage();\n }", "public void ClickAddtoCartinFrequentlyBought(){\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:- Add to cart should be clicked in Frequently Bought\");\r\n\t\ttry{\r\n\t\t\tList<WebElement> ele = listofelements(locator_split(\"btnAddtoCartFrequentlybought\"));\r\n\t\t\tif(ele.size()>1){\r\n\t\t\t\tclick(ele.get(1));\r\n\t\t\t}else{\r\n\t\t\t\tclick(ele.get(0));\r\n\t\t\t}\r\n\t\t\tSystem.out.println(\"Add to cart is clicked in Frequently Bought\");\r\n\t\t\tReporter.log(\"PASS_MESSAGE:- Add to cart is clicked in Frequently Bought\");\r\n\t\t\tsleep(5000);\r\n\t\t}\r\n\t\tcatch(Exception e){\r\n\t\t\tReporter.log(\"FAIL_MESSAGE:- Add to cart is not clicked in Frequently Bought\");\r\n\t\t\tthrow new NoSuchElementException(\"The element with\"\r\n\t\t\t\t\t+ elementProperties.getProperty(\"btnAddtoCartFrequentlybought\")\r\n\t\t\t\t\t+ \" not found\");\r\n\r\n\t\t}\r\n\r\n\t}", "@Test\n public void myMeetingDetailsActivity_isLaunchedWhenWeClickOnAnItem() {\n // When perform a click on an item\n onView(withId(R.id.recyclerview)).perform(RecyclerViewActions.actionOnItemAtPosition(0, click()));\n // Then : MeetingDetailsActivity is launched\n onView(withId(R.id.activity_meeting_details));\n }", "@Test\n public void radioTest() throws InterruptedException {\n driver.get(\"http://practice.cybertekschool.com/radio_buttons\");\n List<WebElement> list = driver.findElements(By.name(\"sport\"));\n\n System.out.println(\"verify none of them selected by default\");\n System.out.println(list.size());\n //checking all the sport checkboxes are not checked\n for (int i = 0; i < list.size(); i++) {\n Assert.assertFalse(list.get(i).isSelected());\n }\n\n System.out.println(\"Start randomly selecting radio buttons\");\n\n //randomly clicking and verifying\n\n for (int q = 0; q < 5; q++) {\n\n Thread.sleep(5000);\n Random ran = new Random();\n int num = ran.nextInt(4);\n list.get(num).click();\n System.out.println(\"Selecting button number: \" + (num + 1));\n\n for (int i = 0; i < list.size(); i++) {\n if (i == num) {\n Assert.assertTrue(list.get(num).isSelected());\n } else {\n Assert.assertFalse(list.get(i).isSelected());\n }\n }\n\n }\n }", "@Test\n public void testDAM31001001() {\n // Data preparation\n {\n clearAndCreateTestDataForBook();\n }\n\n // Index page\n DAM3IndexPage dam3IndexPage = new DAM3IndexPage(driver);\n\n TodoListPage todoListPage = dam3IndexPage.dam31001001Click();\n\n // Confirmation of database state before any update\n assertThat(todoListPage.getCompletedTodoCount(), equalTo(\"3\"));\n assertThat(todoListPage.getIncompletTodoCount(), equalTo(\"7\"));\n assertThat(todoListPage.getTotalTodoCount(), equalTo(\"10\"));\n\n TodoRegisterPage todoRegisterPage = todoListPage.registerTodo();\n\n todoRegisterPage.setTodoCategory(\"CA3\");\n todoRegisterPage.setTodoId(\"0000001000\");\n todoRegisterPage.setTodoTitle(\"ESC Test1\");\n // add couple of todos for escape search operation.\n todoRegisterPage.addTodo();\n\n webDriverOperations.displayPage(getPackageRootUrl());\n dam3IndexPage = new DAM3IndexPage(driver);\n\n todoListPage = dam3IndexPage.dam31001001Click();\n\n // Confirmation of database state before batch update\n assertThat(todoListPage.getCompletedTodoCount(), equalTo(\"3\"));\n assertThat(todoListPage.getIncompletTodoCount(), equalTo(\"8\"));\n assertThat(todoListPage.getTotalTodoCount(), equalTo(\"11\"));\n\n todoRegisterPage = todoListPage.registerTodo();\n\n todoRegisterPage.setTodoCategory(\"CA4\");\n todoRegisterPage.setTodoId(\"0000000031\");\n todoRegisterPage.setTodoTitle(\"2 ESC Test\");\n todoRegisterPage.addTodo();\n\n webDriverOperations.displayPage(getPackageRootUrl());\n dam3IndexPage = new DAM3IndexPage(driver);\n\n todoListPage = dam3IndexPage.dam31001001Click();\n\n // Confirmation of database state after adding 1 todo\n assertThat(todoListPage.getCompletedTodoCount(), equalTo(\"3\"));\n assertThat(todoListPage.getIncompletTodoCount(), equalTo(\"9\"));\n assertThat(todoListPage.getTotalTodoCount(), equalTo(\"12\"));\n\n todoListPage.setTodoTitleContent(\"ESC\");\n\n // perform escape search\n todoListPage = todoListPage.escapeSearch();\n\n // Confirmation of todos retrieved satisfying the escape search criteria\n assertThat(todoListPage.getCompletedTodoCount(), equalTo(\"0\"));\n assertThat(todoListPage.getIncompletTodoCount(), equalTo(\"2\"));\n assertThat(todoListPage.getTotalTodoCount(), equalTo(\"2\"));\n\n // on sampling basis check the details of todo retrieved as a result of escape\n // search.\n TodoDetailsPage todoDetailsPage = todoListPage.displayTodoDetail(\n \"0000001000\");\n assertThat(todoDetailsPage.getTodoTitle(), equalTo(\"ESC Test1\"));\n assertThat(todoDetailsPage.getTodoID(), equalTo(\"0000001000\"));\n assertThat(todoDetailsPage.getTodoCategory(), equalTo(\"CA3\"));\n assertThat(todoDetailsPage.getTodoStatus(), equalTo(\"false\"));\n assertThat(todoDetailsPage.getTodoCreatedDate(), equalTo(\"2016/12/28\"));\n assertThat(todoDetailsPage.getTodoVersion(), equalTo(\"0\"));\n\n }", "@Test\n public void testDAM30503001() {\n\n // Data preparation\n {\n clearAndCreateTestDataForBook();\n }\n // Index page\n DAM3IndexPage dam3IndexPage = new DAM3IndexPage(driver);\n\n TodoListPage todoListPage = dam3IndexPage.dam30503001Click();\n\n // Assert the todo record count from DB table\n assertThat(todoListPage.getCompletedTodoCount(), equalTo(\"3\"));\n assertThat(todoListPage.getIncompletTodoCount(), equalTo(\"7\"));\n assertThat(todoListPage.getTotalTodoCount(), equalTo(\"10\"));\n\n boolean isTodoPresent = todoListPage.isTodoDisplayed(\"0000000002\");\n\n assertThat(isTodoPresent, is(true));\n\n todoListPage.setTodoTitleContent(\"Todo 1\");\n todoListPage.setTodoCreationDate(\"2016-12-30\");\n\n todoListPage = todoListPage.searchByCriteriaBean();\n\n // Assert the todo record count from DB table\n assertThat(todoListPage.getCompletedTodoCount(), equalTo(\"1\"));\n assertThat(todoListPage.getIncompletTodoCount(), equalTo(\"1\"));\n assertThat(todoListPage.getTotalTodoCount(), equalTo(\"2\"));\n\n isTodoPresent = todoListPage.isTodoDisplayed(\"0000000001\");\n assertThat(isTodoPresent, is(true));\n\n isTodoPresent = todoListPage.isTodoDisplayed(\"0000000010\");\n assertThat(isTodoPresent, is(true));\n\n // this todo does not meets the criteria.Hence not displayed.\n isTodoPresent = todoListPage.isTodoDisplayed(\"0000000002\");\n assertThat(isTodoPresent, is(false));\n\n }", "@Test\r\n\tpublic void test_9and10_DeleteItemFromWishList() throws Exception {\n\t\tdriver.findElement(By.name(\"submit.deleteItem\")).click();\r\n\t\tThread.sleep(3000);\r\n\t\t\r\n\t\t// check whether the item exists on g-items removed class\r\n\t\tboolean itemExists = false;\r\n\t\t\r\n\t\t// create an array of product titles under g-item-sortable removed\r\n\t\t// get the product title in this list and compare it with selected item\r\n\t\tList<WebElement> productTitles = driver.findElements(By.xpath(\"//div[@id='g-items']//div[@class = 'a-section a-spacing-none g-item-sortable g-item-sortable-removed']/div/div[1]\"));\r\n\t\tfor(WebElement productTitle : productTitles) {\r\n\t\t\t// compare selected item and any item in wish list\r\n\t\t\t// try to find selected item in the list of removed items\r\n\t\t\tString listedItem = productTitle.getText();\r\n\t\t\tif (listedItem.equals(selectedItem)) {\r\n\t\t\t\titemExists = true;\r\n\t\t\t\tSystem.out.println(selectedItem + \" is deleted from wish list\");\r\n\t\t\t\tAssert.assertTrue(itemExists);\t\r\n\t\t\t}\r\n\t\t}\r\n\t}", "@Test\n public void testDAM31304001() {\n\n // Data preparation\n {\n clearAndCreateTestDataForBook();\n }\n\n {\n webDriverOperations.click(id(\"dam31304001\"));\n }\n\n {\n assertThat(webDriverOperations.getText(id(\"getDateResult\")), is(\n \"2016-12-29\"));\n assertThat(webDriverOperations.getText(id(\"getDateClassResult\")),\n is(\"java.time.LocalDate\"));\n assertThat(webDriverOperations.getText(id(\n \"getObjectCertification\")), is(\"true\"));\n }\n }", "public void clickFavoritieslink(){\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:- Favorities Link should be clicked\");\r\n\t\ttry{\r\n\r\n\t\t\twaitForElement(locator_split(\"lnkFavorities\"));\r\n\t\t\tclick(locator_split(\"lnkFavorities\")); \r\n\t\t\tsleep(1000);\r\n\t\t\tReporter.log(\"PASS_MESSAGE:- Favorities Link is clicked\");\r\n\t\t\tSystem.out.println(\"Favourites link clicked\");\r\n\t\t}\r\n\t\tcatch(Exception e){\r\n\t\t\tReporter.log(\"FAIL_MESSAGE:- Favorities is not clicked \"+elementProperties.getProperty(\"lnkFavorities\"));\r\n\t\t\tthrow new NoSuchElementException(\"The element with \"\r\n\t\t\t\t\t+ elementProperties.getProperty(\"lnkFavorities\").toString().replace(\"By.\", \" \")\r\n\t\t\t\t\t+ \" not found\");\r\n\t\t}\r\n\t}", "@Test\n public void testDAM30901001() {\n // Data preparation\n {\n clearAndCreateTestDataForBook();\n }\n\n // Index page\n DAM3IndexPage dam3IndexPage = new DAM3IndexPage(driver);\n\n TodoListPage todoListPage = dam3IndexPage.dam30901001Click();\n\n // Confirmation of database state before batch update\n assertThat(todoListPage.getCompletedTodoCount(), equalTo(\"3\"));\n assertThat(todoListPage.getIncompletTodoCount(), equalTo(\"7\"));\n assertThat(todoListPage.getTotalTodoCount(), equalTo(\"10\"));\n\n todoListPage.selectCompleteStatRadio();\n\n todoListPage = todoListPage.ifElementUsageSearch();\n\n // Confirmation of database state before batch update\n assertThat(todoListPage.getCompletedTodoCount(), equalTo(\"3\"));\n\n // 1 and 3 todos are incomplete. hence not displayed\n boolean isTodoPresent = todoListPage.isTodoDisplayed(\"0000000003\");\n assertThat(isTodoPresent, is(false));\n\n isTodoPresent = todoListPage.isTodoDisplayed(\"0000000001\");\n assertThat(isTodoPresent, is(false));\n // 10 todo is complete. hence displayed.\n isTodoPresent = todoListPage.isTodoDisplayed(\"0000000010\");\n assertThat(isTodoPresent, is(true));\n\n // default value of finished is now false.hence todos like 1,3 will be displayed\n // where as todo like 10 will not be displayed.\n todoListPage.selectInCompleteStatRadio();\n todoListPage = todoListPage.ifElementUsageSearch();\n\n isTodoPresent = todoListPage.isTodoDisplayed(\"0000000003\");\n assertThat(isTodoPresent, is(true));\n\n isTodoPresent = todoListPage.isTodoDisplayed(\"0000000001\");\n assertThat(isTodoPresent, is(true));\n // 10 todo is complete. hence displayed.\n isTodoPresent = todoListPage.isTodoDisplayed(\"0000000010\");\n assertThat(isTodoPresent, is(false));\n\n // scenario when finished property of criteria is null.\n\n }", "public static WebElement check_btnAddedToBasketIsSeen(Read_XLS xls, String sheetName, int rowNum, \r\n \t\tList<Boolean> testFail) throws Exception{\r\n \ttry{ \t\t\r\n \t\t// 'Add to Basket' button\r\n \t//\tString beforeAddCart = driver.findElement(\r\n \t//\t\t\tBy.xpath(\"//*[contains(@class, 'mt5')]//a[contains(text(),'Add to Basket')]\")).getText();\r\n \t\t\r\n \t\t// 'Added to Basket' button\r\n \t\tString afterAddCart = driver.findElement(\r\n \t\t\t\tBy.xpath(\"//*[contains(@class, 'mt5')]//a[contains(text(),'Added to Basket')]\")).getText();\r\n \t\t\r\n \t\tif(afterAddCart.equals(\"Added to Basket\")){\r\n \t\t\tAdd_Log.info(\"Button value is changed from 'Add to Basket' to 'Added to Basket'.\");\r\n \t\t\tSuiteUtility.WriteResultUtility(\r\n \t\t\t\t\txls, sheetName, Constant.COL_PDT_INQ_ADDED_TO_BASKET_EXISTS, rowNum, Constant.KEYWORD_PASS);\r\n \t\t}else{\r\n \t\t\tAdd_Log.info(\"Button value is NOT changed from 'Add to Basket' to 'Added to Basket'.\");\r\n \t\t\tSuiteUtility.WriteResultUtility(\r\n \t\t\t\t\txls, sheetName, Constant.COL_PDT_INQ_ADDED_TO_BASKET_EXISTS, rowNum, Constant.KEYWORD_FAIL);\r\n \t\t\ttestFail.set(0, true);\r\n \t\t}\r\n \t}catch(Exception e){\r\n \t\tAdd_Log.error(\"Added to Basket button is NOT found on the page.\");\r\n \t\tthrow(e);\r\n \t}\r\n \treturn element;\r\n }", "@Test\n public void clickRecyclerViewItem_OpensDetailsActivity() throws InterruptedException {\n onView(allOf(isDisplayed(), withId(R.id.recycler_view)))\n .perform(RecyclerViewActions.actionOnItemAtPosition(0, click()));\n\n// onData(withId(R.id.recycler_view))\n// .perform(RecyclerViewActions.actionOnItemAtPosition(0, doubleClick()));\n\n onView(withId(R.id.title_tv)).check(ViewAssertions.matches(withText(RECIPE_NAME)));\n }", "@Test\n public void todoItemsOrderByStatusTest() throws InterruptedException {\n onView(withId(R.id.fabList)).perform(click());\n onView(withId(R.id.editTextName)).perform(click(), replaceText(\"To-Do List 1\"), closeSoftKeyboard());\n onView(withId(R.id.btnCreateList)).perform(click());\n onView(withId(R.id.recyclerView)).perform(RecyclerViewActions.actionOnItemAtPosition(TestUtils.getCountFromRecyclerView(R.id.recyclerView) - 1, new ClickOnRelativeList()));\n\n for (List<Integer> lInt : TestUtils.getStatusList()) {\n int lIntCount = 0;\n for (int i = 3; i >= 1; i--) {\n onView(withId(R.id.fabInner)).perform(click());\n onView(withId(R.id.editTextName)).perform(replaceText(i + \"_Name\"));\n onView(withId(R.id.editTextDescription)).perform(replaceText(i + \"_Description\"));\n onView(withId(R.id.editTextDeadline)).perform(replaceText(Utils.getCurrentDate()));\n onView(withId(R.id.btnCreateItem)).perform(click());\n if (lInt.get(lIntCount) == 1) {\n onView(withId(R.id.recyclerViewInner)).perform(RecyclerViewActions.actionOnItemAtPosition(lIntCount, new ClickOnCheckbox()));\n }\n lIntCount++;\n }\n // Click status item from menu on Toolbar\n onView(withId(R.id.menu_order_by)).perform(click());\n onView(withText(R.string.status)).perform(click());\n // Make thread sleep for 2 seconds so we could check whether it's true or not\n Thread.sleep(2000);\n for (int j = 0; j < 3; j++) {\n onView(withId(R.id.recyclerViewInner)).perform(RecyclerViewActions.actionOnItemAtPosition(0, new ClickOnImageDeleteItem()));\n onView(withId(R.id.btnYes)).perform(click());\n }\n }\n\n // Go back to FragmentTodoList\n Espresso.pressBack();\n // Delete To-Do list\n onView(withId(R.id.recyclerView)).perform(RecyclerViewActions.actionOnItemAtPosition(TestUtils.getCountFromRecyclerView(R.id.recyclerView) - 1, new ClickOnImageDeleteList()));\n onView(withId(R.id.btnYes)).perform(click());\n\n Thread.sleep(2000);\n\n }", "@Test(priority = 6)\n\tpublic void clickDrivingScore() throws Exception {\n\t\t\n\t\tdriver = DashboardPage.DrivingScore(driver);\n\t\t\n\t\t//ExcelUtils.setCellData(\"PASS\", 6, 1);\n\t\t\n\t}", "public static WebElement check_inqBasketCountMatch(Read_XLS xls, String sheetName, int rowNum, \r\n \t\tList<Boolean> testFail, int chkbxVerPdtSelected) throws Exception{\r\n \ttry{\r\n\t\t\tString countInqBasketVerPdt = driver.findElement(By.id(\"navcount\")).getText();\t\t\t\r\n\t\t\tint countInqBasketForVerPdt = Integer.parseInt(countInqBasketVerPdt.substring(1, countInqBasketVerPdt.length()-1));\t\t\r\n\t\t\tAdd_Log.info(\"Count beside Inquiry basket ::\" + countInqBasketForVerPdt);\t\t\t\r\n \t\t\r\n \t\tif(countInqBasketForVerPdt == chkbxVerPdtSelected){ \t\t\t\r\n \t\t\tAdd_Log.info(\"Count beside the 'Inquiry basket' in the Global navigation is tally with the number of products added.\");\r\n \t\t\tSuiteUtility.WriteResultUtility(\r\n \t\t\t\t\txls, sheetName, Constant.COL_INQ_BASKET_COUNT_MATCH, rowNum, Constant.KEYWORD_PASS);\r\n \t\t}else{\r\n \t\t\tAdd_Log.info(\"Count beside the 'Inquiry basket' in the Global navigation is NOT tally with the number of products added.\");\r\n \t\t\tSuiteUtility.WriteResultUtility(\r\n \t\t\t\t\txls, sheetName, Constant.COL_INQ_BASKET_COUNT_MATCH, rowNum, Constant.KEYWORD_FAIL);\r\n \t\t\ttestFail.set(0, true);\r\n \t\t} \r\n \t\t\r\n \t/*\tString inqBasketCount = driver.findElement(By.id(\"navcount\")).getText();\r\n\t\t\t// Ignore '(' and ')'\r\n\t\t\tint inqBasketCountNo = Integer.parseInt(inqBasketCount.substring(1, inqBasketCount.length()-1));\r\n\t\t\tAdd_Log.info(\"Count beside Inquiry basket ::\" + inqBasketCountNo);\t\t\t\r\n \t\t\r\n \t\tif(inqBasketCountNo == chkbxCount){\r\n \t\t\tAdd_Log.info(\"Count beside the 'Inquiry basket' in the Global navigation is tally with the number of products added.\");\r\n \t\t\tSuiteUtility.WriteResultUtility(\r\n \t\t\t\t\txls, sheetName, Constant.COL_INQ_BASKET_COUNT_MATCH, rowNum, Constant.KEYWORD_PASS);\r\n \t\t}else{\r\n \t\t\tAdd_Log.info(\"Count beside the 'Inquiry basket' in the Global navigation is NOT tally with the number of products added.\");\r\n \t\t\tSuiteUtility.WriteResultUtility(\r\n \t\t\t\t\txls, sheetName, Constant.COL_INQ_BASKET_COUNT_MATCH, rowNum, Constant.KEYWORD_FAIL);\r\n \t\t\ttestFail.set(0, true);\r\n \t\t}\t */ \r\n \t}catch(Exception e){\r\n \t\tthrow(e);\r\n \t}\r\n \treturn element;\r\n }", "public void execute(WebTestCase webTestCase) throws Exception {\r\n new MenuShareCommand().execute(webTestCase);\r\n \r\n webTestCase.gotoPage(\"menumineBuildRollUp.action\");\r\n \r\n webTestCase.assertTextPresent(\"Roll Up Checked Items As\");\r\n \r\n this.verifyNotAtTheStartPage(webTestCase);\r\n }", "@Test(priority = 10)\n\tpublic void clickFamilyShare() throws Exception {\n\t\t\n\t\tdriver = DashboardPage.FamilyShare(driver);\n\t\t\n\t\t//ExcelUtils.setCellData(\"PASS\", 10, 1);\n\t\t\n\t}", "@Test\n public void testDAM30802001() {\n // Data preparation\n {\n clearAndCreateTestDataForBook();\n }\n\n // Index page\n DAM3IndexPage dam3IndexPage = new DAM3IndexPage(driver);\n\n TodoListPage todoListPage = dam3IndexPage.dam30802001Click();\n\n // Confirmation of database state before batch update\n assertThat(todoListPage.getCompletedTodoCount(), equalTo(\"3\"));\n assertThat(todoListPage.getIncompletTodoCount(), equalTo(\"7\"));\n assertThat(todoListPage.getTotalTodoCount(), equalTo(\"10\"));\n\n // set date : the completed todos having creation date before this date would be deleted in batch\n todoListPage.setCutOffDate(\"2016-12-30\");\n\n todoListPage = todoListPage.batchDelete();\n\n String cntOfUpdatedTodo = todoListPage.getCountOfBatchRegisteredTodos();\n\n assertThat(cntOfUpdatedTodo, equalTo(\n \"Total Todos Registered/Updated in Batch : 3\"));\n\n // Confirmation of database state before batch update\n assertThat(todoListPage.getCompletedTodoCount(), equalTo(\"0\"));\n assertThat(todoListPage.getIncompletTodoCount(), equalTo(\"7\"));\n assertThat(todoListPage.getTotalTodoCount(), equalTo(\"7\"));\n }", "@Test\n public void testAdvancedSearchCategoryResult() throws InterruptedException {\n log.info(\"Go to Homepage \" );\n log.info(\"Click on Advanced Search link in footer \" );\n WebElement advancedSearchButton = driver.findElement(By.partialLinkText(\"Advanced Search\"));\n advancedSearchButton.click();\n WebElement searchCassette = driver.findElement(By.id(\"AdvancedSearchResults\")).findElement(By.tagName(\"input\"));\n WebElement searchButton = driver.findElement(By.id(\"AdvancedSearchResults\")).findElement(By.tagName(\"button\"));\n searchCassette.click();\n searchCassette.sendKeys(\"sculpture\");\n log.info(\"Click on search Button \" );\n searchButton.click();\n log.info(\"Identify the Category Card list in results\" );\n List<WebElement> productGrid = driver.findElements(By.tagName(\"a\"));\n List<WebElement> categoryItems = new ArrayList<WebElement>();\n for (WebElement prod : productGrid)\n if (prod.getAttribute(\"class\").contains(\"category-item\"))\n categoryItems.add(prod);\n TestCase.assertTrue(categoryItems.size() != 0);\n log.info(\"Click first Category Card in results\" );\n categoryItems.get(0).click();\n log.info(\"Confirm category type page is displayed in browser\" );\n TestCase.assertTrue(driver.getCurrentUrl().contains(\"-c-\"));\n }", "@Test\n public void testSearchBoxCategoriesList() throws InterruptedException {\n log.info(\"Go to Homepage \" );\n log.info(\"Go to Search Box in Header \" );\n log.info(\"Write urn \" );\n Actions builder = new Actions(driver);\n WebElement searchBox = driver.findElement(By.id(\"SearchInputs\")).findElement(By.tagName(\"input\"));\n searchBox.click();\n searchBox.sendKeys(\"urn\");\n WebElement categoryResults = driver.findElement(By.partialLinkText(\"category results\"));\n List<WebElement> categoryResultsList = driver.findElement(By.className(\"categories\")).findElements(By.tagName(\"a\"));\n WebDriverWait wait = new WebDriverWait(driver, 1000);\n wait.until(ExpectedConditions.elementToBeClickable(categoryResults));\n log.info(\"Click on first result from category suggestion list\" );\n categoryResultsList.get(0).click();\n log.info(\"Confirm that the link oppened contains searched term (urn in this case ) related results.\");\n assertTrue(driver.getCurrentUrl().contains(\"urn\"));\n }", "@Test\n public void completDataTes() throws Exception{\n mActivity.requestToNetwork();\n Thread.sleep(1000);\n onView(withId(R.id.graph_menu)).perform(click());\n onView(withId(R.id.graph_menu)).perform(click());\n Thread.sleep(1000);\n onView(withIndex(withId(R.id.image_item_clicks), 2)).perform(click());\n\n }", "@Test(priority=5)\n public void Test_header() throws InterruptedException, IOException {\n \t\n java.util.List<WebElement> links = driver.findElements(By.xpath(xPath_Hedaer_Links));\n\n\tSystem.out.println(links.size());\n\n\tfor (int i = 0; i<=links.size(); i=i+1)\n\n\t{\n\t\tSystem.out.println(links.get(i).getText());\n\t\t//links.get(i).click();\n\t\tThread.sleep(10000);\n\t\tWebDriverWait wait = new WebDriverWait(driver, 5);\n\t\twait.until(ExpectedConditions.presenceOfElementLocated(By.xpath(\"Add_New_Order\")));\n\t\tdriver.findElement(By.xpath(Add_New_Order)).click();\n\t\t\n\t}\n\t\n }", "public void VerifyRecapBillinfo(){\r\n\t\tString BillingName = getValue(\"FirstName\")+\" \"+getValue(\"LastName\");\r\n\t\tString Companyname = getValue(\"CompanyName\");\r\n\t\tString Address = getValue(\"Address\");\r\n\t\tString ZipCity = getValue(\"Zip\")+\" , \"+getValue(\"City\");\r\n\t\tString CardType= getValue(\"CardType\");\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:- shopping cart image link should be clicked\");\r\n\r\n\r\n\t\ttry{\r\n\t\t\tString[] BD=getWebTableData(locator_split(\"txtRecapBillinfo\"), locator_split(\"txtRecapBillinfodata\"));\r\n\t\t\tif(BD[1].equalsIgnoreCase(BillingName)&&BD[2].equalsIgnoreCase(Companyname)\r\n\t\t\t\t\t&&BD[3].equalsIgnoreCase(Address)&&BD[5].equalsIgnoreCase(ZipCity)\r\n\t\t\t\t\t&&BD[6].contains(CardType)){\r\n\t\t\t\tSystem.out.println(\"The data from Web matches with Excel Registration data\");\r\n\t\t\t\tReporter.log(\"PASS_MESSAGE:- The data from Web matches with Excel Registration data\");\r\n\t\t\t}\r\n\t\t\telse{\r\n\t\t\t\tReporter.log(\"FAIL_MESSAGE:- The data from Web dosent match with Excel Registration data\");\r\n\t\t\t\tthrow new Exception(\"The data from Web dosent match with Excel Registration data\");\r\n\t\t\t}\r\n\t\t}\r\n\t\tcatch(Exception e){\r\n\t\t\tReporter.log(\"FAIL_MESSAGE:- shopping cart image link is not clicked \");\r\n\t\t\tthrow new NoSuchElementException(\"The element with\"\r\n\t\t\t\t\t+ elementProperties.getProperty(\"txtRecapBillinfo\")\r\n\t\t\t\t\t+ elementProperties.getProperty(\"txtRecapBillinfodata\")\r\n\t\t\t\t\t+ \" not found\");\r\n\t\t}\r\n\r\n\t}", "@Test\n public void randomRecipeTest() {\n onView(withContentDescription(\"Open navigation drawer\")).perform(click());\n //Open the search bar at the top\n onView(withText(\"Find a Random Recipe!\")).perform(click());\n onView(withId(R.id.recipe_title)).check(matches(isDisplayed()));\n\n //Exit to the main activity\n pressBack();\n }", "@Test\n public void displayNthItemTest()\n throws NullPointerException, NoSuchElementException, TimeoutException, ElementNotVisibleException,\n StaleElementReferenceException {\n ArrayList<Integer> nthItems = new ArrayList();\n nthItems.add(3);\n nthItems.add(5);\n ArrayList<String> foodItems = fetchNthFoodItems(driver, nthItems);\n Assert.assertNotNull(foodItems, \"Food items are empty\");\n System.out.println(\"Nth Food item names \");\n System.out.println(\"**********************\");\n for (int idx = 0; idx < foodItems.size(); idx++) {\n System.out.println(nthItems.get(idx) + \" - Food item - \" + foodItems.get(idx));\n }\n }", "@Test\n public void addTheSameItemNameTwice() {\n //TODO 1,2\n onView(ViewMatchers.withId(pl.lizardproject.qe2017.R.id.registerButton)).perform(click());\n onView(ViewMatchers.withId(pl.lizardproject.qe2017.R.id.newUsernameEditText)).check(matches(isDisplayed()));\n\n //TODO 3,4,5,6\n onView(ViewMatchers.withId(pl.lizardproject.qe2017.R.id.newUsernameEditText)).perform(typeText(\"user\"));\n onView(ViewMatchers.withId(pl.lizardproject.qe2017.R.id.newPasswordEditText)).perform(typeText(\"pass\"));\n onView(ViewMatchers.withId(pl.lizardproject.qe2017.R.id.registerButton)).perform(click());\n onView(ViewMatchers.withId(pl.lizardproject.qe2017.R.id.fabAdd)).check(matches(isDisplayed()));\n\n //TODO 7,8,9,10,11,12\n onView(ViewMatchers.withId(pl.lizardproject.qe2017.R.id.fabAdd)).perform(click());\n onView(ViewMatchers.withId(pl.lizardproject.qe2017.R.id.newItemEditText)).check(matches(isDisplayed()));\n onView(ViewMatchers.withId(pl.lizardproject.qe2017.R.id.newItemEditText)).perform(typeText(\"buraki\"));\n onView(ViewMatchers.withId(pl.lizardproject.qe2017.R.id.category_spinner)).perform(click());\n onView(withText(\"other\")).perform(click());\n onView(ViewMatchers.withId(pl.lizardproject.qe2017.R.id.fabSave)).perform(click());\n\n //TODO 13,14,15,16,17,18\n onView(ViewMatchers.withId(pl.lizardproject.qe2017.R.id.fabAdd)).perform(click());\n onView(ViewMatchers.withId(pl.lizardproject.qe2017.R.id.newItemEditText)).check(matches(isDisplayed()));\n onView(ViewMatchers.withId(pl.lizardproject.qe2017.R.id.newItemEditText)).perform(typeText(\"buraki\"));\n onView(ViewMatchers.withId(pl.lizardproject.qe2017.R.id.priority_spinner)).perform(click());\n onView(withText(\"critical\")).perform(click());\n onView(ViewMatchers.withId(pl.lizardproject.qe2017.R.id.fabSave)).perform(click());\n\n //TODO 19\n onView(allOf(ViewMatchers.withId(pl.lizardproject.qe2017.R.id.text), withText(\"buraki\"), hasSibling(withText(\"Category: other\")))).check(matches(isDisplayed()));\n onView(allOf(ViewMatchers.withId(pl.lizardproject.qe2017.R.id.text), withText(\"buraki\"), hasSibling(withText(\"Priority: critical\")))).check(matches(isDisplayed()));\n }", "@Test\n public void testDAM30503002() {\n // Data preparation\n {\n clearAndCreateTestDataForBook();\n }\n\n // Index page\n DAM3IndexPage dam3IndexPage = new DAM3IndexPage(driver);\n TodoListPage todoListPage = dam3IndexPage.dam30503002Click();\n\n // Assert the todo record count from DB table\n assertThat(todoListPage.getCompletedTodoCount(), equalTo(\"3\"));\n assertThat(todoListPage.getIncompletTodoCount(), equalTo(\"7\"));\n assertThat(todoListPage.getTotalTodoCount(), equalTo(\"10\"));\n\n boolean isTodoPresent = todoListPage.isTodoDisplayed(\"0000000002\");\n\n assertThat(isTodoPresent, is(true));\n\n todoListPage.setTodoTitleContent(\"Todo 1\");\n todoListPage.setTodoCreationDate(\"2016-12-30\");\n\n todoListPage = todoListPage.searchByCriteriaBeanRetMap();\n\n // Assert the todo record count from DB table\n assertThat(todoListPage.getCompletedTodoCount(), equalTo(\"1\"));\n assertThat(todoListPage.getIncompletTodoCount(), equalTo(\"1\"));\n assertThat(todoListPage.getTotalTodoCount(), equalTo(\"2\"));\n\n isTodoPresent = todoListPage.isTodoDisplayed(\"0000000001\");\n assertThat(isTodoPresent, is(true));\n\n isTodoPresent = todoListPage.isTodoDisplayed(\"0000000010\");\n assertThat(isTodoPresent, is(true));\n\n // this todo does not meets the criteria.Hence not displayed.\n isTodoPresent = todoListPage.isTodoDisplayed(\"0000000002\");\n assertThat(isTodoPresent, is(false));\n }", "@Test\r\n\tpublic void testMethod() {\n\tdriver.get(\"http://localhost:8080/\");\r\n\t\r\n\t//Click on FIND OWNERS link\t\r\n\tWebElement find = driver.findElement(By.xpath(\"//li[3]\"));\r\n\tfind.click();\r\n\t\r\n\t//Click on Find Owner button\t\r\n\tWebElement findOwner = driver.findElement(By.className(\"btn-default\"));\r\n\tfindOwner.click();\r\n\r\n\t//Get the information of the owner\r\n\tString name = driver.findElement(By.xpath(\"//*[@id=\\\"vets\\\"]/tbody/tr[1]/td[1]\")).getText();\r\n\tString address = driver.findElement(By.xpath(\"//*[@id=\\\"vets\\\"]/tbody/tr[1]/td[2]\")).getText();\r\n\tString city = driver.findElement(By.xpath(\"//*[@id=\\\"vets\\\"]/tbody/tr[1]/td[3]\")).getText();\r\n\tString telephone = driver.findElement(By.xpath(\"//*[@id=\\\"vets\\\"]/tbody/tr[1]/td[4]\")).getText();\r\n\t\r\n\t//Click on an owner Name\r\n\tWebElement link = driver.findElement(By.xpath(\"//*[@id=\\\"vets\\\"]/tbody/tr[1]/td[1]\"));\r\n\tlink.click();\r\n\t//Assert that the Owner's table is displayed\r\n\tWebElement table = driver.findElement(By.className(\"table-striped\"));\r\n\tassertTrue(table.isDisplayed());\r\n\t\r\n\t//Assert that the returning owner information is the same of the expected one\r\n\t//Assert the name\r\n\tString nActualString = driver.findElement(By.xpath(\"/html/body/div/div/table[1]/tbody/tr[1]/td\")).getText();\r\n\tassertTrue(nActualString.equals(name));\r\n\t//Assert the address\r\n\tString aActualString = driver.findElement(By.xpath(\"/html/body/div/div/table[1]/tbody/tr[2]/td\")).getText();\r\n\tassertTrue(aActualString.equals(address));\r\n\t//Assert the city\r\n\tString cActualString = driver.findElement(By.xpath(\"/html/body/div/div/table[1]/tbody/tr[3]/td\")).getText();\r\n\tassertTrue(cActualString.equals(city));\r\n\t//Assert the telephone\r\n\tString tActualString = driver.findElement(By.xpath(\"/html/body/div/div/table[1]/tbody/tr[4]/td\")).getText();\r\n\tassertTrue(tActualString.equals(telephone));\r\n\t//Close the driver\r\n driver.close();\r\n\t}", "public void verifyGUIDeleteConfirmPopup() {\n try {\n String errorMessage = \"Can not test verify gui of delete confirm popup because ToDo list is empty \";\n boolean result = true;\n getLogger().info(\"Verify GUI Delete ToDo popup when click trash ToDo icon.\");\n boolean checkEmptyToDoListRow = checkListIsEmpty(eleToDoRowList);\n boolean checkEmptyToDoCompleteListRow = checkListIsEmpty(eleToDoCompleteRowList);\n // Check ToDo row list is empty\n if (checkEmptyToDoListRow && checkEmptyToDoCompleteListRow) {\n NXGReports.addStep(\"TestScript Failed: \" + errorMessage, LogAs.FAILED, new CaptureScreen(CaptureScreen.ScreenshotOf.BROWSER_PAGE));\n AbstractService.sStatusCnt++;\n return;\n }\n // Get id delete row\n String idRow = getIdRowDelete(checkEmptyToDoListRow, checkEmptyToDoCompleteListRow, eleToDoCheckboxRow, eleToDoCompleteCheckboxRow,\n eleToDoRowList, eleToDoCompleteRowList);\n //verify delete confirm icon\n clickElement(trashToDoBtnEle, \"Trash icon click\");\n //verify popup\n PopUpPage popUpPage = new PopUpPage(getLogger(), getDriver());\n result = popUpPage\n .verifyGUIPopUpDelete(categoryTitleEle, centerDeleteToDoDescriptionEle, cancelDeletedToDoButtonEle, deletedToDoButtonEle);\n if (!result) {\n AbstractService.sStatusCnt++;\n NXGReports.addStep(\"TestScript Failed: Verify gui of delete confirm popup in ToDo page\", LogAs.FAILED,\n new CaptureScreen(CaptureScreen.ScreenshotOf.BROWSER_PAGE));\n }\n //verify close popup icon\n // Check row is delete out of list\n if (!checkEmptyToDoListRow) {\n result = checkRowIsDeleteOutOfToDoList(eleToDoRowList, idRow);\n }\n if (!checkEmptyToDoCompleteListRow && result) {\n result = checkRowIsDeleteOutOfToDoList(eleToDoCompleteRowList, idRow);\n }\n Assert.assertFalse(result, \"Popup icon close does not work\");\n NXGReports.addStep(\"Close popup icon working correct\", LogAs.PASSED, null);\n } catch (AssertionError e) {\n AbstractService.sStatusCnt++;\n NXGReports.addStep(\"TestScript Failed: Verify gui of delete confirm popup in ToDo page\", LogAs.FAILED,\n new CaptureScreen(CaptureScreen.ScreenshotOf.BROWSER_PAGE));\n }\n }", "public void addToCartIconForAccessories(Map<String,String> dataMap) throws Exception\r\n\t{\n\t\tString accessoriesStockStatus = productPageIndia.getWebElementText(productPageIndia.AccessoriesStockStatus);\r\n\t\t\r\n\t\tString productItem = dataMap.get(\"ProductItem\");\r\n\t\t\r\n\t\t\t\t\r\n\t\tdriver.navigate().back();\r\n\t\tint countOfVisibleAccessories = scrollAccessoriesList(productPageIndia.AccessoriesList, productItem);\r\n\t\t\r\n\t\tfor(int i=1;i<=countOfVisibleAccessories;i++)\r\n\t\t{\r\n\t\t\t//WebElement subitems = driver.findElement(By.xpath(\".//div[@id='item_wrap']/div[\"+i+\"]/div[2]/p[1]/a\"));\r\n\t\t\tWebElement subitems = driver.findElement(By.xpath(\".//div[@id='item_wrap']/div[\"+i+\"]/div[2]/p[1]/a\"));\r\n\t\t\tString text =productPageIndia.getWebElementText(subitems);\r\n\t\t\tif(text.contains(productItem))\r\n\t\t\t{\r\n\t\t\t\tproductPageIndia.scrollToElement(driver.findElement(By.xpath(\".//div[@id='item_wrap']/div[\"+i+\"]/div[2]/p[1]/a\")));\r\n\t\t\t\tThread.sleep(2000);\r\n\t\t\t\tString AddToCartIconclassName = productPageIndia.getAttributeText(driver.findElement(By.xpath(\".//div[@id='item_wrap']/div[\"+i+\"]/div[1]/a\")),\"class\");\r\n\t\t\t\tif (AddToCartIconclassName.contains(\"addToCart add_cart_btn\")&&accessoriesStockStatus.equalsIgnoreCase(\"In stock\"))\r\n\t\t\t\t{\r\n\t\t\t\t\tActions action = new Actions(driver);\r\n\t\t\t\t\tproductPageIndia.mouseHoverWebElement(action, driver.findElement(By.xpath(\".//div[@id='item_wrap']/div[\"+i+\"]/div[2]/p[1]/a\")));\r\n\t\t\t\t\tproductPageIndia.clickWebElement(driver.findElement(By.xpath(\".//div[@id='item_wrap']/div[\"+i+\"]/div[1]/a\")));\r\n\t\t\t\t}\r\n\t\t\t\telse if(AddToCartIconclassName.contains(\"add_cart_btn btn_dis\")&&accessoriesStockStatus.equalsIgnoreCase(\"Out of stock\"))\r\n\t\t\t\t{\r\n\t\t\t\t\tBaseClass.skipTestExecution(\"The product item is out of stock. User cannot add this productitem to cart: \"+productItem);\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\telse if(AddToCartIconclassName.contains(\"addToCart add_cart_btn\")&&accessoriesStockStatus.equalsIgnoreCase(\"Out of stock\"))\r\n\t\t\t\t{\r\n\t\t\t\t\tBaseClass.forceStopExecution(\"User shouldn't be able to click Add to cart icon when product item is out of stock: \"+productItem);\r\n\t\t\t\t}\r\n\t\t\t\telse\r\n\t\t\t\t{\r\n\t\t\t\t\tBaseClass.skipTestExecution(\"Unabled to click on the Add to Cart Icon in the Accessories Page for the product item \"+productItem);\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t}", "@Test(priority=15,description=\"Edit Staff\",dependsOnGroups= {\"UserLogin.login\"},enabled=true)\n@Parameters({\"staffName\",\"index\"})\npublic void editStaff(String staffName,int index) throws Throwable {\n\t UserLogin.driver.findElement(By.xpath(\"//*[@id=\\\"navbar-collapse\\\"]/ul/li[1]/a[2]/span[2]\")).click();\n\t\n\t\tUserLogin.entities.click();\n\t\tString s= UserLogin.entities.getText();\n\t\tSystem.out.println(s);\n\t\t\n\t\t//Navigate to the Staff page\n\t\tUserLogin.driver.findElement(By.xpath(\"//a[@href='#/staff']\")).click();\t\t \n\t\ttitle = UserLogin.driver.getTitle();\n\t\tSystem.out.println(title);\n\t\texpected = \"Staffs\";\n\t\tAssert.assertEquals(title, expected);\n\t\t \n\t\t//Edit a staff\n\t\tUserLogin.driver.findElement(By.xpath(\"/html/body/div[3]/div[1]/div/div[4]/table/tbody/tr[2]/td[4]/button[2]\")).click();\n\t\t // /html/body/div[3]/div[1]/div/div[4]/table/tbody/tr[2]/td[4]/button[2]\n\t\tThread.sleep(3000);\n\t\ttitle = UserLogin.driver.getTitle();\n\t\tSystem.out.println(\"title of page is \"+title);\n\t\tUserLogin.driver.findElement(By.name(\"name\")).clear();\n\t\tUserLogin.driver.findElement(By.name(\"name\")).sendKeys(staffName);\n\t\tWebElement dropdown = UserLogin.driver.findElement(By.name(\"related_branch\"));\n\t\t//search.sendKeys(\"dubai\");\n\t Thread.sleep(2000);\n\t\tSelect sel=new Select(dropdown);\t\n\t\t//sel.selectByVisibleText(brName);\n\t\t//sel.selectByValue(\"number:21\");\n\t\tsel.selectByIndex(index);\t\n\t\tSystem.out.println(\"hereeeeeee\");\n\t\tUserLogin.driver.findElement(By.xpath(\"//button[@type='submit']\")).click();\n\t\tThread.sleep(3000);\t\n\t\t\n\t\tAssert.assertTrue(UserLogin.driver.findElement(By.xpath(\"/html/body/div[3]/div[1]/div/div[4]/table/tbody/tr/td[2]\")).isDisplayed());\n\t\tSystem.out.println(\" Staff details edited\");\n\n\t}", "@Test\n public void cart() throws InterruptedException {\n\n WebElement input = driver.findElement(By.id(\"twotabsearchtextbox\"));\n input.sendKeys(\"wooden spoon\");\n WebElement searchButton = driver.findElement(By.className(\"nav-input\"));\n searchButton.click();\n\n String resultName = \"COOKSMARK 5 Piece Bamboo Wood Nonstick Cooking Utensils - Wooden Spoons and Spatula Utensil Set with Multicolored Silicone Handles in Red Yellow Green Orange Blue\";\n String resultPrice = \"$16.99\";\n\n Thread.sleep(2000);\n\n WebElement randomResult = driver.findElement(By.xpath(\"(//*[contains(text(),'COOKSMARK 5 Piece Bamboo Wood Nonstick Cooking Utensils - Wooden Spoons and Spatula Utensil Set with Multicolored Silicone Handles in Red Yellow Green Orange Blue')])[1]\"));\n randomResult.click();\n\n Select quantity = new Select(driver.findElement(By.id(\"quantity\")));\n WebElement defaultQuantity = quantity.getFirstSelectedOption();\n\n String actualQuantity = defaultQuantity.getText().trim();\n\n Assert.assertEquals(actualQuantity,\"1\");\n\n String actualName = driver.findElement(By.xpath(\"//span[@id='productTitle']\")).getText();\n String actualPrice = driver.findElement(By.xpath(\"//span[@id='priceblock_saleprice']\")).getText();\n\n Assert.assertEquals(actualName,resultName);\n Assert.assertEquals(actualPrice,resultPrice);\n\n //driver.manage().timeouts().implicitlyWait(10,TimeUnit.SECONDS);\n WebElement addToCart = driver.findElement(By.xpath(\"//input[@id='add-to-cart-button']\"));\n\n Assert.assertTrue(addToCart.isEnabled());\n\n }", "@Test\n\tpublic void TestAct9() {\n\t\tdriver.findElement(By.xpath(\"//li[5]/a\")).click();\n\t\tdriver.findElement(By.xpath(\"//div/section[2]/div[2]/div[2]/div[2]/div[2]/a\")).click();\n\t\tdriver.findElement(By.id(\"user_login\")).sendKeys(\"root\");\n\t\tdriver.findElement(By.id(\"user_pass\")).sendKeys(\"pa$$w0rd\");\n\t\tdriver.findElement(By.id(\"wp-submit\")).click();\n\n\t\t//Viewing the course for Activity 9\n\t\tdriver.findElement(By.xpath(\"//li[2]/a\")).click();\n\t\tdriver.findElement(By.xpath(\"//div[2]/p[2]/a\")).click();\n\t\tdriver.findElement(By.xpath(\"//div[1]/a/div[2]\")).click();\n\n\t\tString t = driver.getTitle();\n\t\tAssert.assertEquals(\"Developing Strategy – Alchemy LMS\", t);\n\n\t\tWebElement s = driver.findElement(By.xpath(\"//div[4]/div[2]\"));\n\t\tString a = s.getText();\n\t\tBoolean c = a.contains(\"Mark Completed\");\n\n\t\tif (c==true)\n\t\t{\n\t\t\ts.click();\n\t\t\tSystem.out.println(\"Found \"+a+\", hence clicking on it.\");\n\t\t} \n\t\telse {\n\t\t\tSystem.out.println(\"Found \"+a+\", hence not clicking on it.\");}\n\t}", "public void Click_My_Favites()\r\n {\r\n driver.findElement(By.cssSelector(\"a.menuTitle\")).click(); \r\n https://www.n11.com/hesabim\r\n WaitTime(5000);\r\n \r\n driver.findElement(By.linkText(\"İstek Listelerim\")).click();\r\n \r\n WaitTime(3000);\r\n \r\n WebElement element = driver.findElement(By.cssSelector(\"h4.listItemTitle\"));\r\n String number = \"\";\r\n boolean find = false;\r\n for(int i = 0; i < element.getText().length(); ++i)\r\n {\r\n if(element.getText().charAt(i) == '(')\r\n find = true;\r\n else if(find && element.getText().charAt(i) != ')' )\r\n number += element.getText().charAt(i);\r\n }\r\n //System.out.println(\"--------------:\"+number);\r\n String alert = \"alert('\";\r\n alert += \"You have \";\r\n alert += number;\r\n alert += \" favorite products.\";\r\n alert += \"');\";\r\n \r\n //Generating Alert Using Javascript Executor\r\n if (driver instanceof JavascriptExecutor) \r\n ((JavascriptExecutor) driver).executeScript(alert);\r\n \r\n WaitTime(2000);\r\n driver.switchTo().alert().accept();\r\n driver.switchTo().defaultContent();\r\n WaitTime(2000);\r\n \r\n \r\n }", "@And(\"^user clicks New button$\")\n\tpublic void user_clicks_New_button() throws Throwable {\n\t\ttry {\n\t\tSeleniumOperations.switchTo(\"actionid\");\n\t\t SeleniumOperations.clickButton(\"//a[@onclick='newItem()']\");\n\t\t HTMLReportGenerator.StepDetails(\"pass\", \"user clicks New button\", \"Expected:User should able to click New button,Actual:User clicked New button successfully \");\n\t\t// String op1=\"Expected:User should able to click New button:\"+\",Actual:User clicked New button Successfully,Exception:NA\";\n\t \t//System.out.println(op1);\n\t\t}\n\t\tcatch(Exception ex)\n\t\t{\n\t\t\tHTMLReportGenerator.StepDetails(\"Fail\", \"user clicks New button\", \"Expected:User should able to click New button,Actual:Failed to clicked New button \");\n\t\t\t//String op1=\"Expected:User should able to click Manage Company:\"+\",Actual:Falied to click New button ,Exception:\"+ex.getMessage();\n\t \t//System.out.println(op1);\n\t\t \n\t\t}\n\t}", "@Test\n public void todoItemsOrderByNameTest() throws InterruptedException {\n onView(withId(R.id.fabList)).perform(click());\n onView(withId(R.id.editTextName)).perform(click(), replaceText(\"To-Do List 1\"), closeSoftKeyboard());\n onView(withId(R.id.btnCreateList)).perform(click());\n onView(withId(R.id.recyclerView)).perform(RecyclerViewActions.actionOnItemAtPosition(TestUtils.getCountFromRecyclerView(R.id.recyclerView) - 1, new ClickOnRelativeList()));\n // Create 3 To-Do items with descending order\n List<Integer> nameList = TestUtils.getNameList();\n for (int i = 0; i < nameList.size(); i++) {\n onView(withId(R.id.fabInner)).perform(click());\n onView(withId(R.id.editTextName)).perform(replaceText(i + \"_Name\"));\n onView(withId(R.id.editTextDescription)).perform(replaceText(i + \"_Description\"));\n onView(withId(R.id.editTextDeadline)).perform(replaceText(Utils.getCurrentDate()));\n onView(withId(R.id.btnCreateItem)).perform(click());\n }\n // Click name item from menu on Toolbar\n onView(withId(R.id.menu_order_by)).perform(click());\n onView(withText(R.string.name)).perform(click());\n // Make thread sleep for 3 seconds so we could check whether it's true or not\n Thread.sleep(3000);\n // Go back to FragmentTodoList\n Espresso.pressBack();\n // Delete To-Do list\n onView(withId(R.id.recyclerView)).perform(RecyclerViewActions.actionOnItemAtPosition(TestUtils.getCountFromRecyclerView(R.id.recyclerView) - 1, new ClickOnImageDeleteList()));\n onView(withId(R.id.btnYes)).perform(click());\n\n Thread.sleep(2000);\n\n }", "@Test\n public void addItem() {\n //TODO 1,2\n onView(ViewMatchers.withId(pl.lizardproject.qe2017.R.id.registerButton)).perform(click());\n onView(ViewMatchers.withId(pl.lizardproject.qe2017.R.id.newUsernameEditText)).check(matches(isDisplayed()));\n\n //TODO 3,4,5,6\n onView(ViewMatchers.withId(pl.lizardproject.qe2017.R.id.newUsernameEditText)).perform(typeText(\"user\"));\n onView(ViewMatchers.withId(pl.lizardproject.qe2017.R.id.newPasswordEditText)).perform(typeText(\"pass\"));\n onView(ViewMatchers.withId(pl.lizardproject.qe2017.R.id.registerButton)).perform(click());\n onView(ViewMatchers.withId(pl.lizardproject.qe2017.R.id.fabAdd)).check(matches(isDisplayed()));\n\n //TODO 7,8\n onView(ViewMatchers.withId(pl.lizardproject.qe2017.R.id.fabAdd)).perform(click());\n onView(ViewMatchers.withId(pl.lizardproject.qe2017.R.id.newItemEditText)).check(matches(isDisplayed()));\n\n // TODO 9,10\n onView(ViewMatchers.withId(pl.lizardproject.qe2017.R.id.newItemEditText)).perform(typeText(\"ziemniaki\"));\n onView(ViewMatchers.withId(pl.lizardproject.qe2017.R.id.fabSave)).perform(click());\n\n // TODO 11\n onView(ViewMatchers.withId(pl.lizardproject.qe2017.R.id.text)).check(matches(withText(\"ziemniaki\")));\n }", "@Test\n public void testScenario() throws WriteException {\n int i = 1;\n while(i<rows){\n\n zipCode = readableSheet.getCell(0,i).getContents();\n\n driver.navigate().to(\"https://weightwatchers.com\");\n\n //verify the title of the page matches with your expected\n getTitle(driver,\"Weight Loss & Welness Help\");\n\n //click on the studio link\n click(driver,\"//*[@class='find-a-meeting']\",0,\"Studio Link\");\n\n //verify the zipcode page title matches with your expected\n getTitle(driver,\"Studios & Meetings\");\n\n //enter zipcode on search field\n sendKeys(driver,\"//*[@id='meetingSearch']\",0,zipCode,\"Search Field\");\n\n //click on Search Icon\n click(driver,\"//*[@spice='SEARCH_BUTTON']\",0,\"Search Icon\");\n\n //capture the first studio information\n String studioInfo = getText(driver,\"//*[@class='location__container']\",0,\"Studio Info Textg\");\n //click on the first studio link\n click(driver,\"//*[@class='location__container']\",0,\"First Studio\");\n //wait few seconds\n String operationHour = getText(driver,\"//*[contains(@class,'currentday')]\",0,\"Operation Hour Text\");\n\n //create label for location and distance\n label1 = new Label(1,i,studioInfo);\n writableSheet.addCell(label1);\n\n //create label for current day opreation hour\n label2 = new Label(2,i,operationHour);\n writableSheet.addCell(label2);\n i++;\n }//end of while loop\n\n }", "@Test\n public void isFillCartDeleteSingleCartItemSuccessful() throws InterruptedException {\n // Primary Menu\n onView(withId(R.id.foodMenuButton))\n .perform(click());\n Thread.sleep(500);\n\n // Food Menu / Activity Browse Menu\n Thread.sleep(1000);\n onView(allOf(ViewMatchers.withId(R.id.addToCart), hasSibling(withText(\"Sausage Roll\"))))\n .perform(click());\n\n //AddToCartActivity\n Thread.sleep(500);\n onView(withId(R.id.addToCartButton))\n .perform(click());\n\n Thread.sleep(500);\n onView(withId(R.id.cartButton))\n .perform(click());\n\n //Cart Activity\n Thread.sleep(1000);\n onView(allOf(ViewMatchers.withId(R.id.deleteCartItem), hasSibling(withText(\"Sausage Roll\"))))\n .perform(click());\n\n //Cart Activity\n Thread.sleep(1000);\n onView(allOf(ViewMatchers.withId(R.id.deleteCartItem), hasSibling(withText(\"Sausage Roll\"))))\n .check(doesNotExist());\n\n }", "@Test\n public void userNavigateToBookPageSuccessfully() throws InterruptedException {\n\n mouseHoverClick(By.xpath(\"//ul[@class='top-menu notmobile']//li[5]/a\"));\n sleepMethod(2000);\n\n String actualTxt = getTextFromElement(By.xpath(\"//div[@class='page-title']/h1\"));\n String expectedTxt = \"Books\";\n Assert.assertEquals(actualTxt, expectedTxt);\n }", "@Test\n public void resaleClientMatch() throws UiObjectNotFoundException {\n device.findObject(new UiSelector().resourceId(Utils.PACKAGE_NAME_PREFIX + \"btn_create_post\")).click();\n device.findObject(new UiSelector().resourceId(Utils.PACKAGE_NAME_PREFIX + \"lbl_resale_client\")).click();\n device.findObject(new UiSelector().resourceId(Utils.PACKAGE_NAME_PREFIX + \"txt_name\")\n .childSelector(new UiSelector().className(Utils.EDIT_TEXT_CLASS))).setText(\"Icon Windsor Resale\");\n device.findObject(new UiSelector().resourceId(Utils.PACKAGE_NAME_PREFIX + \"dd_configuration\")).click();\n device.findObject(By.text(\"2 BHK\")).click();\n clickButton(device);\n device.findObject(new UiSelector().resourceId(Utils.PACKAGE_NAME_PREFIX + \"txt_pricing\")\n .childSelector(new UiSelector().index(1))).click();\n device.findObject(By.text(\"7\")).click();\n device.findObject(By.text(\"5\")).click();\n device.findObject(By.text(\"0\")).click();\n device.findObject(By.text(\"0\")).click();\n device.findObject(By.text(\"0\")).click();\n device.findObject(By.text(\"0\")).click();\n device.findObject(By.text(\"0\")).click();\n clickButton(device);\n device.wait(Until.findObject(By.text(\"Min Carpet Area\")), 2000);\n device.findObject(new UiSelector().resourceId(Utils.PACKAGE_NAME_PREFIX + \"txt_carpet_area\")\n .childSelector(new UiSelector().className(Utils.EDIT_TEXT_CLASS))).setText(\"880\");\n device.findObject(new UiSelector().resourceId(Utils.PACKAGE_NAME_PREFIX + \"dd_floor\")).click();\n device.findObject(By.text(\"Mid\")).click();\n clickButton(device);\n device.wait(Until.findObject(By.text(\"Min Parking\")), 2000);\n device.findObject(By.text(\"4\")).click();\n UiScrollable postView = new UiScrollable(new UiSelector().scrollable(true));\n UiSelector postSelector = new UiSelector().text(\"POST\");\n postView.scrollIntoView(postSelector);\n device.findObject(By.text(\"ADD BUILDING\")).click();\n device.findObject(new UiSelector().resourceId(Utils.PACKAGE_NAME_PREFIX + \"input_search\")).setText(\"Icon\");\n device.wait(Until.findObject(By.text(\"Icon Windsor Apartments\")), 10000);\n device.findObject(By.text(\"Icon Windsor Apartments\")).click();\n clickButton(device);\n postView.scrollIntoView(postSelector);\n device.findObject(postSelector).click();\n device.wait(Until.findObject(By.text(\"POST\").enabled(true)), 10000);\n String matchNameString = device.findObject(By.textContains(\"matches\")).getText().split(\" \")[0];\n device.findObject(By.text(\"POST\")).click();\n device.wait(Until.findObject(By.text(\"RESALE CLIENT\")), 9000);\n Assert.assertNotEquals(\"Test Case Failed...No Match found\", \"no\", matchNameString.toLowerCase());\n String postMatchName = device.findObject(new UiSelector().resourceId(Utils.PACKAGE_NAME_PREFIX + \"lbl_name\")).getText();\n Assert.assertEquals(\"Test Case Failed...Match should have had been found with\", \"dialectic test\", postMatchName.toLowerCase());\n\n device.findObject(new UiSelector().resourceId(Utils.PACKAGE_NAME_PREFIX + \"btn_close\")).click();\n Utils.markPostExpired(device);\n }", "@Test\n public void seeInfoAboutItemAisleFromDepartmentView() {\n String itemTest = \"Bell Peppers\";\n String aisleCheck = \"Aisle: 2\";\n String aisleDescriptionCheck = \"Aisle Description: Between Aisle 1 and Frozen Aisle\";\n onView(withId(R.id.navigation_home)).perform(click());\n onView(withId(R.id.card_view_department)).perform(click());\n onView(withText(\"Produce\")).perform(click());\n onView(withId(R.id.department_items_list_recycler_view)).perform(RecyclerViewActions.actionOnItemAtPosition(16, click()));\n onView(withText(\"VIEW MORE INFORMATION\")).perform(click());\n onView(withId(android.R.id.message)).check(matches(allOf(withSubstring(aisleCheck), isDisplayed())));\n onView(withId(android.R.id.message)).check(matches(allOf(withSubstring(aisleDescriptionCheck), isDisplayed())));\n }", "@Test(dataProvider = \"getRandomData\")\r\n\r\n\tpublic void testCSVData(String Sku, String Product, String DiaAmountSIGH, String DiaAmountVVSEF,\r\n\r\n\t\t\tString totalGemAmount, String MetalType, String height, String width, String MetalWeight, String Catagory,\r\n\r\n\t\t\tString TypeOfProduct, String diaColor, String diaClarity, String DiamondShape, String NoOfDiamonds,\r\n\r\n\t\t\tString TotalDiamondWeight, String Collection, String GemstoneType, String GemstoneShape,\r\n\r\n\t\t\tString NoOfGemstones, String TotalGemWeight) throws InterruptedException {\r\n\r\n\t\tinitilizeEtry();\r\n\r\n\t\tSystem.out.println(Sku);\r\n\t\tdriver = threadDriver.get();\r\n\r\n\t\tdriver.findElement(By.xpath(\"//div[@id='ajax_register_close']\")).click();// popup\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// close\r\n\r\n\t\tdriver.findElement(By.xpath(\"//div[@class='search_outer']//img\")).click();// for\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// search\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// option\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// click\r\n\r\n\t\tThread.sleep(3000);\r\n\r\n\t\tWebElement elem = driver.findElement(By.xpath(\"//*[@id='ild_search_box']//form//div//input[@id='search']\"));// click\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// image\r\n\r\n\t\telem.sendKeys(Sku);\r\n\r\n\t\telem.sendKeys(\"\\n\");\r\n\r\n\t\tdriver.findElement(By.xpath(\"//a[@class='product-image']\")).click();\r\n\r\n\t\t// verify if the buynow button enable or not\r\n\r\n\t\tWebElement e = driver.findElement(By.xpath(\"//input[@class='add-cart2']\"));\r\n\r\n\t\tAssert.assertTrue(e.isEnabled());// return true when the buynow button\r\n\t\t\t\t\t\t\t\t\t\t\t// enable\r\n\r\n\t\tif (driver.findElements(By.xpath(\"//a[@class='product-image']\")).size() != 0) {\r\n\r\n\t\t\tSystem.out.println(\"Buynow button enable\");\r\n\r\n\t\t} else {\r\n\r\n\t\t\tSystem.out.println(\"Buynow button disable\");\r\n\r\n\t\t}\r\n\t\tThread.sleep(4000);\r\n\t\tdriver.findElement(By.xpath(\"//div/a[@id='viewbreakup']\")).click();\r\n\r\n\t\tThread.sleep(2000);\r\n\r\n\t\tProduct productItms = null;\r\n\r\n\t\tproductItms = new Product(driver);\r\n\r\n\t\t// for diamond quality radio button selection - SI-GH\r\n\r\n\t\tif (diaClarity.contains(\"SI\") && diaColor.contains(\"GH\")) {\r\n\r\n\t\t\tdriver.findElement(\r\n\t\t\t\t\tBy.xpath(\"//div[@class='input-box']/label[@class='label-radio-configurable'][\" + 1 + \"]/input\"))\r\n\t\t\t\t\t.click();\r\n\r\n\t\t\t// breakup selection view click\r\n\r\n\t\t\t// verification of sku of the product for SI-GH\r\n\r\n\t\t\tString actualsku = productItms.getsku();\r\n\r\n\t\t\tif (!(actualsku.trim().toUpperCase().contains(Sku.trim().toUpperCase()))) {\r\n\r\n\t\t\t\tfinalResult.put(\"Sku\", finalResult.get(\"Sku\") & false);\r\n\r\n\t\t\t}\r\n\r\n\t\t\t// Verification of Diamond price SIGH\r\n\r\n\t\t\tString actualDiamondPriceSIGH = utility.converPrice(productItms.getDiamondPriceSIGH());\r\n\r\n\t\t\tif (!(actualDiamondPriceSIGH.trim().toUpperCase().equals(DiaAmountSIGH.trim().toUpperCase()))) {\r\n\r\n\t\t\t\tfinalResult.put(\"DiaAmountSIGH\", finalResult.get(\"DiaAmountSIGH\") & false);\r\n\r\n\t\t\t}\r\n\r\n\t\t\t/**\r\n\t\t\t * \r\n\t\t\t * common mapping function for both SIGH & VVSEF\r\n\t\t\t * \r\n\t\t\t */\r\n\r\n\t\t\tverifyProductDetailAttribute(Sku, totalGemAmount, MetalType, height, width, MetalWeight, Catagory, TypeOfProduct,\r\n\r\n\t\t\t\t\tDiamondShape, NoOfDiamonds, Collection, GemstoneType, GemstoneShape, NoOfGemstones, TotalGemWeight,\r\n\r\n\t\t\t\t\tTotalDiamondWeight, productItms);\r\n\r\n\t\t}\r\n\r\n\t\t// VVSEF - Radio button click\r\n\r\n\t\tdriver.findElement(\r\n\t\t\t\tBy.xpath(\"//div[@class='input-box']/label[@class='label-radio-configurable'][\" + 2 + \"]/input\"))\r\n\t\t\t\t.click();\r\n\r\n\t\tThread.sleep(5000);\r\n\r\n\t\tproductItms = new Product(driver);\r\n\r\n\t\t// verification of sku of the product for VVSEF\r\n\r\n\t\tString actualsku = productItms.getsku();\r\n\r\n\t\tif (!(actualsku.trim().toUpperCase().contains(Sku.trim().toUpperCase()))) {\r\n\r\n\t\t\tfinalResult.put(\"Sku\", finalResult.get(\"Sku\") & false);\r\n\r\n\t\t}\r\n\r\n\t\t// Verification of Diamond price VVSEF\r\n\r\n\t\tString x = productItms.getDiamondPriceVVSEF();\r\n\r\n\t\tString actualDiamondPriceSIGH = utility.converPrice(x);\r\n\r\n\t\tif (!(actualDiamondPriceSIGH.trim().toUpperCase().equals(DiaAmountVVSEF.trim().toUpperCase()))) {\r\n\r\n\t\t\tfinalResult.put(\"DiaAmountVVSEF\", finalResult.get(\"DiaAmountVVSEF\") & false);\r\n\r\n\t\t}\r\n\r\n\t\t/**\r\n\t\t * \r\n\t\t * common mapping function for both SIGH & VVSEF\r\n\t\t * \r\n\t\t */\r\n\r\n\t\tverifyProductDetailAttribute(Sku, totalGemAmount, MetalType, height, width, MetalWeight, Catagory, TypeOfProduct,\r\n\r\n\t\t\t\tDiamondShape, NoOfDiamonds, Collection, GemstoneType, GemstoneShape, NoOfGemstones, TotalGemWeight,\r\n\r\n\t\t\t\tTotalDiamondWeight, productItms);\r\n\r\n\t\t// Add to cart\r\n\r\n\t\tWebElement button1 = driver.findElement(By.xpath(\"//input[@class='add-cart2']\"));\r\n\r\n\t\tbutton1.click();\r\n\r\n\t\t// verify the cart message in cart page\r\n\r\n\t\tif (driver.getPageSource().contains(\"was added to your shopping cart.\")) {\r\n\r\n\t\t\tSystem.out.println(\"cart page message is coming for the added product\");\r\n\r\n\t\t} else {\r\n\r\n\t\t\tSystem.out.println(\"cart page message is not coming\");\r\n\r\n\t\t\tdriver.close();\r\n\r\n\t\t}\r\n\r\n\t\t// for edit\r\n\r\n\t\tdriver.findElement(By.xpath(\"//a[@title='Edit item parameters']\")).click();\r\n\r\n\t\tdriver.findElement(By.xpath(\"//button[@title='Update Cart']\")).click();\r\n\r\n\t\t// for increase and decrease quantity\r\n\r\n\t\tdriver.findElement(By.xpath(\"//button[@title='Increase Quantity']\")).click();\r\n\r\n\t\tdriver.findElement(By.xpath(\"//button[@title='Decrease Quantity']\")).click();\r\n\r\n\t\tdriver.findElement(By.xpath(\"//span[contains(text(),'Proceed to Checkout')]\")).click();\r\n if((Sku.contains(\"RG\")||Sku.contains(\"BR\")))\r\n {\r\n MetalWeight=\"N/A\";\r\n \r\n }\r\n\r\n\r\n\t\tcreateHtML(Sku, Product, DiaAmountSIGH, DiaAmountVVSEF, totalGemAmount, MetalType, height, width,\r\n\r\n\t\t\t\tMetalWeight, Catagory, TypeOfProduct, diaColor, diaClarity, DiamondShape, NoOfDiamonds, Collection,\r\n\r\n\t\t\t\tGemstoneType, GemstoneShape, NoOfGemstones, TotalGemWeight, TotalDiamondWeight);\r\n\r\n\t}", "public void Case35(){\n System.out.println(\"Testing Case 35\");\n driver.manage().timeouts().implicitlyWait(20, TimeUnit.SECONDS);\n MobileElement summaryMenu = (MobileElement) driver.findElementByAccessibilityId(\"Show action\");\n summaryMenu.click();\n MobileElement previewBtn = (MobileElement) driver.findElementById(\"com.engagia.android:id/txt_preview_btn\");\n previewBtn.click();\n MobileElement previewDataWithoutOrder = (MobileElement) driver.findElementById(\"com.engagia.android:id/txt_print_data\");\n String previewDataWithoutOrderText = previewDataWithoutOrder.getText();\n System.out.println(\"Summary Data without order: \\n\"+previewDataWithoutOrderText);\n MobileElement closeBtn = (MobileElement) driver.findElementById(\"android:id/button1\");\n closeBtn.click();\n driver.navigate().back();\n actualOrderPC();\n summaryMenu.click();\n previewBtn.click();\n MobileElement previewDataWithOrder = (MobileElement) driver.findElementById(\"com.engagia.android:id/txt_print_data\");\n String previewDataWithOrderText = previewDataWithOrder.getText();\n System.out.println(\"Summary Data with order: \\n\"+previewDataWithOrderText);\n closeBtn.click();\n driver.navigate().back();\n clear();\n System.out.println(\"Case 35 done\");\n }", "public void ClickItemChkboxinFrequentlyBrought(String itemnumber){\r\n\t\tint item = Integer.valueOf(getValue(itemnumber));\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:- Third item should be unchecked from Frequenlty bought items\");\r\n\t\ttry{\r\n\t\t\tList<WebElement> ele = listofelements(locator_split(\"chkFrequentlybrought\"));\r\n\t\t\tclick(ele.get(item-1));\r\n\t\t\tSystem.out.println(item+\" item checbox is clicked\");\r\n\t\t\tReporter.log(\"PASS_MESSAGE:- Third item is unchecked from Frequenlty bought items\");\r\n\t\t}\r\n\t\tcatch(Exception e){\r\n\t\t\tReporter.log(\"FAIL_MESSAGE:- Third item is not unchecked\");\r\n\t\t\tthrow new NoSuchElementException(\"The element with\"\r\n\t\t\t\t\t+ elementProperties.getProperty(\"chkFrequentlybrought\")\r\n\t\t\t\t\t+ \" not found\");\r\n\r\n\t\t}\r\n\r\n\t}", "@Test\n\tpublic void verifyAdIdPriceTMVVisitsEmailsAndStatusDetailsAreDisplaying() throws Exception {\n\t\tAllStockTradusPROPage AllStockPage= new AllStockTradusPROPage(driver);\n\t\twaitTill(2000);\n\t\tLoginTradusPROPage loginPage = new LoginTradusPROPage(driver);\n\t\tloginPage.setAccountEmailAndPassword(userName, pwd);\n\t\tjsClick(driver, loginPage.LoginButton);\n\t\texplicitWaitFortheElementTobeVisible(driver, AllStockPage.myStockOptioninSiderBar);\n\t\tjsClick(driver, AllStockPage.myStockOptioninSiderBar);\n\t\texplicitWaitFortheElementTobeVisible(driver, AllStockPage.allMyStockOptioninSiderBar);\n\t\tjsClick(driver, AllStockPage.allMyStockOptioninSiderBar);\n\t\texplicitWaitFortheElementTobeVisible(driver, AllStockPage.MyStockText);\n\t\twaitTill(3000);\n\t\twhile(!verifyElementPresent(AllStockPage.tradusLinkforMANtires)) {\n\t\t\tdriver.navigate().refresh();\n\t\t\twaitTill(3000);\n\t\t}\n\t\tfor(int i=0; i<AllStockPage.PostedAds.size();i++)\n\t\t{\n\t\t\t/*switch(i) {\n\t\t\tcase 0: Assert.assertTrue(getText(AllStockPage.PostedAdsAdIds.get(i)).equals(\"Ad ID: 2986865\"),\n\t\t\t\t \"Expected Ad id is not displaying for 1st ad in All stock page\");\n\t\t\tAssert.assertTrue(getText(AllStockPage.PostedAdsCurrencyAndPrices.get(i)).equals(\"EUR 0\"),\n\t\t\t\t \"Given currency & price are not displaying for 1st ad in All stock page\");\n\t\t\tAssert.assertTrue(getText(AllStockPage.PostedAdsTMV.get(i)).equals(\"No price rating\"),\n\t\t\t\t \"Tradus market value is not displaying as no price rating for 1st ad in all stock page\");\n\t\t\tAssert.assertTrue(verifyElementPresent(AllStockPage.PostedAdsTMV.get(i)),\n\t\t\t\t \"Visits are not displaying for 1st ad in all stock page\");\n\t\t\tAssert.assertTrue(verifyElementPresent(AllStockPage.PostedAdsEmails.get(i)),\n\t\t\t\t \"Emails are not displaying for 1st ad in all stock page\");\n\t\t\tAssert.assertTrue(getText(AllStockPage.PostedAdsStatus.get(i)).equals(\"Tradus\"),\n\t\t\t\t \"Status is not displaying as active on tradus for 1st ad in All stock page\");break;\n\t\t\t\t \n\t\t\tcase 1: Assert.assertTrue(getText(AllStockPage.PostedAdsAdIds.get(i)).equals(\"Ad ID: 2986861\"),\n\t\t\t\t \"Expected Ad id is not displaying for 2nd ad in All stock page\");\n\t\t\tAssert.assertTrue(getText(AllStockPage.PostedAdsCurrencyAndPrices.get(i)).equals(\"EUR 100\"),\n\t\t\t\t \"Given currency & price are not displaying for 2nd ad in All stock page\");\n\t\t\tAssert.assertTrue(getText(AllStockPage.PostedAdsTMV.get(i)).equals(\"No price rating\"),\n\t\t\t\t \"Tradus market value is not displaying as no price rating for 2nd ad in all stock page\");\n\t\t\tAssert.assertTrue(verifyElementPresent(AllStockPage.PostedAdsTMV.get(i)),\n\t\t\t\t \"Visits are not displaying for 2nd ad in all stock page\");\n\t\t\tAssert.assertTrue(verifyElementPresent(AllStockPage.PostedAdsEmails.get(i)),\n\t\t\t\t \"Emails are not displaying for 2nd ad in all stock page\");\n\t\t\tAssert.assertTrue(getText(AllStockPage.PostedAdsStatus.get(i)).equals(\"Tradus\"),\n\t\t\t\t \"Status is not displaying as active on tradus for 2nd ad in All stock page\");\n\t\t\t}*/\n\t\t\t Assert.assertTrue(verifyElementPresent(AllStockPage.PostedAdsAdIds.get(i)),\n\t\t\t\t\t \"Expected Ad id is not displaying for \"+i+ \" ad in All stock page\");\n\t\t Assert.assertTrue(verifyElementPresent(AllStockPage.PostedAdsCurrencyAndPrices.get(i)),\n\t\t \t\t\"Given currency & price are not displaying for \"+i+ \" ad in All stock page\");\n\t\t Assert.assertTrue(verifyElementPresent(AllStockPage.PostedAdsTMV.get(i)),\n\t\t \t\t\"Tradus market value is not displaying as no price rating for \"+i+ \" ad in all stock page\");\n\t\t Assert.assertTrue(verifyElementPresent(AllStockPage.PostedAdsVisits.get(i)),\n\t\t \t\t\"Visits are not displaying for \"+i+ \" ad in all stock page\");\n\t\t Assert.assertTrue(verifyElementPresent(AllStockPage.PostedAdsEmails.get(i)),\n\t\t \t\t\"Emails are not displaying for \"+i+ \" ad in all stock page\");\n\t\t Assert.assertTrue(verifyElementPresent(AllStockPage.PostedAdsStatus.get(i)),\n\t\t \t\t\"Status is not displaying as active on tradus for \"+i+ \" ad in All stock page\");\n\t\t}\n\t}", "@Test\n public void rentPropertyMatch() throws UiObjectNotFoundException {\n device.findObject(new UiSelector().resourceId(Utils.PACKAGE_NAME_PREFIX + \"btn_create_post\")).click();\n device.findObject(new UiSelector().resourceId(Utils.PACKAGE_NAME_PREFIX + \"lbl_rental_prop\")).click();\n device.findObject(By.text(\"Search building name\")).click();\n device.findObject(new UiSelector().resourceId(Utils.PACKAGE_NAME_PREFIX + \"input_search\")).setText(\"Icon\");\n device.wait(Until.findObject(By.text(\"Icon Viva\")), 10000);\n device.findObject(By.text(\"Icon Viva\")).click();\n device.findObject(new UiSelector().resourceId(Utils.PACKAGE_NAME_PREFIX + \"dd_configuration\")).click();\n device.findObject(By.text(\"1 BHK\")).click();\n device.findObject(new UiSelector().resourceId(Utils.PACKAGE_NAME_PREFIX + \"txt_pricing\")).click();\n device.findObject(By.text(\"2\")).click();\n device.findObject(By.text(\"5\")).click();\n device.findObject(By.text(\"0\")).click();\n device.findObject(By.text(\"0\")).click();\n device.findObject(By.text(\"0\")).click();\n device.findObject(By.text(\"Done\")).click();\n device.wait(Until.findObject(By.text(\"Yes\")), 2000);\n device.findObject(By.text(\"Yes\")).click();\n device.findObject(new UiSelector().resourceId(Utils.PACKAGE_NAME_PREFIX + \"dd_furnishing\")).click();\n device.findObject(By.text(\"Fully-Furnished\")).click();\n UiScrollable postView = new UiScrollable(new UiSelector().scrollable(true));\n UiSelector postSelector = new UiSelector().text(\"POST\");\n postView.scrollIntoView(postSelector);\n device.findObject(postSelector).click();\n device.wait(Until.findObject(By.text(\"POST\").enabled(true)), 10000);\n String matchNameString = device.findObject(By.textContains(\"matches\")).getText().split(\" \")[0];\n device.findObject(By.text(\"POST\")).click();\n device.wait(Until.findObject(By.text(\"RENTAL PROPERTY\")), 9000);\n Assert.assertNotEquals(\"Test Case Failed...No Match found\", \"no\", matchNameString.toLowerCase());\n String postMatchName = device.findObject(new UiSelector().resourceId(Utils.PACKAGE_NAME_PREFIX + \"lbl_name\")).getText();\n Assert.assertEquals(\"Test Case Failed...Match should have had been found with\", \"dialectic test\", postMatchName.toLowerCase());\n\n device.findObject(new UiSelector().resourceId(Utils.PACKAGE_NAME_PREFIX + \"btn_close\")).click();\n Utils.markPostExpired(device);\n }", "@Test\n public void mainRecipeTest() {\n onView(withId(R.id.rv_main)).check(matches(isDisplayed()));\n // Click on the first recipe in the recyclerview\n onView(withId(R.id.rv_main)).perform(actionOnItemAtPosition(0, click()));\n\n // Check that the recyclerview containing the steps is displayed\n onView(withId(R.id.rv_main)).check(matches(isDisplayed()));\n // Check that the favourite fab is displayed\n onView(withId(R.id.favorite_fab)).check(matches(isDisplayed()));\n // Click on the first recipe in the recyclerview\n onView(withId(R.id.rv_main)).perform(actionOnItemAtPosition(0, click()));\n }", "@Test\r\n\tpublic void createContactWithOrgtest() throws Throwable {\r\n\t\tString orgName = excelL.readExcelData(\"contact\", 1, 2)+\"_\"+webutils.getRandomNo();\r\n\t\tString orgType= excelL.readExcelData(\"contact\", 1, 3);\r\n\t\tString orgIndustry = excelL.readExcelData(\"contact\", 1, 4);\r\n\t\tString contactName = excelL.readExcelData(\"contact\", 1, 5)+\"-\"+webutils.getRandomNo();\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t/* navigate to Organization page */\r\n\t\t\r\n\t\tdriver.findElement(By.linkText(\"Organizations\")).click();\r\n\t\t\t\r\n\t\t/* navigate to create new Organization page */\r\n\t\t\r\n\t\tdriver.findElement(By.xpath(\"//img[@alt='Create Organization...']\")).click();\r\n\t\t\r\n\t\t/* Create Organization */\r\n\t\t\r\n\t\tdriver.findElement(By.name(\"accountname\")).sendKeys(orgName);\r\n\t\r\n\t\tWebElement swb1 = driver.findElement(By.name(\"accounttype\"));\r\n\t webutils.select(swb1, orgType);\r\n\t\t\t\t\r\n\t\tWebElement swb2 = driver.findElement(By.name(\"industry\"));\r\n\t\twebutils.select(swb2, orgIndustry);\r\n\t\t\t\t\r\n\t\tdriver.findElement(By.xpath(\"//input[@title='Save [Alt+S]']\")).click();\r\n\t\t\r\n\t\t/* verify the Organization */\r\n\t\t\r\n\t\tString actualOrgName = driver.findElement(By.xpath(\"//span[@class='dvHeaderText']\")).getText();\r\n\t\tAssert.assertTrue(actualOrgName.contains(orgName));\r\n\t\t\r\n\t\t\r\n\t\t/* Navigate to Contact page */\r\n\t\tdriver.findElement(By.linkText(\"Contacts\")).click();\r\n\t\t\r\n\t\t/* Navigate to create new Contact page */\r\n\t\tdriver.findElement(By.xpath(\"//img[@alt='Create Contact...']\")).click();\r\n\t\t\r\n\t\t/* Create new Contact */\r\n\t\tdriver.findElement(By.name(\"lastname\")).sendKeys(contactName);\r\n\t\t\r\n\t\t/* Identify and Click On Organization name look up icon */\r\n\t\tdriver.findElement(By.xpath(\"//input[@name='account_name']/following-sibling::img\")).click();\r\n\t\t\r\n\t\t/* handle child browser */\r\n\t webutils.switchToNewWindow(driver, \"specific_contact_account_address\");\r\n\t\t\r\n\t\tdriver.findElement(By.name(\"search_text\")).sendKeys(orgName);\r\n\t\tdriver.findElement(By.name(\"search\")).click();\r\n\t\tdriver.findElement(By.linkText(orgName)).click();\r\n\t\t\r\n\t\t/* come back to parent Window */\r\n\t\twebutils.switchToNewWindow(driver, \"Administrator - Contacts\");\r\n\t\tdriver.findElement(By.xpath(\"//input[@title='Save [Alt+S]']\")).click();\r\n\t\t\r\n\t\t/* verify the Organization */\r\n\t\tString actualconatct = driver.findElement(By.xpath(\"//span[@class='dvHeaderText']\")).getText();\r\n\t\tAssert.assertTrue(actualconatct.contains(contactName));\r\n\t\t\r\n\t}" ]
[ "0.6609866", "0.645311", "0.64314973", "0.6344801", "0.6229482", "0.6201251", "0.6173106", "0.6171189", "0.6164271", "0.6139593", "0.6135039", "0.6086289", "0.6074322", "0.60739", "0.60067844", "0.5992724", "0.59862745", "0.59858364", "0.59824866", "0.5970966", "0.5956654", "0.59454226", "0.5931988", "0.59238636", "0.59147197", "0.58971614", "0.5893368", "0.5852815", "0.5846056", "0.58148324", "0.5813592", "0.5802396", "0.5794188", "0.5790004", "0.5780548", "0.5759026", "0.5754661", "0.5740269", "0.57346886", "0.5734604", "0.5730213", "0.5729027", "0.5725779", "0.5724659", "0.57218915", "0.5719919", "0.5719839", "0.5718217", "0.57170546", "0.5716798", "0.5709499", "0.5709235", "0.57014996", "0.56986755", "0.569796", "0.56961554", "0.5694361", "0.56889075", "0.5688589", "0.56846225", "0.5683702", "0.56793946", "0.5678894", "0.56784827", "0.56714565", "0.5667862", "0.5666442", "0.56463295", "0.56449646", "0.5639054", "0.5636324", "0.56360316", "0.5635573", "0.5634582", "0.563148", "0.5626149", "0.56249064", "0.5614615", "0.5613056", "0.56103104", "0.56091386", "0.5607821", "0.56062526", "0.560618", "0.55960035", "0.5584022", "0.55824953", "0.5575939", "0.55741954", "0.5573674", "0.5568746", "0.55660146", "0.5559175", "0.55540437", "0.5554026", "0.5552993", "0.5552056", "0.55503094", "0.5549337", "0.55492866" ]
0.75679725
0
Here we are calling the test to scroll and click, the result is updated in the excel sheet. We are making use of assertion helper class
@Test public void scrollAndClick() throws InterruptedException { productpage = new ProductPage(driver); productpage.clickOnSomePrompt(); int num = productpage.numberOfItemsDisplayed(); log.info("number of items" +num); productdetails = productpage.clickOnLastItem(); boolean status = productdetails.isProductDEtailsPageDisplayed(); AssertionHelper.updateTestStatus(status); TestBaseRunner.result = TestBaseRunner.passOrFail(status); ExcelReadWrtite.updateResult("testData.xlsx", "TestScripts", "scrollAndClick", result); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test(dataProvider=\"getExcelData\", priority=1)\n\t \n\t public void clientQuickLinks(String OrigionLocation, String Dest, String Item, String Count, String Weight, String Volume, String Client_Order, String Busunit, String GeneralLedger) throws InterruptedException, IOException {\n\t\tTC001_LoginOTM.getDriver().manage().timeouts().implicitlyWait(30,TimeUnit.SECONDS);\n\t\t \n\t\t TC001_LoginOTM.getDriver().switchTo().defaultContent();\n\t\t System.out.println(\"before sidebar\");\n\t\t TC001_LoginOTM.getDriver().switchTo().frame(\"sidebar\");\n\t\t System.out.println(\"After sidebar\");\n\t\t //click on client quick links \n\t\t TC001_LoginOTM.getDriver().findElement(By.xpath(\"//a[contains(text(),'Client Quick Links')]\")).click(); \t \n\t\t \n\t\t //click on FOE screen\n\t\t TC001_LoginOTM.getDriver().findElement(By.xpath(\"//a[text()='Fast Order Entry']\")).click();\n\t\t \t\t \n\t\t //Internal Login screen\n\t\t TC001_LoginOTM.getDriver().switchTo().defaultContent();\n\t\t TC001_LoginOTM.getDriver().switchTo().frame(\"mainBody\");\n\t\t\t\t \n\t\t //Internal username\n\t\t TC001_LoginOTM.getDriver().findElement(By.xpath(\"//*[@id='orderentryui-1928791928']/div/div[2]/div/div[1]/div/div/div/div[2]/div/div/div/div[2]/div/div/table/tbody/tr[1]/td[3]/input\")).clear();\n\t\t TC001_LoginOTM.getDriver().findElement(By.xpath(\"//*[@id='orderentryui-1928791928']/div/div[2]/div/div[1]/div/div/div/div[2]/div/div/div/div[2]/div/div/table/tbody/tr[1]/td[3]/input\")).sendKeys(\"MENLO.CLIENTA370\");\n\t\t \n\t\t //Internal password\n\t\t TC001_LoginOTM.getDriver().findElement(By.xpath(\"//*[@id=\\\"orderentryui-1928791928\\\"]/div/div[2]/div/div[1]/div/div/div/div[2]/div/div/div/div[2]/div/div/table/tbody/tr[2]/td[3]/input\")).clear();\n\t\t TC001_LoginOTM.getDriver().findElement(By.xpath(\"//*[@id=\\\"orderentryui-1928791928\\\"]/div/div[2]/div/div[1]/div/div/div/div[2]/div/div/div/div[2]/div/div/table/tbody/tr[2]/td[3]/input\")).sendKeys(\"Year2012??\");\n\t\t \n\t\t TC001_LoginOTM.getDriver().findElement(By.xpath(\"//html/body/div/div/div[2]/div/div[1]/div/div/div/div[2]/div/div/div/div[3]/div/div/span/span\")).click();\n \n\t\t \n\t\t //fast order entry screen\n\t\t TC001_LoginOTM.getDriver().switchTo().defaultContent();\n\t\t TC001_LoginOTM.getDriver().switchTo().frame(\"mainBody\");\n\t\t WebElement Origion = TC001_LoginOTM.getDriver().findElement(By.xpath(\"//html/body/div/div/div[2]/div/div[2]/div/div/div[2]/div/div[1]/div/div[2]/div/div/div[2]/div/div/div/div[2]/div/input\"));\n\t\t Origion.sendKeys(OrigionLocation);\n\t\t Thread.sleep(5000);\n\t\t //Origion.sendKeys(Keys.TAB);\n\t\t TC001_LoginOTM.getDriver().findElement(By.xpath(\"//html/body/div/div/div[2]/div/div[2]/div/div/div[2]/div/div[1]/div/div[2]/div/div/div[3]/div/div/div/div[2]/div/input\")).sendKeys(Dest);\n\t\t Thread.sleep(5000);\n\t\t \n\t\t TC001_LoginOTM.getDriver().findElement(By.xpath(\"//html/body/div/div/div[2]/div/div[2]/div/div/div[2]/div/div[1]/div/div[2]/div/div/div[7]/div/div/div/div[2]/div/div/div/div[1]/div/div/div/div[1]/div/div/div/div[1]/div/input\")).sendKeys(Item);\n\t\t Thread.sleep(5000);\n\t\t TC001_LoginOTM.getDriver().findElement(By.xpath(\"//html/body/div[3]/div/div/div/div[3]/div/div/div[2]/div/div/div[1]/div/div/div[2]/div[1]/table/tbody/tr[1]/td[1]/div\")).click();\n\t\t Thread.sleep(8000);\n\t\t \t\t \n\t\t //to enter count\n\t\t \n\t\t TC001_LoginOTM.getDriver().findElement(By.xpath(\"//html/body/div/div/div[2]/div/div[2]/div/div/div[2]/div/div[1]/div/div[2]/div/div/div[7]/div/div/div/div[2]/div/div/div/div[1]/div/div/div/div[1]/div/div/div/div[4]/div/input\")).sendKeys(Count);\n\t\t Thread.sleep(2000);\n\t\t TC001_LoginOTM.getDriver().findElement(By.xpath(\"//html/body/div/div/div[2]/div/div[2]/div/div/div[2]/div/div[1]/div/div[2]/div/div/div[7]/div/div/div/div[2]/div/div/div/div[1]/div/div/div/div[1]/div/div/div/div[5]/div/input\")).sendKeys(Weight);\n\t\t TC001_LoginOTM.getDriver().findElement(By.xpath(\"//html/body/div/div/div[2]/div/div[2]/div/div/div[2]/div/div[1]/div/div[2]/div/div/div[7]/div/div/div/div[2]/div/div/div/div[1]/div/div/div/div[1]/div/div/div/div[7]/div/input\")).sendKeys(Volume);\n\t\t Thread.sleep(9000);\n\t\t //changing date format\n\t\t //Create object of SimpleDateFormat class and decide the format\n\t\t DateFormat dateFormat = new SimpleDateFormat(\"M/d/yy\");\n\t\t //get current date time with Date()\n\t\t Date date = new Date();\n\t\t // Now format the date\n\t\t String date1= dateFormat.format(date);\n\t\t // to add 4 days to codays date\n\t\t Calendar cal = Calendar.getInstance();\n\t\t cal.setTime(date);\n\t\t cal.add(Calendar.DATE, 4); //minus number would decrement the days\n\t\t Date date2 = cal.getTime();\n\t\t String date3 = dateFormat.format(date2);\t\t \n\t\t \t\t \t\t \n\t\t //entering todays date fields\n\t\t TC001_LoginOTM.getDriver().findElement(By.xpath(\"//html/body/div/div/div[2]/div/div[2]/div/div/div[2]/div/div[1]/div/div[2]/div/div/div[9]/div/div/div/div[2]/div/div/div/div[2]/div/div/input\")).sendKeys(date1);\n\t\t // entering todays date +4 days\n\t\t Thread.sleep(2000);\n\t\t TC001_LoginOTM.getDriver().findElement(By.xpath(\"//html/body/div/div/div[2]/div/div[2]/div/div/div[2]/div/div[1]/div/div[2]/div/div/div[10]/div/div/div/div[3]/div/div/div/div[2]/div/div/input\")).sendKeys(date3);\n\t\t Thread.sleep(2000);\n\t\t TC001_LoginOTM.getDriver().findElement(By.xpath(\"//html/body/div/div/div[2]/div/div[2]/div/div/div[2]/div/div[1]/div/div[2]/div/div/div[12]/div/div/div/div/div[2]/div/input\")).sendKeys(Client_Order);\n\t\t Thread.sleep(2000);\n\t\t //selecting from combo box\n\t\t System.out.println(\"before selection element\");\n\t\t WebElement BusUnitElement = TC001_LoginOTM.getDriver().findElement(By.xpath(\"//html/body/div/div/div[2]/div/div[2]/div/div/div[2]/div/div[1]/div/div[2]/div/div/div[12]/div/div/div/div/div[6]/div/div/input\"));\n\t\t BusUnitElement.sendKeys(Busunit);\n\t \n\t\t //Select BusUnit = new Select(BusUnitElement);\n\t\t //BusUnit.selectByVisibleText(\"TRS\");\n\t\t System.out.println(\"After selection element\");\n\t\t Thread.sleep(5000);\n\t\t System.out.println(\"before premium check box element\");\n\t\t TC001_LoginOTM.getDriver().findElement(By.xpath(\"//*[@id=\\\"gwt-uid-3\\\"]\")).click();\n\t\t \n\t\t //select premium reason from combo box\n\t\t Thread.sleep(2000);\n\t\t WebElement PreReasonElement = TC001_LoginOTM.getDriver().findElement(By.xpath(\"//html/body/div/div/div[2]/div/div[2]/div/div/div[2]/div/div[1]/div/div[2]/div/div/div[12]/div/div/div/div/div[22]/div/div/select\"));\n\t\t Select PreReason = new Select(PreReasonElement);\n\t\t PreReason.selectByIndex(2);\n\t\t \n\t\t Thread.sleep(9000);\n\t\t \n\t\t //General Ledger from combo box\n\t\t WebElement GenLedElement = TC001_LoginOTM.getDriver().findElement(By.xpath(\"//html/body/div/div/div[2]/div/div[2]/div/div/div[2]/div/div[1]/div/div[2]/div/div/div[15]/div/div/div/div[2]/div/div/input\"));\n\t\t //Select GenLed = new Select(GenLedElement);\n\t\t //GenLed.selectByVisibleText(\"143-16400-000\");\n\t\t GenLedElement.sendKeys(GeneralLedger);\n\t\t Thread.sleep(5000);\n\t\t GenLedElement.sendKeys(Keys.ARROW_DOWN.ENTER);\n\t\t \n\t\t Thread.sleep(9000);\n\t\t \n\t\t //click on create button\n\t\t TC001_LoginOTM.getDriver().findElement(By.xpath(\"//html/body/div/div/div[2]/div/div[2]/div/div/div[2]/div/div[1]/div/div[2]/div/div/div[25]/div/div/div/div[1]/div/div/div/div[1]/div/div/div/div[1]/div/div/span/span\")).click();\n\t\t Thread.sleep(9000);\n\t\t \n\t\t \n\t\t \n\t\t //String message = \"//html/body/div/div/div[2]/div/div[2]/div/div/div[2]/div/div[1]/div/div[2]/div/div/div[25]/div/div/div/div[1]/div/div/div/div[2]/div/div/div/div[1]/div/div\";\n\t\t System.out.println(\"Before popup window\");\n\t\t new WebDriverWait(TC001_LoginOTM.getDriver(),30).until(ExpectedConditions.elementToBeClickable(By.xpath(\"//html/body/div/div/div[2]/div/div[2]/div/div/div[2]/div/div[1]/div/div[2]/div/div/div[25]/div/div/div/div[1]/div/div/div/div[2]/div/div\")));\n\t\t \n\t\t System.out.println(\"After popup window\");\n\t\t Thread.sleep(9000);\n\t\t \t\t \n\t\t \n\t\t String element_text = TC001_LoginOTM.getDriver().findElement(By.xpath(\"//html/body/div/div/div[2]/div/div[2]/div/div/div[2]/div/div[1]/div/div[2]/div/div/div[25]/div/div/div/div[1]/div/div/div/div[2]/div/div\")).getText();\n\t\t //splitting on the basis of space and taking index 1 to take order no \n\t\t String element_text_actual = element_text.split(\" \")[1];\n\t\t System.out.println(element_text_actual);\t\n\t\t \n\t\t\n\t\t try {\n\t\t\t //writing order no to Excel file\n\t\t\t // HSSFWorkbook wb = new HSSFWorkbook(); \n\t\t\t //CreationHelper createHelper = wb.getCreationHelper();\n\t\t\t //Sheet sheet = wb.createSheet(\"Sheet1\");\n\t\t\t \n\t\t\t //HSSFRow row = (HSSFRow) sheet.createRow(1);\n\t\t //HSSFCell cell;\n\t\t //Creating rows and filling them with data \n\t\t // cell = row.createCell(1);\n\t\t // cell.setCellValue(createHelper.createRichTextString(element_text_actual));\n\t\t\t // FileOutputStream fileOut;\n // fileOut = new FileOutputStream(\"Testdata/FOE_output.xls\");\n\t\t\t // wb.write(fileOut);\n\t\t\t // fileOut.close(); \n\t\t\t//create an object of Workbook and pass the FileInputStream object into it to create a pipeline between the sheet and eclipse.\n\t\t\t\tFileInputStream fis = new FileInputStream(\"Testdata/FOE_output.xlsx\");\n\t\t\t\tXSSFWorkbook workbook = new XSSFWorkbook(fis);\n\t\t\t\t//call the getSheet() method of Workbook and pass the Sheet Name here. \n\t\t\t\t//In this case I have given the sheet name as “TestData” \n\t\t //or if you use the method getSheetAt(), you can pass sheet number starting from 0. Index starts with 0.\n\t\t\t\tXSSFSheet sheet = workbook.getSheet(\"sheet1\");\n\t\t\t\t//XSSFSheet sheet = workbook.getSheetAt(0);\n\t\t\t\t//Now create a row number and a cell where we want to enter a value. \n\t\t\t\t//Here im about to write my test data in the cell B2. It reads Column B as 1 and Row 2 as 1. Column and Row values start from 0.\n\t\t\t\t//The below line of code will search for row number 2 and column number 2 (i.e., B) and will create a space. \n\t\t //The createCell() method is present inside Row class.\n\t\t XSSFRow row = sheet.createRow(1);\n\t\t\t\tCell cell = row.createCell(1);\n\t\t\t\t//Now we need to find out the type of the value we want to enter. \n\t\t //If it is a string, we need to set the cell type as string \n\t\t //if it is numeric, we need to set the cell type as number\n\t\t\t\tcell.setCellType(cell.CELL_TYPE_STRING);\n\t\t\t\tcell.setCellValue(element_text_actual);\n\t\t\t\tFileOutputStream fos = new FileOutputStream(\"Testdata/FOE_output.xlsx\");\n\t\t\t\tworkbook.write(fos);\n\t\t\t\tfos.close();\n\t\t\t\tSystem.out.println(\"END OF WRITING DATA IN EXCEL\");\n\t\t} catch (FileNotFoundException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t\t\n\t\t} \n\t\t\n\t\t Assert.assertTrue(element_text.contains(\"Order\"));\t\t \n\t\t \n\t }", "@Test\n\tpublic void scroll_multy_fingure_tap() {\n\t}", "@Test\n public void testCase2() {\n homePage.openSite();\n\n //2 Assert Browser title\n homePage.checkHomePageTitle();\n\n //3 Perform login\n homePage.login(PITER_CHAILOVSKII.login, PITER_CHAILOVSKII.password);\n\n //4 Assert User name in the left-top side of screen that user is logged in\n homePage.checkUserNameAfterLogIn();\n\n //5 Open through the header menu Service -> Dates Page\n homePage.openDatesServicePage();\n\n //6 Using drag-and-drop set Range sliders. left sliders - the most left position,\n // right slider - the most right position\n datesPage.settingRightRoller(100);\n datesPage.settingLeftRoller(0);\n\n //7 Assert that for \"From\" and \"To\" sliders there are logs rows with corresponding values\n datesPage.checkLog(2, \"to\", 100);\n datesPage.checkLog(1, \"from\", 0);\n\n //8 Using drag-and-drop set Range sliders. left sliders - the most left position, right slider -\n // the most left position.\n datesPage.settingLeftRoller(0);\n datesPage.settingRightRoller(0);\n\n //9 Assert that for \"From\" and \"To\" sliders there are logs rows with corresponding values\n datesPage.checkLog(2, \"from\", 0);\n datesPage.checkLog(1, \"to\", 0);\n\n //10 Using drag-and-drop set Range sliders. left sliders - the most right position, right slider - the most\n // right position.\n datesPage.settingRightRoller(100);\n datesPage.settingLeftRoller(100);\n datesPage.checkLog(1, \"from\", 100);\n datesPage.checkLog(2, \"to\", 100);\n\n //12 Using drag-and-drop set Range sliders.\n datesPage.settingLeftRoller(30);\n datesPage.settingLeftRoller(30);\n datesPage.settingRightRoller(70);\n datesPage.checkLog(2, \"from\", 30);\n datesPage.checkLog(1, \"to\", 70);\n }", "@Test (priority=1)\n\t\tpublic static void QuestionType1 () throws InterruptedException, IOException {\t\n\t\t SoftAssert assertion1 = new SoftAssert();\n\t\t FileInputStream finput = new FileInputStream(src);\n\t workbook = new HSSFWorkbook(finput);\n\t sheet= workbook.getSheetAt(0); //preview sheet\n\t for(int i=2; i<=sheet.getLastRowNum(); i++)\n\t {\t\n\t \tLogin();\t \t\n\t\t\t \tdriver.findElement(By.xpath(\"//*[@id=\\\"batch\\\"]\")).click(); //click new batch icon\n\t\t\t\tdriver.findElement(By.xpath(\"//*[contains(text(),'New Master')]\")).click(); //Click master batch icon\n\t\t\t//Fill basic details\n\t\t\t\tcell = sheet.getRow(i).getCell(1);\n\t\t cell.setCellType(Cell.CELL_TYPE_STRING);\n\t\t\t\tdriver.findElement(By.xpath(\"//*[@id=\\\"type_name\\\"]\")).sendKeys(cell.getStringCellValue());\n\t\t\t\tcell = sheet.getRow(i).getCell(2);\n\t\t cell.setCellType(Cell.CELL_TYPE_STRING);\n\t\t\t\tSelect templateCategory =new Select(driver.findElement(By.xpath(\"//*[@id=\\\"type_category\\\"]\")));\n\t\t\t\ttemplateCategory.selectByVisibleText(cell.getStringCellValue());\n\t\t\t\tcell = sheet.getRow(i).getCell(3);\n\t\t cell.setCellType(Cell.CELL_TYPE_STRING);\n\t\t\t\tSelect templateType =new Select(driver.findElement(By.xpath(\"//*[@id=\\\"template_type\\\"]\")));\n\t\t\t\ttemplateType.selectByVisibleText(cell.getStringCellValue());\n\t\t\t\tcell = sheet.getRow(i).getCell(4);\n\t\t cell.setCellType(Cell.CELL_TYPE_STRING);\n\t\t\t\tdriver.findElement(By.xpath(\"//*[@id=\\\"type_purpose\\\"]\")).clear();\n\t\t\t\tdriver.findElement(By.xpath(\"//*[@id=\\\"type_purpose\\\"]\")).sendKeys(cell.getStringCellValue());\n\t\t\t\tcell = sheet.getRow(i).getCell(5);\n\t\t cell.setCellType(Cell.CELL_TYPE_STRING);\n\t\t\t\tdriver.findElement(By.xpath(\"//*[@id=\\\"type_document\\\"]\")).clear();\n\t\t\t\tdriver.findElement(By.xpath(\"//*[@id=\\\"type_document\\\"]\")).sendKeys(cell.getStringCellValue());\n\t\t\t\t//save\n\t\t\t\tdriver.findElement(By.xpath(\"//*[@id=\\\"masterSave\\\"]\")).click();\n\t\t\t\t//upload assert\n\t\t\t\tcell = sheet.getRow(i).getCell(6);\n\t\t cell.setCellType(Cell.CELL_TYPE_STRING);\n\t\t\t\tdriver.findElement(By.xpath(\"//*[@id=\\\"type_name1\\\"]\")).sendKeys(cell.getStringCellValue()); //enter assert master record name\n\t\t\t\tThread.sleep(5000);\n\t\t\t\t\n\t\t\t\tString file = \"//home//s4cchinpc105//Desktop//ZImage//download1.jpeg\";\n\t\t\t\tdriver.findElement(By.xpath(\"//*[@id=\\\"asset_files\\\"]\")).sendKeys(file); //upload file\n\t\t\t\tThread.sleep(3000);\n\t\t\t\tWebElement uploadedfile1 = driver.findElement(By.xpath(\"//*[@id=\\\"assetTable\\\"]/tr[1]/td/label\"));\n\t\t\t\tString uploadedfile1text = uploadedfile1.getText();\n\t\t\t\tString expectuploadedfile1text = \"download1.jpeg\";\n\t\t\t\t//assertion1.assertEquals(expectuploadedfile1text, uploadedfile1text); \n\t\t\t\tThread.sleep(3000);\n\t\t \t\tdriver.findElement(By.xpath(\"//*[@id=\\\"fileSave\\\"]\")).click(); // click continue\n\t\t \t\tThread.sleep(3000);\n\t\t\t \t\t\n\t\t\t\t//Form Builder - single input\n\t\t\t driver.findElement(By.xpath(\"//img[contains(@src,'/Survey-portlet/images/Add question icon.svg')]\")).click();\n\t\t\t Thread.sleep(5000);\n\t\t\t driver.findElement(By.xpath(\"//*[@class=\\\"svd_toolbox_item svd-light-border-color svdToolboxItem svd_toolbox_item_icon-text\\\"]\")).click(); //single input\n\t\t\t Thread.sleep(5000);\n\t\t\t driver.findElement(By.xpath(\"//*[@class=\\\"sv_qstn question_actions svd_question svd-dark-bg-color svd_q_design_border svd_q_selected svd-main-border-color\\\"]/div[3]/question-actions/div/span\")).click(); //click properties icon \n\t\t\t Thread.sleep(6000);\n\t ((JavascriptExecutor)driver).executeScript(\"arguments[0].scrollIntoView();\", driver.findElement(By.xpath(\"//span[contains(text(), 'Title')]/parent::td/parent::tr/td[2]/div/div[2]/input\")));\n\t cell = sheet.getRow(i).getCell(7);\n\t\t cell.setCellType(Cell.CELL_TYPE_STRING);\n\t\t\t driver.findElement(By.xpath(\"//span[contains(text(), 'Title')]/parent::td/parent::tr/td[2]/div/div[2]/input\")).sendKeys(cell.getStringCellValue());\n\t\t\t \n\t\t\t //Form Builder - dropdown\n\t\t\t driver.findElement(By.xpath(\"//img[contains(@src,'/Survey-portlet/images/Add question icon.svg')]\")).click();\n\t\t\t Thread.sleep(5000);\n\t\t\t driver.findElement(By.xpath(\"//span[contains(text(),'Dropdown')]\")).click(); //Dropdown\n\t\t\t Thread.sleep(5000);\n\t\t\t driver.findElement(By.xpath(\"//*[@class=\\\"sv_qstn question_actions svd_question svd-dark-bg-color svd_q_design_border svd_q_selected svd-main-border-color\\\"]/div[3]/question-actions/div/span\")).click(); //click properties icon \n\t\t\t Thread.sleep(6000);\n\t ((JavascriptExecutor)driver).executeScript(\"arguments[0].scrollIntoView();\", driver.findElement(By.xpath(\"//span[contains(text(), 'Title')]/parent::td/parent::tr/td[2]/div/div[2]/input\")));\n\t cell = sheet.getRow(i).getCell(8);\n\t\t cell.setCellType(Cell.CELL_TYPE_STRING);\n\t\t\t driver.findElement(By.xpath(\"//span[contains(text(), 'Title')]/parent::td/parent::tr/td[2]/div/div[2]/input\")).sendKeys(cell.getStringCellValue());\n\t\t\t Thread.sleep(5000);\n\n\t\t\t //Form Builder - dynamic matrix\n\t \t\tdriver.findElement(By.xpath(\"//img[contains(@src,'/Survey-portlet/images/Add question icon.svg')]\")).click();\n\t \t\tThread.sleep(5000);\n\t \t\tdriver.findElement(By.xpath(\"//span[contains(text(),'Matrix (dynamic rows)')]\")).click(); //Matrix (dynamic rows)\n\t\t\t Thread.sleep(5000);\n\t \t\tdriver.findElement(By.xpath(\"//*[@class=\\\"sv_qstn question_actions svd_question svd-dark-bg-color svd_q_design_border svd_q_selected svd-main-border-color\\\"]/div[3]/question-actions/div/span[1]/img\")).click(); //click properties icon\n\t \t\t((JavascriptExecutor)driver).executeScript(\"arguments[0].scrollIntoView();\", driver.findElement(By.xpath(\"//span[contains(text(), 'Title')]/parent::td/parent::tr/td[2]/div/div[2]/input\")));\n\t cell = sheet.getRow(i).getCell(9);\n\t\t cell.setCellType(Cell.CELL_TYPE_STRING);\n\t\t\t driver.findElement(By.xpath(\"//span[contains(text(), 'Title')]/parent::td/parent::tr/td[2]/div/div[2]/input\")).sendKeys(cell.getStringCellValue());\n\t\t\t Thread.sleep(5000);\n\n\t\t\t //Add second page\n\t\t\t driver.findElement(By.xpath(\"//*[@title=\\\"Add New Page\\\"]\")).click(); \n\t\t\t\t\n\t\t\t//Form Builder - rating\n\t\t \tdriver.findElement(By.xpath(\"//img[contains(@src,'/Survey-portlet/images/Add question icon.svg')]\")).click();\n\t\t \tThread.sleep(5000);\n\t\t \tdriver.findElement(By.xpath(\"//span[contains(text(),'Rating')]\")).click(); //Rating\t\t\n\t\t \tThread.sleep(5000);\n\t\t \tdriver.findElement(By.xpath(\"//*[@class=\\\"sv_qstn question_actions svd_question svd-dark-bg-color svd_q_design_border svd_q_selected svd-main-border-color\\\"]/div[3]/question-actions/div/span\")).click(); //click properties icon\n\t\t \t((JavascriptExecutor)driver).executeScript(\"arguments[0].scrollIntoView();\", driver.findElement(By.xpath(\"//span[contains(text(), 'Title')]/parent::td/parent::tr/td[2]/div/div[2]/input\")));\n\t cell = sheet.getRow(i).getCell(10);\n\t\t cell.setCellType(Cell.CELL_TYPE_STRING);\n\t\t\t driver.findElement(By.xpath(\"//span[contains(text(), 'Title')]/parent::td/parent::tr/td[2]/div/div[2]/input\")).sendKeys(cell.getStringCellValue());\n\t\t\t Thread.sleep(5000);\n\n\t\t\t//Form Builder - matrix single choice\n\t\t \tdriver.findElement(By.xpath(\"//img[contains(@src,'/Survey-portlet/images/Add question icon.svg')]\")).click();\n\t\t \tThread.sleep(5000);\n\t\t \tdriver.findElement(By.xpath(\"//*[@class=\\\"svd_toolbox_item svd-light-border-color svdToolboxItem svd_toolbox_item_icon-matrix\\\"]/span[2]\")).click(); //single choice\n\t\t\t Thread.sleep(5000);\n\t\t \tdriver.findElement(By.xpath(\"//*[@class=\\\"sv_qstn question_actions svd_question svd-dark-bg-color svd_q_design_border svd_q_selected svd-main-border-color\\\"]/div[3]/question-actions/div/span\")).click(); //click properties icon\n\t\t \t((JavascriptExecutor)driver).executeScript(\"arguments[0].scrollIntoView();\", driver.findElement(By.xpath(\"//span[contains(text(), 'Title')]/parent::td/parent::tr/td[2]/div/div[2]/input\")));\n\t cell = sheet.getRow(i).getCell(11);\n\t\t cell.setCellType(Cell.CELL_TYPE_STRING);\n\t\t\t driver.findElement(By.xpath(\"//span[contains(text(), 'Title')]/parent::td/parent::tr/td[2]/div/div[2]/input\")).sendKeys(cell.getStringCellValue());\n\t\t\t Thread.sleep(5000);\n\n\t\t\t driver.findElement(By.xpath(\"//*[@id=\\\"saveSurvey\\\"]\")).click(); //save\n\t \tThread.sleep(5000); \n\t \t\n\t\t ((JavascriptExecutor)driver).executeScript(\"arguments[0].scrollIntoView();\", driver.findElement(By.xpath(\"//*[contains(text(), 'Complete')]\"))); \n\t\t\t driver.findElement(By.xpath(\"//*[contains(text(), 'Complete')]\")).click(); //complete\n\t\t\t Thread.sleep(5000);\n\t\t\n\t\t\t String thirdques = driver.findElement(By.xpath(\"//*[@class=\\\"sv_p_root\\\"]/div[4]/div/div/h5/span[3]\")).getText();\n\t\t String expectthirdques = \"Dynamic Matrix Question\";\n\t\t AssertJUnit.assertEquals(expectthirdques, thirdques); \n\t\t\n\t\t Thread.sleep(6000);\n\t\t ((JavascriptExecutor)driver).executeScript(\"arguments[0].scrollIntoView();\", driver.findElement(By.xpath(\"//*[@id=\\\"surveyElement\\\"]/div/form/div[2]/div/div[4]/input[2]\")));\n\t \n\t\t driver.findElement(By.xpath(\"//*[@id=\\\"surveyElement\\\"]/div/form/div[2]/div/div[4]/input[2]\")).click(); //click next\n\t\t Thread.sleep(5000);\n\t\t String fifthques = driver.findElement(By.xpath(\"//*[@class=\\\"sv_p_root\\\"]/div[3]/div/div/h5/span[3]\")).getText();\n\t\t String expectfifthques = \"Single Matrix Question\";\n\t\t AssertJUnit.assertEquals(expectfifthques, fifthques); \n\t\t assertion1.assertAll();\n\t\t \t\t\n\t\t driver.findElement(By.xpath(\"//*[@id=\\\"surveyElement\\\"]/div/form/div[2]/div/div[4]/input\")).click(); //click previous\n\t\t \tThread.sleep(2000);\n\t\t \tClose();\n\t }\n\t }", "public void assertProductPrice() throws ParseException {\n wait.until(ExpectedConditions.visibilityOfElementLocated(_productPrice));\n\n\n // scroll down to get visibility for every element\n JavascriptExecutor jse = (JavascriptExecutor) driver;\n jse.executeScript(\"window.scrollBy(0,5000)\", \"\");\n\n // Check the number of pages for agination\n List <WebElement> pagination = driver.findElements(_pagination);\n System.out.println(\"Total number of pages are \" + pagination.size());\n\n\n /* First for loop to get pagination so that once the products are\n asserted in the next loop than this loop will look for next page\n and click on page 2\n */\n for(int i=0; i<pagination .size(); i++){\n // common element for product price\n java.util.List<WebElement> price = driver.findElements(_productPrice);\n\n // loop to get product price and assert that price is in price range searched\n for (int j = 0; j < price.size(); j = j + 1) {\n\n // get the text of the product price eg:£20.00\n String productPrice = price.get(j).getText();\n\n // Number format inbuilt class in Java to split currency sign and number\n NumberFormat priceFormat = NumberFormat.getCurrencyInstance();\n\n // parse function which passes the format of price without decimal and pound sign\n Number number = priceFormat.parse(productPrice);\n System.out.println(number.toString());\n\n // Assert product price is greater than or equal to £20\n Assert.assertTrue(number.intValue() >= 20);\n System.out.println(\"This product price is greater then £20\");\n\n // Assert product price is less than or equal to £39\n Assert.assertTrue(number.intValue() <= 39);\n System.out.println(\"This product price is less then £39\");\n }\n // if block to paginate and go to next page\n if(pagination .size()>0){\n System.out.println(\"pagination exists\");\n\n // Scroll to page 2 link at the bottom of the page\n WebElement element = driver.findElement(_pageTwoLink);\n jse.executeScript(\"arguments[0].scrollIntoView(true);\", element);\n\n // scroll up as the above sctoll to view method scrolls right at the bottom of page\n jse.executeScript(\"window.scrollBy(0,-500)\");\n\n Boolean nextButton = driver.findElement(_pageTwoLink).isEnabled();\n if (nextButton) {\n // click on page 2\n driver.findElement(_pageTwoLink).click();\n\n // implicit wait to wait until all the elements are loaded\n implicitWait(5);\n }\n else {\n System.out.println(nextButton + \" is not clickable\");\n }\n }\n else {\n System.out.println(\"pagination does not exists\");\n }\n }\n }", "public void giftOverviewInitialPage(WebDriver driver) throws InvalidFormatException, InterruptedException\r\n\t{\r\n\t\ttry\r\n\t\t{\r\n\t\t\tExcelLib xllib = new ExcelLib();\r\n\t\t\t\r\n\t\t\trowCount= xllib.getRowCount(\"GiftOverview\");\r\n\t\t\tlog.info(\"*********************Gift Overview Logger Initialized***********************************************************************************************************************************************************************\");\r\n\t\t\tlog.info(\"Purchaser Email ||\"+\" Amount ||\" + \" Reason ||\" + \" Add Credits || \" + \" Subtract Credits || \" + \" Credit Status ||\" + \" First Name || \" + \" Last Name || \" + \" Credit Type || \" + \" Amount(Credited/Redeem) || \" + \" Sub Category || \" + \" Credit Time ||\" + \" Source\");\r\n\t \t\tlog.info(\"********************************************************************************************************************************************************************************************************************************\");\r\n\t\t\tfor (i = 1; i <= rowCount; i++) \r\n\t\t\t{\t\t\t\t\r\n\t\t\t\t//Reading View Edit Tickets values\r\n\t\t\t\tpurchaserEmail = xllib.getExcelData(\"GiftOverview\", i, 0);\r\n\t\t \t\tcode = xllib.getExcelData(\"GiftOverview\", i, 1);\r\n\t\t \t\t\r\n\t\t \t\t//Search criteria\r\n\t\t\t\tsearchCriteria(driver);\r\n\t\t\t\t\r\n\t\t \t\t//Calling gift Overview Actions method\r\n\t\t\t\trefundGiftActions(driver);\r\n\t\t \t\t\r\n\t\t\t\t//Calling clicking on go back link method\r\n\t\t\t\t//clickingOnGoBackLink(driver);\r\n\t\t\t\t\r\n\t\t \t\tif(verifyRefundStatus)\r\n\t\t\t\t{\r\n\t\t\t\t\tisTestPassed=\"PASS\";\r\n\t\t\t\t\txllib.writeToExcel(\"GiftOverview\", i, 2, isTestPassed);\r\n\t\t\t\t\txllib.writeToExcel(\"GiftOverview\", i, 3, membershipRefundID);\r\n\t\t\t\t\txllib.writeToExcel(\"GiftOverview\", i, 4, chargeID);\r\n\t\t\t\t\txllib.writeToExcel(\"GiftOverview\", i, 5, totalCashToRefund);\r\n\t\t\t\t\t\r\n\t\t\t\t\tif(verifyCreditsRefundID)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\txllib.writeToExcel(\"GiftOverview\", i, 6, creditsRefundID);\r\n\t\t\t\t\t}\r\n\t\t\t\t}else\r\n\t\t\t\t{\r\n\t\t\t\t\tisTestPassed=\"FAIL\";\r\n\t\t\t\t\txllib.writeToExcel(\"GiftOverview\", i, 2, isTestPassed);\r\n\t\t\t\t\txllib.writeToExcel(\"GiftOverview\", i, 3, isTestPassed);\r\n\t\t\t\t\txllib.writeToExcel(\"GiftOverview\", i, 4, isTestPassed);\r\n\t\t\t\t\txllib.writeToExcel(\"GiftOverview\", i, 5, isTestPassed);\r\n\t\t\t\t\txllib.writeToExcel(\"GiftOverview\", i, 6, isTestPassed);\r\n\t\t\t\t}\r\n\t\t\t }//End of FOR LOOP\r\n\t\t }catch(NullPointerException e)\r\n\t\t {\r\n\t\t\t e.printStackTrace();\r\n\t\t }\r\n\t}", "@Test(dataProviderClass = DataProviderUtils.class, dataProvider = \"excelDataReader\",testName=\"Test1_6_4\",description=\"Test1_6_3 : State transition prompt \")\r\n\tpublic void Test1_6_4(HashMap<String,String> dataValues,String currentDriver,ITestContext context) throws Exception {\r\n\r\n\t\t//Variable Declaration\r\n\t\tdriver = WebDriverUtils.getDriver();\r\n\t\t\r\n\r\n\t\tConcurrentHashMap <String, String> testData = new ConcurrentHashMap <String, String>(dataValues);\r\n\t\tLoginPage loginPage=null;\r\n\r\n\t\tConfigurationPage configPage=null;\r\n\t\tHomePage homepage=null;\r\n\t\ttry {\r\n\r\n\t\t\t//Step-1: Login to Configuration Page\r\n\t\t\tloginPage=new LoginPage(driver);\r\n\t\t\tloginPage.navigateToApplication(configSite,userName,password,\"\");\t\r\n\t\t\tLog.message(\"1. Logged in to Configuration Page\", driver);\r\n\r\n\t\t\t//Step-2: Click Vault from left panel of Configuration Page\r\n\t\t\tconfigPage=new ConfigurationPage(driver);\r\n\t\t\tconfigPage.clickVaultFolder(testData.get(\"VaultName\"));\r\n\t\t\tLog.message(\"2. Select 'Sample vault' from left panel of Configuration Page\", driver);\r\n\r\n\r\n\t\t\t//Step-3 : Set value for Maximum number of search results\r\n\r\n\t\t\tif (!configPage.configurationPanel.getVaultAccess()) {\r\n\t\t\t\tconfigPage.configurationPanel.setVaultAccess(true); //Allows access to this vault\r\n\t\t\t}\r\n\r\n\t\t\tconfigPage.expandVaultFolder(documentVault);\r\n\t\t\tLog.message(\"3. Clicked '\"+documentVault+\"' from left panel of Configuration Page\", driver);\r\n\r\n\t\t\t//Step-4 : Set the control values\r\n\r\n\t\t\tconfigPage.setUTCdate(true); \r\n\t\t\tconfigPage.clickSaveButton();\r\n\t\t\t// Check any warning dialog displayed\r\n\t\t\tif(configPage.isWarningDialogDisplayed())\r\n\t\t\t{\r\n\t\t\t\tconfigPage.clickResetButton();\r\n\t\t\t\tconfigPage.setUTCdate(true); \r\n\t\t\t\tconfigPage.clickSaveButton();\r\n\t\t\t\tconfigPage.clickOKBtnOnSaveDialog(); \r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t\tconfigPage.clickOKBtnOnSaveDialog();\r\n\r\n\t\t\tLog.message(\"4. UTC date option is enabled and settings are saved.\", driver);\r\n\t\t\t//Step-3 : Login to the vault\r\n\t\t\tconfigPage.clickLogOut(); //Logs out from the Configuration page\r\n\t\t\tLog.message(\"5. LoggedOut from configuration page.\", driver);\r\n\r\n\t\t\t//Step-5: Login to Web Access Vault\r\n\t\t\tloginPage.navigateToApplication(webSite,userName,password,testData.get(\"VaultName\"));\r\n\t\t\tUtils.waitForPageLoad(driver);\r\n\t\t\thomepage=new HomePage(driver);\r\n\r\n\t\t\tif (!homepage.isLoggedIn(userName))\r\n\t\t\t\tthrow new Exception(\"Some Error encountered while logging..check testdata..\");\r\n\t\t\tLog.message(\"6. Logged in to the vault (\" + testData.get(\"VaultName\") + \").\", driver);\r\n\r\n\t\t\t//Step-6 : To perform all object search\r\n\t\t\t//---------------------------------------\r\n\t\t\tSearchPanel searchpanel = new SearchPanel(driver);\r\n\t\t\tsearchpanel.clickSearchBtn(driver);\r\n\r\n\t\t\tLog.message(\"7. Perform all object search.\", driver); \r\n\r\n\t\t\t//Step-7 : Select any existing object\r\n\t\t\t//-------------------------------------\r\n\t\t\thomepage.listView.clickItemByIndex(0);\r\n\t\t\tUtils.fluentWait(driver);\r\n\t\t\tString selecteddocument = homepage.listView.getItemNameByItemIndex(0);\r\n\t\t\tUtils.fluentWait(driver);\r\n\t\t\tLog.message(\"8. Select any existing object.\" + selecteddocument, driver);\r\n\r\n\t\t\t//Step-8 : Click workflow option from task pane area\r\n\t\t\t//------------------------------------------\r\n\r\n\t\t\tMetadataCard metadata = new MetadataCard(driver, true);\r\n\t\t\tString createddate = metadata.getCreatedDate();\r\n\r\n\t\t\t//Step-9: Verify number of objects displayed in listing view\r\n\t\t\tif (createddate.contains(\"GMT\"))\r\n\t\t\t\tLog.pass(\"Test Passed. Created date displayed in UTC format.\");\r\n\t\t\telse\r\n\t\t\t\tLog.fail(\"Test Failed. Created date is not displayed in UTC format.\", driver);\r\n\r\n\t\t} //End try\r\n\r\n\t\tcatch (Exception e) {\r\n\t\t\tLog.exception(e, driver);\r\n\t\t} //End catch\r\n\r\n\t\tfinally {\r\n\r\n\t\t\tdriver.quit();\t\r\n\t\t} //End finally\r\n\t}", "public void Inter() throws InterruptedException {\n\t\t//Adv.click();\n\t\tJavascriptExecutor js = (JavascriptExecutor)driver;\n\t\t//js.executeScript(\"arguments[0].click()\", Elemnt);\n\t\t//Thread.sleep(3000);\n\t\tjs.executeScript(\"window.scrollBy(0,360)\");\n\t\tThread.sleep(2000);\n\t\tjs.executeScript(\"arguments[0].click()\", Interactiontab);\n\t\tThread.sleep(3000);\n\t\tLogger5.log(Status.PASS, \"Interaction tab has opened successfully\");\n\t\t\n\t\tjs.executeScript(\"window.scrollBy(0,360)\");\n\t\tThread.sleep(2000);\n\t\tjs.executeScript(\"arguments[0].click()\", Sortable);\n\t\tThread.sleep(3000);\n\t\tLogger5.log(Status.PASS, \"Sortable tab has opened successfully\");\n\t\t\n\t\tGrid.click();\n\t\tThread.sleep(3000);\n\t\tLogger5.log(Status.PASS, \"Grid tab has opened successfully\");\n\n\t\tGridThree.click();\n\t\tThread.sleep(3000);\n\t\tLogger5.log(Status.PASS, \"Grid tab has selected firstnumber successfully\");\n\n\t\tGridNine.click();\n\t\tThread.sleep(3000);\n\t\tLogger5.log(Status.PASS, \"Grid tab has selected Second number successfully\");\n\n\t\tjs.executeScript(\"window.scrollBy(0,360)\");\n\t\tThread.sleep(2000);\n\t\tjs.executeScript(\"arguments[0].click()\", Selectable);\n\t\tThread.sleep(3000);\n\t\tLogger5.log(Status.PASS, \"Selectable tab has opened successfully\");\n\t\t\n\t\tList3.click();\n\t\tThread.sleep(3000);\n\t\tLogger5.log(Status.PASS, \"List tab has selected first number successfully \");\n\t\t\n\t\tList1.click();\n\t\tThread.sleep(3000);\n\t\tLogger5.log(Status.PASS, \"List tab has selected second number successfully \");\n\t\t\n\t\t\n\t\tGridSelect.click();\n\t\tThread.sleep(3000);\n\t\tLogger5.log(Status.PASS, \"Grid tab has opened successfully in Selectable tab\");\n\n\t\tGridSeven.click();\n\t\tThread.sleep(3000);\n\t\tLogger5.log(Status.PASS, \"Grid tab has selected firstnumber successfully\");\n\t\t\n\t\tGridfive.click();\n\t\tThread.sleep(3000);\n\t\tLogger5.log(Status.PASS, \"Grid tab has selected firstnumber successfully\");\n\t\t\n\t\t\n\t\tjs.executeScript(\"window.scrollBy(0,360)\");\n\t\tThread.sleep(2000);\n\t\tjs.executeScript(\"arguments[0].click()\",Resize);\n\t\tThread.sleep(3000);\n\t\tLogger5.log(Status.PASS, \"Resize tab has opened successfully\");\n\t\t\n\t\tActions act= new Actions(driver);\n\t\tact.dragAndDropBy(arrow, 20, 15).perform();;\n\t\tThread.sleep(3000);\n\t\tLogger5.log(Status.PASS, \"Size has been changed successfully\");\n\n\t\tjs.executeScript(\"window.scrollBy(0,360)\");\n\t\tThread.sleep(2000);\n\t\tjs.executeScript(\"arguments[0].click()\",drop);\n\t\tThread.sleep(3000);\n\t\tLogger5.log(Status.PASS, \"Dropable tab has opened successfully\");\n\t\t\n\t\tActions action=new Actions(driver);\n\t\taction.dragAndDrop(drag, drop1).perform();\n\t\tLogger5.log(Status.PASS, \"Simple drag has performed successfully\");\n\n\t\t\n\t\taccept.click();\n\t\tThread.sleep(3000);\n\t\tLogger5.log(Status.PASS, \"Accept tab has opened successfully\");\n\t\t\n\t\tActions a =new Actions(driver);\n\t\ta.dragAndDrop(aceptable, drop2);\n\t\tThread.sleep(5000);\n\t\tLogger5.log(Status.PASS, \"Accept drag has performed successfully\");\n\n\t\tjs.executeScript(\"window.scrollBy(0,360)\");\n\t\tThread.sleep(2000);\n\t\tjs.executeScript(\"arguments[0].click()\",dragable);\n\t\tThread.sleep(3000);\n\t\tLogger5.log(Status.PASS, \"Draggable tab has opened successfully\");\n\t\t\n\t\tAxis.click();\n\t\tThread.sleep(3000);\n\t\tLogger5.log(Status.PASS, \"Axis restricted tab has opened successfully\");\n\t\t\t\n\t\n\t\tPoint p=xaxis.getLocation();\n\t\tSystem.out.println(\"Position of X-axis is :-\" +p.getX());\n\t\tSystem.out.println(\"Position of Y-axis is :-\" +p.getY());\n\t\tActions x=new Actions(driver);\n\t\tx.dragAndDropBy(xaxis, -100, p.getY());\n\t\tThread.sleep(3000);\n\t\tLogger5.log(Status.PASS, \"X Axis has moved successfully\");\n\t\n\t\tActions y=new Actions(driver);\n\t\ty.dragAndDropBy(yaxis, 0, 900);\n\t\tThread.sleep(3000);\n\t\tLogger5.log(Status.PASS, \"Y Axis has moved successfully\");\n\t}", "@Test(dataProviderClass = DataProviderUtils.class, dataProvider = \"excelDataReader\",testName=\"Test1_6_3\",description=\"Test1_6_3 : State transition prompt \")\r\n\tpublic void Test1_6_3(HashMap<String,String> dataValues,String currentDriver,ITestContext context) throws Exception {\r\n\r\n\t\t//Variable Declaration\r\n\t\tdriver = WebDriverUtils.getDriver();\r\n\t\t\r\n\r\n\t\tConcurrentHashMap <String, String> testData = new ConcurrentHashMap <String, String>(dataValues);\r\n\t\tLoginPage loginPage=null;\r\n\r\n\t\tConfigurationPage configPage=null;\r\n\t\tHomePage homepage=null;\r\n\t\ttry {\r\n\r\n\t\t\t//Step-1: Login to Configuration Page\r\n\t\t\tloginPage=new LoginPage(driver);\r\n\t\t\tloginPage.navigateToApplication(configSite,userName,password,\"\");\t\r\n\t\t\tLog.message(\"1. Logged in to Configuration Page\", driver);\r\n\r\n\t\t\t//Step-2: Click Vault from left panel of Configuration Page\r\n\t\t\tconfigPage=new ConfigurationPage(driver);\r\n\t\t\tconfigPage.clickVaultFolder(testData.get(\"VaultName\"));\r\n\t\t\tLog.message(\"2. Clicked 'Sample vault' from left panel of Configuration Page\", driver);\r\n\r\n\r\n\t\t\t//Step-3 : Set value for Maximum number of search results\r\n\r\n\t\t\tif (!configPage.configurationPanel.getVaultAccess()) {\r\n\t\t\t\tconfigPage.configurationPanel.setVaultAccess(true); //Allows access to this vault\r\n\t\t\t}\r\n\r\n\t\t\tconfigPage.expandVaultFolder(documentVault);\r\n\t\t\tLog.message(\"3. Clicked '\"+documentVault+\"' from left panel of Configuration Page\", driver);\r\n\r\n\t\t\t//Step-4 : Set the control values\r\n\r\n\t\t\tconfigPage.clickSettingsFolder(\"Controls\");\r\n\t\t\tif (configPage.configurationPanel.getVaultCommands(testData.get(\"Control\")).equalsIgnoreCase(\"Hide\")) {\r\n\t\t\t\tconfigPage.chooseConfigurationVaultSettings(driver, testData.get(\"Control\"),\"controls\",\"Show\");\r\n\t\t\t\tconfigPage.clickSaveButton();\r\n\r\n\t\t\t\t// Check any warning dialog displayed\r\n\t\t\t\tif(configPage.isWarningDialogDisplayed())\r\n\t\t\t\t{\r\n\t\t\t\t\tconfigPage.clickResetButton();\r\n\t\t\t\t\tconfigPage.chooseConfigurationVaultSettings(driver, testData.get(\"Control\"),\"controls\",\"Show\");\r\n\t\t\t\t\tconfigPage.clickSaveButton();\r\n\t\t\t\t\tconfigPage.clickOKBtnOnSaveDialog(); \r\n\t\t\t\t}\r\n\t\t\t\telse\r\n\t\t\t\t\tconfigPage.clickOKBtnOnSaveDialog();\r\n\t\t\t}\r\n\t\t\tLog.message(\"4. Show \" + testData.get(\"Control\") + \" is enabled and settings are saved.\", driver);\r\n\t\t\t//Step-3 : Login to the vault\r\n\t\t\tconfigPage.clickLogOut(); //Logs out from the Configuration page\r\n\t\t\tLog.message(\"5. LoggedOut from configuration page.\", driver);\r\n\r\n\t\t\t//Step-5: Login to Web Access Vault\r\n\t\t\tloginPage.navigateToApplication(webSite,userName,password,testData.get(\"VaultName\"));\r\n\t\t\tUtils.waitForPageLoad(driver);\r\n\t\t\thomepage=new HomePage(driver);\r\n\r\n\t\t\tif (!homepage.isLoggedIn(userName))\r\n\t\t\t\tthrow new Exception(\"Some Error encountered while logging..check testdata..\");\r\n\t\t\tLog.message(\"6. Logged in to the vault (\" + testData.get(\"VaultName\") + \").\", driver);\r\n\r\n\t\t\t//Step-6 : To perform all object search\r\n\t\t\t//---------------------------------------\r\n\t\t\tSearchPanel searchpanel = new SearchPanel(driver);\r\n\t\t\tsearchpanel.clickSearchBtn(driver);\r\n\r\n\t\t\tLog.message(\"7. Perform all object search.\", driver); \r\n\r\n\t\t\t//Step-7 : Select any existing object\r\n\t\t\t//-------------------------------------\r\n\t\t\thomepage.listView.clickItemByIndex(0);\r\n\t\t\tUtils.fluentWait(driver);\r\n\t\t\tString selecteddocument = homepage.listView.getItemNameByItemIndex(0);\r\n\t\t\tUtils.fluentWait(driver);\r\n\t\t\tLog.message(\"8. Select any existing object.\" + selecteddocument, driver);\r\n\r\n\t\t\t//Step-8 : Click workflow option from operation menu\r\n\t\t\t//------------------------------------------\r\n\t\t\thomepage.menuBar.ClickOperationsMenu(\"Workflow\");\r\n\t\t\tUtils.fluentWait(driver);\r\n\t\t\tLog.message(\"9 : Click Workflow option from operation menu.\", driver);\r\n\r\n\t\t\t//Step-9: Verify number of objects displayed in listing view\r\n\t\t\tif (homepage.isWorkflowdialogDisplayed())\r\n\t\t\t\tLog.pass(\"Test Passed. Workflow dialog is Displayed in MFWA.\");\r\n\t\t\telse\r\n\t\t\t\tLog.fail(\"Test Failed. Workflow dialog is not Displayed in MFWA.\", driver);\r\n\r\n\t\t} //End try\r\n\r\n\t\tcatch (Exception e) {\r\n\t\t\tLog.exception(e, driver);\r\n\t\t} //End catch\r\n\r\n\t\tfinally {\r\n\r\n\t\t\tdriver.quit();\t\r\n\t\t} //End finally\r\n\t}", "@Test\n public void scrollIntoView() throws InterruptedException {\n/*\nTask:\ngo to http://carettahotel.com/\nverify the text \"Recent Blog\" is on the page\nScroll to that element\n */\n driver.get(\"http://carettahotel.com/\");\n\n // we have to scroll otherwise it fails\n // scroll to the element by using javascript executor\n\n WebElement recentBlog = driver.findElement(By.xpath(\"//*[.='Recent Blog']\"));\n\n // 1. create javascript executor\n // ((JavascriptExecutor) driver).executeScript(\"arguments[0].scrollIntoView(true);\", recentBlog);\n JavascriptExecutor executor = (JavascriptExecutor) driver;\n executor.executeScript(\"arguments[0].scrollIntoView(true)\", recentBlog);\n\n\n\n //Wait a little so that the page scrolls down. We can use also explictlyWait\n Thread.sleep(3000);\n boolean isRecentBlogDisplayed = recentBlog.isDisplayed();\n Assert.assertTrue(isRecentBlogDisplayed);\n\n\n }", "@Test(dataProviderClass = DataProviderUtils.class, dataProvider = \"excelDataReader\",testName=\"Test1_6_2\",description=\"Test1_6_2 : Search in right pane \")\r\n\tpublic void Test1_6_2(HashMap<String,String> dataValues,String currentDriver,ITestContext context) throws Exception {\r\n\r\n\t\t//Variable Declaration\r\n\t\tdriver = WebDriverUtils.getDriver();\r\n\t\t\r\n\r\n\t\tConcurrentHashMap <String, String> testData = new ConcurrentHashMap <String, String>(dataValues);\r\n\t\tLoginPage loginPage=null;\r\n\r\n\t\tConfigurationPage configPage=null;\r\n\t\tHomePage homepage=null;\r\n\t\ttry {\r\n\r\n\t\t\t//Step-1: Login to Configuration Page\r\n\t\t\tloginPage=new LoginPage(driver);\r\n\t\t\tloginPage.navigateToApplication(configSite,userName,password,\"\");\t\r\n\t\t\tLog.message(\"1. Logged in to Configuration Page\", driver);\r\n\r\n\t\t\t//Step-2: Click Vault from left panel of Configuration Page\r\n\t\t\tconfigPage=new ConfigurationPage(driver);\r\n\t\t\tconfigPage.clickVaultFolder(testData.get(\"VaultName\"));\r\n\t\t\tLog.message(\"2. Clicked 'Sample vault' from left panel of Configuration Page\", driver);\r\n\r\n\r\n\t\t\t//Step-3 : Set value for Maximum number of search results\r\n\r\n\t\t\tif (!configPage.configurationPanel.getVaultAccess()) {\r\n\t\t\t\tconfigPage.configurationPanel.setVaultAccess(true); //Allows access to this vault\r\n\t\t\t}\r\n\r\n\t\t\tconfigPage.expandVaultFolder(documentVault);\r\n\t\t\tLog.message(\"3. Clicked '\"+documentVault+\"' from left panel of Configuration Page\", driver);\r\n\r\n\t\t\t//Step-4 : Set the control values\r\n\r\n\t\t\tconfigPage.clickSettingsFolder(\"Controls\");\r\n\t\t\tif (configPage.configurationPanel.getVaultCommands(testData.get(\"Control\")).equalsIgnoreCase(\"Hide\")) {\r\n\t\t\t\tconfigPage.chooseConfigurationVaultSettings(driver, testData.get(\"Control\"),\"controls\",\"Show\");\r\n\t\t\t\tconfigPage.clickSaveButton();\r\n\r\n\t\t\t\t// Check any warning dialog displayed\r\n\t\t\t\tif(configPage.isWarningDialogDisplayed())\r\n\t\t\t\t{\r\n\t\t\t\t\tconfigPage.clickResetButton();\r\n\t\t\t\t\tconfigPage.chooseConfigurationVaultSettings(driver, testData.get(\"Control\"),\"controls\",\"Show\");\r\n\t\t\t\t\tconfigPage.clickSaveButton();\r\n\t\t\t\t\tconfigPage.clickOKBtnOnSaveDialog(); \r\n\t\t\t\t}\r\n\t\t\t\telse\r\n\t\t\t\t\tconfigPage.clickOKBtnOnSaveDialog();\r\n\r\n\t\t\t}\r\n\t\t\tLog.message(\"4. Show \" + testData.get(\"Control\") + \" is enabled and settings are saved.\", driver);\r\n\t\t\t//Step-3 : Login to the vault\r\n\t\t\tconfigPage.clickLogOut(); //Logs out from the Configuration page\r\n\t\t\tLog.message(\"5. LoggedOut from configuration page.\", driver);\r\n\r\n\t\t\t//Step-5: Login to Web Access Vault\r\n\t\t\tloginPage.navigateToApplication(webSite,userName,password,testData.get(\"VaultName\"));\r\n\t\t\tUtils.waitForPageLoad(driver);\r\n\t\t\thomepage=new HomePage(driver);\r\n\r\n\t\t\tif (!homepage.isLoggedIn(userName))\r\n\t\t\t\tthrow new Exception(\"Some Error encountered while logging..check testdata..\");\r\n\t\t\tLog.message(\"6. Logged in to the vault (\" + testData.get(\"VaultName\") + \").\", driver);\r\n\r\n\t\t\t//Step-7: Verify if search tab is displayed in right pane\r\n\t\t\tif (homepage.previewPane.isTabExists(\"Search\"))\r\n\t\t\t\tLog.pass(\"Test Passed. Search is displayed in right pane .\");\r\n\t\t\telse\r\n\t\t\t\tLog.fail(\"Test Failed. Search is not displayed in right pane.\", driver);\r\n\r\n\t\t} //End try\r\n\r\n\t\tcatch (Exception e) {\r\n\t\t\tLog.exception(e, driver);\r\n\t\t} //End catch\r\n\r\n\t\tfinally {\r\n\t\t\ttry {\r\n\t\t\t\tloginPage=new LoginPage(driver);\r\n\t\t\t\tdriver.get(configSite);\r\n\t\t\t\tconfigPage=new ConfigurationPage(driver);\r\n\t\t\t\tconfigPage.clickVaultFolder(testData.get(\"VaultName\"));\t\t\r\n\t\t\t\tconfigPage.expandVaultFolder(documentVault);\r\n\t\t\t\tconfigPage.clickSettingsFolder(\"Controls\");\r\n\t\t\t\tif (configPage.configurationPanel.getVaultCommands(testData.get(\"Control\")).equalsIgnoreCase(\"Show\")) {\r\n\t\t\t\t\tconfigPage.chooseConfigurationVaultSettings(driver, testData.get(\"Control\"),\"controls\",\"Hide\");\r\n\t\t\t\t\tconfigPage.clickSaveButton();\r\n\t\t\t\t\tconfigPage.clickOKBtnOnSaveDialog();\r\n\t\t\t\t}}\r\n\r\n\t\t\tcatch (Exception e) {\r\n\t\t\t\tLog.exception(e, driver);\r\n\t\t\t} //End catch\r\n\r\n\t\t\tfinally {\r\n\r\n\t\t\t\tdriver.quit();\t\r\n\t\t\t} //End finally\r\n\t\t} //End finally\r\n\t}", "@Test\n public void testScenario() throws WriteException {\n int i = 1;\n while(i<rows){\n\n zipCode = readableSheet.getCell(0,i).getContents();\n\n driver.navigate().to(\"https://weightwatchers.com\");\n\n //verify the title of the page matches with your expected\n getTitle(driver,\"Weight Loss & Welness Help\");\n\n //click on the studio link\n click(driver,\"//*[@class='find-a-meeting']\",0,\"Studio Link\");\n\n //verify the zipcode page title matches with your expected\n getTitle(driver,\"Studios & Meetings\");\n\n //enter zipcode on search field\n sendKeys(driver,\"//*[@id='meetingSearch']\",0,zipCode,\"Search Field\");\n\n //click on Search Icon\n click(driver,\"//*[@spice='SEARCH_BUTTON']\",0,\"Search Icon\");\n\n //capture the first studio information\n String studioInfo = getText(driver,\"//*[@class='location__container']\",0,\"Studio Info Textg\");\n //click on the first studio link\n click(driver,\"//*[@class='location__container']\",0,\"First Studio\");\n //wait few seconds\n String operationHour = getText(driver,\"//*[contains(@class,'currentday')]\",0,\"Operation Hour Text\");\n\n //create label for location and distance\n label1 = new Label(1,i,studioInfo);\n writableSheet.addCell(label1);\n\n //create label for current day opreation hour\n label2 = new Label(2,i,operationHour);\n writableSheet.addCell(label2);\n i++;\n }//end of while loop\n\n }", "@Test\r\n\tpublic static void uiTesting()\r\n\t{\n\t\ttry\r\n\t\t{\r\n\r\n\t\t\tLog4J.logp.info(\"Started :::: uiTestting\");\r\n\t\t\tdriver.manage().window().setSize(new Dimension(1366, 768));\r\n\t\t\t/*landingp_webe.lnk_Coding.click();\r\n\t\t\tThread.sleep(2000);\r\n\t\t\tCommon_Lib.openCase(\"DB001\");\r\n\t\t\tThread.sleep(15000);\r\n\t\t\tCommon_Lib.rightclick_system_sugggested_evidence();\r\n\t\t\tThread.sleep(2000);\r\n\t\t\tmedicalrecordpnl_webe.lnk_discusswithcolleague.click();\r\n\t\t\tThread.sleep(2000);\r\n\t\t\tIssuePanel_Lib.send_DiscussWithColleague(\"DB001\");\r\n\t\t\tThread.sleep(2000);\r\n\t\t\tCommon_Lib.rightclick_system_sugggested_evidence();\r\n\t\t\tThread.sleep(2000);\r\n\t\t\tmedicalrecordpnl_webe.lnk_querytophysician.click();\r\n\t\t\tIssuePanel_Lib.send_QueryToPhysician(\"DB001\");\r\n\t\t\tThread.sleep(2000);\r\n\t\t\tissuepnl_webe.btn_Issues.click();\r\n\t\t\tThread.sleep(2000);\r\n\t\t\tgroupingpnl_webe.btn_Later.click();\r\n\t\t\tThread.sleep(3000);*/\r\n\t\t\tlandingp_webe.lnk_All.click();\r\n\t\t\tThread.sleep(2000);\r\n\t\t\tlandingp_webe.lnk_Reports.click();\r\n\t\t\tThread.sleep(2000);\r\n\t\t\tlandingp_webe.lnk_CodingDashboard.click();\r\n\t\t\tThread.sleep(2000);\r\n\t\t\tJavascriptExecutor jse;\r\n\t\t\tdriver = ExecutionSetup.getDriver();\r\n\t\t\tjse = (JavascriptExecutor) driver;\r\n\t\t\t//scroll downward\r\n\t\t\tjse.executeScript(\"window.scrollBy(0,80)\", \"\");\r\n\t\t\t//jse.executeScript(\"window.scrollBy(0,600)\", \"\");\r\n\t\t\tWebElement e = driver.findElement(By.id(\"dischargeMain\"));\r\n\t\t\t// Get entire page screenshot\r\n\t\t\tFile screenshot = ((TakesScreenshot) driver).getScreenshotAs(OutputType.FILE);\r\n\r\n\t\t\tFileUtils.copyFile(screenshot, new File(\"D:/images/GoogleLogo_screenshot_main.jpg\"));\r\n\t\t\tBufferedImage fullImg = ImageIO.read(screenshot);\r\n\t\t\t// Get the location of element in the page\r\n\t\t\tPoint point = e.getLocation();\r\n\t\t\tSystem.out.println(\"Point is = \" + point);\r\n\t\t\tint x = point.getX();\r\n\t\t\tSystem.out.println(\"X values is = \" + x);\r\n\t\t\tint y = point.getY();\r\n\t\t\tSystem.out.println(\"Y value is = \" + y);\r\n\t\t\t//Get width and height of the element\r\n\r\n\t\t\tint eleWidth = e.getSize().getWidth();\r\n\t\t\tSystem.out.println(\"Width is = \" + eleWidth);\r\n\t\t\tint eleHeight = e.getSize().getHeight();\r\n\t\t\tSystem.out.println(\"Height is = \" + eleHeight);\r\n\t\t\t//Crop the entire page screenshot to get only element screenshot\r\n\t\t\tSystem.out.println(\"x = \" + point.getX() + \" y = \" + point.getY() + \"width = \" + e.getSize().getWidth() + \"height =\" + e.getSize().getHeight());\r\n\t\t\tThread.sleep(3000);\r\n\t\t\tBufferedImage eleScreenshot = fullImg.getSubimage(point.getX(), point.getY() - 80, e.getSize().getWidth(), e.getSize().getHeight());\r\n\t\t\tThread.sleep(3000);\r\n\t\t\tFile ak = new File(\"image.jpg\");\r\n\t\t\tImageIO.write(eleScreenshot, \"jpg\", ak);\r\n\t\t\tFileUtils.copyFile(ak, new File(\"D:\\\\images\\\\sample.jpg\"));\r\n\t\t\t//ImageIO.write(eleScreenshot, \"png\", screenshot);\r\n\t\t\tBufferedImage img1 = Dashboard_Lib.resize(eleScreenshot, 1295, 488);\r\n\t\t\tThread.sleep(3000);\r\n\t\t\tFile outputfile = new File(\"image.jpg\");\r\n\t\t\tImageIO.write(img1, \"jpg\", outputfile);\r\n\r\n\t\t\t//Copy the element screenshot to disk\r\n\t\t\t// Expected image\r\n\t\t\tFileUtils.copyFile(outputfile, new File(\"D:\\\\images\\\\akash.jpg\"));\r\n\r\n\t\t\tString file1 = \"D:\\\\images\\\\akash.jpg\";\r\n\t\t\tString file2 = \"D:\\\\images\\\\gupta.jpg\";\r\n\r\n\t\t\t// Comparing the two images for number of bands, width & Height\r\n\r\n\t\t\tImage pic1 = Toolkit.getDefaultToolkit().getImage(file1);\r\n\t\t\tImage pic2 = Toolkit.getDefaultToolkit().getImage(file2);\r\n\r\n\t\t\ttry\r\n\t\t\t{\r\n\r\n\t\t\t\tPixelGrabber grab11 = new PixelGrabber(pic1, 0, 0, -1, -1, false);\r\n\t\t\t\tPixelGrabber grab21 = new PixelGrabber(pic2, 0, 0, -1, -1, false);\r\n\r\n\t\t\t\tint[] array1 = null;\r\n\r\n\t\t\t\tif (grab11.grabPixels())\r\n\t\t\t\t{\r\n\t\t\t\t\tint width = grab11.getWidth();\r\n\t\t\t\t\tSystem.out.println(\"Width of Image 1 = \" + width);\r\n\t\t\t\t\tint height = grab11.getHeight();\r\n\t\t\t\t\tSystem.out.println(\"Height of Image 1 = \" + height);\r\n\t\t\t\t\tarray1 = new int[width * height];\r\n\t\t\t\t\tarray1 = (int[]) grab11.getPixels();\r\n\t\t\t\t}\r\n\r\n\t\t\t\tint[] array2 = null;\r\n\r\n\t\t\t\tif (grab21.grabPixels())\r\n\t\t\t\t{\r\n\t\t\t\t\tint width = grab21.getWidth();\r\n\t\t\t\t\tSystem.out.println(\"Width of Image 2 = \" + width);\r\n\t\t\t\t\tint height = grab21.getHeight();\r\n\t\t\t\t\tSystem.out.println(\"Height of Image 2 = \" + height);\r\n\t\t\t\t\tarray2 = new int[width * height];\r\n\t\t\t\t\tarray2 = (int[]) grab21.getPixels();\r\n\t\t\t\t}\r\n\r\n\t\t\t\tSystem.out.println(array1.length);\r\n\r\n\t\t\t\tSystem.out.println(array2.length);\r\n\r\n\t\t\t\tfor (int i = 0; i < array2.length; i++)\r\n\t\t\t\t{\r\n\t\t\t\t\tif (array1[i] != array2[i])\r\n\t\t\t\t\t{\r\n\r\n\t\t\t\t\t\tSystem.out.println(array1[i] + \" ! =\" + array2[i]);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\tSystem.out.println(\"Pixels equal: \" + java.util.Arrays.equals(array1, array2));\r\n\r\n\t\t\t}\r\n\t\t\tcatch (InterruptedException e1)\r\n\t\t\t{\r\n\t\t\t\te1.printStackTrace();\r\n\t\t\t}\r\n\t\t\tLog4J.logp.info(\"Ended :::: uiTestting\");\r\n\r\n\t\t}\r\n\t\tcatch (Exception e)\r\n\t\t{\r\n\t\t\t// report error\r\n\t\t\te.printStackTrace();\r\n\r\n\t\t}\r\n\t}", "@Test(priority = 1)\n\tpublic void watchItOperation() throws Exception {\n\t\t\n\t\tdriver = DashboardPage.clickWatchIt(driver);\n\t\t\n\t\t//ExcelUtils.setCellData(\"PASS\", 2, 1);\n\t}", "@Test(groups = \"regression\")\n\t public void product()throws Throwable{\n\t ExcelUtility eLib = new ExcelUtility();\n\t String Pname1 = eLib.getExcelData(\"Product\", 8, 2);\n\t String Pname2 = eLib.getExcelData(\"Product\", 8, 3)+ JavaUtility.getRanDomNum();\n\t String Unit = eLib.getExcelData(\"Product\", 8, 4);\n\t String Qtys = eLib.getExcelData(\"Product\", 8, 5);\n\t String Qtyu = eLib.getExcelData(\"Product\", 8, 6);\n\t String Reorder = eLib.getExcelData(\"Product\", 8, 7);\n\t String Group = eLib.getExcelData(\"Product\", 8, 8);\n\t String Qtyd = eLib.getExcelData(\"Product\", 8, 9);\n\t\n\t /*step 3 : navigate to Products Page*/\n\n\t driver.findElement(By.xpath(\"//a[text()='Products']\")).click();\n\t /*step 4 : navigate to create Product Page*/\n\t List <WebElement> noofrows = driver.findElements(By.xpath(\"//table[@class=\\\"lvt small\\\"]/tbody/tr\")); \n\t //selecting existing product from the table. \n\t int rownum = noofrows.size();\t \n\t List <WebElement> element = driver.findElements(By.xpath(\"//a[@title=\\\"Products\\\"]\")); \n\t for (int i = 0; i<element.size();i++) \n\t {\n\t\t if(element.get(i).getText().equalsIgnoreCase(Pname1)) \n\t\t {\n\t\t\t element.get(i).click();\n\n\t\t\t break;\n\t\t }\n\n\t }\n\t //clickicg on edit option.\n\t driver.findElement(By.xpath(\"//input[@name=\\\"Edit\\\"]\")).click();\n\n\t //clearing old name and entering new name.\n\t driver.findElement(By.xpath(\"//input[@name='productname']\")).clear();\n\t driver.findElement(By.xpath(\"//input[@name='productname']\")).sendKeys(Pname2);\n\t //selecting unit to be used.\n\t WebElement dd = driver.findElement(By.xpath(\"//select[@name=\\\"usageunit\\\"]\"));\n\t wLib.select(dd,Unit);\n\t //\t\t\t\n\t //clearing texboxes and entering new data.\n\t driver.findElement(By.xpath(\"//input[@id=\\\"qtyinstock\\\"]\")).clear();\n\t driver.findElement(By.xpath(\"//input[@id=\\\"qtyinstock\\\"]\")).sendKeys(Qtys); \n\t driver.findElement(By.xpath(\"//input[@id=\\\"qty_per_unit\\\"]\")).clear();\n\t driver.findElement(By.xpath(\"//input[@id=\\\"qty_per_unit\\\"]\")).sendKeys(Qtyu);\n\t driver.findElement(By.xpath(\"//input[@id=\\\"reorderlevel\\\"]\")).clear();\n\t driver.findElement(By.xpath(\"//input[@id=\\\"reorderlevel\\\"]\")).sendKeys(Reorder);\n\t //selecting group from dropdown\n\t driver.findElement(By.xpath(\"//input[@value=\\\"T\\\"]\")).click();\n\t WebElement dd1 = driver.findElement(By.xpath(\"//select[@name=\\\"assigned_group_id\\\"]\"));\n\t wLib.select(dd1, Group);\n\n\t //updating quantity in demand.\n\t driver.findElement(By.xpath(\"//input[@id=\\\"qtyindemand\\\"]\")).clear();\n\t driver.findElement(By.xpath(\"//input[@id=\\\"qtyindemand\\\"]\")).sendKeys(Qtyd);\n\t //saving the changes by clicking save button.\n\t driver.findElement(By.xpath(\"//input[@title=\\\"Save [Alt+S]\\\"]\")).click();\n\n\t /*step 5: verify*/\n\t String actSuccessFullMsg = driver.findElement(By.xpath(\"//span[@class='lvtHeaderText']\")).getText();\n\t if(actSuccessFullMsg.contains(Pname2)) {\n\t\t System.out.println(Pname2 + \"==>Product editd successfully==>PASS\");\n\t }else {\n\t\t System.out.println(Pname2 + \"==>Product not Edited ==>Fail\");\n\n\t } \n }", "public void scrollDown() throws Exception {\n Dimension size = driver.manage().window().getSize();\n //Starting y location set to 80% of the height (near bottom)\n int starty = (int) (size.height * 0.80);\n //Ending y location set to 20% of the height (near top)\n int endy = (int) (size.height * 0.20);\n //endy=driver.findElement(By.xpath(\"//*[@text='Terms']\")).getLocation().getY();\n //x position set to mid-screen horizontally\n int startx = size.width / 2;\n\n TouchAction touchAction = new TouchAction(driver);\n \n int i=8;\n while(i-->0) {\n touchAction\n .press(PointOption.point(startx, starty))\n .waitAction(new WaitOptions().withDuration(Duration.ofSeconds(1)))\n .moveTo(PointOption.point(startx, endy))\n .release().perform();\n }\n// touchAction.tap(PointOption.point(startx, endy)).perform();\n// touchAction.moveTo(PointOption.point(startx, endy)).perform();\n System.out.println(\"Tap Complete\");\n \n// new TouchAction((PerformsTouchActions) driver)\n// .moveTo(new PointOption<>().point(startx, endy))\n// .release()\n// .perform();\n\n}", "@Test(priority = 2)\n\tpublic void scrolling() throws InterruptedException {\n\t\tThread.sleep(800);\n\t\tJavascriptExecutor js = (JavascriptExecutor) driver;\n\t\tjs.executeScript(\"window.scrollBy(0,500)\");\n\t\tjs.executeScript(\"window.scrollBy(0,-800)\");\n\n\t}", "@Test(priority = 6)\n\tpublic void clickDrivingScore() throws Exception {\n\t\t\n\t\tdriver = DashboardPage.DrivingScore(driver);\n\t\t\n\t\t//ExcelUtils.setCellData(\"PASS\", 6, 1);\n\t\t\n\t}", "@Test\n public void exerciseTwoTest() {\n driver.get(properties.getProperty(\"URL\"));\n\n // 2. Assert Browser title\n homePageAsserts.shouldReturnPageTitle();\n\n // 3. Perform login\n homePageSteps.login(properties.getProperty(\"username\"), properties.getProperty(\"password\"));\n\n // 4. Assert User name in the left-top side of screen that user is loggined\n homePageAsserts.shouldReturnUsernameText();\n\n // 5. Open through the header menu Service -> Different Elements Page\n homePageSteps.clickServiceButton();\n homePageSteps.openDifferentElementsPage();\n\n // 6. Select checkboxes\n differentElementsPageSteps.selectCheckbox(WATER.getValue());\n differentElementsPageSteps.selectCheckbox(WIND.getValue());\n\n // 7. Select radio\n differentElementsPageSteps.selectRadioButton(SELEN.getValue());\n\n // 8. Select in dropdown\n differentElementsPageSteps.selectDropdown(YELLOW.getValue());\n\n // 9.1 Assert that for each checkbox there is an individual log row\n // and value is corresponded to the status of checkbox\n differentElementsAsserts.shouldReturnSelectedCheckbox();\n differentElementsAsserts.shouldReturnLogRowText(WATER.getValue(), \"true\");\n differentElementsAsserts.shouldReturnLogRowText(WIND.getValue(), \"true\");\n\n // 9.2 Assert that for radio button there is a log row and value is corresponded to the status of radio button\n differentElementsAsserts.shouldReturnSelectedRadioButton();\n differentElementsAsserts.shouldReturnLogRowText(METAL.getValue(), SELEN.getValue());\n\n // 9.3 Assert that for dropdown there is a log row and value is corresponded to the selected value\n differentElementsAsserts.shouldReturnSelectedDropdown();\n differentElementsAsserts.shouldReturnLogRowText(COLORS.getValue(), YELLOW.getValue());\n }", "@Test\n\tpublic void Reports_18961_execute() throws Exception {\n\t\tVoodooUtils.voodoo.log.info(\"Running \" + testName + \"...\");\n\n\t\t// Navigate to Advance Reports in navbar \n\t\tsugar().navbar.navToModule(ds.get(0).get(\"advance_report_name\"));\n \t\tnavigationCtrl.click();\n \t\t\n \t\t// Click on View Advance Report link\n \t\tviewAdvanceReportCtrl = new VoodooControl(\"a\", \"css\", \"[data-navbar-menu-item='LNK_LIST_REPORTMAKER']\");\n \t\tviewAdvanceReportCtrl.click();\n \t\tVoodooUtils.focusFrame(\"bwc-frame\");\n \t\t\n \t\t// click on list item\n \t\tnew VoodooControl(\"a\", \"css\", \"tr.oddListRowS1 > td:nth-child(3) a\").click();\n \t\tVoodooUtils.focusDefault();\n \t\tVoodooUtils.focusFrame(\"bwc-frame\");\n \t\t\n \t\t// Click to Select to add data format in report\n \t\tnew VoodooControl(\"input\", \"css\", \"#form [title='Select']\").click();\n \t\tVoodooUtils.focusWindow(1);\n \t\t\n \t\t// select data format in list\n \t\tnew VoodooControl(\"a\", \"css\", \"tr.oddListRowS1 td:nth-child(1) a\").click();\n \t\tVoodooUtils.focusWindow(0);\n \t\tVoodooUtils.focusFrame(\"bwc-frame\");\n \t\t\n \t\t// Click \"Edit\" of a \"Data Format\"\n \t\tnew VoodooControl(\"a\", \"css\", \"#contentTable tr.oddListRowS1 > td:nth-child(6) > slot > a:nth-child(3)\").click();\n \t\tVoodooUtils.focusDefault();\n \t\tVoodooUtils.focusFrame(\"bwc-frame\");\n \t\tnew VoodooControl(\"input\", \"id\", \"name\").assertEquals(ds.get(0).get(\"data_format_name\"), true);\n \t\tnew VoodooControl(\"input\", \"id\", \"query_name\").assertEquals(ds.get(0).get(\"query_name\"), true);\n \t\tnew VoodooControl(\"a\", \"css\", \"#Default_DataSets_Subpanel tr:nth-child(1) td:nth-child(4) a\").assertEquals(ds.get(0).get(\"report_name\"), true);\n \t\tVoodooUtils.focusDefault();\n\n\t\tVoodooUtils.voodoo.log.info(testName + \" complete.\");\n\t}", "@DDDataProvider(datafile = \"testdata/Team3Search and Sort.xlsx\", sheetName = \"SearchItem\", testcaseID = \"\", runmode = \"No\")\n@Test(dataProvider = \"dd-dataprovider\", dataProviderClass = TestUtil.class)\n\npublic void TC_SearchProductwithInValiddata(Hashtable<String, String> datatable) throws InterruptedException, UnsupportedEncodingException, GeneralSecurityException{\n\tSearchPage searchpage = new SearchPage(driver);\n\tExtentTest Obj = ExtentTestManager.getTest();\n\t\n\tExtentTestManager.getTest().log(Status.PASS, \"Testcase 1 : Search for the product with Invalid data\");\n\tLoginPage loginPage = new LoginPage(driver);\n\tExtentTestManager.getTest().log(Status.PASS, \"Step 1 : Successfully singed in with Valid credentials\");\n\tloginPage.login(datatable.get(\"UserName\"), Base64.decrypt(datatable.get(\"Password\")));\n\tThread.sleep(1000);\n\t\n\tString searchvalue =datatable.get(\"ProductName\");\n\tsearchpage.getSearchBar().sendKeys(searchvalue);\n\tExtentTestManager.getTest().log(Status.PASS, \"Step 2 : Successfully entered \" +searchvalue+ \" in the search bar\");\n\t\n\tsearchpage.getsearchBtn().click();\n\tExtentTestManager.getTest().log(Status.PASS, \"Step 3 : Successfully clicked on the search button\");\n\tThread.sleep(500);\n\t\t\n\tExtentTestManager.getTest().log(Status.PASS, \"Step 4 : User entered invalid data: \" + searchpage.getnoDataFoundMsg().getText() + \".\");\n\t\n\t\n\t\t\t\n}", "@Test\r\n public void excel() throws EncryptedDocumentException, InvalidFormatException, FileNotFoundException, IOException {\n\t\tSystem.setProperty(\"webdriver.chrome.driver\", \"E:\\\\Selenium\\\\Newfolder\\\\chromedriver.exe\");\r\n\t\tdriver = new ChromeDriver();\r\n\t\t\r\n //get the excel sheet file location \r\n String filepath=\"E:\\\\Selenium\\\\SampleApplications\\\\ClearTripAppln\\\\DataSheet.xlsx\";\r\n\t \t\t\t\tWorkbook wb= WorkbookFactory.create(new FileInputStream(new File(filepath)));\r\n //get the sheet which needs read operation\r\n\t\t Sheet sh = wb.getSheet(\"sheet1\");\r\n\t\t \r\n\t String url =sh.getRow(0).getCell(1).getStringCellValue();\r\n\t System.out.println(url);\r\n\t driver.get(url);\r\n\t \r\n\t \t\t// Maximizing the window\r\n\t \t\tdriver.manage().window().maximize();\r\n\t \t\t\r\n\r\n\r\n\t\t }", "@Test\n public void testDAM31304001() {\n\n // Data preparation\n {\n clearAndCreateTestDataForBook();\n }\n\n {\n webDriverOperations.click(id(\"dam31304001\"));\n }\n\n {\n assertThat(webDriverOperations.getText(id(\"getDateResult\")), is(\n \"2016-12-29\"));\n assertThat(webDriverOperations.getText(id(\"getDateClassResult\")),\n is(\"java.time.LocalDate\"));\n assertThat(webDriverOperations.getText(id(\n \"getObjectCertification\")), is(\"true\"));\n }\n }", "@SuppressWarnings(\"deprecation\")\n@Test\n public void f() throws Exception{\nFile fi=new File(\"e://Loginwebtourdata.xls\");\n\t\t Workbook w=Workbook.getWorkbook(fi);\n\t\t Sheet s=w.getSheet(0);\n// Creating Result file in Results columns\n\t WritableWorkbook wwb=Workbook.createWorkbook(fi,w);\n\t\tWritableSheet sh=wwb.getSheet(0);\nfor (int i = 1; i < s.getRows(); i++) {\n//Enter username, Password and click on signin by taking data from testdata file\t\ndriver.findElement(By.name(\"userName\")).sendKeys(s.getCell(0, i).getContents());\ndriver.findElement(By.name(\"password\")).sendKeys(s.getCell(1, i).getContents());\ndriver.findElement(By.name(\"login\")).click();\n\tThread.sleep(1000);\n//Validate signout, if available assign Pass to str, else assign Fail to str\t\n\tif(selenium.isElementPresent(\"link=SIGN-OFF\"))\n\t{\n\tdriver.findElement(By.linkText(\"SIGN-OFF\")).click();\n\tThread.sleep(1000);\n\tdriver.get(\"http://newtours.demoaut.com\");\n\tdriver.manage().window().maximize();\n\tReporter.log(\"both user and password are valid\",true);\n\tstr=\"Pass\";\n\t}else{\n\t\tstr=\"Fail\";\n\t\tReporter.log(\"both user and password are invalid\",true);\n\t\t\t}\n// Add the str value to Result file under result column\t\n\tLabel result=new Label(2, i, str);\n\tsh.addCell(result);\n}//Add 3 labels in Result file\n\t\t Label rs=new Label(2,0,\"Result\");\n\t\t sh.addCell(rs);\n\t// Write and close result file\t \n\t\t wwb.write();\n\t\t wwb.close();\n\t\t }", "@Test\n public void ScrollToView() {\n driver.scrollTo(\"Views\");\n // Click on Views.\n driver.findElement(By.name(\"Views\")).click();\n }", "public void startTest() throws Throwable\n {\n ExcelFileUtil excel= new ExcelFileUtil();\n // iterate all row in masterTestCases sheet\n\n for(int i=1;i<=excel.rowCount(\"MasterTestCases\");i++)\n {\n String ModuleStatus=\"\";\n if(excel.getData(\"MasterTestCases\", i, 2).equalsIgnoreCase(\"Y\"))\n {\n //store module name to TCModule\n String TCModule =excel.getData(\"MasterTestCases\", i, 1);\n report=new ExtentReports(\"./Reports/\"+TCModule+Muvi_Functions.generateDate()+\".html\");\n //iterate all rows in TCModule\n for(int j=1;j<=excel.rowCount(TCModule);j++)\n {\n test=report.startTest(TCModule);\n //read al the columns from TCMocule\n String Description=excel.getData(TCModule, j, 0);\n String Object_Type=excel.getData(TCModule, j, 1);\n String Locator_Type=excel.getData(TCModule, j, 2);\n String Locator_Value=excel.getData(TCModule, j, 3);\n String Test_Data=excel.getData(TCModule, j, 4);\n //System.out.println(Description+\" \"+Object_Type);\n //calling the method from function library\n try{\n if(Object_Type.equalsIgnoreCase(\"startBrowser\"))\n {\n System.out.println(\"Executing startBroswer\");\n driver= Muvi_Functions.startBrowser(driver);\n System.out.println(\"Executing startBroswer\");\n }else if (Object_Type.equalsIgnoreCase(\"openApplication\"))\n {\n Muvi_Functions.openApplication(driver);\n test.log(LogStatus.INFO, Description);\n System.out.println(\"Executing openApplication\");\n }else if (Object_Type.equalsIgnoreCase(\"waitForElement\"))\n {\n Muvi_Functions.waitForElement(driver, Locator_Type, Locator_Value, Test_Data);\n test.log(LogStatus.INFO, Description);\n System.out.println(\"Executing waitForElement\");\n }else if (Object_Type.equalsIgnoreCase(\"typeAction\"))\n {\n Muvi_Functions.typeAction(driver, Locator_Type, Locator_Value, Test_Data);\n test.log(LogStatus.INFO, Description);\n System.out.println(\"Executing typeAction\");\n }else if (Object_Type.equalsIgnoreCase(\"clickAction\"))\n {\n Muvi_Functions.clickAction(driver, Locator_Type, Locator_Value);\n test.log(LogStatus.INFO, Description);\n System.out.println(\"Executing clickAction\");\n }else if (Object_Type.equalsIgnoreCase(\"selectAction\"))\n {\n Muvi_Functions.selectAction(driver, Locator_Type, Locator_Value);\n test.log(LogStatus.INFO, Description);\n System.out.println(\"Executing selectAction\");\n } else if (Object_Type.equalsIgnoreCase(\"selectStartDate\"))\n {\n Muvi_Functions.selectStartDate(driver, Locator_Type, Locator_Value);\n test.log(LogStatus.INFO, Description);\n System.out.println(\"Executing selectStartDate\");\n }\n else if (Object_Type.equalsIgnoreCase(\"switchWindow\"))\n {\n Muvi_Functions.switchWindow(driver);\n test.log(LogStatus.INFO, Description);\n System.out.println(\"Executing switchWindow\");\n }else if (Object_Type.equalsIgnoreCase(\"isElementVisible\"))\n {\n Muvi_Functions.isElementVisible(driver, Locator_Type, Locator_Value);\n test.log(LogStatus.INFO, Description);\n System.out.println(\"Executing isElementVisible\");\n }else if (Object_Type.equalsIgnoreCase(\"hoverOver\"))\n {\n Muvi_Functions.hoverOver(driver, Locator_Type, Locator_Value);\n test.log(LogStatus.INFO, Description);\n System.out.println(\"Executing hoverOver\");\n }else if (Object_Type.equalsIgnoreCase(\"uploadTopBanner\"))\n {\n Muvi_Functions.uploadTopBanner(driver);\n test.log(LogStatus.INFO, Description);\n System.out.println(\"Executing uploadTopBanner\");\n }\n else if (Object_Type.equalsIgnoreCase(\"uploadPoster\"))\n {\n Muvi_Functions.uploadPoster(driver);\n test.log(LogStatus.INFO, Description);\n System.out.println(\"Executing uploadPoster\");\n }\n else if (Object_Type.equalsIgnoreCase(\"profilePicture\"))\n {\n Muvi_Functions.profilePicture(driver);\n test.log(LogStatus.INFO, Description);\n System.out.println(\"Executing profilePicture\");\n }\n else if (Object_Type.equalsIgnoreCase(\"uploadVideo\"))\n {\n Muvi_Functions.uploadVideo(driver);\n test.log(LogStatus.INFO, Description);\n System.out.println(\"Executing uploadVideo\");\n }\n else if (Object_Type.equalsIgnoreCase(\"verifyUpload\"))\n {\n Muvi_Functions.verifyUpload(driver);\n test.log(LogStatus.INFO, Description);\n System.out.println(\"Executing verifyUpload\");\n }\n\n else if (Object_Type.equalsIgnoreCase(\"closeBrowser\"))\n {\n Muvi_Functions.closeBrowser(driver);\n test.log(LogStatus.INFO, Description);\n System.out.println(\"Executing closeBrowser\");\n }\n\n\n //write as pass into status column\n excel.setCellData(TCModule, j, 5, \"PASS\");\n test.log(LogStatus.PASS, Description);\n ScreenShot.Takescreen(driver,Description);\n ModuleStatus=\"TRUE\";\n\n }\n catch(Exception e)\n {\n excel.setCellData(TCModule, j, 5, \"FAIL\");\n ModuleStatus=\"FALSE\";\n if(ModuleStatus.equalsIgnoreCase(\"FALSE\"))\n {\n excel.setCellData(\"MasterTestCases\", i, 3, \"FAIL\");\n Thread.sleep(2000);\n test.log(LogStatus.FAIL, \"Test Fail\");\n ScreenShot.Takescreen(driver,Description);\n }\n System.out.println(e.getMessage());\n break;\n }\n if(ModuleStatus.equalsIgnoreCase(\"TRUE\"))\n {\n excel.setCellData(\"MasterTestCases\", i, 3, \"PASS\");\n }\n report.flush();//push reports to html\n report.endTest(test);\n }\n\n }\n else\n {\n //write as not executed in master testcases in status coulmn for flag N\n excel.setCellData(\"MasterTestCases\", i,3, \"Not Executed\");\n\n }\n }\n }", "public static WebElement check_inqBasketCountMatch(Read_XLS xls, String sheetName, int rowNum, \r\n \t\tList<Boolean> testFail, int chkbxVerPdtSelected) throws Exception{\r\n \ttry{\r\n\t\t\tString countInqBasketVerPdt = driver.findElement(By.id(\"navcount\")).getText();\t\t\t\r\n\t\t\tint countInqBasketForVerPdt = Integer.parseInt(countInqBasketVerPdt.substring(1, countInqBasketVerPdt.length()-1));\t\t\r\n\t\t\tAdd_Log.info(\"Count beside Inquiry basket ::\" + countInqBasketForVerPdt);\t\t\t\r\n \t\t\r\n \t\tif(countInqBasketForVerPdt == chkbxVerPdtSelected){ \t\t\t\r\n \t\t\tAdd_Log.info(\"Count beside the 'Inquiry basket' in the Global navigation is tally with the number of products added.\");\r\n \t\t\tSuiteUtility.WriteResultUtility(\r\n \t\t\t\t\txls, sheetName, Constant.COL_INQ_BASKET_COUNT_MATCH, rowNum, Constant.KEYWORD_PASS);\r\n \t\t}else{\r\n \t\t\tAdd_Log.info(\"Count beside the 'Inquiry basket' in the Global navigation is NOT tally with the number of products added.\");\r\n \t\t\tSuiteUtility.WriteResultUtility(\r\n \t\t\t\t\txls, sheetName, Constant.COL_INQ_BASKET_COUNT_MATCH, rowNum, Constant.KEYWORD_FAIL);\r\n \t\t\ttestFail.set(0, true);\r\n \t\t} \r\n \t\t\r\n \t/*\tString inqBasketCount = driver.findElement(By.id(\"navcount\")).getText();\r\n\t\t\t// Ignore '(' and ')'\r\n\t\t\tint inqBasketCountNo = Integer.parseInt(inqBasketCount.substring(1, inqBasketCount.length()-1));\r\n\t\t\tAdd_Log.info(\"Count beside Inquiry basket ::\" + inqBasketCountNo);\t\t\t\r\n \t\t\r\n \t\tif(inqBasketCountNo == chkbxCount){\r\n \t\t\tAdd_Log.info(\"Count beside the 'Inquiry basket' in the Global navigation is tally with the number of products added.\");\r\n \t\t\tSuiteUtility.WriteResultUtility(\r\n \t\t\t\t\txls, sheetName, Constant.COL_INQ_BASKET_COUNT_MATCH, rowNum, Constant.KEYWORD_PASS);\r\n \t\t}else{\r\n \t\t\tAdd_Log.info(\"Count beside the 'Inquiry basket' in the Global navigation is NOT tally with the number of products added.\");\r\n \t\t\tSuiteUtility.WriteResultUtility(\r\n \t\t\t\t\txls, sheetName, Constant.COL_INQ_BASKET_COUNT_MATCH, rowNum, Constant.KEYWORD_FAIL);\r\n \t\t\ttestFail.set(0, true);\r\n \t\t}\t */ \r\n \t}catch(Exception e){\r\n \t\tthrow(e);\r\n \t}\r\n \treturn element;\r\n }", "@Test(dataProviderClass = DataProviderUtils.class, dataProvider = \"excelDataReader\", groups = { \"Sprint54\", \"Get Hyperlink\"}, \r\n\t\t\tdescription = \"No Java applet and no task area (but show 'Go To' shortcuts) layout will be displayed for hyperlink url on selecting No Java applet and no task area (but show 'Go To' shortcuts) layout in configuration and default in hyperlink dialog - Context menu.\")\r\n\tpublic void SprintTest54_1_30_5A_1A(HashMap<String,String> dataValues, String driverType) throws Exception {\r\n\r\n\t\tdriver = null; \r\n\r\n\t\ttry {\r\n\r\n\r\n\r\n\r\n\t\t\tdriver = WebDriverUtils.getDriver();\r\n\r\n\t\t\tConcurrentHashMap <String, String> dataPool = new ConcurrentHashMap <String, String>(dataValues);\r\n\t\t\tHomePage homePage = LoginPage.launchDriverAndLogin(driver, true);\r\n\r\n\r\n\t\t\tConfigurationPage configurationPage = LoginPage.launchDriverAndLoginToConfig(driver, true); //Launched driver and logged in\r\n\r\n\t\t\t//Step-1 : Navigate to Vault in tree view\r\n\t\t\t//---------------------------------------\r\n\t\t\tconfigurationPage.treeView.clickTreeViewItem(Caption.ConfigSettings.VaultSpecificSettings.Value + \">>\" + testVault); //Clicks tree view item\r\n\r\n\r\n\t\t\tif (!configurationPage.configurationPanel.getPageName().toUpperCase().equalsIgnoreCase(testVault.toUpperCase())) //Checks if navigated to vault settings page\r\n\t\t\t\tthrow new Exception(\"Vault settings page in configuration is not opened.\");\r\n\r\n\t\t\tLog.message(\"1. Navigated to Vault settings page.\");\r\n\r\n\t\t\t//Step-2 : Select No Java applet and No task area but show Go to shortcuts layout layout and save the settings\r\n\t\t\t//------------------------------------------------------------------------------------------------------------\r\n\t\t\tconfigurationPage.configurationPanel.setJavaApplet(Caption.ConfigSettings.Config_Disable.Value);\r\n\r\n\t\t\tif(configurationPage.configurationPanel.isJavaAppletEnabled())\r\n\t\t\t\tthrow new Exception(\"Java applet is enabled\");\r\n\r\n\t\t\tconfigurationPage.configurationPanel.setLayout(Caption.ConfigSettings.Config_TaskAreaWithShowGoTo.Value);\r\n\r\n\t\t\tif (!configurationPage.configurationPanel.saveSettings()) //Save the settings\r\n\t\t\t\tthrow new Exception(\"Configuration settings are not saved after changing its layout.\");\r\n\r\n\t\t\tLog.message(\"2. No java applet with task area with go to layout is selected and saved.\");\r\n\r\n\t\t\tif (!configurationPage.logOut()) //Logs out from configuration page\r\n\t\t\t\tthrow new Exception(\"Log out is not successful after saving the settings in configuration page.\");\r\n\r\n\t\t\tLog.message(\"2. \" + Caption.ConfigSettings.Config_TaskAreaWithShowGoTo.Value + \" layout is selected and settings are saved.\");\r\n\r\n\t\t\t//Step-3 : Login to the default page and navigate to any view\r\n\t\t\t//-------------------------------------------------------------\r\n\t\t\thomePage = LoginPage.launchDriverAndLogin(driver, false); //Launches and logs into the default page\r\n\r\n\t\t\tString viewToNavigate = SearchPanel.searchOrNavigatetoView(driver, dataPool.get(\"NavigateToView\"), dataPool.get(\"ObjectName\"));\r\n\r\n\t\t\tLog.message(\"3. Logged into the default page and navigated to '\" + viewToNavigate + \"' view.\");\r\n\r\n\t\t\t//Step-4 : Open Get Hyperlink dialog for the object from context menu\r\n\t\t\t//-------------------------------------------------------------------\r\n\t\t\tif (!homePage.listView.rightClickItem(dataPool.get(\"ObjectName\"))) //Selects the Object in the list\r\n\t\t\t\tthrow new Exception(\"Object (\" + dataPool.get(\"ObjectName\") + \") is not got selected.\");\r\n\r\n\t\t\thomePage.listView.clickContextMenuItem(Caption.MenuItems.GetMFilesWebURL.Value); //Selects Get Hyperlink from context menu\r\n\r\n\t\t\tMFilesDialog mfilesDialog = new MFilesDialog(driver); //Instantiating MFilesDialog wrapper class\r\n\r\n\t\t\tif (!mfilesDialog.isGetMFilesWebURLDialogOpened()) //Checks for MFiles dialog title\r\n\t\t\t\tthrow new Exception(\"M-Files dialog with 'Get Hyperlink' title is not opened.\");\r\n\r\n\t\t\tLog.message(\"4. Hyperlink dialog of an object (\" + dataPool.get(\"ObjectName\") + \") is opened through context menu.\");\r\n\r\n\t\t\t//Step-5 : Copy the link from text box and close the Get Hyperlink dialog\r\n\t\t\t//-----------------------------------------------------------------------\r\n\t\t\tString hyperlinkText = mfilesDialog.getHyperlink(); //Gets the hyperlink\r\n\t\t\tmfilesDialog.close(); //Closes the Get Hyperlink dialog\r\n\r\n\t\t\tLog.message(\"5. Hyperlink is copied and Get Hyperlink dialog is closed.\");\r\n\r\n\t\t\t//Step-6 : Open the copied Hyperlink in the browser\r\n\t\t\t//-------------------------------------------------\r\n\t\t\thomePage = Utility.navigateToPage(driver, hyperlinkText, userName, password, \"\"); //Navigates to the hyperlink url\r\n\r\n\r\n\t\t\tif (!driver.getCurrentUrl().equalsIgnoreCase(hyperlinkText))\r\n\t\t\t\tthrow new Exception (\"Browser is not opened with copied object Hyperlink.[Expected URL: \"+hyperlinkText+\" & Current URL : \"+ driver.getCurrentUrl() +\"]\");\r\n\r\n\t\t\tLog.message(\"6. Object Hyperlink is opened in the browser.\");\r\n\r\n\t\t\t//Verification : Verify if default layout is displayed\r\n\t\t\t//----------------------------------------------------\r\n\t\t\tString unAvailableLayouts = \"\";\r\n\r\n\t\t\tif (!homePage.isSearchbarPresent()) //Checks if Search bar present\r\n\t\t\t\tunAvailableLayouts = \"Search Bar is not available;\";\r\n\r\n\t\t\tif (homePage.isTaskPaneDisplayed()) //Checks if Task Pane present\r\n\t\t\t\tunAvailableLayouts = unAvailableLayouts + \"Task Pane is available;\";\r\n\r\n\t\t\tif (!homePage.taskPanel.isTaskPaneGoToDisplayed()) //Checks if Task Pane GoTo present\r\n\t\t\t\tunAvailableLayouts = unAvailableLayouts + \"Task Pane GoTo is not available;\";\r\n\r\n\t\t\tif (!homePage.previewPane.isTabExists(Caption.PreviewPane.MetadataTab.Value))\r\n\t\t\t\tunAvailableLayouts = unAvailableLayouts + \"Properties Pane is not available;\";\r\n\r\n\t\t\tif (!homePage.menuBar.isMenuInMenubarDisplayed()) //Checks if Menu Bar present\r\n\t\t\t\tunAvailableLayouts = unAvailableLayouts + \"Menu Bar is not available;\";\r\n\r\n\t\t\tif (!homePage.menuBar.isBreadCrumbDisplayed()) //Checks if Breadcrumb present\r\n\t\t\t\tunAvailableLayouts = unAvailableLayouts + \"Breadcrumb is not available;\";\r\n\r\n\t\t\tif (homePage.taskPanel.isAppletEnabled())\r\n\t\t\t\tunAvailableLayouts = unAvailableLayouts + \"Java Applet is available;\";\r\n\r\n\t\t\tif (!homePage.isListViewDisplayed())\r\n\t\t\t\tunAvailableLayouts = unAvailableLayouts + \"List View is not available;\";\r\n\r\n\t\t\tif (homePage.isTreeViewDisplayed())\r\n\t\t\t\tunAvailableLayouts = unAvailableLayouts + \"Tree View is available;\";\r\n\r\n\t\t\tif (unAvailableLayouts.equals(\"\")) //Verifies default layout have selected default custom layout\r\n\t\t\t\tLog.pass(\"Test case Passed. Hyperlink URL page is displayed as .\" + Caption.ConfigSettings.Config_TaskAreaWithShowGoTo.Value);\r\n\t\t\telse\r\n\t\t\t\tLog.fail(\"Test case Failed. Few layots are not as expected on selecting \" + Caption.ConfigSettings.Config_TaskAreaWithShowGoTo.Value + \". Refer additional information : \" \r\n\t\t\t\t\t\t+ unAvailableLayouts, driver);\r\n\t\t}\r\n\t\tcatch (Exception e) {\r\n\t\t\tLog.exception(e, driver);\r\n\t\t} //End catch\r\n\r\n\t\tfinally {\r\n\r\n\t\t\tif(driver != null){\r\n\t\t\t\ttry\r\n\t\t\t\t{\r\n\t\t\t\t\tdriver.get(configURL);\r\n\r\n\t\t\t\t\tConfigurationPage configurationPage = new ConfigurationPage(driver);\r\n\t\t\t\t\tconfigurationPage.treeView.clickTreeViewItem(Caption.ConfigSettings.VaultSpecificSettings.Value + \">>\" + testVault); //Clicks tree view item\r\n\r\n\t\t\t\t\tconfigurationPage.configurationPanel.setLayout(Caption.ConfigSettings.Config_Default.Value);\r\n\r\n\t\t\t\t\tif (!configurationPage.configurationPanel.saveSettings())\r\n\t\t\t\t\t\tthrow new Exception(\"Configuration settings are not saved.\");\r\n\t\t\t\t}\r\n\t\t\t\tcatch(Exception e0)\r\n\t\t\t\t{\r\n\t\t\t\t\tLog.exception(e0, driver);\r\n\t\t\t\t}\r\n\r\n\t\t\t}\r\n\t\t\tUtility.quitDriver(driver);\r\n\r\n\t\t} //End finally\r\n\r\n\t}", "@Test\n public void scrollListTest() {\n\n onView(withId(R.id.rv_list)).perform(RecyclerViewActions.actionOnItemAtPosition(MainActivity.mListSize, scrollTo()));\n }", "@Test(priority = 8)\n @Parameters(\"browser\")\n public void TC08_VERIFY_BUTTON_TIEPTHEO(String browser) throws IOException {\n String excel_BtnTiepTheo = null;\n excel_BtnTiepTheo = global.Read_Data_From_Excel(excelPath,\"ELEMENTS\",7,2);\n if(excel_BtnTiepTheo == null){\n System.out.println(\"ERROR - Cell or Row No. is wrong.\");\n exTest.log(LogStatus.ERROR, \"ERROR - Cell or Row No. is wrong.\" );\n }\n // Locate element by Xpath\n WebElement ele_BtnTiepTheo = null;\n ele_BtnTiepTheo = global.Find_Element_By_XPath(driver, excel_BtnTiepTheo);\n if(ele_BtnTiepTheo == null){\n exTest.log(LogStatus.FAIL,\"::[\" + browser + \"]:: TC08 - Button Tiep theo is not displayed.\");\n } else {\n exTest.log(LogStatus.PASS,\"::[\" + browser + \"]:: TC08 - Button Tiep theo is displayed.\");\n }\n // Get text from Element.\n String textBtnTieptheo = \"Tiếp theo\";\n String textGetFromEle_BtnTieptheo = ele_BtnTiepTheo.getText();\n System.out.println(\"DEBUG --- \" + textGetFromEle_BtnTieptheo);\n if(textGetFromEle_BtnTieptheo != null && textGetFromEle_BtnTieptheo.equals(textBtnTieptheo)){\n exTest.log(LogStatus.PASS,\"::[\" + browser + \"]:: TC08.1 - Button Tiep theo is correct.\");\n } else {\n exTest.log(LogStatus.FAIL,\"::[\" + browser + \"]:: TC08.1 - Link Tao Tai Khoan is not correct.\");\n }\n }", "@Test\r\n public void clickOnGift()\r\n {WebDriverWait wait = new WebDriverWait(driver, 60);\r\n// driver.navigate().back();\r\n driver.findElement(By.id(\"il.co.mintapp.buyme:id/skipButton\")).click();\r\n driver.findElement(By.id(\"il.co.mintapp.buyme:id/skipTitle\")).click();\r\n wait.until(ExpectedConditions.visibilityOfElementLocated(By.id(\"il.co.mintapp.buyme:id/t_title\")));\r\n List<MobileElement> category = driver.findElementsByAndroidUIAutomator(\"new UiSelector().resourceId(\\\"il.co.mintapp.buyme:id/t_title\\\")\");\r\n category.get(0).click();\r\n /************scroll****************************************/\r\n// TouchAction action=new TouchAction(driver);\r\n// Duration threeSecondsDuration= Duration.ofSeconds(5);//AppsExamples(3);\r\n /**************************************************************/\r\n List<MobileElement> buisness = driver.findElementsByAndroidUIAutomator(\"new UiSelector().resourceId(\\\"il.co.mintapp.buyme:id/t_title\\\")\");\r\n //buisness.get(4).click();\r\n buisness.get(buisness.size() - 1).click();\r\n System.out.println(\"buisness.size() \"+ buisness.size());\r\n List<MobileElement> optionsInBuisness = driver.findElementsByAndroidUIAutomator(\"new UiSelector().resourceId(\\\"il.co.mintapp.buyme:id/businessName\\\")\");\r\n optionsInBuisness.get(optionsInBuisness.size() - 1).click();\r\n System.out.println(\"optionsInBuisness.size() \"+ optionsInBuisness.size());\r\n\r\n WebElement price = driver.findElementByAndroidUIAutomator(\"new UiSelector().resourceId(\\\"il.co.mintapp.buyme:id/priceEditText\\\")\"); //il.co.mintapp.buyme:id/priceEditText\r\n price.sendKeys(\"100\");\r\n WebElement purchesButton = driver.findElementByAndroidUIAutomator(\"new UiSelector().resourceId(\\\"il.co.mintapp.buyme:id/purchaseButton\\\")\"); //il.co.mintapp.buyme:id/priceEditText\r\n purchesButton.click();\r\n //il.co.mintapp.buyme:id/purchaseButton\r\n// \"il.co.mintapp.buyme:id/businessImage\"\"\r\n// System.out.println(element.get(0).getText());\r\n\r\n }", "@LogMethod\r\n private void editResults()\r\n {\n navigateToFolder(getProjectName(), TEST_ASSAY_FLDR_LAB1);\r\n clickAndWait(Locator.linkWithText(TEST_ASSAY));\r\n waitAndClickAndWait(Locator.linkWithText(\"view results\"));\r\n DataRegionTable table = new DataRegionTable(\"Data\", getDriver());\r\n assertEquals(\"No rows should be editable\", 0, DataRegionTable.updateLinkLocator().findElements(table.getComponentElement()).size());\r\n assertElementNotPresent(Locator.button(\"Delete\"));\r\n\r\n // Edit the design to make them editable\r\n ReactAssayDesignerPage assayDesignerPage = _assayHelper.clickEditAssayDesign(true);\r\n assayDesignerPage.setEditableResults(true);\r\n assayDesignerPage.clickFinish();\r\n\r\n // Try an edit\r\n navigateToFolder(getProjectName(), TEST_ASSAY_FLDR_LAB1);\r\n clickAndWait(Locator.linkWithText(TEST_ASSAY));\r\n clickAndWait(Locator.linkWithText(\"view results\"));\r\n DataRegionTable dataTable = new DataRegionTable(\"Data\", getDriver());\r\n assertEquals(\"Incorrect number of results shown.\", 10, table.getDataRowCount());\r\n doAndWaitForPageToLoad(() -> dataTable.updateLink(dataTable.getRowIndex(\"Specimen ID\", \"AAA07XK5-05\")).click());\r\n setFormElement(Locator.name(\"quf_SpecimenID\"), \"EditedSpecimenID\");\r\n setFormElement(Locator.name(\"quf_VisitID\"), \"601.5\");\r\n setFormElement(Locator.name(\"quf_testAssayDataProp5\"), \"notAnumber\");\r\n clickButton(\"Submit\");\r\n assertTextPresent(\"Could not convert value: \" + \"notAnumber\");\r\n setFormElement(Locator.name(\"quf_testAssayDataProp5\"), \"514801\");\r\n setFormElement(Locator.name(\"quf_Flags\"), \"This Flag Has Been Edited\");\r\n clickButton(\"Submit\");\r\n assertTextPresent(\"EditedSpecimenID\", \"601.5\", \"514801\");\r\n assertElementPresent(Locator.xpath(\"//img[@src='/labkey/Experiment/flagDefault.gif'][@title='This Flag Has Been Edited']\"), 1);\r\n assertElementPresent(Locator.xpath(\"//img[@src='/labkey/Experiment/unflagDefault.gif'][@title='Flag for review']\"), 9);\r\n\r\n // Try a delete\r\n dataTable.checkCheckbox(table.getRowIndex(\"Specimen ID\", \"EditedSpecimenID\"));\r\n doAndWaitForPageToLoad(() ->\r\n {\r\n dataTable.clickHeaderButton(\"Delete\");\r\n assertAlert(\"Are you sure you want to delete the selected row?\");\r\n });\r\n\r\n // Verify that the edit was audited\r\n goToSchemaBrowser();\r\n viewQueryData(\"auditLog\", \"ExperimentAuditEvent\");\r\n assertTextPresent(\r\n \"Data row, id \",\r\n \", edited in \" + TEST_ASSAY + \".\",\r\n \"Specimen ID changed from 'AAA07XK5-05' to 'EditedSpecimenID'\",\r\n \"Visit ID changed from '601.0' to '601.5\",\r\n \"testAssayDataProp5 changed from blank to '514801'\",\r\n \"Deleted data row.\");\r\n }", "@Test\r\n\t@Parameters({ \"browsername\" })\r\n\tpublic void BookTour(String browsername) throws Exception {\r\n\t\ttest = rep.startTest(\"Book Tour\");\r\n\t\texcel = new ExcelDataConfig(Config.getExcelPathBook());\r\n\t\tPropertyConfigurator.configure(\"Log4j.properties\");\r\n\t\tlogger.info(\"Test Case Started\");\r\n\t\tif (browsername.equalsIgnoreCase(\"CH\")) {\r\n\t\t\tdriverqa = new DriverAndObjectDetails(DriverName.CH).CreateDriver();\r\n\t\t} else if (browsername.equalsIgnoreCase(\"IE\")) {\r\n\t\t\tdriverqa = new DriverAndObjectDetails(DriverName.IE).CreateDriver();\r\n\t\t} else {\r\n\t\t\tdriverqa = new DriverAndObjectDetails(DriverName.FF).CreateDriver();\r\n\t\t}\r\n\t\tWebDriverWait wait = new WebDriverWait(driverqa, 80);\r\n\t\tActions action = new Actions(driverqa);\r\n\r\n\t\t/* ####### Login functionality ######### **/\r\n\r\n\t\ttry {\r\n\t\t\tlogger.info(\"Browser Opened\");\r\n\t\t\tString URL = excel.getData(0, 1, 3) + \"/interface/en\";\r\n\t\t\tdriverqa.get(URL);\r\n\t\t\tlogger.info(\"Test Case Started\");\r\n\t\t\ttest.log(LogStatus.INFO, \"Starting Login\");\r\n\t\t\tWebElement username = driverqa.findElement(LoginPage.LoginId);\r\n\t\t\tusername.clear();\r\n\t\t\tusername.sendKeys(excel.getData(0, 58, 1));\r\n\t\t\twait.until(ExpectedConditions.visibilityOfElementLocated(LoginPage.password));\r\n\t\t\tdriverqa.findElement(LoginPage.password).sendKeys(excel.getData(0, 58, 2));\r\n\t\t\tThread.sleep(1000);\r\n\t\t\tWebElement company = driverqa.findElement(LoginPage.Companycode);\r\n\t\t\tcompany.clear();\r\n\t\t\tcompany.sendKeys(excel.getData(0, 58, 3));\r\n\t\t\tdriverqa.findElement(LoginPage.Submit).click();\r\n\t\t\tThread.sleep(2000);\r\n\t\t\tString expectedtitle = \"DOTWconnect.com\";\r\n\t\t\tString atualtitle = driverqa.getTitle();\r\n\t\t\tAssert.assertEquals(atualtitle, expectedtitle);\r\n\t\t\ttest.log(LogStatus.INFO, \"Ending Login\");\r\n\t\t\ttest.log(LogStatus.PASS, \"PASSED Login\");\r\n\t\t\tlogger.info(\"Login Successful\");\r\n\t\t\t// Thread.sleep(7000);\r\n\t\t\tExpectedCondition<Boolean> pageLoadCondition = new ExpectedCondition<Boolean>() {\r\n\t\t\t\tpublic Boolean apply(WebDriver driver) {\r\n\t\t\t\t\treturn ((JavascriptExecutor) driverqa).executeScript(\"return document.readyState\")\r\n\t\t\t\t\t\t\t.equals(\"complete\");\r\n\t\t\t\t}\r\n\t\t\t};\r\n\t\t\t// WebDriverWait waiting = new WebDriverWait(driverqa, 30);\r\n\t\t\twait.until(pageLoadCondition);\r\n\t\t\taction.sendKeys(Keys.ESCAPE).build().perform();\r\n\t\t\tThread.sleep(2000);\r\n\t\t\tobj.Takesnap(driverqa, Config.SnapShotPath() + \"/Tour/Book_Tour/Log-In.jpg\");\r\n\r\n\t\t} catch (Throwable e) {\r\n\r\n\t\t\tobj.Takesnap(driverqa, Config.SnapShotPath() + \"/Tour/Error/Book_Tour/Log-In.jpg\");\r\n\t\t\ttest.log(LogStatus.FAIL, \"Login\");\r\n\t\t\terrorpath = Config.SnapShotPath() + \"/Tour/Error/Book_Tour/Log-In.jpg\";\r\n\t\t\tlogger.info(e.getMessage());\r\n\t\t\ttest.log(LogStatus.FAIL, e.getMessage());\r\n\t\t\trep.endTest(test);\r\n\t\t\trep.flush();\r\n\t\t\tAssert.assertTrue(false, e.getMessage());\r\n\r\n\t\t}\r\n\r\n\t\t/* ####### Applying filters and searching for filters ######### **/\r\n\r\n\t\ttry {\r\n\t\t\tlogger.info(\"Applying search Filters\");\r\n\t\t\tlogger.info(\"Starting Tour Search\");\r\n\t\t\ttest.log(LogStatus.INFO, \"Starting Tour Search\");\r\n\t\t\tdriverqa.findElement(Tour.tour).click();\r\n\t\t\tThread.sleep(2000);\r\n\t\t\twait.until(ExpectedConditions.visibilityOfElementLocated(Tour.tourname));\r\n\t\t\twait.until(ExpectedConditions.visibilityOfElementLocated(Tour.TourdestID));\r\n\t\t\tdriverqa.findElement(Tour.TourdestID).sendKeys(excel.getData(0, 51, 4));\r\n\t\t\tThread.sleep(3000);\r\n\t\t\taction.sendKeys(Keys.ARROW_DOWN).build().perform();\r\n\t\t\taction.sendKeys(Keys.ENTER).build().perform();\r\n\t\t\tdriverqa.findElement(Tour.tourname).sendKeys(excel.getData(0, 51, 1));\r\n\t\t\tThread.sleep(4000);\r\n\t\t\taction.sendKeys(Keys.ARROW_DOWN).build().perform();\r\n\t\t\taction.sendKeys(Keys.ENTER).build().perform();\r\n\r\n\t\t\ttest.log(LogStatus.INFO, \"Selecting dates\");\r\n\t\t\tdriverqa.findElement(Tour.tourdate).click();\r\n\t\t\twait.until(ExpectedConditions.visibilityOfElementLocated(Search.CalenderIN));\r\n\t\t\tdriverqa.findElement(Search.nextmnth).click();\r\n\t\t\tdriverqa.findElement(Search.nextmnth).click();\r\n\t\t\tList<WebElement> allDates = driverqa.findElements(Search.CalenderIN);\r\n\r\n\t\t\tfor (WebElement ele : allDates) {\r\n\r\n\t\t\t\tString date = ele.getText();\r\n\r\n\t\t\t\tif (date.equalsIgnoreCase(excel.getData(0, 65, 1))) {\r\n\t\t\t\t\tele.click();\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\r\n\t\t\t}\r\n\t\t\t/*\r\n\t\t\t * wait.until(ExpectedConditions.visibilityOfElementLocated(Search.\r\n\t\t\t * CalenderIN));\r\n\t\t\t * \r\n\t\t\t * List<WebElement> allDates2 =\r\n\t\t\t * driverqa.findElements(Search.CalenderIN);\r\n\t\t\t * \r\n\t\t\t * for (WebElement ele : allDates2) {\r\n\t\t\t * \r\n\t\t\t * String date = ele.getText();\r\n\t\t\t * \r\n\t\t\t * if (date.equalsIgnoreCase(excel.getData(0, 65, 2))) {\r\n\t\t\t * ele.click(); break; }\r\n\t\t\t * \r\n\t\t\t * }\r\n\t\t\t */\r\n\t\t\ttest.log(LogStatus.PASS, \"Selection of Dates\");\r\n\t\t\t/*\r\n\t\t\t * WebElement Noofchilds = driverqa.findElement(Search.NoOfChilds);\r\n\t\t\t * Noofchilds.clear(); Noofchilds.sendKeys(\"1\");\r\n\t\t\t */\r\n\t\t\tThread.sleep(2000);\r\n\t\t\tobj.Takesnap(driverqa, Config.SnapShotPath() + \"/Tour/Book_Tour/Filters.jpg\");\r\n\t\t\tString expectedresult = excel.getData(0, 51, 1);\r\n\t\t\tSystem.out.println(expectedresult);\r\n\t\t\tdriverqa.findElement(Tour.searchtourbutton).click();\r\n\t\t\twait.until(ExpectedConditions.visibilityOfElementLocated(Search.HotelTitle));\r\n\t\t\tThread.sleep(2000);\r\n\t\t\tobj.Takesnap(driverqa, Config.SnapShotPath() + \"/Tour/Book_Tour/Search-Result.jpg\");\r\n\t\t\tString actualresult = driverqa.findElement(Search.HotelTitle).getText();\r\n\t\t\tSystem.out.println(actualresult);\r\n\t\t\tAssert.assertTrue(actualresult.equalsIgnoreCase(expectedresult));\r\n\t\t\ttest.log(LogStatus.INFO, \"Ending Tour Search\");\r\n\t\t\ttest.log(LogStatus.PASS, \"PASSED Tour Search\");\r\n\t\t\tlogger.info(\"Tour Search Complete\");\r\n\t\t} catch (Throwable e) {\r\n\t\t\ttest.log(LogStatus.FAIL, \"Tour Search\");\r\n\r\n\t\t\tobj.Takesnap(driverqa, Config.SnapShotPath() + \"/Tour/Error/Book_Tour/Search-Result.jpg\");\r\n\t\t\terrorpath = Config.SnapShotPath() + \"/Tour/Error/Book_Tour/Search-Result.jpg\";\r\n\t\t\tlogger.info(e.getMessage());\r\n\t\t\ttest.log(LogStatus.FAIL, e.getMessage());\r\n\t\t\trep.endTest(test);\r\n\t\t\trep.flush();\r\n\t\t\tAssert.assertTrue(false, e.getMessage());\r\n\t\t}\r\n\r\n\t\t/* ####### Booking Tour for the specified date ######### **/\r\n\r\n\t\ttry {\r\n\t\t\ttest.log(LogStatus.INFO, \"Starting Tour Book\");\r\n\t\t\tlogger.info(\"Starting Tour Book\");\r\n\t\t\twait.until(ExpectedConditions.visibilityOfElementLocated(Tour.Gettour));\r\n\t\t\ttest.log(LogStatus.INFO, \"Selecting Tour\");\r\n\t\t\tlogger.info(\"Selecting Tour\");\r\n\t\t\tdriverqa.findElement(Tour.Gettour).click();\r\n\t\t\twait.until(ExpectedConditions.visibilityOfElementLocated(Tour.SelectTour));\r\n\t\t\tThread.sleep(2000);\r\n\t\t\tobj.Takesnap(driverqa, Config.SnapShotPath() + \"/Tour/Book_Tour/Avaailable_Tour_List.jpg\");\r\n\t\t\tdriverqa.findElement(Tour.SelectTour).click();\r\n\t\t\ttest.log(LogStatus.INFO, \"Tour Selected\");\r\n\t\t\tlogger.info(\"Tour Selected\");\r\n\t\t\tlogger.info(\"Entering Passenger details\");\r\n\t\t\ttest.log(LogStatus.INFO, \"Entering Passenger details\");\r\n\t\t\twait.until(ExpectedConditions.visibilityOfElementLocated(Tour.BookTourFirstName));\r\n\t\t\tdriverqa.findElement(Tour.BookTourFirstName).sendKeys(excel.getData(0, 21, 1));\r\n\t\t\tThread.sleep(2000);\r\n\t\t\tdriverqa.findElement(Tour.BookTourLastName).sendKeys(excel.getData(0, 21, 2));\r\n\t\t\tSelect passengertitle = new Select(driverqa.findElement(Tour.BookTourpassengerTitle));\r\n\t\t\tpassengertitle.selectByIndex(1);\r\n\t\t\tdriverqa.findElement(Tour.Pickuplocation).sendKeys(\"Airport\");\r\n\t\t\tdriverqa.findElement(Booking.PrcdToBookChckBox).click();\r\n\t\t\tThread.sleep(2000);\r\n\t\t\tobj.Takesnap(driverqa, Config.SnapShotPath() + \"/Tour/Book_Tour/Passenger-Details.jpg\");\r\n\t\t\tlogger.info(\"Entered Passenger details\");\r\n\t\t\ttest.log(LogStatus.INFO, \"Entered Passenger details\");\r\n\t\t\ttest.log(LogStatus.PASS, \"Passenger details\");\r\n\t\t\tdriverqa.findElement(Tour.ContinueTourBook).click();\r\n\t\t\twait.until(ExpectedConditions.visibilityOfElementLocated(Booking.ProccedToBook));\r\n\t\t\tThread.sleep(2000);\r\n\t\t\tobj.Takesnap(driverqa, Config.SnapShotPath() + \"/Tour/Book_Tour/Confirm-Tour-Booking.jpg\");\r\n\t\t\tdriverqa.findElement(Booking.ProccedToBook).click();\r\n\t\t\tlogger.info(\"Entering Payment details\");\r\n\t\t\ttest.log(LogStatus.INFO, \"Entering Payment details\");\r\n\t\t\twait.until(ExpectedConditions.visibilityOfElementLocated(PaymentPage.FirstName));\r\n\t\t\tWebElement FirstName = driverqa.findElement(PaymentPage.FirstName);\r\n\t\t\tFirstName.clear();\r\n\t\t\tFirstName.sendKeys(excel.getData(0, 22, 1));\r\n\t\t\tWebElement LastName = driverqa.findElement(PaymentPage.LastName);\r\n\t\t\tLastName.clear();\r\n\t\t\tLastName.sendKeys(excel.getData(0, 22, 2));\r\n\t\t\tWebElement Address = driverqa.findElement(PaymentPage.Address);\r\n\t\t\tAddress.clear();\r\n\t\t\tAddress.sendKeys(\"Kolkata1234\");\r\n\t\t\tWebElement CardNo = driverqa.findElement(PaymentPage.CardNumber);\r\n\t\t\tCardNo.clear();\r\n\t\t\tCardNo.sendKeys(excel.getData(0, 21, 5));\r\n\t\t\tWebElement CVVNo = driverqa.findElement(PaymentPage.CVVNumber);\r\n\t\t\tCVVNo.clear();\r\n\t\t\tCVVNo.sendKeys(excel.getData(0, 22, 5));\r\n\t\t\tdriverqa.findElement(PaymentPage.AcceptTerms).click();\r\n\t\t\tlogger.info(\"Entered Payment details\");\r\n\t\t\ttest.log(LogStatus.INFO, \"Entered Payment details\");\r\n\t\t\ttest.log(LogStatus.PASS, \"Payment details\");\r\n\t\t\tThread.sleep(2000);\r\n\t\t\tobj.Takesnap(driverqa, Config.SnapShotPath() + \"/Tour/Book_Tour/Payment-Details.jpg\");\r\n\t\t\tdriverqa.findElement(PaymentPage.Acceptpayment).click();\r\n\t\t\twait.until(ExpectedConditions.visibilityOfElementLocated(Booking.ViewBooking));\r\n\t\t\tJavascriptExecutor js1 = (JavascriptExecutor) driverqa;\r\n\t\t\tThread.sleep(2000);\r\n\t\t\tobj.Takesnap(driverqa, Config.SnapShotPath() + \"/Tour/Book_Tour/Search-Booking-Page.jpg\");\r\n\t\t\t// WebElement Element = driverqa.findElement(Booking.Invoice);\r\n\t\t\t// This will scroll the page till the element is found\r\n\t\t\t/*\r\n\t\t\t * Assert.assertTrue(ActualStatus.equalsIgnoreCase(ExpectedStatus));\r\n\t\t\t * Assert.assertTrue(ActualNoOfAdults.equalsIgnoreCase(\r\n\t\t\t * ExpectedNoOfAdults));\r\n\t\t\t */\r\n\t\t\tdriverqa.findElement(Booking.ViewBooking).click();\r\n\t\t\tThread.sleep(2000);\r\n\t\t\tobj.Takesnap(driverqa, Config.SnapShotPath() + \"/Tour/Book_Tour/Booking-Details1.jpg\");\r\n\t\t\t// This will scroll the page till the element is found\r\n\t\t\tjs1.executeScript(\"window.scrollTo(0, document.body.scrollHeight)\");\r\n\t\t\tThread.sleep(2000);\r\n\t\t\tobj.Takesnap(driverqa, Config.SnapShotPath() + \"/Tour/Book_Tour/Booking-Details2.jpg\");\r\n\t\t\twait.until(ExpectedConditions.visibilityOfElementLocated(Booking.BookingStatusPrepay));\r\n\t\t\tString ExpectedStatus = \"CONFIRMED\";\r\n\t\t\tString ExpectedTourName = excel.getData(0, 51, 1);\r\n\t\t\tExpectedTourDate = excel.getData(0, 65, 1);\r\n\t\t\tActualTourDate = driverqa.findElement(Tour.AfterBookingTourDate).getText();\r\n\t\t\tExpectedTourPickUp = \"Airport\";\r\n\t\t\tActualTourPickUp = driverqa.findElement(Tour.AfterBookingTourPickUp).getText();\r\n\t\t\tString ActualTourName = driverqa.findElement(Tour.AfterBookingTourName).getText();\r\n\t\t\tString ActualStatus = driverqa.findElement(Booking.BookingStatusPrepay).getText();\r\n\t\t\tSystem.out.println(ExpectedStatus);\r\n\t\t\tSystem.out.println(ExpectedTourName);\r\n\t\t\tSystem.out.println(ExpectedTourDate);\r\n\t\t\tSystem.out.println(ActualTourDate);\r\n\t\t\tSystem.out.println(ExpectedTourPickUp);\r\n\t\t\tSystem.out.println(ActualTourPickUp);\r\n\t\t\tSystem.out.println(ActualTourName);\r\n\t\t\tSystem.out.println(ActualStatus);\r\n\t\t\tAssert.assertTrue(ActualStatus.equalsIgnoreCase(ExpectedStatus));\r\n\t\t\tAssert.assertTrue(ActualTourName.equalsIgnoreCase(ExpectedTourName));\r\n\t\t\tAssert.assertTrue(ActualTourPickUp.equalsIgnoreCase(ExpectedTourPickUp));\r\n\t\t\tAssert.assertTrue(ActualTourDate.contains(ExpectedTourDate));\r\n\t\t\ttest.log(LogStatus.INFO, \"Ending Tour Book\");\r\n\t\t\ttest.log(LogStatus.PASS, \"Tour Book\");\r\n\t\t\tlogger.info(\"Tour Booked\");\r\n\r\n\t\t} catch (Throwable e) {\r\n\t\t\ttest.log(LogStatus.FAIL, \"Tour Book\");\r\n\t\t\tobj.Takesnap(driverqa, Config.SnapShotPath() + \"/Tour/Error/Book_Tour/Booking.jpg\");\r\n\t\t\terrorpath = Config.SnapShotPath() + \"/Tour/Error/Book_Tour/Booking.jpg\";\r\n\t\t\tlogger.info(e.getMessage());\r\n\t\t\ttest.log(LogStatus.FAIL, e.getMessage());\r\n\t\t\trep.endTest(test);\r\n\t\t\trep.flush();\r\n\t\t\tAssert.assertTrue(false, e.getMessage());\r\n\t\t}\r\n\t}", "@Test(dataProviderClass = DataProviderUtils.class, dataProvider = \"excelDataReader\", groups = { \"Sprint54\", \"Get Hyperlink\"}, \r\n\t\t\tdescription = \"No Java applet and no task area (but show 'Go To' shortcuts) layout will be displayed for hyperlink url on selecting No Java applet and no task area (but show 'Go To' shortcuts) layout in configuration and default in hyperlink dialog - Operations menu.\")\r\n\tpublic void SprintTest54_1_30_5A_1B(HashMap<String,String> dataValues, String driverType) throws Exception {\r\n\r\n\t\tdriver = null; \r\n\r\n\t\ttry {\r\n\r\n\r\n\r\n\r\n\t\t\tdriver = WebDriverUtils.getDriver();\r\n\r\n\r\n\t\t\tConcurrentHashMap <String, String> dataPool = new ConcurrentHashMap <String, String>(dataValues);\r\n\t\t\tConfigurationPage configurationPage = LoginPage.launchDriverAndLoginToConfig(driver, true); //Launched driver and logged in\r\n\r\n\t\t\t//Step-1 : Navigate to Vault in tree view\r\n\t\t\t//---------------------------------------\r\n\t\t\tconfigurationPage.treeView.clickTreeViewItem(Caption.ConfigSettings.VaultSpecificSettings.Value + \">>\" + testVault); //Clicks tree view item\r\n\r\n\r\n\t\t\tif (!configurationPage.configurationPanel.getPageName().toUpperCase().equalsIgnoreCase(testVault.toUpperCase())) //Checks if navigated to vault settings page\r\n\t\t\t\tthrow new Exception(\"Vault settings page in configuration is not opened.\");\r\n\r\n\t\t\tLog.message(\"1. Navigated to Vault settings page.\");\r\n\r\n\t\t\t//Step-2 : Select No Java applet and No task area but show Go to shortcuts layout layout and save the settings\r\n\t\t\t//------------------------------------------------------------------------------------------------------------\r\n\t\t\tconfigurationPage.configurationPanel.setJavaApplet(Caption.ConfigSettings.Config_Disable.Value);\r\n\r\n\t\t\tif(configurationPage.configurationPanel.isJavaAppletEnabled())\r\n\t\t\t\tthrow new Exception(\"Java applet is enabled\");\r\n\r\n\t\t\tconfigurationPage.configurationPanel.setLayout(Caption.ConfigSettings.Config_TaskAreaWithShowGoTo.Value);\r\n\r\n\t\t\tif (!configurationPage.configurationPanel.saveSettings()) //Save the settings\r\n\t\t\t\tthrow new Exception(\"Configuration settings are not saved after changing its layout.\");\r\n\r\n\t\t\tLog.message(\"1. No java applet with task area with go to layout is selected and saved.\");\r\n\r\n\t\t\tif (!configurationPage.logOut()) //Logs out from configuration page\r\n\t\t\t\tthrow new Exception(\"Log out is not successful after saving the settings in configuration page.\");\r\n\r\n\t\t\tLog.message(\"2. \" + Caption.ConfigSettings.Config_TaskAreaWithShowGoTo.Value + \" layout is selected and settings are saved.\");\r\n\r\n\t\t\t//Step-3 : Login to the default page and navigate to any view\r\n\t\t\t//-------------------------------------------------------------\r\n\t\t\tHomePage homePage = LoginPage.launchDriverAndLogin(driver, false); //Launches and logs into the default page\r\n\r\n\t\t\tString viewToNavigate = SearchPanel.searchOrNavigatetoView(driver, dataPool.get(\"NavigateToView\"), dataPool.get(\"ObjectName\"));\r\n\r\n\t\t\tLog.message(\"3. Logged into the default page and navigated to '\" + viewToNavigate + \"' view.\");\r\n\r\n\t\t\t//Step-4 : Open Get Hyperlink dialog for the object from operations menu\r\n\t\t\t//-----------------------------------------------------------------------\r\n\t\t\tif (!homePage.listView.clickItem(dataPool.get(\"ObjectName\"))) //Selects the Object in the list\r\n\t\t\t\tthrow new Exception(\"Object (\" + dataPool.get(\"ObjectName\") + \") is not got selected.\");\r\n\r\n\t\t\thomePage.menuBar.ClickOperationsMenu(Caption.MenuItems.GetMFilesWebURL.Value); //Selects Get Hyperlink from operations menu\r\n\r\n\t\t\tMFilesDialog mfilesDialog = new MFilesDialog(driver); //Instantiating MFilesDialog wrapper class\r\n\r\n\t\t\tif (!mfilesDialog.isGetMFilesWebURLDialogOpened()) //Checks for MFiles dialog title\r\n\t\t\t\tthrow new Exception(\"M-Files dialog with 'Get Hyperlink' title is not opened.\");\r\n\r\n\t\t\tLog.message(\"4. Hyperlink dialog of an object (\" + dataPool.get(\"ObjectName\") + \") is opened through operations menu.\");\r\n\r\n\t\t\t//Step-5 : Copy the link from text box and close the Get Hyperlink dialog\r\n\t\t\t//-----------------------------------------------------------------------\r\n\t\t\tString hyperlinkText = mfilesDialog.getHyperlink(); //Gets the hyperlink\r\n\t\t\tmfilesDialog.close(); //Closes the Get Hyperlink dialog\r\n\r\n\t\t\tLog.message(\"5. Hyperlink is copied and Get Hyperlink dialog is closed.\");\r\n\r\n\t\t\t//Step-6 : Open the copied Hyperlink in the browser\r\n\t\t\t//-------------------------------------------------\r\n\t\t\thomePage = Utility.navigateToPage(driver, hyperlinkText, userName, password, \"\"); //Navigates to the hyperlink url\r\n\r\n\r\n\t\t\tif (!driver.getCurrentUrl().equalsIgnoreCase(hyperlinkText))\r\n\t\t\t\tthrow new Exception (\"Browser is not opened with copied object Hyperlink.[Expected URL: \"+hyperlinkText+\" & Current URL : \"+ driver.getCurrentUrl() +\"]\");\r\n\r\n\t\t\tLog.message(\"6. Object Hyperlink is opened in the browser.\");\r\n\r\n\t\t\t//Verification : Verify if default layout is displayed\r\n\t\t\t//----------------------------------------------------\r\n\t\t\tString unAvailableLayouts = \"\";\r\n\r\n\t\t\tif (!homePage.isSearchbarPresent()) //Checks if Search bar present\r\n\t\t\t\tunAvailableLayouts = \"Search Bar is not available;\";\r\n\r\n\t\t\tif (homePage.isTaskPaneDisplayed()) //Checks if Task Pane present\r\n\t\t\t\tunAvailableLayouts = unAvailableLayouts + \"Task Pane is available;\";\r\n\r\n\t\t\tif (!homePage.taskPanel.isTaskPaneGoToDisplayed()) //Checks if Task Pane GoTo present\r\n\t\t\t\tunAvailableLayouts = unAvailableLayouts + \"Task Pane GoTo is not available;\";\r\n\r\n\t\t\tif (!homePage.previewPane.isTabExists(Caption.PreviewPane.MetadataTab.Value))\r\n\t\t\t\tunAvailableLayouts = unAvailableLayouts + \"Properties Pane is not available;\";\r\n\r\n\t\t\tif (!homePage.menuBar.isMenuInMenubarDisplayed()) //Checks if Menu Bar present\r\n\t\t\t\tunAvailableLayouts = unAvailableLayouts + \"Menu Bar is not available;\";\r\n\r\n\t\t\tif (!homePage.menuBar.isBreadCrumbDisplayed()) //Checks if Breadcrumb present\r\n\t\t\t\tunAvailableLayouts = unAvailableLayouts + \"Breadcrumb is not available;\";\r\n\r\n\t\t\tif (homePage.taskPanel.isAppletEnabled())\r\n\t\t\t\tunAvailableLayouts = unAvailableLayouts + \"Java Applet is available;\";\r\n\r\n\t\t\tif (!homePage.isListViewDisplayed())\r\n\t\t\t\tunAvailableLayouts = unAvailableLayouts + \"List View is not available;\";\r\n\r\n\t\t\tif (homePage.isTreeViewDisplayed())\r\n\t\t\t\tunAvailableLayouts = unAvailableLayouts + \"Tree View is available;\";\r\n\r\n\t\t\tif (unAvailableLayouts.equals(\"\")) //Verifies default layout have selected default custom layout\r\n\t\t\t\tLog.pass(\"Test case Passed. Hyperlink URL page is displayed as .\" + Caption.ConfigSettings.Config_TaskAreaWithShowGoTo.Value);\r\n\t\t\telse\r\n\t\t\t\tLog.fail(\"Test case Failed. Few layots are not as expected on selecting \" + Caption.ConfigSettings.Config_TaskAreaWithShowGoTo.Value + \". Refer additional information : \" \r\n\t\t\t\t\t\t+ unAvailableLayouts, driver);\r\n\t\t}\r\n\t\tcatch (Exception e) {\r\n\t\t\tLog.exception(e, driver);\r\n\t\t} //End catch\r\n\r\n\t\tfinally {\r\n\r\n\t\t\tif(driver != null){\r\n\t\t\t\ttry\r\n\t\t\t\t{\r\n\t\t\t\t\tdriver.get(configURL);\r\n\r\n\t\t\t\t\tConfigurationPage configurationPage = new ConfigurationPage(driver);\r\n\t\t\t\t\tconfigurationPage.treeView.clickTreeViewItem(Caption.ConfigSettings.VaultSpecificSettings.Value + \">>\" + testVault); //Clicks tree view item\r\n\r\n\t\t\t\t\tconfigurationPage.configurationPanel.setLayout(Caption.ConfigSettings.Config_Default.Value);\r\n\r\n\t\t\t\t\tif (!configurationPage.configurationPanel.saveSettings())\r\n\t\t\t\t\t\tthrow new Exception(\"Configuration settings are not saved.\");\r\n\t\t\t\t}\r\n\t\t\t\tcatch(Exception e0)\r\n\t\t\t\t{\r\n\t\t\t\t\tLog.exception(e0, driver);\r\n\t\t\t\t}\r\n\r\n\t\t\t}\r\n\t\t\tUtility.quitDriver(driver);\r\n\r\n\t\t} //End finally\r\n\r\n\t}", "public void VerifyRecapBillinfo(){\r\n\t\tString BillingName = getValue(\"FirstName\")+\" \"+getValue(\"LastName\");\r\n\t\tString Companyname = getValue(\"CompanyName\");\r\n\t\tString Address = getValue(\"Address\");\r\n\t\tString ZipCity = getValue(\"Zip\")+\" , \"+getValue(\"City\");\r\n\t\tString CardType= getValue(\"CardType\");\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:- shopping cart image link should be clicked\");\r\n\r\n\r\n\t\ttry{\r\n\t\t\tString[] BD=getWebTableData(locator_split(\"txtRecapBillinfo\"), locator_split(\"txtRecapBillinfodata\"));\r\n\t\t\tif(BD[1].equalsIgnoreCase(BillingName)&&BD[2].equalsIgnoreCase(Companyname)\r\n\t\t\t\t\t&&BD[3].equalsIgnoreCase(Address)&&BD[5].equalsIgnoreCase(ZipCity)\r\n\t\t\t\t\t&&BD[6].contains(CardType)){\r\n\t\t\t\tSystem.out.println(\"The data from Web matches with Excel Registration data\");\r\n\t\t\t\tReporter.log(\"PASS_MESSAGE:- The data from Web matches with Excel Registration data\");\r\n\t\t\t}\r\n\t\t\telse{\r\n\t\t\t\tReporter.log(\"FAIL_MESSAGE:- The data from Web dosent match with Excel Registration data\");\r\n\t\t\t\tthrow new Exception(\"The data from Web dosent match with Excel Registration data\");\r\n\t\t\t}\r\n\t\t}\r\n\t\tcatch(Exception e){\r\n\t\t\tReporter.log(\"FAIL_MESSAGE:- shopping cart image link is not clicked \");\r\n\t\t\tthrow new NoSuchElementException(\"The element with\"\r\n\t\t\t\t\t+ elementProperties.getProperty(\"txtRecapBillinfo\")\r\n\t\t\t\t\t+ elementProperties.getProperty(\"txtRecapBillinfodata\")\r\n\t\t\t\t\t+ \" not found\");\r\n\t\t}\r\n\r\n\t}", "public void ClickAddtoCartiteminCustomersalsoViewed(){\r\n\t\tString[] ExpText = getValue(\"CustomeralsoViewedtitle\").split(\",\", 2);\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:- Add to Cart button should be clicked in CustomeralsoViewed table\");\r\n\t\ttry{\r\n\t\t\tList<WebElement> ele = listofelements(locator_split(\"imgitemCustomeralsoOrderedViewed\"));\r\n\t\t\t((JavascriptExecutor) driver).executeScript(\"arguments[0].click();\", ele.get(Integer.valueOf(ExpText[0])-1));\r\n\t\t\tSystem.out.println(\"Add to Cart button is clicked in CustomeralsoOrdered table\");\r\n\t\t\tReporter.log(\"PASS_MESSAGE:- Add to Cart button is clicked in CustomeralsoOrdered table\");\r\n\r\n\t\t}\r\n\t\tcatch(NoSuchElementException e){\r\n\t\t\tReporter.log(\"FAIL_MESSAGE:- Add to Cart button is not clicked in CustomeralsoViewed table\");\r\n\t\t\tthrow new NoSuchElementException(\"The element with \"\r\n\t\t\t\t\t+ elementProperties.getProperty(\"imgitemCustomeralsoOrderedViewed\").toString()\r\n\t\t\t\t\t+ \" not found\");\r\n\t\t}\r\n\t}", "public void LoginHomePage(){\r\n\t\t\r\n\t\tString username =ExcelRetrieve(8, 1);\r\n\tString password = ExcelRetrieve(9, 1);\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:- My Account should be clicked and user should get logged in\");\r\n\t\ttry{\r\n\t\t\tSystem.out.println(\"inside login function\");\r\n\t\t\tsleep(3000);\r\n\t\t\t//click(locator_split(\"btnLoginArrow\"));\r\n\t\t//\tclearWebEdit(locator_split(\"txtLoginNamegrasp\"));\r\n\t\t//driver.get(\"https://tuchwsmw0301.r1-core.r1.aig.net:20400/prweb/GRASPExt\");\r\n\t\t\tdriver.get(\"https://www.ultimatix.net\");\r\n\t\tsleep(5000);\r\n\t\t\t//System.out.println(locator_split(\"txtLoginNamegrasp\"));\r\n\t\tclearWebEdit(locator_split(\"txtultimatixuser\"));\r\n\t\tsleep(5000);\r\n\t\tSystem.out.println(username);\r\n\t\tSystem.out.println(password);\r\n\t\tsendKeys(locator_split(\"txtultimatixuser\"), username);\r\n\t\tsendKeys(locator_split(\"txtultimatixpass\"), password);\r\n\t\t\t\t\t\t//clearWebEdit(locator_split(\"txtLoginNamegrasp\"));\r\n\t\t\t//sendKeys(locator_split(\"txtLoginNamegrasp\"), username);\r\n\t\t\t//sendKeys(locator_split(\"txtpasswordgrasp\"), password);\r\n\t\t\t//driver.findElement(By.name(\"USER\")).clear();\r\n\t\t\t//driver.findElement(By.name(\"USER\")).sendKeys(username);\r\n\t\t//\tdriver.findElement(locator_split(\"txtLoginNamegrasp\")).sendKeys(username);\r\n\t\t\t//driver.findElement(locator_split(\"txtpasswordgrasp\")).sendKeys(password);\r\n\t\t\t//driver.findElement(locator_split(\"btnlogingrasp\")).click();\r\n\t\t\t//click(locator_split(\"btnlogingrasp\"));\r\n\t\t\tclick(locator_split(\"btxultimatix\"));\r\n\t\t\t//sleep(5000);\r\n\t\t\t//driver.findElement(locator_split(\"btn_privacyok\")).click();\r\n\t\t//click(locator_split(\"btn_privacyok\"));\r\n\t\t\t\r\n\t\t\t/*Reporter.log(\"PASS_MESSAGE:- My Account is clicked and user is logged in\");*/\r\n\t\t}\r\n\t\tcatch(Exception e){\r\n\t\t\tReporter.log(\"FAIL_MESSAGE:- User is not logged in\");\r\n\t\t\tthrow new NoSuchElementException(\"The element with\"\r\n\t\t\t\t\t+ elementProperties.getProperty(\"LoginLogout\")\r\n\t\t\t\t\t+ \" not found\");\r\n\r\n\t\t}\r\n\r\n\t}", "@Test\n public void rentClientMatch() throws UiObjectNotFoundException {\n device.findObject(new UiSelector().resourceId(Utils.PACKAGE_NAME_PREFIX + \"btn_create_post\")).click();\n device.findObject(new UiSelector().resourceId(Utils.PACKAGE_NAME_PREFIX + \"lbl_rental_client\")).click();\n device.findObject(new UiSelector().resourceId(Utils.PACKAGE_NAME_PREFIX + \"txt_name\")\n .childSelector(new UiSelector().className(Utils.EDIT_TEXT_CLASS))).setText(\"Icon Windsor Rent\");\n device.findObject(new UiSelector().resourceId(Utils.PACKAGE_NAME_PREFIX + \"dd_configuration\")).click();\n device.findObject(By.text(\"3 BHK\")).click();\n clickButton(device);\n device.wait(Until.findObject(By.text(\"No\")), 2000);\n device.findObject(By.text(\"No\")).click();\n device.findObject(new UiSelector().resourceId(Utils.PACKAGE_NAME_PREFIX + \"dd_furnishing\")).click();\n device.findObject(By.text(\"Fully-Furnished\")).click();\n clickButton(device);\n device.findObject(new UiSelector().resourceId(Utils.PACKAGE_NAME_PREFIX + \"txt_pricing\")\n .childSelector(new UiSelector().index(1))).click();\n device.findObject(By.text(\"2\")).click();\n device.findObject(By.text(\"5\")).click();\n device.findObject(By.text(\"0\")).click();\n device.findObject(By.text(\"0\")).click();\n device.findObject(By.text(\"0\")).click();\n clickButton(device);\n device.wait(Until.findObject(By.text(\"Building Names\")), 2000);\n device.findObject(By.text(\"ADD BUILDING\")).click();\n device.findObject(new UiSelector().resourceId(Utils.PACKAGE_NAME_PREFIX + \"input_search\")).setText(\"Icon\");\n device.wait(Until.findObject(By.text(\"Icon Windsor Park\")), 10000);\n device.findObject(By.text(\"Icon Windsor Park\")).click();\n clickButton(device);\n UiScrollable postView = new UiScrollable(new UiSelector().scrollable(true));\n UiSelector postSelector = new UiSelector().text(\"POST\");\n postView.scrollIntoView(postSelector);\n device.findObject(postSelector).click();\n device.wait(Until.findObject(By.text(\"POST\").enabled(true)), 10000);\n String matchNameString = device.findObject(By.textContains(\"matches\")).getText().split(\" \")[0];\n device.findObject(By.text(\"POST\")).click();\n device.wait(Until.findObject(By.text(\"RENTAL CLIENT\")), 9000);\n Assert.assertNotEquals(\"Test Case Failed...No Match found\", \"no\", matchNameString.toLowerCase());\n String postMatchName = device.findObject(new UiSelector().resourceId(Utils.PACKAGE_NAME_PREFIX + \"lbl_name\")).getText();\n Assert.assertEquals(\"Test Case Failed...Match should have had been found with\", \"dialectic test\", postMatchName.toLowerCase());\n\n device.findObject(new UiSelector().resourceId(Utils.PACKAGE_NAME_PREFIX + \"btn_close\")).click();\n Utils.markPostExpired(device);\n }", "@Test\n\t public void testleadEdit() throws InterruptedException {\n\t\t List <WebElement> options = driver.findElement(By.id(\"tree_menu\")).findElements(By.className(\" close\"));\n\t\t System.out.println(\"The left pane has '\" + options.size() + \"' Options\");\t\t \n\t\t System.out.println(\"The option selected is:\" + options.get(7).getText());\n\t\t options.get(7).findElement(By.tagName(\"span\")).click();\n\t\t \n\t\t //Clicking on Edit Leads link\n\t\t System.out.println(\"Click on the '\" + driver.findElement(By.id(\"editLeads\")).getText() + \"' Link\" );\n\t\t driver.findElement(By.id(\"editLeads\")).click();\n\t\t \n\t\t //Verifying whether the required page is loaded or not\n\t\t System.out.println(\"Page loaded is:\" + driver.findElement(By.id(\"container\")).findElement(By.tagName(\"h1\")).getText());\n\t\t \n\t\t //Selecting no.of entries for the table\n\t\t driver.findElement(By.id(\"example_length\")).click();\n\t\t List <WebElement> entries = driver.findElement(By.name(\"example_length\")).findElements(By.tagName(\"option\"));\n\t\t Thread.sleep(4000);\n\t\t System.out.println(entries.size());\n\t\t Random r = new Random();\n\t\t int opt = r.nextInt(entries.size());\n\t\t entries.get(opt).click();\n\t\t System.out.println(\"No.of Entries selected for the page:\" + entries.get(opt).getText());\n\t\t \n\t\t //Verifying no.of leads in the page\n\t\t List <WebElement> leads = driver.findElement(By.id(\"example\")).findElement(By.tagName(\"tbody\")).findElements(By.tagName(\"tr\"));\n\t\t System.out.println(\"No. of leads in the Lead Edit Table:\" + leads.size());\n\t\t \n\t\t //Checking for the Track it and Edit buttons for each lead\n\t\t int edit=0, trackit=0;\n\t\t for(int i=0; i<leads.size(); i++) {\n\t\t\tif((leads.get(i).findElement(By.className(\"analyse\")).isEnabled()) && (leads.get(i).findElement(By.className(\"edit\")).isEnabled())) {\n\t\t\t edit++;\n\t\t\t trackit++;\n\t\t\t}\t \n\t\t }\n\t\t if((edit==leads.size()) && (trackit==leads.size()))\n\t\t\t System.out.println(\"Trackit and Edit buttons are enabled for all leads.\");\n\t\t \n\t\t //Validating the Track it button\n\t\t Random r1 = new Random();\n\t\t int opt1 = r1.nextInt(leads.size());\n\t\t leads.get(3).findElement(By.className(\"analyse\")).click();\n\t\t \n\t\t \n\t\t \n\t\t //Printing the details of the table\n\t\t String details = driver.findElement(By.tagName(\"table\")).findElement(By.tagName(\"tbody\")).getText();\n\t\t System.out.println(details);\n\t\t \n\t\t driver.findElement(By.id(\"editLeads\")).click();\n\t\t driver.findElement(By.name(\"example_length\")).findElements(By.tagName(\"option\")).get(3).click();\n\t\t sleep(5);\n\t\t driver.findElement(By.id(\"example\")).findElement(By.tagName(\"tbody\")).findElements(By.tagName(\"tr\")).get(opt1).findElement(By.className(\"edit\")).click();\n\t\t sleep(5);\n\t\t System.out.println(driver.findElement(By.cssSelector(\"span.ui-dialog-title\")).getText());\n\t\t \n\t\t \n\t \n\t \n\t \n\t }", "public void ClickAddtoCartiteminCustomersalsoOrdered(){\r\n\t\tString[] ExpText = getValue(\"CustomeralsoOrderedtitle\").split(\",\", 2);\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:- Add to Cart button should be clicked in CustomeralsoOrdered table\");\r\n\t\ttry{\r\n\t\t\tList<WebElement> ele = listofelements(locator_split(\"imgitemCustomeralsoOrderedViewed\"));\r\n\t\t\t((JavascriptExecutor) driver).executeScript(\"arguments[0].click();\", ele.get(Integer.valueOf(ExpText[0])-1));\r\n\t\t\tSystem.out.println(\"Add to Cart button is clicked in CustomeralsoOrdered table\");\r\n\t\t\tReporter.log(\"PASS_MESSAGE:- Add to Cart button is clicked in CustomeralsoOrdered table\");\r\n\r\n\t\t}\r\n\t\tcatch(NoSuchElementException e){\r\n\t\t\tReporter.log(\"FAIL_MESSAGE:- Add to Cart button is not clicked in CustomeralsoOrdered table\");\r\n\t\t\tthrow new NoSuchElementException(\"The element with \"\r\n\t\t\t\t\t+ elementProperties.getProperty(\"imgitemCustomeralsoOrderedViewed\").toString()\r\n\t\t\t\t\t+ \" not found\");\r\n\t\t}\r\n\t}", "@Test(dataProviderClass = DataProviderUtils.class, dataProvider = \"excelDataReader\", groups = {\"Sprint25\", \"Password\"}, \r\n\t\t\tdescription = \"Task area with GOTO items only\")\r\n\tpublic void SprintTest25_9_5(HashMap<String,String> dataValues, String driverType) throws Exception {\r\n\r\n\t\tdriver = null; \r\n\t\tConcurrentHashMap <String, String> dataPool = new ConcurrentHashMap <String, String>(dataValues);\r\n\r\n\t\ttry {\r\n\r\n\t\t\t//1. Login to Configuration\r\n\t\t\t//--------------------------\r\n\r\n\r\n\t\t\tdriver = WebDriverUtils.getDriver();\r\n\r\n\t\t\tdriver.get(configURL);\r\n\r\n\t\t\tLoginPage loginPage = new LoginPage(driver);\r\n\t\t\tConfigurationPage configurationPage = loginPage.loginToConfigurationUI(userName, password);\r\n\r\n\t\t\tLog.message(\"1. Logged in to Configuiration\");\r\n\r\n\t\t\t//2. Set the required settings\r\n\t\t\t//----------------------------\r\n\t\t\tconfigurationPage.treeView.clickTreeViewItem(\"Vault-specific settings>>\" + testVault);\r\n\r\n\t\t\tConfigurationPanel configSettingsPanel = new ConfigurationPanel(driver);\r\n\t\t\tconfigSettingsPanel.setLayout(dataPool.get(\"Layout\"));\r\n\r\n\t\t\tif (!configurationPage.configurationPanel.saveSettings())\r\n\t\t\t\tthrow new Exception(\"Configuration settings are not saved.\");\r\n\r\n\t\t\tconfigurationPage.logOut();\r\n\r\n\t\t\tLog.message(\"2. Set the required settings\");\r\n\r\n\t\t\t//3. Login to the Test vault\r\n\t\t\t//---------------------------\r\n\t\t\tdriver.get(loginURL);\r\n\t\t\tHomePage homePage = loginPage.loginToWebApplication(userName, password, testVault);\r\n\r\n\r\n\t\t\tLog.message(\"3. Login to the Test Vault.\");\r\n\r\n\t\t\t//Verification: To verify if the Java applet is not loaded\r\n\t\t\t//---------------------------------------------------------\r\n\t\t\tboolean flag = false;\r\n\t\t\ttry {\r\n\t\t\t\tWebElement GoToBar = driver.findElement(By.cssSelector(\"body[class='ui-widget ui-layout-container']>div[class='ui-layout-west ui-layout-pane ui-layout-pane-west']\"));\r\n\t\t\t\tif(GoToBar.isDisplayed() && GoToBar.isEnabled())\r\n\t\t\t\t\tflag = true;\r\n\t\t\t}\r\n\r\n\t\t\tcatch (Exception e) {\r\n\t\t\t\tif (e.getClass().toString().contains(\"NoSuchElementException\")) \r\n\t\t\t\t\tflag = false;\r\n\t\t\t} //End catch\r\n\r\n\t\t\tif(!flag)\r\n\t\t\t\tLog.fail(\"Tets Case Failed. The GoTo pane was not visible.\", driver);\r\n\t\t\telse if(!homePage.isTaskPaneDisplayed())\r\n\t\t\t\tLog.pass(\"Test Case Passed. The task pane was not displayed, Java applet was not enabled as expected.\");\r\n\t\t\telse\r\n\t\t\t\tLog.fail(\"Test Case Failed. The task pane was displayed.\", driver);\r\n\r\n\t\t\tdriver.get(configURL);\r\n\r\n\t\t\tconfigurationPage = new ConfigurationPage(driver);\r\n\t\t\tconfigurationPage.treeView.clickTreeViewItem(\"Vault-specific settings>>\" + testVault);\r\n\r\n\t\t\tconfigSettingsPanel.setLayout(Caption.ConfigSettings.Config_Default.Value);\r\n\r\n\t\t\tif (!configurationPage.configurationPanel.saveSettings())\r\n\t\t\t\tthrow new Exception(\"Configuration settings are not saved.\");\r\n\r\n\t\t}\r\n\r\n\t\tcatch(Exception e)\r\n\t\t{\r\n\t\t\tLog.exception(e, driver);\r\n\t\t}\r\n\r\n\t\tfinally {\r\n\t\t\tUtility.quitDriver(driver);\r\n\t\t}\r\n\r\n\t}", "@Test\n\tpublic void verifyAdIdPriceTMVVisitsEmailsAndStatusDetailsAreDisplaying() throws Exception {\n\t\tAllStockTradusPROPage AllStockPage= new AllStockTradusPROPage(driver);\n\t\twaitTill(2000);\n\t\tLoginTradusPROPage loginPage = new LoginTradusPROPage(driver);\n\t\tloginPage.setAccountEmailAndPassword(userName, pwd);\n\t\tjsClick(driver, loginPage.LoginButton);\n\t\texplicitWaitFortheElementTobeVisible(driver, AllStockPage.myStockOptioninSiderBar);\n\t\tjsClick(driver, AllStockPage.myStockOptioninSiderBar);\n\t\texplicitWaitFortheElementTobeVisible(driver, AllStockPage.allMyStockOptioninSiderBar);\n\t\tjsClick(driver, AllStockPage.allMyStockOptioninSiderBar);\n\t\texplicitWaitFortheElementTobeVisible(driver, AllStockPage.MyStockText);\n\t\twaitTill(3000);\n\t\twhile(!verifyElementPresent(AllStockPage.tradusLinkforMANtires)) {\n\t\t\tdriver.navigate().refresh();\n\t\t\twaitTill(3000);\n\t\t}\n\t\tfor(int i=0; i<AllStockPage.PostedAds.size();i++)\n\t\t{\n\t\t\t/*switch(i) {\n\t\t\tcase 0: Assert.assertTrue(getText(AllStockPage.PostedAdsAdIds.get(i)).equals(\"Ad ID: 2986865\"),\n\t\t\t\t \"Expected Ad id is not displaying for 1st ad in All stock page\");\n\t\t\tAssert.assertTrue(getText(AllStockPage.PostedAdsCurrencyAndPrices.get(i)).equals(\"EUR 0\"),\n\t\t\t\t \"Given currency & price are not displaying for 1st ad in All stock page\");\n\t\t\tAssert.assertTrue(getText(AllStockPage.PostedAdsTMV.get(i)).equals(\"No price rating\"),\n\t\t\t\t \"Tradus market value is not displaying as no price rating for 1st ad in all stock page\");\n\t\t\tAssert.assertTrue(verifyElementPresent(AllStockPage.PostedAdsTMV.get(i)),\n\t\t\t\t \"Visits are not displaying for 1st ad in all stock page\");\n\t\t\tAssert.assertTrue(verifyElementPresent(AllStockPage.PostedAdsEmails.get(i)),\n\t\t\t\t \"Emails are not displaying for 1st ad in all stock page\");\n\t\t\tAssert.assertTrue(getText(AllStockPage.PostedAdsStatus.get(i)).equals(\"Tradus\"),\n\t\t\t\t \"Status is not displaying as active on tradus for 1st ad in All stock page\");break;\n\t\t\t\t \n\t\t\tcase 1: Assert.assertTrue(getText(AllStockPage.PostedAdsAdIds.get(i)).equals(\"Ad ID: 2986861\"),\n\t\t\t\t \"Expected Ad id is not displaying for 2nd ad in All stock page\");\n\t\t\tAssert.assertTrue(getText(AllStockPage.PostedAdsCurrencyAndPrices.get(i)).equals(\"EUR 100\"),\n\t\t\t\t \"Given currency & price are not displaying for 2nd ad in All stock page\");\n\t\t\tAssert.assertTrue(getText(AllStockPage.PostedAdsTMV.get(i)).equals(\"No price rating\"),\n\t\t\t\t \"Tradus market value is not displaying as no price rating for 2nd ad in all stock page\");\n\t\t\tAssert.assertTrue(verifyElementPresent(AllStockPage.PostedAdsTMV.get(i)),\n\t\t\t\t \"Visits are not displaying for 2nd ad in all stock page\");\n\t\t\tAssert.assertTrue(verifyElementPresent(AllStockPage.PostedAdsEmails.get(i)),\n\t\t\t\t \"Emails are not displaying for 2nd ad in all stock page\");\n\t\t\tAssert.assertTrue(getText(AllStockPage.PostedAdsStatus.get(i)).equals(\"Tradus\"),\n\t\t\t\t \"Status is not displaying as active on tradus for 2nd ad in All stock page\");\n\t\t\t}*/\n\t\t\t Assert.assertTrue(verifyElementPresent(AllStockPage.PostedAdsAdIds.get(i)),\n\t\t\t\t\t \"Expected Ad id is not displaying for \"+i+ \" ad in All stock page\");\n\t\t Assert.assertTrue(verifyElementPresent(AllStockPage.PostedAdsCurrencyAndPrices.get(i)),\n\t\t \t\t\"Given currency & price are not displaying for \"+i+ \" ad in All stock page\");\n\t\t Assert.assertTrue(verifyElementPresent(AllStockPage.PostedAdsTMV.get(i)),\n\t\t \t\t\"Tradus market value is not displaying as no price rating for \"+i+ \" ad in all stock page\");\n\t\t Assert.assertTrue(verifyElementPresent(AllStockPage.PostedAdsVisits.get(i)),\n\t\t \t\t\"Visits are not displaying for \"+i+ \" ad in all stock page\");\n\t\t Assert.assertTrue(verifyElementPresent(AllStockPage.PostedAdsEmails.get(i)),\n\t\t \t\t\"Emails are not displaying for \"+i+ \" ad in all stock page\");\n\t\t Assert.assertTrue(verifyElementPresent(AllStockPage.PostedAdsStatus.get(i)),\n\t\t \t\t\"Status is not displaying as active on tradus for \"+i+ \" ad in All stock page\");\n\t\t}\n\t}", "@Test(dataProvider = \"loginTestData\")\r\n\tpublic void testTC05NavigateThroughBrand(String Email, String Password) throws Exception{\r\n\r\n\t\tUtils.openWriter(\"TC05_NavigateThroughBrand.log.txt\");\r\n\t\t// Step.1 Open url\r\n\t\tdriver.get(Utils.appurl);\r\n\r\n\t\t//Step.2 Click on My Account and then click on login\r\n\t\tdriver.findElement(By.xpath(\"//a[@title='My Account']\")).click();\r\n\t\t\r\n\t\tif ( Utils.isElementPresent(By.linkText(\"Logout\")))\r\n\t\t{\r\n\t\t\tdriver.findElement(By.linkText(\"Logout\")).click();\r\n\t\t\tdriver.findElement(By.xpath(\"//a[@title='My Account']\")).click();\r\n\t\t}\r\n\r\n\t\tdriver.findElement(By.linkText(\"Login\")).click();\r\n\t\tReporter.log(\"Clicked on login<BR>\");\t\t\t\t\r\n\r\n\t\t// verify Login page is displayed or not?\r\n\t\tString header = driver.findElement(By.xpath(\"//h2[text()='Returning Customer']\")).getText();\r\n\t\tif ( header.equals(\"\"))\r\n\t\t{\r\n\t\t\tReporter.log(\"Login page not displayed<BR>\");\r\n\t\t\treturn ;\r\n\t\t}\r\n\t\tReporter.log(\"Entering data in Login page<BR>\");\r\n\r\n\t\t//Step.3 Enter email and password from Excel sheet\r\n\t\tdriver.findElement(By.id(\"input-email\")).clear();\r\n\t\tdriver.findElement(By.id(\"input-email\")).sendKeys(Email);\r\n\t\tReporter.log(\"Entered the email ID \"+ Email +\"<br>\");\r\n\t\tdriver.findElement(By.id(\"input-password\")).clear();\r\n\t\tdriver.findElement(By.id(\"input-password\")).sendKeys(Password);\r\n\t\tReporter.log(\"Entered the password<BR>\");\r\n\r\n\t\t//Step.4 Click on Login button\r\n\t\tdriver.findElement(By.xpath(\"//input[@value='Login']\")).click();\r\n\r\n\t\t//Step.4b capture the screenshot and store in screenshot folder\r\n\t\tReporter.log(driver.findElement(By.xpath(\"//h2[text()='My Account']\")).getText()+\"<BR>\");\r\n\t\tUtils.captureScreenshot(\"TC05_NavigateStore_a_\");\r\n\r\n\t\t//Step.5 Click on Your Store link available on top left corner\r\n\t\tdriver.findElement(By.linkText(\"Your Store\")).click();\r\n\t\tReporter.log(\"Clicked on Your Store <BR>\");\r\n\r\n\t\t//Step.6 Click on Brands link available on bottom navbar under Extras\r\n\t\tdriver.findElement(By.linkText(\"Brands\")).click();\r\n\t\tReporter.log(driver.findElement(By.xpath(\"//*[@id=\\\"content\\\"]/h1\")).getText() +\"<br>\");\r\n\r\n\t\t//Step.7 Click on all Brands links one by one\r\n\t\tList<String> brandall =\tnew ArrayList<String>();\r\n\t\t\r\n\t\tfor(WebElement elem : driver.findElements(By.xpath(\"//*[@id='content']/div/*/a\")) )\r\n\t\t{\r\n\t\t\tbrandall.add(elem.getText());\r\n\t\t}\t\t\r\n\t\t\r\n\t\tReporter.log(\"Total :\" + brandall.size() +\" Brands found<BR>\");\r\n\t\t\r\n\t\tfor(String brand : brandall)\r\n\t\t{\r\n\t\t\tWebElement elem = driver.findElement(By.linkText(brand));\r\n\t\t\tReporter.log(\"Clicking on brand :\" + elem.getText() +\" <BR>\");\r\n\t\t\telem.click();\r\n\t\t\tUtils.captureScreenshot(\"TC05_NavigateStore_\"+brand);\r\n\r\n\t\t\t// navigate back to the parent page\r\n\t\t\tdriver.navigate().back();\r\n\t\t}\r\n\r\n\r\n\t\t//Step.8(7) Click on My Account \r\n\t\tdriver.findElement(By.xpath(\"//a[@title='My Account']\")).click();\r\n\r\n\t\t//Step.9(8s) Click on Logout \r\n\t\tdriver.findElement(By.linkText(\"Logout\")).click();\r\n\t\tReporter.log(\"Clicked on logout<BR>\");\r\n\t\tString msg = driver.findElement(By.xpath(\"//*[@id='content']/p[1]\")).getText();\r\n\t\tReporter.log(msg+\"<BR>\");\r\n\t\tout.println(msg);\r\n\t}", "@Test\n\tpublic void testTaxinearu() throws Exception {\n\t\tAssert.assertTrue(Constant.TITLE.contains(driver.getTitle()));\n\t\tThread.sleep(5000);\n\t\tLog.info(\"TITLE IS MATCHED\");\n\n\t\t// click on the LOGIN./SIGNUP\n\t\tdriver.findElement(By.xpath(\"//*[@id='loginsignuplink']\")).click();\n\t\tThread.sleep(5000);\n\n\t\t// click on the SignUp\n\t\tdriver.findElement(By.id(\"btnSignup\")).click();\n\t\tThread.sleep(5000);\n int row=12;\n\t\t// passing value for firstName\n\t\tdriver.findElement(By.id(\"firstName\")).sendKeys(ExcelUtils.getCellData(row, 1, Constant.SHEET_NAME4));\n\t\t// passing value for second name\n\t\tdriver.findElement(By.id(\"lastName\")).sendKeys(ExcelUtils.getCellData(row, 2, Constant.SHEET_NAME4));\n\t\t// passing value for contact number\n\t\tdriver.findElement(By.id(\"contactNo\")).sendKeys(ExcelUtils.getCellData(row, 3, Constant.SHEET_NAME4));\n\t\t// passing value for email address\n\t\tdriver.findElement(By.id(\"emailId\")).sendKeys(ExcelUtils.getCellData(row, 4, Constant.SHEET_NAME4));\n\t\t// passing value for password\n\t\tdriver.findElement(By.id(\"password\")).sendKeys(ExcelUtils.getCellData(row, 5, Constant.SHEET_NAME4));\n\t\t// passing value for con pass\n\t\tdriver.findElement(By.id(\"confPassword\")).sendKeys(ExcelUtils.getCellData(row, 6, Constant.SHEET_NAME4));\n\t\t\n\t\t// selecting security question\n\t\tFunction.dropDown(driver, row, 7, Constant.SHEET_NAME4);\n\n\t\t// passing value for security question 1\n\t\tdriver.findElement(By.id(\"ans1\")).sendKeys(ExcelUtils.getCellData(row, 8, Constant.SHEET_NAME4));\n\n\t\t// selecting security question 2\n\t\tFunction.dropDown(driver, row, 9, Constant.SHEET_NAME4);\n\n\t\t// passing value for security question 2\n\t\tdriver.findElement(By.id(\"ans2\")).sendKeys(ExcelUtils.getCellData(row, 10, Constant.SHEET_NAME4));\n\n\t\t// click on the check box\n\t\tdriver.findElement(By.xpath(\"//html/body/div[3]/div/div/div/div[2]/div/form/div[11]/div/div/input\")).click();\n\n\t\tThread.sleep(2000);\n\n\t\t// click on the submit button ,so that we can check the errors\n\t\tdriver.findElement(By.id(\"btnUsrSignUp\")).click();\n\t\tThread.sleep(2000);\n\n\t\t// passing vaule of check to true\n\t\tcheck = true;\n\n\t}", "@Test\n public void resalePropertyMatch() throws UiObjectNotFoundException {\n device.findObject(new UiSelector().resourceId(Utils.PACKAGE_NAME_PREFIX + \"btn_create_post\")).click();\n device.findObject(new UiSelector().resourceId(Utils.PACKAGE_NAME_PREFIX + \"lbl_resale_prop\")).click();\n device.findObject(By.text(\"Search building name\")).click();\n device.findObject(new UiSelector().resourceId(Utils.PACKAGE_NAME_PREFIX + \"input_search\")).setText(\"Icon\");\n device.wait(Until.findObject(By.text(\"Icon Linera\")), 10000);\n device.findObject(By.text(\"Icon Linera\")).click();\n device.findObject(new UiSelector().resourceId(Utils.PACKAGE_NAME_PREFIX + \"dd_configuration\")).click();\n device.findObject(By.text(\"3 BHK\")).click();\n device.findObject(new UiSelector().resourceId(Utils.PACKAGE_NAME_PREFIX + \"txt_pricing\")).click();\n device.findObject(By.text(\"7\")).click();\n device.findObject(By.text(\"5\")).click();\n device.findObject(By.text(\"0\")).click();\n device.findObject(By.text(\"0\")).click();\n device.findObject(By.text(\"0\")).click();\n device.findObject(By.text(\"0\")).click();\n device.findObject(By.text(\"0\")).click();\n device.findObject(By.text(\"Done\")).click();\n device.wait(Until.findObject(By.text(\"sq ft\")), 2000);\n device.findObject(new UiSelector().resourceId(Utils.PACKAGE_NAME_PREFIX + \"txt_carpet_area\")\n .childSelector(new UiSelector().className(Utils.EDIT_TEXT_CLASS))).setText(\"1200\");\n device.findObject(new UiSelector().resourceId(Utils.PACKAGE_NAME_PREFIX + \"dd_floor\")).click();\n device.findObject(By.text(\"Higher\")).click();\n device.findObject(By.text(\"4\")).click();\n UiScrollable postView = new UiScrollable(new UiSelector().scrollable(true));\n UiSelector postSelector = new UiSelector().text(\"POST\");\n postView.scrollIntoView(postSelector);\n device.findObject(postSelector).click();\n device.wait(Until.findObject(By.text(\"POST\").enabled(true)), 10000);\n String matchNameString = device.findObject(By.textContains(\"matches\")).getText().split(\" \")[0];\n device.findObject(By.text(\"POST\")).click();\n device.wait(Until.findObject(By.text(\"RESALE PROPERTY\")), 9000);\n Assert.assertNotEquals(\"Test Case Failed...No Match found\", \"no\", matchNameString.toLowerCase());\n String postMatchName = device.findObject(new UiSelector().resourceId(Utils.PACKAGE_NAME_PREFIX + \"lbl_name\")).getText();\n Assert.assertEquals(\"Test Case Failed...Match should have had been found with\", \"dialectic test\", postMatchName.toLowerCase());\n\n device.findObject(new UiSelector().resourceId(Utils.PACKAGE_NAME_PREFIX + \"btn_close\")).click();\n Utils.markPostExpired(device);\n }", "@Test(dataProviderClass = DataProviderUtils.class, dataProvider = \"excelDataReader\", groups = {\"Sprint33\", \"Breadcrumb\"}, \r\n\t\t\tdescription = \"Verify to Hiding GOTO items.\")\r\n\tpublic void SprintTest33_1_5(HashMap<String,String> dataValues, String driverType) throws Exception {\r\n\r\n\t\tdriver = null; \r\n\t\tLoginPage loginPage = null;\r\n\t\tConfigurationPage configurationPage = null;\r\n\t\tString[] options = null;\r\n\r\n\t\ttry {\r\n\r\n\r\n\r\n\t\t\tdriver = WebDriverUtils.getDriver();\r\n\r\n\t\t\tConcurrentHashMap <String, String> dataPool = new ConcurrentHashMap <String, String>(dataValues);\r\n\r\n\t\t\t//1. Login to Configuration\r\n\t\t\t//--------------------------\r\n\t\t\tdriver.get(configURL);\r\n\r\n\t\t\tloginPage = new LoginPage(driver);\r\n\t\t\tconfigurationPage = loginPage.loginToConfigurationUI(userName, password);\r\n\r\n\r\n\t\t\tLog.message(\"1. Logged in to Configuiration\");\r\n\r\n\t\t\t//2. Click the Task area link \r\n\t\t\t//----------------------------\r\n\t\t\tconfigurationPage.treeView.clickTreeViewItem(Caption.ConfigSettings.VaultSpecificSettings.Value + \">>\" + testVault + \">>\" + Caption.ConfigSettings.Config_TaskArea.Value);\r\n\r\n\r\n\t\t\tLog.message(\"2. Clicked the Task area link.\");\r\n\r\n\t\t\t//3. Hide all GoTo shortcuts\r\n\t\t\t//---------------------------\r\n\t\t\toptions = dataPool.get(\"Options\").split(\"\\n\");\r\n\r\n\r\n\t\t\tfor(int count = 0; count < options.length; count++) \r\n\t\t\t\tconfigurationPage.configurationPanel.setVaultCommands(options[count],\"Hide\");\r\n\r\n\t\t\tif (!configurationPage.configurationPanel.saveSettings())\r\n\t\t\t\tthrow new Exception(\"Configuration settings are not saved.\");\r\n\r\n\t\t\tconfigurationPage.logOut();\r\n\r\n\r\n\t\t\tLog.message(\"3. Hide all GoTo shortcuts\");\r\n\r\n\t\t\t//Step-4: Login to the vault\r\n\t\t\t//---------------------------\r\n\t\t\tdriver.get(loginURL);\r\n\r\n\t\t\tloginPage = new LoginPage(driver);\r\n\t\t\tHomePage homePage = loginPage.loginToWebApplication(userName, password, testVault);\r\n\r\n\r\n\t\t\tLog.message(\"Step-4: Login to the vault.\");\r\n\r\n\t\t\t//Verification: To verify if GoTo option is not displayed in the task pane\r\n\t\t\t//------------------------------------------------------------------------\r\n\r\n\t\t\tif(!homePage.taskPanel.isItemExists(dataPool.get(\"MenuItem\")))\r\n\t\t\t\tLog.pass(\"Test case Passed. The Task Panel item \" + dataPool.get(\"MenuItem\") + \" did not exist.\");\r\n\t\t\telse\r\n\t\t\t\tLog.fail(\"Test Case Failed. The Task Panel item \" + dataPool.get(\"MenuItem\") + \" still exists\", driver);\r\n\r\n\r\n\t\t} //End try\r\n\r\n\t\tcatch(Exception e) \t{\r\n\t\t\tLog.exception(e, driver);\r\n\t\t} //End catch\r\n\r\n\t\tfinally {\r\n\t\t\tif(driver != null){\r\n\t\t\t\ttry\r\n\t\t\t\t{\r\n\t\t\t\t\tdriver.get(configURL);\r\n\r\n\t\t\t\t\tconfigurationPage = new ConfigurationPage(driver);\r\n\t\t\t\t\tconfigurationPage.treeView.clickTreeViewItem(Caption.ConfigSettings.VaultSpecificSettings.Value + \">>\" + testVault + \">>\" + Caption.ConfigSettings.Config_TaskArea.Value);\r\n\r\n\t\t\t\t\tfor(int count = 0; count < options.length; count++) \r\n\t\t\t\t\t\tconfigurationPage.configurationPanel.setVaultCommands(options[count],\"Show\");\r\n\r\n\t\t\t\t\tif (!configurationPage.configurationPanel.saveSettings())\r\n\t\t\t\t\t\tthrow new Exception(\"Configuration settings are not saved.\");\r\n\t\t\t\t}\r\n\t\t\t\tcatch(Exception e0)\r\n\t\t\t\t{\r\n\t\t\t\t\tLog.exception(e0, driver);\r\n\t\t\t\t}\r\n\r\n\t\t\t}\r\n\t\t\tUtility.quitDriver(driver);\r\n\t\t} //End finally\r\n\r\n\t}", "@Override\n\tpublic void onTestSuccess(ITestResult result) {\n\t\ttry {\n\t\t\tapitest = new ExcelAPI(obj.filepath);\n\t\t\tobj = (TestNGDataExlProvider) result.getInstance();\n\t\t\tXSSFCell cell = apitest.setCellData(obj.sheetName, \"Results\", obj.k, \"Pass\");\n\t\t\tapitest.setupFont(cell, HSSFColor.GREEN.index);\n\t\t} catch (Exception e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\n\t}", "@Test\n public void testDAM31001001() {\n // Data preparation\n {\n clearAndCreateTestDataForBook();\n }\n\n // Index page\n DAM3IndexPage dam3IndexPage = new DAM3IndexPage(driver);\n\n TodoListPage todoListPage = dam3IndexPage.dam31001001Click();\n\n // Confirmation of database state before any update\n assertThat(todoListPage.getCompletedTodoCount(), equalTo(\"3\"));\n assertThat(todoListPage.getIncompletTodoCount(), equalTo(\"7\"));\n assertThat(todoListPage.getTotalTodoCount(), equalTo(\"10\"));\n\n TodoRegisterPage todoRegisterPage = todoListPage.registerTodo();\n\n todoRegisterPage.setTodoCategory(\"CA3\");\n todoRegisterPage.setTodoId(\"0000001000\");\n todoRegisterPage.setTodoTitle(\"ESC Test1\");\n // add couple of todos for escape search operation.\n todoRegisterPage.addTodo();\n\n webDriverOperations.displayPage(getPackageRootUrl());\n dam3IndexPage = new DAM3IndexPage(driver);\n\n todoListPage = dam3IndexPage.dam31001001Click();\n\n // Confirmation of database state before batch update\n assertThat(todoListPage.getCompletedTodoCount(), equalTo(\"3\"));\n assertThat(todoListPage.getIncompletTodoCount(), equalTo(\"8\"));\n assertThat(todoListPage.getTotalTodoCount(), equalTo(\"11\"));\n\n todoRegisterPage = todoListPage.registerTodo();\n\n todoRegisterPage.setTodoCategory(\"CA4\");\n todoRegisterPage.setTodoId(\"0000000031\");\n todoRegisterPage.setTodoTitle(\"2 ESC Test\");\n todoRegisterPage.addTodo();\n\n webDriverOperations.displayPage(getPackageRootUrl());\n dam3IndexPage = new DAM3IndexPage(driver);\n\n todoListPage = dam3IndexPage.dam31001001Click();\n\n // Confirmation of database state after adding 1 todo\n assertThat(todoListPage.getCompletedTodoCount(), equalTo(\"3\"));\n assertThat(todoListPage.getIncompletTodoCount(), equalTo(\"9\"));\n assertThat(todoListPage.getTotalTodoCount(), equalTo(\"12\"));\n\n todoListPage.setTodoTitleContent(\"ESC\");\n\n // perform escape search\n todoListPage = todoListPage.escapeSearch();\n\n // Confirmation of todos retrieved satisfying the escape search criteria\n assertThat(todoListPage.getCompletedTodoCount(), equalTo(\"0\"));\n assertThat(todoListPage.getIncompletTodoCount(), equalTo(\"2\"));\n assertThat(todoListPage.getTotalTodoCount(), equalTo(\"2\"));\n\n // on sampling basis check the details of todo retrieved as a result of escape\n // search.\n TodoDetailsPage todoDetailsPage = todoListPage.displayTodoDetail(\n \"0000001000\");\n assertThat(todoDetailsPage.getTodoTitle(), equalTo(\"ESC Test1\"));\n assertThat(todoDetailsPage.getTodoID(), equalTo(\"0000001000\"));\n assertThat(todoDetailsPage.getTodoCategory(), equalTo(\"CA3\"));\n assertThat(todoDetailsPage.getTodoStatus(), equalTo(\"false\"));\n assertThat(todoDetailsPage.getTodoCreatedDate(), equalTo(\"2016/12/28\"));\n assertThat(todoDetailsPage.getTodoVersion(), equalTo(\"0\"));\n\n }", "@Test\npublic void TestMarketWatch() throws InterruptedException {\nSystem.setProperty(\"webdriver.firefox.bin\",\"/Users/jasonsouryamath/Desktop/FirefoxDeveloperEdition.app/Contents/MacOS/firefox-bin\");\ndriver = new FirefoxDriver();\ndriver.get(\"http://www.marketwatch.com/\");\nThread.sleep(2000);\n((JavascriptExecutor)driver).executeScript(\"scroll(0,1000)\");\nnew WebDriverWait(driver,10).until(ExpectedConditions.presenceOfElementLocated(By.cssSelector(\"#f72ae3716b0373a474b6898d41a29e1a9158244d > li:nth-child(3) > div:nth-child(1) > div:nth-child(2) > h3:nth-child(1) > a:nth-child(1)\"))).click();\n((JavascriptExecutor)driver).executeScript(\"scroll(0,1200)\");\n}", "@Test\n\tpublic static void Main() {\n\t\tSystem.setProperty(\"webdriver.chrome.driver\",\n\t\t\t\t\"C:\\\\Data\\\\Tools\\\\Selenium\\\\chromedriver_win32\\\\chromedriver.exe\");\n\t\tWebDriver driver = new ChromeDriver();\n\t\tdriver.manage().window().maximize();\n\t\tString baseUrl = \"https://the-internet.herokuapp.com/\";\n\t\tString expectedTitle = \"The Internet\";\n\t\tString actualTitle = \"\";\n\t\tdriver.get(baseUrl);\n\t\tactualTitle = driver.getTitle();\n\t\tif (actualTitle.contentEquals(expectedTitle)) {\n\t\t\tSystem.out.println(\"Test Passed!\");\n\t\t} else {\n\t\t\t\tSystem.out.println(\"Test Failed\");\n\t\t}\n\t\tdriver.findElement(By.xpath(\"(//div[@id=\\\"content\\\"]//a)[21]\")).click();\n\n\t\ttry {\n\t\t\tFileInputStream file = new FileInputStream(new File(\"C:\\\\Data\\\\Login.xlsx\"));\n\n\t\t\t// Create Workbook instance holding reference to .xlsx file\n\t\t\tXSSFWorkbook workbook = new XSSFWorkbook(file);\n\n\t\t\t// Get first/desired sheet from the workbook\n\t\t\tXSSFSheet sheet = workbook.getSheetAt(0);\n\n\t\t\t// Iterate through each rows one by one\n\t\t\tIterator<Row> rowIterator = sheet.iterator();\n\t\t\trowIterator.next();\n\t\t\twhile (rowIterator.hasNext()) {\n\t\t\t\tRow row = rowIterator.next();\n\t\t\t\t// For each row, iterate through all the columns\n\t\t\t\tIterator<Cell> cellIterator = row.cellIterator();\n\n\t\t\t\tCell username = cellIterator.next();\n\t\t\t\tusername1 = username.getStringCellValue();\n\t\t\t\tSystem.out.println(username1);\n\t\t\t\tCell password = cellIterator.next();\n\t\t\t\tpassword1 = password.getStringCellValue();\n\t\t\t\tSystem.out.println(password1);\n\t\t\t\tSystem.out.println(\"\");\n\t\t\t\t\n\t\t\t\tdriver.findElement(By.xpath(\"//div[@class=\\\"example\\\"]//input[@name=\\\"username\\\"]\")).sendKeys(username1);\n\t\t\t\tdriver.findElement(By.xpath(\"//div[@class=\\\"example\\\"]//input[@name=\\\"password\\\"]\")).sendKeys(password1);\n\t\t\t\tdriver.findElement(By.xpath(\"//div[@id=\\\"content\\\"]//button[@class=\\\"radius\\\"]\")).click();\n\t\t\t\tactualTitle = driver.findElement(By.xpath(\"//div[@class=\\\"row\\\"]//div[@class=\\\"flash success\\\"]\")).getText();\n\t\t\t\texpectedTitle = \"You logged into a secure area!\";\n\t\t\t\tString[] parts = actualTitle.split(\"\\n\");\n\t\t\t\tSystem.out.println(parts[0]);\n\t\t\t\tif (parts[0].contentEquals(expectedTitle)) {\n\t\t\t\t\tSystem.out.println(\"Login Passed\");\n\t\t\t\t} else {\n\t\t\t\t\tSystem.out.println(\"Login Failed\");\n\t\t\t\t}\n\t\t\t\tdriver.findElement(By.xpath(\"//div[@class=\\\"row\\\"]//a[@class=\\\"button secondary radius\\\"]\")).click();\n\t\t\t\tactualTitle = driver.findElement(By.xpath(\"//div[@class=\\\"row\\\"]//div[@class=\\\"flash success\\\"]\")).getText();\n\t\t\t\texpectedTitle = \"You logged out of the secure area!\";\n\t\t\t\tparts = actualTitle.split(\"\\n\");\n\t\t\t\tSystem.out.println(parts[0]);\n\t\t\t\tif (parts[0].contentEquals(expectedTitle)) {\n\t\t\t\t\tSystem.out.println(\"Logout Passed!\");\n\t\t\t\t} else {\n\t\t\t\t\tSystem.out.println(\"Logout Failed\");\n\t\t\t\t}\n\t\t\t}\n\t\t\tfile.close();\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\t}", "public static WebElement check_btnAddedIsSeen_selectedPdtChkbxHidden(Read_XLS xls, String sheetName, int rowNum, \r\n \t\tList<Boolean> testFail) throws Exception{\r\n \ttry{\r\n\r\n\t\t\t// Verify all chkbx those are odd number \r\n\t\t\tList<WebElement> chkbx = driver.findElements(\r\n\t\t\t\t\tBy.xpath(\"//*[contains(@class, 'majorPP_check')]//input[@type='checkbox']\"));\r\n\t\t\tfor(int i=1; i<chkbx.size(); i=i+2){\r\n\t\t\t\t\r\n\t\t \t//\tString btnAddedToBasket = driver.findElement(\r\n\t\t \t//\t\t\tBy.xpath(\"//*[contains(@class, 'mt5')]//a[contains(text(),'Added to Basket')]\")).getText();\r\n\t\t \tString btnAdded = driver.findElement(\r\n\t\t \t\t\tBy.xpath(\"//*[contains(@class, 'majorPP_funR')]//a[contains(text(),'Added')]\")).getText();\r\n\t\t \tAdd_Log.info(\"Print button text ::\" + btnAdded);\r\n\t\t \t\r\n\t\t \tBoolean isChkbxHidden = driver.findElement(\r\n\t\t \t\t\tBy.xpath(\"//*[contains(@class, 'majorPP_check')]//input[@type='checkbox']\")).isDisplayed();\r\n\t\t \tAdd_Log.info(\"Does chkbx still available ::\" + isChkbxHidden);\r\n\t\t \t\t \t\t\r\n\t\t \tif(btnAdded.equals(\"Added\") && isChkbxHidden == false){\r\n\t\t \t\tAdd_Log.info(\"Button value is changed from 'Add' to 'Added'.\");\r\n\t\t \t\tAdd_Log.info(\"Chkbx of those selected products are removed\");\r\n\t\t \t\tSuiteUtility.WriteResultUtility(\r\n\t\t \t\t\t\txls, sheetName, Constant.COL_PDT_INQ_ADDED_TO_BASKET_EXISTS, rowNum, Constant.KEYWORD_PASS);\r\n\t\t \t\tSuiteUtility.WriteResultUtility(\r\n\t\t \t\t\t\txls, sheetName, Constant.COL_PDT_INQ_CHKBX_REMOVED, rowNum, Constant.KEYWORD_PASS);\r\n\t\t \t}else{\r\n\t\t \t\tAdd_Log.info(\"Button value is NOT changed from 'Add' to 'Added'.\");\r\n\t\t \t\tAdd_Log.info(\"Chkbx of those selected products are NOT removed\");\r\n\t\t \t\tSuiteUtility.WriteResultUtility(\r\n\t\t \t\t\t\txls, sheetName, Constant.COL_PDT_INQ_ADDED_TO_BASKET_EXISTS, rowNum, Constant.KEYWORD_FAIL);\r\n\t\t \t\tSuiteUtility.WriteResultUtility(\r\n\t\t \t\t\t\txls, sheetName, Constant.COL_PDT_INQ_CHKBX_REMOVED, rowNum, Constant.KEYWORD_FAIL);\r\n\t\t \t\ttestFail.set(0, true);\r\n\t\t \t}\r\n\t\t\t}\r\n\r\n \t}catch(Exception e){\r\n \t\tthrow(e);\r\n \t}\r\n \treturn element;\r\n }", "@Test\n public void selenium(){\n LandingPage landingPage = new LandingPage();\n landingPage.setDriver(driver);\n landingPage\n .assertTitle()\n .clickFindMeeting()\n .assertTitle()\n .search(\"10011\")\n .printFirstLocation()\n .printFirstDistance()\n .clickOnLocation()\n .assertLocationMatches()\n .printTodaysHours();\n }", "@Test(dataProviderClass = DataProviderUtils.class, dataProvider = \"excelDataReader\", groups = { \"Sprint54\", \"Get Hyperlink\", \"SKIP_JavaApplet\"}, \r\n\t\t\tdescription = \"Default layout will be displayed for hyperlink url on selecting default layout in configuration and in hyperlink dialog - Operations menu.\")\r\n\tpublic void SprintTest54_1_30_1A_1B(HashMap<String,String> dataValues, String driverType) throws Exception {\r\n\r\n\t\tdriver = null; \r\n\r\n\t\ttry {\r\n\r\n\r\n\r\n\r\n\t\t\tdriver = WebDriverUtils.getDriver();\r\n\r\n\t\t\tConcurrentHashMap <String, String> dataPool = new ConcurrentHashMap <String, String>(dataValues);\r\n\t\t\tHomePage homePage = LoginPage.launchDriverAndLogin(driver, true);\r\n\r\n\r\n\t\t\tConfigurationPage configurationPage = LoginPage.launchDriverAndLoginToConfig(driver, true); //Launched driver and logged in\r\n\r\n\t\t\t//Step-1 : Navigate to Vault in tree view\r\n\t\t\t//-----------------------------------------\r\n\t\t\tconfigurationPage.treeView.clickTreeViewItem(Caption.ConfigSettings.VaultSpecificSettings.Value + \">>\" + testVault); //Clicks tree view item\r\n\r\n\r\n\t\t\tif (!configurationPage.configurationPanel.getPageName().toUpperCase().equalsIgnoreCase(testVault.toUpperCase())) //Checks if navigated to vault settings page\r\n\t\t\t\tthrow new Exception(\"Vault settings page in configuration is not opened.\");\r\n\r\n\t\t\tLog.message(\"1. Navigated to Vault settings page.\");\r\n\r\n\t\t\t//Step-2 : Select Default layout and save the settings\r\n\t\t\t//----------------------------------------------------\r\n\t\t\tconfigurationPage.configurationPanel.setLayout(Caption.ConfigSettings.Config_Default.Value); //Sets as default layout\r\n\r\n\t\t\tif (!configurationPage.configurationPanel.getLayout().equalsIgnoreCase(Caption.ConfigSettings.Config_Default.Value)) //Verifies if default layout is selected\r\n\t\t\t\tthrow new Exception(\"Default layout is not selected.\");\r\n\r\n\t\t\tif (!configurationPage.configurationPanel.saveSettings()) //Saves the settings\r\n\t\t\t\tthrow new Exception(\"Settings are not saved properly.\");\r\n\r\n\t\t\tif (!configurationPage.logOut()) //Logs out from configuration page\r\n\t\t\t\tthrow new Exception(\"Log out is not successful after saving the settings in configuration page.\");\r\n\r\n\t\t\tLog.message(\"2. Default layout is selected and settings are saved.\");\r\n\r\n\t\t\t//Step-3 : Login to the default page and navigate to any view\r\n\t\t\t//--------------------------------------------------------------------------\r\n\t\t\thomePage = LoginPage.launchDriverAndLogin(driver, false); //Launches and logs into the default page\r\n\r\n\t\t\tString viewToNavigate = SearchPanel.searchOrNavigatetoView(driver, dataPool.get(\"NavigateToView\"), dataPool.get(\"ObjectName\"));\r\n\r\n\t\t\tLog.message(\"3. Logged into the default page and navigated to '\" + viewToNavigate + \"' view.\");\r\n\r\n\t\t\t//Step-4 : Open Get Hyperlink dialog for the object from operations menu\r\n\t\t\t//-----------------------------------------------------------------------\r\n\t\t\tif (!homePage.listView.clickItem(dataPool.get(\"ObjectName\"))) //Selects the Object in the list\r\n\t\t\t\tthrow new Exception(\"Object (\" + dataPool.get(\"ObjectName\") + \") is not got selected.\");\r\n\r\n\t\t\thomePage.menuBar.ClickOperationsMenu(Caption.MenuItems.GetMFilesWebURL.Value); //Selects Get Hyperlink from operations menu\r\n\r\n\t\t\tMFilesDialog mfilesDialog = new MFilesDialog(driver); //Instantiating MFilesDialog wrapper class\r\n\r\n\t\t\tif (!mfilesDialog.isGetMFilesWebURLDialogOpened()) //Checks for MFiles dialog title\r\n\t\t\t\tthrow new Exception(\"M-Files dialog with 'Get Hyperlink' title is not opened.\");\r\n\r\n\t\t\tLog.message(\"4. Hyperlink dialog of an object (\" + dataPool.get(\"ObjectName\") + \") is opened through operations menu.\");\r\n\r\n\t\t\t//Step-5 : Copy the link from text box and close the Get Hyperlink dialog\r\n\t\t\t//-----------------------------------------------------------------------\r\n\t\t\tString hyperlinkText = mfilesDialog.getHyperlink(); //Gets the hyperlink\r\n\t\t\tmfilesDialog.close(); //Closes the Get Hyperlink dialog\r\n\r\n\t\t\tLog.message(\"5. Hyperlink is copied and Get Hyperlink dialog is closed.\");\r\n\r\n\t\t\t//Step-6 : Open the copied Hyperlink in the browser\r\n\t\t\t//-------------------------------------------------\r\n\t\t\thomePage = Utility.navigateToPage(driver, hyperlinkText, userName, password, \"\"); //Navigates to the hyperlink url\r\n\r\n\t\t\tif (!driver.getCurrentUrl().equalsIgnoreCase(hyperlinkText))\r\n\t\t\t\tthrow new Exception (\"Browser is not opened with copied object Hyperlink.[Expected URL: \"+hyperlinkText+\" & Current URL : \"+ driver.getCurrentUrl() +\"]\");\r\n\r\n\t\t\tLog.message(\"6. Object Hyperlink is opened in the browser.\");\r\n\r\n\t\t\t//Verification : Verify if default layout is displayed\r\n\t\t\t//----------------------------------------------------\r\n\t\t\tString unAvailableLayouts = \"\";\r\n\r\n\t\t\tif (!homePage.isSearchbarPresent()) //Checks if Search bar present\r\n\t\t\t\tunAvailableLayouts = \"Search Bar\";\r\n\r\n\t\t\tif (!homePage.isTaskPaneDisplayed()) //Checks if Task Pane present\r\n\t\t\t\tunAvailableLayouts = unAvailableLayouts + \"Task Pane;\";\r\n\r\n\t\t\tif (!homePage.previewPane.isTabExists(Caption.PreviewPane.MetadataTab.Value))\r\n\t\t\t\tunAvailableLayouts = unAvailableLayouts + \"Properties Pane;\";\r\n\r\n\t\t\tif (!homePage.menuBar.isMenuInMenubarDisplayed()) //Checks if Menu Bar present\r\n\t\t\t\tunAvailableLayouts = unAvailableLayouts + \"Menu Bar;\";\r\n\r\n\t\t\tif (!homePage.menuBar.isBreadCrumbDisplayed()) //Checks if Breadcrumb present\r\n\t\t\t\tunAvailableLayouts = unAvailableLayouts + \"Breadcrumb;\";\r\n\r\n\t\t\tif (!homePage.taskPanel.isAppletEnabled())\r\n\t\t\t\tunAvailableLayouts = unAvailableLayouts + \"Java Applet;\";\r\n\r\n\t\t\tif (!homePage.isListViewDisplayed())\r\n\t\t\t\tunAvailableLayouts = unAvailableLayouts + \"Metadatacard;\";\r\n\r\n\t\t\tif (unAvailableLayouts.equals(\"\")) //Verifies default layout have selected default custom layout\r\n\t\t\t\tLog.pass(\"Test case Passed. Hyperlink URL page is displayed as Default layout.\");\r\n\t\t\telse\r\n\t\t\t\tLog.fail(\"Test case Failed. Few layots are missing on selecting 'Default' custom layout. Missed layots : \" \r\n\t\t\t\t\t\t+ unAvailableLayouts, driver);\r\n\r\n\t\t}\r\n\t\tcatch (Exception e) {\r\n\t\t\tLog.exception(e, driver);\r\n\t\t} //End catch\r\n\r\n\t\tfinally {\r\n\t\t\tUtility.quitDriver(driver);\r\n\t\t} //End finally\r\n\r\n\t}", "@SuppressWarnings(\"unused\")\r\n\t@Before\r\n\tpublic void BeforeSteps() throws Throwable {\n\t\tSystem.setProperty(\"webdriver.chrome.driver\",\r\n\t\t\t\t\"C:\\\\Users\\\\ba06875\\\\Downloads\\\\chromedriver_win3291\\\\chromedriver.exe\");\r\n\t\tdriver = new ChromeDriver();\r\n\t\t\t\t\t\r\n\t\tdriver.manage().window().maximize();\r\n//driver.get(Url);\r\n\t\t\r\n\t\t// String Url = ExcelRead2.readURLFromExcel();\r\n\t\t driver.get(Url+\"?web3feo\");\r\n\t\t\r\n\t\t// Thread.sleep(5000); Thread.sleep(5000);\r\n\t\t //driver.findElement(By.xpath(\"//button[contains(text(),'No, Continue without 20% off')]\")).click();\r\n\t\t \r\n\t\t /*if (driver.findElement(By.xpath(\"//a[contains(text(),'Click here')]\")).isDisplayed());\r\n\t\t {\r\n\t\t driver.findElement(By.xpath(\"//a[contains(text(),'Click here')]\")).click();\r\n\t\t }\r\n\t\t Thread.sleep(5000);\r\n\t\t */\r\n\t\t \r\n\t}", "public void addToCartIconForAccessories(Map<String,String> dataMap) throws Exception\r\n\t{\n\t\tString accessoriesStockStatus = productPageIndia.getWebElementText(productPageIndia.AccessoriesStockStatus);\r\n\t\t\r\n\t\tString productItem = dataMap.get(\"ProductItem\");\r\n\t\t\r\n\t\t\t\t\r\n\t\tdriver.navigate().back();\r\n\t\tint countOfVisibleAccessories = scrollAccessoriesList(productPageIndia.AccessoriesList, productItem);\r\n\t\t\r\n\t\tfor(int i=1;i<=countOfVisibleAccessories;i++)\r\n\t\t{\r\n\t\t\t//WebElement subitems = driver.findElement(By.xpath(\".//div[@id='item_wrap']/div[\"+i+\"]/div[2]/p[1]/a\"));\r\n\t\t\tWebElement subitems = driver.findElement(By.xpath(\".//div[@id='item_wrap']/div[\"+i+\"]/div[2]/p[1]/a\"));\r\n\t\t\tString text =productPageIndia.getWebElementText(subitems);\r\n\t\t\tif(text.contains(productItem))\r\n\t\t\t{\r\n\t\t\t\tproductPageIndia.scrollToElement(driver.findElement(By.xpath(\".//div[@id='item_wrap']/div[\"+i+\"]/div[2]/p[1]/a\")));\r\n\t\t\t\tThread.sleep(2000);\r\n\t\t\t\tString AddToCartIconclassName = productPageIndia.getAttributeText(driver.findElement(By.xpath(\".//div[@id='item_wrap']/div[\"+i+\"]/div[1]/a\")),\"class\");\r\n\t\t\t\tif (AddToCartIconclassName.contains(\"addToCart add_cart_btn\")&&accessoriesStockStatus.equalsIgnoreCase(\"In stock\"))\r\n\t\t\t\t{\r\n\t\t\t\t\tActions action = new Actions(driver);\r\n\t\t\t\t\tproductPageIndia.mouseHoverWebElement(action, driver.findElement(By.xpath(\".//div[@id='item_wrap']/div[\"+i+\"]/div[2]/p[1]/a\")));\r\n\t\t\t\t\tproductPageIndia.clickWebElement(driver.findElement(By.xpath(\".//div[@id='item_wrap']/div[\"+i+\"]/div[1]/a\")));\r\n\t\t\t\t}\r\n\t\t\t\telse if(AddToCartIconclassName.contains(\"add_cart_btn btn_dis\")&&accessoriesStockStatus.equalsIgnoreCase(\"Out of stock\"))\r\n\t\t\t\t{\r\n\t\t\t\t\tBaseClass.skipTestExecution(\"The product item is out of stock. User cannot add this productitem to cart: \"+productItem);\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\telse if(AddToCartIconclassName.contains(\"addToCart add_cart_btn\")&&accessoriesStockStatus.equalsIgnoreCase(\"Out of stock\"))\r\n\t\t\t\t{\r\n\t\t\t\t\tBaseClass.forceStopExecution(\"User shouldn't be able to click Add to cart icon when product item is out of stock: \"+productItem);\r\n\t\t\t\t}\r\n\t\t\t\telse\r\n\t\t\t\t{\r\n\t\t\t\t\tBaseClass.skipTestExecution(\"Unabled to click on the Add to Cart Icon in the Accessories Page for the product item \"+productItem);\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t}", "@Test\r\n public void Test4() throws InterruptedException {\n driver.navigate().to(\"http://webstrar99.fulton.asu.edu/page2/\");\r\n driver.findElement(By.id(\"number1\")).sendKeys(\"10\");\r\n driver.findElement(By.id(\"number2\")).sendKeys(\"5\");\r\n driver.findElement(By.id(\"div\")).click();\r\n driver.findElement(By.id(\"calc\")).click();\r\n Assert.assertEquals(\"2\", driver.findElement(By.id(\"res\")).getText());\r\n driver.quit();\r\n }", "@Test(dataProviderClass = DataProviderUtils.class, dataProvider = \"excelDataReader\", groups = { \"Sprint54\", \"Get Hyperlink\"}, \r\n\t\t\tdescription = \"Listing pane and properties pane only layout will be displayed for hyperlink url on selecting Listing pane and properties pane only layout in configuration and default in hyperlink dialog - Context menu.\")\r\n\tpublic void SprintTest54_1_30_6A_1(HashMap<String,String> dataValues, String driverType) throws Exception {\r\n\r\n\t\tdriver = null; \r\n\r\n\t\ttry {\r\n\r\n\r\n\r\n\r\n\t\t\tdriver = WebDriverUtils.getDriver();\r\n\r\n\t\t\tConcurrentHashMap <String, String> dataPool = new ConcurrentHashMap <String, String>(dataValues);\r\n\t\t\tHomePage homePage = LoginPage.launchDriverAndLogin(driver, true);\r\n\r\n\r\n\t\t\tConfigurationPage configurationPage = LoginPage.launchDriverAndLoginToConfig(driver, true); //Launched driver and logged in\r\n\r\n\t\t\t//Step-1 : Navigate to Vault in tree view\r\n\t\t\t//---------------------------------------\r\n\t\t\tconfigurationPage.treeView.clickTreeViewItem(Caption.ConfigSettings.VaultSpecificSettings.Value + \">>\" + testVault); //Clicks tree view item\r\n\r\n\r\n\t\t\tif (!configurationPage.configurationPanel.getPageName().toUpperCase().equalsIgnoreCase(testVault.toUpperCase())) //Checks if navigated to vault settings page\r\n\t\t\t\tthrow new Exception(\"Vault settings page in configuration is not opened.\");\r\n\r\n\t\t\tLog.message(\"1. Navigated to Vault settings page.\");\r\n\r\n\t\t\t//Step-2 : Select Listing pane and properties pane layout layout and save the settings\r\n\t\t\t//------------------------------------------------------------------------------------------------------------\r\n\t\t\tconfigurationPage.configurationPanel.setLayout(Caption.ConfigSettings.Config_ListingPropertiesPaneOnly.Value); //Sets as Listing pane and properties pane layout\r\n\r\n\t\t\tif (!configurationPage.configurationPanel.getLayout().equalsIgnoreCase(Caption.ConfigSettings.Config_ListingPropertiesPaneOnly.Value)) //Verifies if Listing pane and properties pane layout is selected\r\n\t\t\t\tthrow new Exception(Caption.ConfigSettings.Config_ListingPropertiesPaneOnly.Value + \" layout is not selected.\");\r\n\r\n\t\t\tif (!configurationPage.configurationPanel.saveSettings()) //Saves the settings\r\n\t\t\t\tthrow new Exception(\"Settings are not saved properly.\");\r\n\r\n\t\t\tif (!configurationPage.logOut()) //Logs out from configuration page\r\n\t\t\t\tthrow new Exception(\"Log out is not successful after saving the settings in configuration page.\");\r\n\r\n\t\t\tLog.message(\"2. \" + Caption.ConfigSettings.Config_ListingPropertiesPaneOnly.Value + \" layout is selected and settings are saved.\");\r\n\r\n\t\t\t//Step-3 : Login to the default page and navigate to any view\r\n\t\t\t//-------------------------------------------------------------\r\n\t\t\thomePage = LoginPage.launchDriverAndLogin(driver, false); //Launches and logs into the default page\r\n\r\n\t\t\tString viewToNavigate = SearchPanel.searchOrNavigatetoView(driver, dataPool.get(\"NavigateToView\"), dataPool.get(\"ObjectName\"));\r\n\r\n\t\t\tLog.message(\"3. Logged into the default page and navigated to '\" + viewToNavigate + \"' view.\");\r\n\r\n\t\t\t//Step-4 : Open Get Hyperlink dialog for the object from context menu\r\n\t\t\t//-------------------------------------------------------------------\r\n\t\t\tif (!homePage.listView.rightClickItem(dataPool.get(\"ObjectName\"))) //Selects the Object in the list\r\n\t\t\t\tthrow new Exception(\"Object (\" + dataPool.get(\"ObjectName\") + \") is not got selected.\");\r\n\r\n\t\t\thomePage.listView.clickContextMenuItem(Caption.MenuItems.GetMFilesWebURL.Value); //Selects Get Hyperlink from context menu\r\n\r\n\t\t\tMFilesDialog mfilesDialog = new MFilesDialog(driver); //Instantiating MFilesDialog wrapper class\r\n\r\n\t\t\tif (!mfilesDialog.isGetMFilesWebURLDialogOpened()) //Checks for MFiles dialog title\r\n\t\t\t\tthrow new Exception(\"M-Files dialog with 'Get Hyperlink' title is not opened.\");\r\n\r\n\t\t\tLog.message(\"4. Hyperlink dialog of an object (\" + dataPool.get(\"ObjectName\") + \") is opened through context menu.\");\r\n\r\n\t\t\t//Step-5 : Copy the link from text box and close the Get Hyperlink dialog\r\n\t\t\t//-----------------------------------------------------------------------\r\n\t\t\tString hyperlinkText = mfilesDialog.getHyperlink(); //Gets the hyperlink\r\n\t\t\tmfilesDialog.close(); //Closes the Get Hyperlink dialog\r\n\r\n\t\t\tLog.message(\"5. Hyperlink is copied and Get Hyperlink dialog is closed.\");\r\n\r\n\t\t\t//Step-6 : Open the copied Hyperlink in the browser\r\n\t\t\t//-------------------------------------------------\r\n\t\t\thomePage = Utility.navigateToPage(driver, hyperlinkText, userName, password, \"\"); //Navigates to the hyperlink url\r\n\r\n\r\n\t\t\tif (!driver.getCurrentUrl().equalsIgnoreCase(hyperlinkText))\r\n\t\t\t\tthrow new Exception (\"Browser is not opened with copied object Hyperlink.[Expected URL: \"+hyperlinkText+\" & Current URL : \"+ driver.getCurrentUrl() +\"]\");\r\n\r\n\t\t\tLog.message(\"6. Object Hyperlink is opened in the browser.\");\r\n\r\n\t\t\t//Verification : Verify if default layout is displayed\r\n\t\t\t//----------------------------------------------------\r\n\t\t\tString unAvailableLayouts = \"\";\r\n\r\n\t\t\tif (homePage.isSearchbarPresent()) //Checks if Search bar present\r\n\t\t\t\tunAvailableLayouts = \"Search Bar is available;\";\r\n\r\n\t\t\tif (homePage.isTaskPaneDisplayed()) //Checks if Task Pane present\r\n\t\t\t\tunAvailableLayouts = unAvailableLayouts + \"Task Pane is available;\";\r\n\r\n\t\t\tif (!homePage.previewPane.isTabExists(Caption.PreviewPane.MetadataTab.Value))\r\n\t\t\t\tunAvailableLayouts = unAvailableLayouts + \"Properties Pane is not available;\";\r\n\r\n\t\t\tif (homePage.menuBar.isMenuInMenubarDisplayed()) //Checks if Menu Bar present\r\n\t\t\t\tunAvailableLayouts = unAvailableLayouts + \"Menu Bar is available;\";\r\n\r\n\t\t\tif (homePage.menuBar.isBreadCrumbDisplayed()) //Checks if Breadcrumb present\r\n\t\t\t\tunAvailableLayouts = unAvailableLayouts + \"Breadcrumb is available;\";\r\n\r\n\t\t\tif (homePage.taskPanel.isAppletEnabled())\r\n\t\t\t\tunAvailableLayouts = unAvailableLayouts + \"Java Applet is available;\";\r\n\r\n\t\t\tif (!homePage.isListViewDisplayed())\r\n\t\t\t\tunAvailableLayouts = unAvailableLayouts + \"List View is not available;\";\r\n\r\n\t\t\tif (homePage.isTreeViewDisplayed())\r\n\t\t\t\tunAvailableLayouts = unAvailableLayouts + \"Tree View is available;\";\r\n\r\n\t\t\tif (unAvailableLayouts.equals(\"\")) //Verifies default layout have selected default custom layout\r\n\t\t\t\tLog.pass(\"Test case Passed. Hyperlink URL page is displayed as .\" + Caption.ConfigSettings.Config_ListingPropertiesPaneOnly.Value);\r\n\t\t\telse\r\n\t\t\t\tLog.fail(\"Test case Failed. Few layots are not as expected on selecting \" + Caption.ConfigSettings.Config_ListingPropertiesPaneOnly.Value + \". Refer additional information : \" \r\n\t\t\t\t\t\t+ unAvailableLayouts, driver);\r\n\t\t}\r\n\t\tcatch (Exception e) {\r\n\t\t\tLog.exception(e, driver);\r\n\t\t} //End catch\r\n\r\n\t\tfinally {\r\n\r\n\t\t\tif(driver != null){\r\n\t\t\t\ttry\r\n\t\t\t\t{\r\n\t\t\t\t\tdriver.get(configURL);\r\n\r\n\t\t\t\t\tConfigurationPage configurationPage = new ConfigurationPage(driver);\r\n\t\t\t\t\tconfigurationPage.treeView.clickTreeViewItem(Caption.ConfigSettings.VaultSpecificSettings.Value + \">>\" + testVault); //Clicks tree view item\r\n\r\n\t\t\t\t\tconfigurationPage.configurationPanel.setLayout(Caption.ConfigSettings.Config_Default.Value);\r\n\r\n\t\t\t\t\tif (!configurationPage.configurationPanel.saveSettings())\r\n\t\t\t\t\t\tthrow new Exception(\"Configuration settings are not saved.\");\r\n\t\t\t\t}\r\n\t\t\t\tcatch(Exception e0)\r\n\t\t\t\t{\r\n\t\t\t\t\tLog.exception(e0, driver);\r\n\t\t\t\t}\r\n\r\n\t\t\t}\r\n\t\t\tUtility.quitDriver(driver);\r\n\r\n\t\t} //End finally\r\n\r\n\t}", "@Test\n//Verify that new created API is displayed properly at API Revision wizard \n public void APIM_CreateAPI_004() throws Exception {\n try {\n assertEquals(\"DTSS-TESTAUTO-1\", driver.findElement(By.cssSelector(\"div.subNav > h2\")).getText());\n } catch (Error e) {\n verificationErrors.append(e.toString());\n }\n try {\n assertEquals(\"Delete Revision\", driver.findElement(By.linkText(\"Delete Revision\")).getText());\n } catch (Error e) {\n verificationErrors.append(e.toString());\n }\n try {\n assertEquals(\"Edit API Details\", driver.findElement(By.linkText(\"Edit API Details\")).getText());\n } catch (Error e) {\n verificationErrors.append(e.toString());\n }\n try {\n assertEquals(\"Deploy Revision\", driver.findElement(By.linkText(\"Deploy Revision\")).getText());\n } catch (Error e) {\n verificationErrors.append(e.toString());\n }\n try {\n assertEquals(\"Copy Revision As New API\", driver.findElement(By.linkText(\"Copy Revision As New API\")).getText());\n } catch (Error e) {\n verificationErrors.append(e.toString());\n }\n try {\n assertEquals(\"Revision: 1\", driver.findElement(By.cssSelector(\"div.myapis_DetailInfo\")).getText());\n } catch (Error e) {\n verificationErrors.append(e.toString());\n }\n try {\n assertEquals(\"API Version: 1\", driver.findElement(By.xpath(\"//div[@id='myapis_api_revision_details_view_container']/div/div/div/div[2]/div[2]/div/div/div[2]\")).getText());\n } catch (Error e) {\n verificationErrors.append(e.toString());\n }\n try {\n assertEquals(\"Status: Enabled\", driver.findElement(By.xpath(\"//div[@id='myapis_api_revision_details_view_container']/div/div/div/div[2]/div[2]/div/div/div[3]\")).getText());\n } catch (Error e) {\n verificationErrors.append(e.toString());\n }\n try {\n assertEquals(\"Visibility:\", driver.findElement(By.xpath(\"//div[@id='myapis_api_revision_details_view_container']/div/div/div/div[2]/div[2]/div/div/div[4]/span\")).getText());\n } catch (Error e) {\n verificationErrors.append(e.toString());\n }\n try {\n assertEquals(\"Taxonomy Id: 1752\", driver.findElement(By.xpath(\"//div[@id='myapis_api_revision_details_view_container']/div/div/div/div[2]/div[2]/div/div/div[6]\")).getText());\n } catch (Error e) {\n verificationErrors.append(e.toString());\n }\n try {\n assertEquals(\"Documentation URI:\", driver.findElement(By.cssSelector(\"div.clear > div.myapis_DetailInfo > span.label\")).getText());\n } catch (Error e) {\n verificationErrors.append(e.toString());\n }\n try {\n assertEquals(\"www.disney.go.com/docs\", driver.findElement(By.linkText(\"www.disney.go.com/docs\")).getText());\n } catch (Error e) {\n verificationErrors.append(e.toString());\n }\n try {\n assertEquals(\"Last Modified:\", driver.findElement(By.xpath(\"//div[@id='myapis_api_revision_details_view_container']/div/div/div/div[2]/div[2]/div/div[2]/div/span\")).getText());\n } catch (Error e) {\n verificationErrors.append(e.toString());\n }\n try {\n assertEquals(\"API Owners: \" + EmailValue, driver.findElement(By.xpath(\"//div[@id='myapis_api_revision_details_view_container']/div/div/div/div[2]/div[2]/div/div[2]/div[2]\")).getText());\n } catch (Error e) {\n verificationErrors.append(e.toString());\n }\n try {\n assertEquals(\"Release Managers: \" + EmailValue, driver.findElement(By.xpath(\"//div[@id='myapis_api_revision_details_view_container']/div/div/div/div[2]/div[2]/div/div[2]/div[3]\")).getText());\n } catch (Error e) {\n verificationErrors.append(e.toString());\n }\n try {\n assertEquals(\"Origin Base Names: \" + OriginBaseName + \" Before you are able to deploy your API to an environment, you must specify at least one Origin Base Name. Origin Base Names will be matched with named Origin Base URIs in the environment in which the API is deployed. Upon deployment the environment will be checked to ensure these Origin Base Names are defined before allowing the deployment.\", driver.findElement(By.xpath(\"//div[@id='myapis_api_revision_details_view_container']/div/div/div/div[2]/div[2]/div/div[3]/div\")).getText());\n } catch (Error e) {\n verificationErrors.append(e.toString());\n }\n try {\n assertEquals(\"Authenticator:\", driver.findElement(By.xpath(\"//div[@id='myapis_api_revision_details_view_container']/div/div/div/div[2]/div[2]/div/div[3]/div[2]/span\")).getText());\n } catch (Error e) {\n verificationErrors.append(e.toString());\n }\n try {\n assertEquals(\"Allow Public Tokens:\", driver.findElement(By.xpath(\"//div[@id='myapis_api_revision_details_view_container']/div/div/div/div[2]/div[2]/div/div[3]/div[3]/span\")).getText());\n } catch (Error e) {\n verificationErrors.append(e.toString());\n }\n try {\n assertEquals(\"Description:\", driver.findElement(By.xpath(\"//div[@id='myapis_api_revision_details_view_container']/div/div/div/div[2]/div[2]/div[2]/div[2]/span\")).getText());\n } catch (Error e) {\n verificationErrors.append(e.toString());\n }\n try {\n assertEquals(\"For automation purposes\", driver.findElement(By.cssSelector(\"div.infoBox\")).getText());\n } catch (Error e) {\n verificationErrors.append(e.toString());\n }\n try {\n assertEquals(\"Resources\", driver.findElement(By.cssSelector(\"button.active\")).getText());\n } catch (Error e) {\n verificationErrors.append(e.toString());\n }\n try {\n assertEquals(\"Variables\", driver.findElement(By.xpath(\"//div[@id='myapis_api_revision_details_view_container']/div/div/div[2]/div/button[2]\")).getText());\n } catch (Error e) {\n verificationErrors.append(e.toString());\n }\n try {\n assertEquals(\"Headers\", driver.findElement(By.xpath(\"//div[@id='myapis_api_revision_details_view_container']/div/div/div[2]/div/button[3]\")).getText());\n } catch (Error e) {\n verificationErrors.append(e.toString());\n }\n try {\n assertEquals(\"Security\", driver.findElement(By.xpath(\"//div[@id='myapis_api_revision_details_view_container']/div/div/div[2]/div/button[4]\")).getText());\n } catch (Error e) {\n verificationErrors.append(e.toString());\n }\n try {\n assertEquals(\"URI Rewriting\", driver.findElement(By.xpath(\"//div[@id='myapis_api_revision_details_view_container']/div/div/div[2]/div/button[5]\")).getText());\n } catch (Error e) {\n verificationErrors.append(e.toString());\n }\n try {\n assertEquals(\"Logging\", driver.findElement(By.xpath(\"//div[@id='myapis_api_revision_details_view_container']/div/div/div[2]/div/button[6]\")).getText());\n } catch (Error e) {\n verificationErrors.append(e.toString());\n }\n try {\n assertEquals(\"Assertions\", driver.findElement(By.xpath(\"//div[@id='myapis_api_revision_details_view_container']/div/div/div[2]/div/button[7]\")).getText());\n } catch (Error e) {\n verificationErrors.append(e.toString());\n }\n assertTrue(isElementPresent(By.id(\"DataTables_Table_3_wrapper\")));\n try {\n assertEquals(\"API Resources\", driver.findElement(By.cssSelector(\"#DataTables_Table_3_filter > h2\")).getText());\n } catch (Error e) {\n verificationErrors.append(e.toString());\n }\n try {\n assertEquals(\"Add Resource\", driver.findElement(By.cssSelector(\"#DataTables_Table_3_filter > button.new.primary\")).getText());\n } catch (Error e) {\n verificationErrors.append(e.toString());\n }\n try {\n assertEquals(\"Edit Resource Ordering\", driver.findElement(By.cssSelector(\"button.ordering\")).getText());\n } catch (Error e) {\n verificationErrors.append(e.toString());\n }\n try {\n assertEquals(\"\", driver.findElement(By.cssSelector(\"#DataTables_Table_3_filter > input.on.searchInput\")).getText());\n } catch (Error e) {\n verificationErrors.append(e.toString());\n }\n try {\n assertEquals(\"Resource\\nAccess\\nAction\", driver.findElement(By.cssSelector(\"#DataTables_Table_3 > thead > tr > th.cog.sorting\")).getText());\n } catch (Error e) {\n verificationErrors.append(e.toString());\n }\n try {\n assertEquals(\"Resource\", driver.findElement(By.xpath(\"//table[@id='DataTables_Table_3']/thead/tr/th[2]\")).getText());\n } catch (Error e) {\n verificationErrors.append(e.toString());\n }\n try {\n assertEquals(\"Access\", driver.findElement(By.xpath(\"//table[@id='DataTables_Table_3']/thead/tr/th[3]\")).getText());\n } catch (Error e) {\n verificationErrors.append(e.toString());\n }\n try {\n assertEquals(\"Action\", driver.findElement(By.xpath(\"//table[@id='DataTables_Table_3']/thead/tr/th[4]\")).getText());\n } catch (Error e) {\n verificationErrors.append(e.toString());\n }\n try {\n assertEquals(\"No data available in table\", driver.findElement(By.cssSelector(\"#DataTables_Table_3 > tbody > tr.odd > td.dataTables_empty\")).getText());\n } catch (Error e) {\n verificationErrors.append(e.toString());\n }\n // Warning: verifyTextPresent may require manual changes\n try {\n assertTrue(driver.findElement(By.cssSelector(\"BODY\")).getText().matches(\"^[\\\\s\\\\S]*Add ResourceEdit Resource OrderingAPI Resources\\n Resource\\nAccess\\nAction\\n\\n ResourceAccessAction No data available in tableShowing 0 to 0 of 0 entries\\nFirstPreviousNextLast[\\\\s\\\\S]*$\"));\n } catch (Error e) {\n verificationErrors.append(e.toString());\n }\n }", "@Test(priority = 13)\n @Parameters(\"browser\")\n public void TC13_VERIFY_INPUT_EMAIL (String browser) throws IOException {\n String excel_txtboxEmail = null;\n String excel_btnTieptheo = null;\n excel_txtboxEmail = global.Read_Data_From_Excel(excelPath,\"ELEMENTS\",3,3);\n excel_btnTieptheo = global.Read_Data_From_Excel(excelPath, \"ELEMENTS\", 7,2);\n if(excel_txtboxEmail == null || excel_btnTieptheo == null){\n System.out.println(\"ERROR - Cell or Row No. is wrong.\");\n exTest.log(LogStatus.ERROR, \"ERROR - Cell or Row No. is wrong.\");\n }\n // Locate element by Xpath\n WebElement ele_txtboxEmail = null;\n WebElement ele_btnTieptheo = null;\n ele_txtboxEmail = global.Find_Element_By_Css_Selector(driver,excel_txtboxEmail);\n ele_btnTieptheo = global.Find_Element_By_XPath(driver, excel_btnTieptheo);\n if(ele_txtboxEmail == null){\n exTest.log(LogStatus.FAIL,\"::[\" + browser + \"]:: TC13 - Textbox EMAIL is not displayed.\");\n } else {\n exTest.log(LogStatus.PASS,\"::[\" + browser + \"]:: TC13 - Textbox EMAIL is displayed.\");\n }\n if (ele_btnTieptheo == null){\n exTest.log(LogStatus.FAIL,\"::[\" + browser + \"]:: TC13 - Button Tiep theo is not displayed.\");\n } else {\n exTest.log(LogStatus.PASS,\"::[\" + browser + \"]:: TC13 - Button Tiep theo is displayed.\");\n }\n // Input value from Array to Email\n for(int i = 0; i <= global.INPUT_VALIDATION.length; i++){\n global.Send_Keys(ele_txtboxEmail, global.INPUT_VALIDATION[i]);\n System.out.println(\"DEBUG --- Input Validation: \" + global.INPUT_VALIDATION[i]);\n global.Click(ele_btnTieptheo);\n ele_txtboxEmail.clear();\n }\n global.Processing_Time();\n }", "@Test(dataProviderClass = DataProviderUtils.class, dataProvider = \"excelDataReader\", groups = { \"Sprint54\", \"Get Hyperlink\"}, \r\n\t\t\tdescription = \"No Java applet and no task area layout will be displayed for hyperlink url on selecting No Java applet and no task area layout in configuration and default in hyperlink dialog - Context menu.\")\r\n\tpublic void SprintTest54_1_30_4A_1A(HashMap<String,String> dataValues, String driverType) throws Exception {\r\n\r\n\t\tdriver = null; \r\n\r\n\t\ttry {\r\n\r\n\r\n\r\n\t\t\tdriver = WebDriverUtils.getDriver();\r\n\r\n\t\t\tConcurrentHashMap <String, String> dataPool = new ConcurrentHashMap <String, String>(dataValues);\r\n\t\t\tHomePage homePage = LoginPage.launchDriverAndLogin(driver, true);\r\n\r\n\r\n\t\t\tConfigurationPage configurationPage = LoginPage.launchDriverAndLoginToConfig(driver, true); //Launched driver and logged in\r\n\r\n\t\t\t//Step-1 : Navigate to Vault in tree view\r\n\t\t\t//---------------------------------------\r\n\t\t\tconfigurationPage.treeView.clickTreeViewItem(Caption.ConfigSettings.VaultSpecificSettings.Value + \">>\" + testVault); //Clicks tree view item\r\n\r\n\r\n\t\t\tif (!configurationPage.configurationPanel.getPageName().toUpperCase().equalsIgnoreCase(testVault.toUpperCase())) //Checks if navigated to vault settings page\r\n\t\t\t\tthrow new Exception(\"Vault settings page in configuration is not opened.\");\r\n\r\n\t\t\tLog.message(\"1. Navigated to Vault settings page.\");\r\n\r\n\t\t\t//Step-2 : Select No Java applet and No task area layout layout and save the settings\r\n\t\t\t//--------------------------------------------------------------------\r\n\t\t\tconfigurationPage.configurationPanel.setJavaApplet(Caption.ConfigSettings.Config_Disable.Value);\r\n\r\n\t\t\tif(configurationPage.configurationPanel.isJavaAppletEnabled())\r\n\t\t\t\tthrow new Exception(\"Java applet is enabled\");\r\n\r\n\t\t\tconfigurationPage.configurationPanel.setLayout(Caption.ConfigSettings.Config_NoTaskArea.Value);\r\n\r\n\t\t\tif (!configurationPage.configurationPanel.saveSettings()) //Save the settings\r\n\t\t\t\tthrow new Exception(\"Configuration settings are not saved after changing its layout.\");\r\n\r\n\t\t\tLog.message(\"1. No java applet and no task area layout is selected and saved.\");\r\n\r\n\t\t\tif (!configurationPage.logOut()) //Logs out from configuration page\r\n\t\t\t\tthrow new Exception(\"Log out is not successful after saving the settings in configuration page.\");\r\n\r\n\t\t\tLog.message(\"2. Logout from the configuration page.\");\r\n\r\n\t\t\t//Step-3 : Login to the default page and navigate to any view\r\n\t\t\t//--------------------------------------------------------------------------\r\n\t\t\thomePage = LoginPage.launchDriverAndLogin(driver, false); //Launches and logs into the default page\r\n\r\n\t\t\tString viewToNavigate = SearchPanel.searchOrNavigatetoView(driver, dataPool.get(\"NavigateToView\"), dataPool.get(\"ObjectName\"));\r\n\r\n\t\t\tLog.message(\"3. Logged into the default page and navigated to '\" + viewToNavigate + \"' view.\");\r\n\r\n\t\t\t//Step-4 : Open Get Hyperlink dialog for the object from context menu\r\n\t\t\t//-------------------------------------------------------------------\r\n\t\t\tif (!homePage.listView.rightClickItem(dataPool.get(\"ObjectName\"))) //Selects the Object in the list\r\n\t\t\t\tthrow new Exception(\"Object (\" + dataPool.get(\"ObjectName\") + \") is not got selected.\");\r\n\r\n\t\t\thomePage.listView.clickContextMenuItem(Caption.MenuItems.GetMFilesWebURL.Value); //Selects Get Hyperlink from context menu\r\n\r\n\t\t\tMFilesDialog mfilesDialog = new MFilesDialog(driver); //Instantiating MFilesDialog wrapper class\r\n\r\n\t\t\tif (!mfilesDialog.isGetMFilesWebURLDialogOpened()) //Checks for MFiles dialog title\r\n\t\t\t\tthrow new Exception(\"M-Files dialog with 'Get Hyperlink' title is not opened.\");\r\n\r\n\t\t\tLog.message(\"4. Hyperlink dialog of an object (\" + dataPool.get(\"ObjectName\") + \") is opened through context menu.\");\r\n\r\n\t\t\t//Step-5 : Copy the link from text box and close the Get Hyperlink dialog\r\n\t\t\t//-----------------------------------------------------------------------\r\n\t\t\tString hyperlinkText = mfilesDialog.getHyperlink(); //Gets the hyperlink\r\n\t\t\tmfilesDialog.close(); //Closes the Get Hyperlink dialog\r\n\r\n\t\t\tLog.message(\"5. Hyperlink is copied and Get Hyperlink dialog is closed.\");\r\n\r\n\t\t\t//Step-6 : Open the copied Hyperlink in the browser\r\n\t\t\t//-------------------------------------------------\r\n\t\t\thomePage = Utility.navigateToPage(driver, hyperlinkText, userName, password, \"\"); //Navigates to the hyperlink url\r\n\r\n\r\n\t\t\tif (!driver.getCurrentUrl().equalsIgnoreCase(hyperlinkText))\r\n\t\t\t\tthrow new Exception (\"Browser is not opened with copied object Hyperlink.[Expected URL: \"+hyperlinkText+\" & Current URL : \"+ driver.getCurrentUrl() +\"]\");\r\n\r\n\t\t\tLog.message(\"6. Object Hyperlink is opened in the browser.\");\r\n\r\n\t\t\t//Verification : Verify if default layout is displayed\r\n\t\t\t//----------------------------------------------------\r\n\t\t\tString unAvailableLayouts = \"\";\r\n\r\n\t\t\tif (!homePage.isSearchbarPresent()) //Checks if Search bar present\r\n\t\t\t\tunAvailableLayouts = \"Search Bar is not available;\";\r\n\r\n\t\t\tif (homePage.isTaskPaneDisplayed()) //Checks if Task Pane present\r\n\t\t\t\tunAvailableLayouts = unAvailableLayouts + \"Task Pane is available;\";\r\n\r\n\t\t\tif (!homePage.previewPane.isTabExists(Caption.PreviewPane.MetadataTab.Value))\r\n\t\t\t\tunAvailableLayouts = unAvailableLayouts + \"Properties Pane is not available;\";\r\n\r\n\t\t\tif (!homePage.menuBar.isMenuInMenubarDisplayed()) //Checks if Menu Bar present\r\n\t\t\t\tunAvailableLayouts = unAvailableLayouts + \"Menu Bar is not available;\";\r\n\r\n\t\t\tif (!homePage.menuBar.isBreadCrumbDisplayed()) //Checks if Breadcrumb present\r\n\t\t\t\tunAvailableLayouts = unAvailableLayouts + \"Breadcrumb is not available;\";\r\n\r\n\t\t\tif (homePage.taskPanel.isAppletEnabled())\r\n\t\t\t\tunAvailableLayouts = unAvailableLayouts + \"Java Applet is available;\";\r\n\r\n\t\t\tif (!homePage.isListViewDisplayed())\r\n\t\t\t\tunAvailableLayouts = unAvailableLayouts + \"List View is not available;\";\r\n\r\n\t\t\tif (homePage.isTreeViewDisplayed())\r\n\t\t\t\tunAvailableLayouts = unAvailableLayouts + \"Tree View is available;\";\r\n\r\n\t\t\tif (unAvailableLayouts.equals(\"\")) //Verifies default layout have selected default custom layout\r\n\t\t\t\tLog.pass(\"Test case Passed. Hyperlink URL page is displayed as No java applet and No task area layout\");\r\n\t\t\telse\r\n\t\t\t\tLog.fail(\"Test case Failed. Few layots are not as expected on selecting No java applet and No task area layout\"\r\n\t\t\t\t\t\t+ unAvailableLayouts, driver);\r\n\t\t}\r\n\t\tcatch (Exception e) {\r\n\t\t\tLog.exception(e, driver);\r\n\t\t} //End catch\r\n\r\n\t\tfinally {\r\n\r\n\t\t\tif(driver != null){\r\n\t\t\t\ttry\r\n\t\t\t\t{\r\n\t\t\t\t\tdriver.get(configURL);\r\n\r\n\t\t\t\t\tConfigurationPage configurationPage = new ConfigurationPage(driver);\r\n\t\t\t\t\tconfigurationPage.treeView.clickTreeViewItem(Caption.ConfigSettings.VaultSpecificSettings.Value + \">>\" + testVault); //Clicks tree view item\r\n\r\n\t\t\t\t\tconfigurationPage.configurationPanel.setLayout(Caption.ConfigSettings.Config_Default.Value);\r\n\r\n\t\t\t\t\tif (!configurationPage.configurationPanel.saveSettings())\r\n\t\t\t\t\t\tthrow new Exception(\"Configuration settings are not saved.\");\r\n\t\t\t\t}\r\n\t\t\t\tcatch(Exception e0)\r\n\t\t\t\t{\r\n\t\t\t\t\tLog.exception(e0, driver);\r\n\t\t\t\t}\r\n\r\n\t\t\t}\r\n\t\t\tUtility.quitDriver(driver);\r\n\r\n\t\t} //End finally\r\n\r\n\t}", "@Test\r\n public void Test2() throws InterruptedException {\n driver.navigate().to(\"http://webstrar99.fulton.asu.edu/page2/\");\r\n driver.findElement(By.id(\"number1\")).sendKeys(\"10\");\r\n driver.findElement(By.id(\"number2\")).sendKeys(\"5\");\r\n driver.findElement(By.id(\"sub\")).click();\r\n driver.findElement(By.id(\"calc\")).click();\r\n Assert.assertEquals(\"5\", driver.findElement(By.id(\"res\")).getText());\r\n driver.quit();\r\n }", "public static void main(String[] args) throws IOException,InterruptedException {\n\t\t\tChromeOptions option=new ChromeOptions();\r\n\t\t\toption.addArguments(\"--disable-notifications\");\r\n\t\t\tWebDriver driver=new ChromeDriver(option);\r\n\t\t\tdriver.manage().timeouts().implicitlyWait(15, TimeUnit.SECONDS);\r\n\t\t\tdriver.manage().window().maximize();\r\n\t\t\tdriver.get(\"https://www.bluestone.com\");\r\n\t\t\tActions action=new Actions(driver);\r\n\t\t\tString sheetName=\"Sheet1\";\r\n\t\t\tString path=\"./data/ringdata.xlsx\";\r\n\t\t\tWebElement element=driver.findElement(By.xpath(\"//div[@class='bottom-header']/descendant::nav/ul/li\"));\r\n\t\t\taction.moveToElement(element).perform();\r\n\t\t\tString mainmenu=\"//div[@class='bottom-header']/descendant::nav/ul/li/a[contains(text(),'Rings')]/following-sibling::div/descendant::div/div[@class='wh-submenu-header']\";\r\n\t\t WebElement subElement=driver.findElement(By.xpath(mainmenu));\r\n\t\t driver.findElement(By.xpath(\"//div[@class='bottom-header']/descendant::nav/ul/li/a[contains(text(),'Rings')]/following-sibling::div/descendant::div/div[@class='wh-submenu-header'and contains(text(),'Popular Ring Types')]/parent::div/ul/li/a[contains(text(),'Diamond')]\")).click();\r\n\t\t\tList<WebElement> priceVal=driver.findElements(By.xpath(\"//div[@class='inner pd-gray-bg']/descendant::span[@id='bst-discounted-price']\"));\r\n\t\t\tfor(int i=0;i<priceVal.size();i++)\r\n\t\t\t{\r\n\t\t\t\tString s=priceVal.get(i).getText();\r\n\t\t\t\tSystem.out.println(s);\r\n\t\t\t\tsetExcelData(path, sheetName, i, 0,s );\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t\tThread.sleep(1000);\r\n\t\t\tWebElement sort=driver.findElement(By.xpath(\"//section[@class='block sort-by pull-right']\"));\r\n\t\t\tJavascriptExecutor js=(JavascriptExecutor)driver;\r\n\t\t\tjs.executeScript(\"window.scrollBy(0,150)\");\r\n\t\t\taction.moveToElement(sort).perform();\r\n\t\t\tThread.sleep(1000);\r\n\t\t\tdriver.findElement(By.xpath(\"//div[@id='view-sort-by']/div/a[text()='Price Low to High ']\")).click();\r\n\t\t\tThread.sleep(2000);\r\n\t\t\tList<WebElement> priceVal2=driver.findElements(By.xpath(\"//div[@class='inner pd-gray-bg']/descendant::span[@id='bst-discounted-price']\"));\r\n\t\t\tint count=priceVal.size();\r\n\t\t\tfor(int i=0;i<priceVal2.size();i++,count++)\r\n\t\t\t{\r\n\t\t\t\tString s=priceVal2.get(i).getText();\r\n\t\t\t\tSystem.out.println(s);\r\n\t\t\t\tsetExcelData(path, sheetName,i, 1,s );\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t\t\r\n\t\t}", "public static void main(String[] args) throws Exception {\n \n ExcelUtils.setExcelFile(Constants.Path_TestData + Constants.File_TestData,\"Sheet1\");\n \t System.out.println(\"Total Number of Rows in the excel is : \"+ExcelUtils.rowCount());\n \t System.out.println(\"Total Number of Columns in the excel is : \"+ExcelUtils.columnCount());\n\n System.setProperty(\"webdriver.gecko.driver\",driverPath);\n driver = new FirefoxDriver();\n \n driver.manage().timeouts().implicitlyWait(10, TimeUnit.SECONDS);\n \n driver.get(Constants.URL);\n \n SignIn_Action.Execute(driver);\n \n System.out.println(\"Login Successfully, now it is the time to Log Off buddy.\");\n \n Home_Page.lnk_LogOut(driver).click(); \n \n driver.quit();\n \n //This is to send the PASS value to the Excel sheet in the result column.\n \n ExcelUtils.setCellData(\"Pass\", 1, 3);\n \n }", "private static void tests_to_run(String testcase, XSSFWorkbook workbook) {\n\t\tXSSFSheet sheet=workbook.getSheet(\"Test_Cases\");\r\n\t\t\r\n\t\tfor(int i=1;i<=sheet.getLastRowNum();i++) {\r\n\t\t\t\r\n\t\t\tString test_case=sheet.getRow(i).getCell(0).getStringCellValue();\r\n\t\t\t\r\n\t\t\tif(test_case.equalsIgnoreCase(testcase)) {\r\n\t\t\t\ttry {keyword=sheet.getRow(i).getCell(2).getStringCellValue();\r\n\t\t\t\txpath=sheet.getRow(i).getCell(3).getStringCellValue();\r\n\t\t\t\ttest_data=sheet.getRow(i).getCell(4).getStringCellValue();}catch(Exception e) {}\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\tswitch(keyword) {\r\n\t\t\t\tcase \"launchbrowser\":System.setProperty(\"webdriver.chrome.driver\", \"chromedriver_version_75.exe\");\r\n\t\t\t\t\t\t\t\t\tchrome=new ChromeDriver();\r\n\t\t\t\t\t\t\t\t\tchrome.get(test_data);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t\t\r\n\t\t\t\tcase \"login\": chrome.findElement(By.xpath(xpath)).click();\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t\t\r\n\t\t\t\tcase \"enter_email\": chrome.findElement(By.xpath(xpath)).sendKeys(test_data);\r\n\t\t\t\t\t\t\t\t\tver=test_data;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t\t\r\n\t\t\t\tcase \"enter_password\": chrome.findElement(By.xpath(xpath)).sendKeys(test_data);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t\t\r\n\t\t\t\tcase \"click_login\": chrome.findElement(By.xpath(xpath)).click();\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t\t\r\n\t\t\t\tcase \"verify\": String ver1=chrome.findElement(By.xpath(xpath)).getText();\r\n\t\t\t\t\t\t\t\tif(ver1.equalsIgnoreCase(ver)) {\r\n\t\t\t\t\t\t\t\t\tSystem.out.println(\"Verified\");\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t\t\r\n\t\t\t\tdefault:System.out.println(\"WASTED\");\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t}\r\n\t}", "@Test(priority = 1, groups = \"test\")\r\n\tpublic void AddSchemeProcess() throws IOException, InterruptedException\r\n\t{\r\n\t\tFile src = new File(\"C:\\\\Users\\\\Admin\\\\Desktop\\\\DD_FrmWrk\\\\Videocon\\\\TC_04_Add_Scheme.xls\");\r\n\t\tFileInputStream fin = new FileInputStream(src);\r\n\t\twb = new HSSFWorkbook(fin);\r\n\t\tsheet = wb.getSheetAt(0);\r\n\t\t\r\n\t\tfor(int i = 1; i<=sheet.getLastRowNum(); i++)\r\n\t\t{\r\n\t\t\ttry \r\n\t\t\t{\r\n\t\t\t\twait.until(ExpectedConditions.elementToBeClickable(addButton));\r\n\t\t\t\tdriver.findElement(addButton).click();\r\n\t\t\t\twait.until(ExpectedConditions.visibilityOfElementLocated(categoryDD));\r\n\t\t\t\textent.log(LogStatus.INFO, \"Scheme master page opened.\");\r\n\t\t\t\t\r\n\t\t\t\t//Step-1] Import data for Category.\r\n\t\t\t\tcell = sheet.getRow(i).getCell(1);\r\n\t\t\t\tcell.setCellType(Cell.CELL_TYPE_STRING);\r\n\t\t\t\tSelect category = new Select(driver.findElement(categoryDD));\r\n\t\t\t\tcategory.selectByVisibleText(cell.getStringCellValue());\r\n\t\t\t\t\r\n\t\t\t\t//Step-2] Import data for Sub Category.\r\n\t\t\t\tcell = sheet.getRow(i).getCell(2);\r\n\t\t\t\tcell.setCellType(Cell.CELL_TYPE_STRING);\r\n\t\t\t\tSelect subCategory = new Select(driver.findElement(subCategoryDD));\r\n\t\t\t\tsubCategory.selectByVisibleText(cell.getStringCellValue());\r\n\t\t\t\t\r\n\t\t\t\t//Step-3] Import data for Name.\r\n\t\t\t\tcell = sheet.getRow(i).getCell(3);\r\n\t\t\t\tcell.setCellType(Cell.CELL_TYPE_STRING);\r\n\t\t\t\tdriver.findElement(name).sendKeys(cell.getStringCellValue());\r\n\t\t\t\tdriver.findElement(name).sendKeys(Keys.ENTER);\r\n\t\t\t\tThread.sleep(3500);\r\n\t\t\t\t//Step-3] Import data for Code.\r\n\t\t\t\tcell = sheet.getRow(i).getCell(4);\r\n\t\t\t\tcell.setCellType(Cell.CELL_TYPE_STRING);\r\n\t\t\t\tdriver.findElement(code).sendKeys(cell.getStringCellValue());\r\n\t\t\t\t\r\n\t\t\t\t//Step-4] Input for Start date.\r\n\t\t\t\tdriver.findElement(startDate).click();\r\n\t\t\t\tdriver.findElement(By.xpath(\".//*[@id='ContentPlaceHolder1_schememaster_startdate_today']\")).click();\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t// Step-5] Input data for End date.\r\n\t\t\t\tdriver.findElement(endDate).sendKeys(\"2016-12-22\");\r\n\t\t\t\tdriver.findElement(endDate).sendKeys(Keys.ENTER);\r\n\t\t\t\t\r\n\t\t\t\t// Step-6] Import data for Product group and Iterate.\r\n\t\t\t\tcell = sheet.getRow(i).getCell(5);\r\n\t\t\t\tcell.setCellType(Cell.CELL_TYPE_STRING);\r\n\t\t\t\tString productGroupString = cell.getStringCellValue();\r\n\t\t\t\tList<String> productGrpArray = Arrays.asList(productGroupString.split(\",\"));\r\n\t\t\t\t\r\n\t\t\t\t// Step-7] Import data for CP.\r\n\t\t\t\tcell = sheet.getRow(i).getCell(6);\r\n\t\t\t\tcell.setCellType(Cell.CELL_TYPE_STRING);\r\n\t\t\t\tString cpString = cell.getStringCellValue();\r\n\t\t\t\tList<String> cpArray = Arrays.asList(cpString.split(\",\"));\r\n\t\t\t\t\r\n\t\t\t\t// Step-8] Import data for Del charge %.\r\n\t\t\t\tcell = sheet.getRow(i).getCell(7);\r\n\t\t\t\tcell.setCellType(Cell.CELL_TYPE_STRING);\r\n\t\t\t\tString delChargeString = cell.getStringCellValue();\r\n\t\t\t\tList<String> delChargeArray = Arrays.asList(delChargeString.split(\",\"));\r\n\t\t\t\t\r\n\t\t\t\t// Step-9] Import data for Discount %.\r\n\t\t\t\tcell = sheet.getRow(i).getCell(8);\r\n\t\t\t\tcell.setCellType(Cell.CELL_TYPE_STRING);\r\n\t\t\t\tString discountString = cell.getStringCellValue();\r\n\t\t\t\tList<String> discountArray = Arrays.asList(discountString.split(\",\"));\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t// Step-10] Iterate the process for the data retrieved in steps 7 to 9.\r\n\t\t\t\tfor(int j = 0; j<productGrpArray.size(); j++)\r\n\t\t\t\t{\r\n\t\t\t\t\t// Create ID for product group drop down.\r\n\t\t\t\t\tString firstPartIDprdctGrp = \"ContentPlaceHolder1_schememaster_Grdscheme_ddlScheme_\";\r\n\t\t\t\t\tString finalPartIDprdctGrp = firstPartIDprdctGrp+j;\r\n\t\t\t\t\t\r\n\t\t\t\t\t// Create ID for CP.\r\n\t\t\t\t\tString firstPartIdCP = \"ContentPlaceHolder1_schememaster_Grdscheme_txttempcp_price_\";\r\n\t\t\t\t\tString finalpartIdCP = firstPartIdCP+j;\r\n\t\t\t\t\t\r\n\t\t\t\t\t// Create ID for DelCharge %.\r\n\t\t\t\t\tString firstPartIdDelCharge = \"ContentPlaceHolder1_schememaster_Grdscheme_txttemp_delcharge_\";\r\n\t\t\t\t\tString finalpartIdDelCharge = firstPartIdDelCharge+j;\r\n\t\t\t\t\t\r\n\t\t\t\t\t// Create ID for Discount %.\r\n\t\t\t\t\tString firstPartIdDiscount = \"ContentPlaceHolder1_schememaster_Grdscheme_txttemp_discount_\";\r\n\t\t\t\t\tString finalpartIdDiscount = firstPartIdDiscount+j;\r\n\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\t// Select product group drop down.\r\n\t\t\t\t\tSelect productGroup = new Select(driver.findElement(By.id(finalPartIDprdctGrp)));\r\n\t\t\t\t\tproductGroup.selectByVisibleText(productGrpArray.get(j));\r\n\t\t\t\t\tThread.sleep(3500);\r\n\t\t\t\t\t// Write data for CP.\r\n\t\t\t\t\tdriver.findElement(By.id(finalpartIdCP)).sendKeys(cpArray.get(j));\r\n\t\t\t\t\tdriver.findElement(By.id(finalpartIdCP)).sendKeys(Keys.ENTER);\r\n\t\t\t\t\tThread.sleep(3500);\r\n\t\t\t\t\t// Write data for Del charge %.\r\n\t\t\t\t\tdriver.findElement(By.id(finalpartIdDelCharge)).sendKeys(delChargeArray.get(j));\r\n\t\t\t\t\t\r\n\t\t\t\t\t// Write data for Discount %.\r\n\t\t\t\t\tdriver.findElement(By.id(finalpartIdDiscount)).sendKeys(discountArray.get(j));\r\n\t\t\t\t\t\r\n\t\t\t\t\t// Click on \"Add Product Group\" if more than 1 Product group exists.\r\n\t\t\t\t\tint rowCount = driver.findElements(By.xpath(\".//*[@id='ContentPlaceHolder1_schememaster_Grdscheme']/tbody/tr\")).size();\r\n\t\t\t\t \r\n\t\t\t\t\tif(productGrpArray.size() > 1 && rowCount <= productGrpArray.size())\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tdriver.findElement(addProductGroup).click();\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\t// Step-11] Import data for length.\r\n\t\t\t\tcell = sheet.getRow(i).getCell(9);\r\n\t\t\t\tcell.setCellType(Cell.CELL_TYPE_STRING);\r\n\t\t\t\tdriver.findElement(dimensionLength).sendKeys(cell.getStringCellValue());\r\n\t\t\t\tdriver.findElement(dimensionLength).sendKeys(Keys.ENTER);\r\n\t\t\t\tThread.sleep(3500);\r\n\t\t\t\t\r\n\t\t\t\t// Step-12] Import data for breadth.\r\n\t\t\t\tcell = sheet.getRow(i).getCell(10);\r\n\t\t\t\tcell.setCellType(Cell.CELL_TYPE_STRING);\r\n\t\t\t\tdriver.findElement(dimensionBreadth).sendKeys(cell.getStringCellValue());\r\n\t\t\t\tdriver.findElement(dimensionBreadth).sendKeys(Keys.ENTER);\r\n\t\t\t\tThread.sleep(3500);\r\n\t\t\t\t\r\n\t\t\t\t// Step-13] Import data for height.\r\n\t\t\t\tcell = sheet.getRow(i).getCell(11);\r\n\t\t\t\tcell.setCellType(Cell.CELL_TYPE_STRING);\r\n\t\t\t\tdriver.findElement(dimensionHeight).sendKeys(cell.getStringCellValue());\r\n\t\t\t\tdriver.findElement(dimensionHeight).sendKeys(Keys.ENTER);\r\n\t\t\t\tThread.sleep(3500);\r\n\t\t\t\t\r\n\t\t\t\t// Step-14] Import data for Multiplying factor.\r\n\t\t\t\tcell = sheet.getRow(i).getCell(12);\r\n\t\t\t\tcell.setCellType(Cell.CELL_TYPE_STRING);\r\n\t\t\t\tdriver.findElement(multiplyingFactor).clear();\r\n\t\t\t\tdriver.findElement(multiplyingFactor).sendKeys(cell.getStringCellValue());\r\n\t\t\t\tdriver.findElement(multiplyingFactor).sendKeys(Keys.ENTER);\r\n\t\t\t\tThread.sleep(3500);\r\n\t\t\t\t\r\n\t\t\t\t// Step-14] Import data for Dividing factor.\r\n\t\t\t\tcell = sheet.getRow(i).getCell(13);\r\n\t\t\t\tcell.setCellType(Cell.CELL_TYPE_STRING);\r\n\t\t\t\tdriver.findElement(dividingFactor).clear();\r\n\t\t\t\tdriver.findElement(dividingFactor).sendKeys(cell.getStringCellValue());\r\n\t\t\t\tdriver.findElement(dividingFactor).sendKeys(Keys.ENTER);\r\n\t\t\t\tThread.sleep(3500);\r\n\t\t\t\t\r\n\t\t\t\t// Step-16] Import data for Weight.\r\n\t\t\t\tcell = sheet.getRow(i).getCell(14);\r\n\t\t\t\tcell.setCellType(Cell.CELL_TYPE_STRING);\r\n\t\t\t\tdriver.findElement(weightTxtBox).sendKeys(cell.getStringCellValue());\r\n\t\t\t\t\r\n\t\t\t\t // Step-17] Import data for Weight unit.\r\n\t\t\t\tcell = sheet.getRow(i).getCell(15);\r\n\t\t\t\tcell.setCellType(Cell.CELL_TYPE_STRING);\r\n\t\t\t\tSelect weightUnit = new Select(driver.findElement(weightUnitDD));\r\n\t\t\t\tweightUnit.selectByVisibleText(cell.getStringCellValue());\r\n\t\t\t\t\r\n\t\t\t\t // Step-18] Import data for Delivery charges.\r\n\t\t\t\tcell = sheet.getRow(i).getCell(16);\r\n\t\t\t\tcell.setCellType(Cell.CELL_TYPE_STRING);\r\n\t\t\t\tSelect deliveryCharges = new Select(driver.findElement(delChargesDD));\r\n\t\t\t\tdeliveryCharges.selectByVisibleText(cell.getStringCellValue());\r\n\t\t\t\t\r\n\t\t\t\t// Step-19] Import data for Loyalty points.\r\n\t\t\t\tcell = sheet.getRow(i).getCell(17);\r\n\t\t\t\tcell.setCellType(Cell.CELL_TYPE_STRING);\r\n\t\t\t\tdriver.findElement(loyaltyPoints).sendKeys(cell.getStringCellValue());\r\n\t\t\t\t\r\n\t\t\t\t// Step-20] Import data for mode.\r\n\t\t\t\tcell = sheet.getRow(i).getCell(18);\r\n\t\t\t\tcell.setCellType(Cell.CELL_TYPE_STRING);\r\n\t\t\t\tString mode = cell.getStringCellValue();\r\n\t\t\t\t\r\n\t\t\t\t// Check for the retreived data and click accordingly.\r\n\t\t\t\tif(mode.equalsIgnoreCase(\"AIR\"))\r\n\t\t\t\t{\r\n\t\t\t\t\tdriver.findElement(By.id(\"ContentPlaceHolder1_schememaster_rdmode_0\")).click();\r\n\t\t\t\t\tThread.sleep(3500);\r\n\t\t\t\t}\r\n\t\t\t\tif(mode.equalsIgnoreCase(\"SURFACE\"))\r\n\t\t\t\t{\r\n\t\t\t\t\tdriver.findElement(By.id(\"ContentPlaceHolder1_schememaster_rdmode_1\")).click();\r\n\t\t\t\t\tThread.sleep(3500);\r\n\t\t\t\t}\r\n\t\t\t\tif(mode.equalsIgnoreCase(\"BOTH\"))\r\n\t\t\t\t{\r\n\t\t\t\t\tdriver.findElement(By.id(\"ContentPlaceHolder1_schememaster_rdmode_2\")).click();\r\n\t\t\t\t\tThread.sleep(3500);\r\n\t\t\t\t\t// Step-20] Import data for priority.\r\n\t\t\t\t\tcell = sheet.getRow(i).getCell(19);\r\n\t\t\t\t\tcell.setCellType(Cell.CELL_TYPE_STRING);\r\n\t\t\t\t\twait.until(ExpectedConditions.visibilityOfElementLocated(By.id(\"ContentPlaceHolder1_schememaster_ddlmodepri\")));\r\n\t\t\t\t\tSelect priority = new Select(driver.findElement(By.id(\"ContentPlaceHolder1_schememaster_ddlmodepri\")));\r\n\t\t\t\t\tpriority.selectByVisibleText(cell.getStringCellValue());\r\n\t\t\t\t}\r\n\t\t\t\t// Click on the packing box.\r\n\t\t\t\tdriver.findElement(By.xpath(\".//*[@id='ContentPlaceHolder1_schememaster_lstpacking']/option[3]\")).click();\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t// Step-22] Click on submit button.\r\n\t\t\t\tdriver.findElement(submitButton).click();\r\n\t\t\t\t\r\n\t\t\t\ttry \r\n\t\t\t\t{\r\n\t\t\t\t\tAlert alert = driver.switchTo().alert();\r\n\t\t\t\t\tString alertMsg = alert.getText();\r\n\t\t\t\t\tif(alertMsg.equalsIgnoreCase(\"Are you sure to Submit this record?\"))\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\talert.accept();\r\n\t\t\t\t\t\twait.until(ExpectedConditions.visibilityOfElementLocated(By.xpath(\".//*[@id='ContentPlaceHolder1_schememaster_pnlwarehouse']/div/table/tbody/tr[1]/td[1]\")));\r\n\t\t\t\t\t\tdriver.findElement(By.xpath(\".//*[@id='ContentPlaceHolder1_schememaster_pnlwarehouse']/div/table/tbody/tr[1]/td[1]\")).sendKeys(Keys.ESCAPE);\r\n\t\t\t\t\t wait.until(ExpectedConditions.visibilityOfElementLocated(By.id(\"ContentPlaceHolder1_schememaster_lblmsg\")));\r\n\t\t\t\t\t String successMsg = driver.findElement(By.id(\"ContentPlaceHolder1_schememaster_lblmsg\")).getText();\r\n\t\t\t\t\t System.out.println(successMsg);\r\n\t\t\t\t\t extent.log(LogStatus.PASS, successMsg);\r\n\t\t\t\t\t sheet.getRow(i).createCell(21).setCellValue(alertMsg);\r\n\t\t\t\t\t\tFileOutputStream fout = new FileOutputStream(src);\r\n\t\t\t\t\t\twb.write(fout);\r\n\t\t\t\t\t\tfout.close();\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\textent.log(LogStatus.ERROR, \"Error message\" +alertMsg);\r\n\t\t\t\t\t\tsheet.getRow(i).createCell(20).setCellValue(alertMsg);\r\n\t\t\t\t\t\tFileOutputStream fout = new FileOutputStream(src);\r\n\t\t\t\t\t\twb.write(fout);\r\n\t\t\t\t\t\tfout.close();\r\n\t\t\t\t\t\ttry \r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\talert.accept();\r\n\t\t\t\t\t\t\tAlert alert1 = driver.switchTo().alert();\r\n\t\t\t\t\t\t\talert1.accept();\r\n\t\t\t\t\t\t} \r\n\t\t\t\t\t\tcatch (Exception e) \r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\t\t\t\tSystem.out.println(\"Second alert is not present\");\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\tcatch (Exception e)\r\n\t\t\t\t{\r\n\t\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t}\r\n\t\t\t\tdriver.get(driver.getCurrentUrl());\r\n\t\t\t} \r\n\t\t\tcatch (Exception e)\r\n\t\t\t{\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\t\r\n\t\t\t\r\n\t\t}\r\n\t\treports.endTest(extent);\r\n\t\treports.flush();\r\n\t}", "@Test(dataProviderClass = DataProviderUtils.class, dataProvider = \"excelDataReader\", groups = { \"Sprint54\", \"Get Hyperlink\", \"SKIP_JavaApplet\"}, \r\n\t\t\tdescription = \"Default layout with navigation pane will be displayed for hyperlink url on selecting Default layout with navigation pane layout in configuration and default in hyperlink dialog - Context menu.\")\r\n\tpublic void SprintTest54_1_30_2A_1A(HashMap<String,String> dataValues, String driverType) throws Exception {\r\n\r\n\t\tdriver = null; \r\n\r\n\t\ttry {\r\n\r\n\r\n\r\n\r\n\t\t\tdriver = WebDriverUtils.getDriver();\r\n\r\n\r\n\t\t\tConcurrentHashMap <String, String> dataPool = new ConcurrentHashMap <String, String>(dataValues);\r\n\t\t\tConfigurationPage configurationPage = LoginPage.launchDriverAndLoginToConfig(driver, true); //Launched driver and logged in\r\n\r\n\t\t\t//Step-1 : Navigate to Vault in tree view\r\n\t\t\t//-----------------------------------------\r\n\t\t\tconfigurationPage.treeView.clickTreeViewItem(Caption.ConfigSettings.VaultSpecificSettings.Value + \">>\" + testVault); //Clicks tree view item\r\n\r\n\r\n\t\t\tif (!configurationPage.configurationPanel.getPageName().toUpperCase().equalsIgnoreCase(testVault.toUpperCase())) //Checks if navigated to vault settings page\r\n\t\t\t\tthrow new Exception(\"Vault settings page in configuration is not opened.\");\r\n\r\n\t\t\tLog.message(\"1. Navigated to Vault settings page.\");\r\n\r\n\t\t\t//Step-2 : Select Default and navigate pane layout and save the settings\r\n\t\t\t//--------------------------------------------------------------------\r\n\t\t\tconfigurationPage.configurationPanel.setLayout(Caption.ConfigSettings.Config_DefaultAndNavigation.Value); //Sets as Default layout with navigation pane layout\r\n\r\n\t\t\tif (!configurationPage.configurationPanel.getLayout().equalsIgnoreCase(Caption.ConfigSettings.Config_DefaultAndNavigation.Value)) //Verifies if Default layout with navigation pane is selected\r\n\t\t\t\tthrow new Exception(Caption.ConfigSettings.Config_DefaultAndNavigation.Value + \" layout is not selected.\");\r\n\r\n\t\t\tif (!configurationPage.configurationPanel.saveSettings()) //Saves the settings\r\n\t\t\t\tthrow new Exception(\"Settings are not saved properly.\");\r\n\r\n\t\t\tif (!configurationPage.logOut()) //Logs out from configuration page\r\n\t\t\t\tthrow new Exception(\"Log out is not successful after saving the settings in configuration page.\");\r\n\r\n\t\t\tLog.message(\"2. \" + Caption.ConfigSettings.Config_DefaultAndNavigation.Value + \" layout is selected and settings are saved.\");\r\n\r\n\t\t\t//Step-3 : Login to the default page and navigate to any view\r\n\t\t\t//--------------------------------------------------------------------------\r\n\t\t\tHomePage homePage = LoginPage.launchDriverAndLogin(driver, false); //Launches and logs into the default page\r\n\r\n\t\t\tString viewToNavigate = SearchPanel.searchOrNavigatetoView(driver, dataPool.get(\"NavigateToView\"), dataPool.get(\"ObjectName\"));\r\n\r\n\t\t\tLog.message(\"3. Logged into the default page and navigated to '\" + viewToNavigate + \"' view.\");\r\n\r\n\t\t\t//Step-4 : Open Get Hyperlink dialog for the object from context menu\r\n\t\t\t//-------------------------------------------------------------------\r\n\t\t\tif (!homePage.listView.rightClickItem(dataPool.get(\"ObjectName\"))) //Selects the Object in the list\r\n\t\t\t\tthrow new Exception(\"Object (\" + dataPool.get(\"ObjectName\") + \") is not got selected.\");\r\n\r\n\t\t\thomePage.listView.clickContextMenuItem(Caption.MenuItems.GetMFilesWebURL.Value); //Selects Get Hyperlink from context menu\r\n\r\n\t\t\tMFilesDialog mfilesDialog = new MFilesDialog(driver); //Instantiating MFilesDialog wrapper class\r\n\r\n\t\t\tif (!mfilesDialog.isGetMFilesWebURLDialogOpened()) //Checks for MFiles dialog title\r\n\t\t\t\tthrow new Exception(\"M-Files dialog with 'Get Hyperlink' title is not opened.\");\r\n\r\n\t\t\tLog.message(\"4. Hyperlink dialog of an object (\" + dataPool.get(\"ObjectName\") + \") is opened through context menu.\");\r\n\r\n\t\t\t//Step-5 : Copy the link from text box and close the Get Hyperlink dialog\r\n\t\t\t//-----------------------------------------------------------------------\r\n\t\t\tString hyperlinkText = mfilesDialog.getHyperlink(); //Gets the hyperlink\r\n\t\t\tmfilesDialog.close(); //Closes the Get Hyperlink dialog\r\n\r\n\t\t\tLog.message(\"5. Hyperlink is copied and Get Hyperlink dialog is closed.\");\r\n\r\n\t\t\t//Step-6 : Open the copied Hyperlink in the browser\r\n\t\t\t//-------------------------------------------------\r\n\t\t\thomePage = Utility.navigateToPage(driver, hyperlinkText, userName, password, \"\"); //Navigates to the hyperlink url\r\n\r\n\t\t\tif (!driver.getCurrentUrl().equalsIgnoreCase(hyperlinkText))\r\n\t\t\t\tthrow new Exception (\"Browser is not opened with copied object Hyperlink.[Expected URL: \"+hyperlinkText+\" & Current URL : \"+ driver.getCurrentUrl() +\"]\");\r\n\r\n\t\t\tLog.message(\"6. Object Hyperlink is opened in the browser.\");\r\n\r\n\t\t\t//Verification : Verify if default layout is displayed\r\n\t\t\t//----------------------------------------------------\r\n\t\t\tString unAvailableLayouts = \"\";\r\n\r\n\t\t\tif (!homePage.isSearchbarPresent()) //Checks if Search bar present\r\n\t\t\t\tunAvailableLayouts = \"Search Bar\";\r\n\r\n\t\t\tif (!homePage.isTaskPaneDisplayed()) //Checks if Task Pane present\r\n\t\t\t\tunAvailableLayouts = unAvailableLayouts + \"Task Pane;\";\r\n\r\n\t\t\tif (!homePage.previewPane.isTabExists(Caption.PreviewPane.MetadataTab.Value))\r\n\t\t\t\tunAvailableLayouts = unAvailableLayouts + \"Properties Pane;\";\r\n\r\n\t\t\tif (!homePage.menuBar.isMenuInMenubarDisplayed()) //Checks if Menu Bar present\r\n\t\t\t\tunAvailableLayouts = unAvailableLayouts + \"Menu Bar;\";\r\n\r\n\t\t\tif (!homePage.menuBar.isBreadCrumbDisplayed()) //Checks if Breadcrumb present\r\n\t\t\t\tunAvailableLayouts = unAvailableLayouts + \"Breadcrumb;\";\r\n\r\n\t\t\tif (!homePage.taskPanel.isAppletEnabled())\r\n\t\t\t\tunAvailableLayouts = unAvailableLayouts + \"Java Applet;\";\r\n\r\n\t\t\tif (!homePage.isListViewDisplayed())\r\n\t\t\t\tunAvailableLayouts = unAvailableLayouts + \"Metadatacard;\";\r\n\r\n\t\t\tif (!homePage.isTreeViewDisplayed())\r\n\t\t\t\tunAvailableLayouts = unAvailableLayouts + \"Tree View;\";\r\n\r\n\t\t\tif (unAvailableLayouts.equals(\"\")) //Verifies default layout have selected default custom layout\r\n\t\t\t\tLog.pass(\"Test case Passed. Hyperlink URL page is displayed as Default layout with Navigation pane.\");\r\n\t\t\telse\r\n\t\t\t\tLog.fail(\"Test case Failed. Few layots are missing on selecting 'Default layout and navigation pane' layout. Missed layots : \" \r\n\t\t\t\t\t\t+ unAvailableLayouts, driver);\r\n\r\n\t\t}\r\n\t\tcatch (Exception e) {\r\n\t\t\tLog.exception(e, driver);\r\n\t\t} //End catch\r\n\r\n\t\tfinally {\r\n\r\n\t\t\tif(driver != null){\r\n\t\t\t\ttry\r\n\t\t\t\t{\r\n\t\t\t\t\tdriver.get(configURL);\r\n\r\n\t\t\t\t\tConfigurationPage configurationPage = new ConfigurationPage(driver);\r\n\t\t\t\t\tconfigurationPage.treeView.clickTreeViewItem(Caption.ConfigSettings.VaultSpecificSettings.Value + \">>\" + testVault); //Clicks tree view item\r\n\r\n\t\t\t\t\tconfigurationPage.configurationPanel.setLayout(Caption.ConfigSettings.Config_Default.Value);\r\n\r\n\t\t\t\t\tif (!configurationPage.configurationPanel.saveSettings())\r\n\t\t\t\t\t\tthrow new Exception(\"Configuration settings are not saved.\");\r\n\t\t\t\t}\r\n\t\t\t\tcatch(Exception e0)\r\n\t\t\t\t{\r\n\t\t\t\t\tLog.exception(e0, driver);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tUtility.quitDriver(driver);\r\n\r\n\t\t} //End finally\r\n\r\n\t}", "@Test(dataProviderClass = DataProviderUtils.class, dataProvider = \"excelDataReader\",testName=\"Test1_6_1\",description=\"Test1_6_1: Maximum number of search results\")\r\n\tpublic void Test1_6_1(HashMap<String,String> dataValues,String currentDriver,ITestContext context) throws Exception {\r\n\r\n\t\t//Variable Declaration\r\n\t\tdriver = WebDriverUtils.getDriver();\r\n\t\t\r\n\r\n\t\tConcurrentHashMap <String, String> testData = new ConcurrentHashMap <String, String>(dataValues);\r\n\t\tLoginPage loginPage=null;\r\n\r\n\t\tConfigurationPage configPage=null;\r\n\t\tHomePage homepage=null;\r\n\t\ttry {\r\n\r\n\t\t\t//Step-1: Login to Configuration Page\r\n\t\t\tloginPage=new LoginPage(driver);\r\n\t\t\tloginPage.navigateToApplication(configSite,userName,password,\"\");\t\r\n\t\t\tLog.message(\"1. Logged in to Configuration Page\", driver);\r\n\r\n\t\t\t//Step-2: Click Vault from left panel of Configuration Page\r\n\t\t\tconfigPage=new ConfigurationPage(driver);\r\n\t\t\tconfigPage.clickVaultFolder(testData.get(\"VaultName\"));\r\n\t\t\tLog.message(\"2. Clicked 'Sample vault' from left panel of Configuration Page\", driver);\r\n\r\n\r\n\t\t\t//Step-3 : Set value for Maximum number of search results\r\n\r\n\t\t\tif (!configPage.configurationPanel.getVaultAccess()) {\r\n\t\t\t\tconfigPage.configurationPanel.setVaultAccess(true); //Allows access to this vault\r\n\t\t\t}\r\n\r\n\t\t\tconfigPage.configurationPanel.setValueSearchmaximumResult(testData.get(\"Maximum search results\"));\r\n\t\t\tconfigPage.clickSaveButton();\r\n\r\n\t\t\t// Check any warning dialog displayed\r\n\t\t\tif(configPage.isWarningDialogDisplayed())\r\n\t\t\t{\r\n\t\t\t\tconfigPage.clickResetButton();\r\n\t\t\t\tconfigPage.configurationPanel.setValueSearchmaximumResult(testData.get(\"Maximum search results\"));\r\n\t\t\t\tconfigPage.clickSaveButton();\r\n\t\t\t\tconfigPage.clickOKBtnOnSaveDialog(); \r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t\tconfigPage.clickOKBtnOnSaveDialog();\r\n\r\n\t\t\tLog.message(\"3. Value set for Maximum number of search results\", driver);\r\n\r\n\t\t\t//Step-4: LogOut of configurationpage\r\n\t\t\tconfigPage.clickLogOut(); //Logs out from the Configuration page\r\n\t\t\tLog.message(\"4. Logged Out of configuration Page.\", driver);\r\n\r\n\t\t\t//Step-5: Login to Web Access Vault\r\n\t\t\tloginPage.navigateToApplication(webSite,userName,password,testData.get(\"VaultName\"));\r\n\t\t\tUtils.waitForPageLoad(driver);\r\n\t\t\thomepage=new HomePage(driver);\r\n\r\n\t\t\tif (!homepage.isLoggedIn(userName))\r\n\t\t\t\tthrow new Exception(\"Some Error encountered while logging..check testdata..\");\r\n\t\t\tLog.message(\"5. Logged in to the vault (\" + testData.get(\"VaultName\") + \").\", driver);\r\n\r\n\t\t\t//Step-6: Select Advanced Search Options\r\n\t\t\tSearchPanel.searchOrNavigatetoView(driver, testData.get(\"SearchType\"), \"\");\r\n\r\n\t\t\t//Step-7: Verify number of objects displayed in listing view\r\n\t\t\tif (homepage.listView.itemCount() == Integer.parseInt(testData.get(\"Maximum search results\")))\r\n\t\t\t\tLog.pass(\"Test Passed. Search results display less than or equal to Maximum number of search results value.\");\r\n\t\t\telse\r\n\t\t\t\tLog.fail(\"Test Failed. Search results display greater than to Maximum number of search results value.\", driver);\r\n\r\n\t\t} //End try\r\n\r\n\t\tcatch (Exception e) {\r\n\t\t\tLog.exception(e, driver);\r\n\t\t} //End catch\r\n\r\n\t\tfinally {\r\n\r\n\t\t\tdriver.quit();\t\r\n\t\t} //End finally\r\n\t}", "@Test(dataProviderClass = DataProviderUtils.class, dataProvider = \"excelDataReader\", groups = { \"Sprint54\", \"Get Hyperlink\"}, \r\n\t\t\tdescription = \"Listing pane only layout will be displayed for hyperlink url on selecting Listing pane only layout in configuration and default in hyperlink dialog - Context menu.\")\r\n\tpublic void SprintTest54_1_30_7A_1(HashMap<String,String> dataValues, String driverType) throws Exception {\r\n\r\n\t\tdriver = null; \r\n\r\n\t\ttry {\r\n\r\n\r\n\r\n\r\n\t\t\tdriver = WebDriverUtils.getDriver();\r\n\r\n\t\t\tConcurrentHashMap <String, String> dataPool = new ConcurrentHashMap <String, String>(dataValues);\r\n\t\t\tConfigurationPage configurationPage = LoginPage.launchDriverAndLoginToConfig(driver, true); //Launched driver and logged in\r\n\r\n\t\t\t//Step-1 : Navigate to Vault in tree view\r\n\t\t\t//---------------------------------------\r\n\t\t\tconfigurationPage.treeView.clickTreeViewItem(Caption.ConfigSettings.VaultSpecificSettings.Value + \">>\" + testVault); //Clicks tree view item\r\n\r\n\r\n\t\t\tif (!configurationPage.configurationPanel.getPageName().toUpperCase().equalsIgnoreCase(testVault.toUpperCase())) //Checks if navigated to vault settings page\r\n\t\t\t\tthrow new Exception(\"Vault settings page in configuration is not opened.\");\r\n\r\n\t\t\tLog.message(\"1. Navigated to Vault settings page.\");\r\n\r\n\t\t\t//Step-2 : Select Listing pane layout layout and save the settings\r\n\t\t\t//--------------------------------------------------------------------------------------\r\n\t\t\tconfigurationPage.configurationPanel.setLayout(Caption.ConfigSettings.Config_ListingPaneOnly.Value); //Sets as Listing pane layout\r\n\r\n\t\t\tif (!configurationPage.configurationPanel.getLayout().equalsIgnoreCase(Caption.ConfigSettings.Config_ListingPaneOnly.Value)) //Verifies if Listing pane and properties pane layout is selected\r\n\t\t\t\tthrow new Exception(Caption.ConfigSettings.Config_ListingPaneOnly.Value + \" layout is not selected.\");\r\n\r\n\t\t\tif (!configurationPage.configurationPanel.saveSettings()) //Saves the settings\r\n\t\t\t\tthrow new Exception(\"Settings are not saved properly.\");\r\n\r\n\t\t\tif (!configurationPage.logOut()) //Logs out from configuration page\r\n\t\t\t\tthrow new Exception(\"Log out is not successful after saving the settings in configuration page.\");\r\n\r\n\t\t\tLog.message(\"2. \" + Caption.ConfigSettings.Config_ListingPaneOnly.Value + \" layout is selected and settings are saved.\");\r\n\r\n\t\t\t//Step-3 : Login to the default page and navigate to any view\r\n\t\t\t//-------------------------------------------------------------\r\n\t\t\tHomePage homePage = LoginPage.launchDriverAndLogin(driver, false); //Launches and logs into the default page\r\n\r\n\t\t\tString viewToNavigate = SearchPanel.searchOrNavigatetoView(driver, dataPool.get(\"NavigateToView\"), dataPool.get(\"ObjectName\"));\r\n\r\n\t\t\tLog.message(\"3. Logged into the default page and navigated to '\" + viewToNavigate + \"' view.\");\r\n\r\n\t\t\t//Step-4 : Open Get Hyperlink dialog for the object from context menu\r\n\t\t\t//-------------------------------------------------------------------\r\n\t\t\tif (!homePage.listView.rightClickItem(dataPool.get(\"ObjectName\"))) //Selects the Object in the list\r\n\t\t\t\tthrow new Exception(\"Object (\" + dataPool.get(\"ObjectName\") + \") is not got selected.\");\r\n\r\n\t\t\thomePage.listView.clickContextMenuItem(Caption.MenuItems.GetMFilesWebURL.Value); //Selects Get Hyperlink from context menu\r\n\r\n\t\t\tMFilesDialog mfilesDialog = new MFilesDialog(driver); //Instantiating MFilesDialog wrapper class\r\n\r\n\t\t\tif (!mfilesDialog.isGetMFilesWebURLDialogOpened()) //Checks for MFiles dialog title\r\n\t\t\t\tthrow new Exception(\"M-Files dialog with 'Get Hyperlink' title is not opened.\");\r\n\r\n\t\t\tLog.message(\"4. Hyperlink dialog of an object (\" + dataPool.get(\"ObjectName\") + \") is opened through context menu.\");\r\n\r\n\t\t\t//Step-5 : Copy the link from text box and close the Get Hyperlink dialog\r\n\t\t\t//-----------------------------------------------------------------------\r\n\t\t\tString hyperlinkText = mfilesDialog.getHyperlink(); //Gets the hyperlink\r\n\t\t\tmfilesDialog.close(); //Closes the Get Hyperlink dialog\r\n\r\n\t\t\tLog.message(\"5. Hyperlink is copied and Get Hyperlink dialog is closed.\");\r\n\r\n\t\t\t//Step-6 : Open the copied Hyperlink in the browser\r\n\t\t\t//-------------------------------------------------\r\n\t\t\thomePage = Utility.navigateToPage(driver, hyperlinkText, userName, password, \"\"); //Navigates to the hyperlink url\r\n\r\n\r\n\t\t\tif (!driver.getCurrentUrl().equalsIgnoreCase(hyperlinkText))\r\n\t\t\t\tthrow new Exception (\"Browser is not opened with copied object Hyperlink.[Expected URL: \"+hyperlinkText+\" & Current URL : \"+ driver.getCurrentUrl() +\"]\");\r\n\r\n\t\t\tLog.message(\"6. Object Hyperlink is opened in the browser.\");\r\n\r\n\t\t\t//Verification : Verify if default layout is displayed\r\n\t\t\t//----------------------------------------------------\r\n\t\t\tString unAvailableLayouts = \"\";\r\n\r\n\t\t\tif (homePage.isSearchbarPresent()) //Checks if Search bar present\r\n\t\t\t\tunAvailableLayouts = \"Search Bar is available;\";\r\n\r\n\t\t\tif (homePage.isTaskPaneDisplayed()) //Checks if Task Pane present\r\n\t\t\t\tunAvailableLayouts = unAvailableLayouts + \"Task Pane is available;\";\r\n\r\n\t\t\tif (homePage.previewPane.isTabExists(Caption.PreviewPane.MetadataTab.Value))\r\n\t\t\t\tunAvailableLayouts = unAvailableLayouts + \"Properties Pane is available;\";\r\n\r\n\t\t\tif (homePage.menuBar.isMenuInMenubarDisplayed()) //Checks if Menu Bar present\r\n\t\t\t\tunAvailableLayouts = unAvailableLayouts + \"Menu Bar is available;\";\r\n\r\n\t\t\tif (homePage.menuBar.isBreadCrumbDisplayed()) //Checks if Breadcrumb present\r\n\t\t\t\tunAvailableLayouts = unAvailableLayouts + \"Breadcrumb is available;\";\r\n\r\n\t\t\tif (homePage.taskPanel.isAppletEnabled())\r\n\t\t\t\tunAvailableLayouts = unAvailableLayouts + \"Java Applet is available;\";\r\n\r\n\t\t\tif (!homePage.isListViewDisplayed())\r\n\t\t\t\tunAvailableLayouts = unAvailableLayouts + \"List View is not available;\";\r\n\r\n\t\t\tif (homePage.isTreeViewDisplayed())\r\n\t\t\t\tunAvailableLayouts = unAvailableLayouts + \"Tree View is available;\";\r\n\r\n\t\t\tif (unAvailableLayouts.equals(\"\")) //Verifies default layout have selected default custom layout\r\n\t\t\t\tLog.pass(\"Test case Passed. Hyperlink URL page is displayed as .\" + Caption.ConfigSettings.Config_ListingPaneOnly.Value);\r\n\t\t\telse\r\n\t\t\t\tLog.fail(\"Test case Failed. Few layots are not as expected on selecting \" + Caption.ConfigSettings.Config_ListingPaneOnly.Value + \". Refer additional information : \" \r\n\t\t\t\t\t\t+ unAvailableLayouts, driver);\r\n\t\t}\r\n\t\tcatch (Exception e) {\r\n\t\t\tLog.exception(e, driver);\r\n\t\t} //End catch\r\n\r\n\t\tfinally {\r\n\r\n\t\t\tif(driver != null){\r\n\t\t\t\ttry\r\n\t\t\t\t{\r\n\t\t\t\t\tdriver.get(configURL);\r\n\r\n\t\t\t\t\tConfigurationPage configurationPage = new ConfigurationPage(driver);\r\n\t\t\t\t\tconfigurationPage.treeView.clickTreeViewItem(Caption.ConfigSettings.VaultSpecificSettings.Value + \">>\" + testVault); //Clicks tree view item\r\n\r\n\t\t\t\t\tconfigurationPage.configurationPanel.setLayout(Caption.ConfigSettings.Config_Default.Value);\r\n\r\n\t\t\t\t\tif (!configurationPage.configurationPanel.saveSettings())\r\n\t\t\t\t\t\tthrow new Exception(\"Configuration settings are not saved.\");\r\n\t\t\t\t}\r\n\t\t\t\tcatch(Exception e0)\r\n\t\t\t\t{\r\n\t\t\t\t\tLog.exception(e0, driver);\r\n\t\t\t\t}\r\n\r\n\t\t\t}\r\n\t\t\tUtility.quitDriver(driver);\r\n\r\n\t\t} //End finally\r\n\r\n\t}", "public static void main(String[] args) {\n\t\tSystem.setProperty(\"webdriver.chrome.driver\", \"C:/Automation/Drivers/chromedriver.exe\");\r\n\r\n\t\tChromeDriver driver = new ChromeDriver();\r\n\r\n\t\tdriver.manage().timeouts().implicitlyWait(20, TimeUnit.SECONDS);\r\n\r\n\t\tdriver.get(\"http://www.leafground.com/pages/table.html\");\r\n\t\tdriver.manage().window().maximize();\r\n\t\t//get table and store in web element\r\n\t\tWebElement leafgroundstable = driver.findElementByXPath(\"//table[@id='table_id']\");\r\n\t\t//find the number of rows and store in list\r\n\t\tList<WebElement> totalrows = leafgroundstable.findElements(By.tagName(\"tr\"));\r\n\t\tSystem.out.println(\"total row count: \"+totalrows.size());\r\n\t\tWebElement firstrow = totalrows.get(1);\r\n\r\n\r\n\t\tList<WebElement> allcolumns = firstrow.findElements(By.tagName(\"td\"));\r\n\r\n\r\n\t\tSystem.out.println(\"total column count: \"+allcolumns.size());\r\n\r\n\t\t// Get the progress value of 'Learn to interact with Elements' and store it in a variable\r\n\t\t//\t\tfor (WebElement currentrow : totalrows) \r\n\t\t//\t\t{\r\n\t\t//\t\t\tList<WebElement> currentcolvals = currentrow.findElements(By.tagName(\"td\"));\r\n\t\t//\r\n\t\t//\t\t\tfor(int i=0;i<currentcolvals.size();i++)\r\n\t\t//\t\t\t{\r\n\t\t//\t\t\t\tString columntxtvalue = currentcolvals.get(i).getText();\r\n\t\t//\t\t\t\t\r\n\t\t//\t\t\t\tif(columntxtvalue.equalsIgnoreCase(\"Learn to interact with Elements\"))\r\n\t\t//\t\t\t\t{\r\n\t\t//\t\t\t\t\tSystem.out.println(\"Progress Value is : \"+currentcolvals.get(1).getText());\r\n\t\t//\t\t\t\t}\r\n\t\t//\t\t\t}\r\n\r\n\t\t//learn to interact with key board val\r\n\t\tfor (WebElement currentrow : totalrows) \r\n\t\t{\r\n\t\t\tList<WebElement> currentcolvals = currentrow.findElements(By.tagName(\"td\"));\r\n\r\n\t\t\tfor(int i=0;i<currentcolvals.size();i++)\r\n\t\t\t{\r\n\t\t\t\tString columntxtvalue = currentcolvals.get(i).getText();\r\n\r\n\t\t\t\tif(columntxtvalue.equalsIgnoreCase(\"Learn to interact using Keyboard, Actions\"))\r\n\t\t\t\t{\r\n\t\t\t\t\tSystem.out.println(\"Progress Value is : \"+currentcolvals.get(1).getText());\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\t// Find the vital task for the least completed progress and check the box\r\n\r\n//\t\t\tString[]progressvalues = null;\r\n//\r\n//\t\t\tfor (WebElement currentrow: totalrows) {\r\n//\r\n//\t\t\t\tList<WebElement> currentcolvals = currentrow.findElements(By.tagName(\"td\"));\r\n//\r\n//\t\t\t\tString text = currentcolvals.get(2).getText();\t\r\n//\t\t\t\tfor (int i = 0; i <totalrows.size(); i++) {\r\n//\t\t\t\t\tprogressvalues[i]=currentcolvals.get(1).getText();\r\n//\t\t\t\t\t\r\n//\t\t\t\t}\r\n//\t\t\t\tArrays.sort(progressvalues);\r\n//\t\t\t\t\r\n//\t\t\t\tfor(int j = 0;j<currentcolvals.size();j++)\r\n//\t\t\t\t{\r\n//\t\t\t\t\tString columntxtvalue = currentcolvals.get(j).getText();\r\n//\t\t\t\t\tif(columntxtvalue.equalsIgnoreCase(progressvalues[0]))\r\n//\t\t\t\t\t{\r\n//\t\t\t\t\t\tSystem.out.println(currentcolvals.get(2).isEnabled());\r\n//\t\t\t\t\t}\r\n//\t\t\t\t}\r\n\t\t\r\n\t WebElement progres = driver.findElementByXPath(\"//tr[i]//td[i]\");\r\n\t String interaction = progres.getText();\r\n\t\tString regex = null;\r\n\t\tString replacement = null;\r\n\t\tString replaceAll = interaction.replaceAll(regex, replacement);\r\n\t System.out.println(replaceAll);\r\n\t\t\t}", "@Test\n public void testCase() throws InterruptedException {\n driver.findElement(By.xpath(\"//android.widget.EditText[@text='Username']\")).sendKeys(\"company\");\n driver.findElement(By.xpath(\"//android.widget.EditText[@resource-id='com.experitest.ExperiBank:id/passwordTextField']\")).sendKeys(\"company\");\n driver.findElement(By.xpath(\"//android.widget.Button[@text='Login']\")).click();\n \n //Navigate to Make Payment screen\n driver.findElement(By.xpath(\"//android.widget.Button[@text='Make Payment']\")).click();\n \n //Enter payment data\n driver.findElement(By.xpath(\"//android.widget.EditText[@text='Phone']\")).sendKeys(\"0112345678\");\n driver.findElement(By.xpath(\"//android.widget.EditText[@text='Name']\")).sendKeys(\"John\");\n driver.findElement(By.xpath(\"//android.widget.EditText[@text='Amount']\")).sendKeys(\"2\");\n driver.findElement(By.xpath(\"//android.widget.Button[@text='Select']\")).click();\n \n //Scroll to the correct country\n driver.scrollTo(\"Spain\");\n driver.findElement(By.xpath(\"//android.widget.TextView[@text='Spain']\")).click();\n \n //Send Payment\n driver.findElement(By.xpath(\"//android.widget.Button[@text='Send Payment']\")).click();\n \n //Confirm\n driver.findElement(By.xpath(\"//android.widget.Button[@text='Yes']\")).click();\n }", "public static void main(String[] args) throws InterruptedException {\n\n System.setProperty(\"webdriver.chrome.driver\",\n \"C:\\\\Users\\\\ANUMANTHU\\\\Desktop\\\\Selenium Learning\\\\chromedriver.exe\");\n\n WebDriver driver = new ChromeDriver();\n driver.get(\"https://www.spicejet.com/\");\n\n driver.manage().window().maximize();\n\n driver.manage().timeouts().pageLoadTimeout(5, TimeUnit.SECONDS);\n driver.manage().timeouts().implicitlyWait(5, TimeUnit.SECONDS);\n\n Actions ac = new Actions(driver);\n ac.moveToElement(driver.findElement(By.xpath(\"//span[@class='burger-bread']\"))).build().perform();\n\n // ul[@id='menu-list-addons']//a\n\n Thread.sleep(3000);\n\n List<WebElement> ele = driver.findElements(By.xpath(\"//ul[@id='menu-list-addons']//a\"));\n\n int count = ele.size();\n\n for (int i = 0; i < count; i++) {\n if (ele.get(i).getText().contains(\"Travel Info\")) {\n ac.moveToElement(ele.get(i)).build().perform();\n\n Thread.sleep(3000);\n\n for (int j = 0; j < count; j++) {\n if (ele.get(j).getText().contains(\"FAQ\")) {\n // ac.moveToElement(ele.get(j)).build().perform();\n // ac.doubleClick(ele.get(j)).build().perform();\n // We can do below as well both movement and click as shown below\n\n ac.moveToElement(ele.get(j)).doubleClick().build().perform();\n\n break;\n\n }\n\n }\n break;\n\n }\n\n }\n\n }", "@Test(priority = 7)\n @Parameters(\"browser\")\n public void TC07_VERIFY_LINK_TAOTK(String browser) throws IOException {\n String excel_Link_TaoTK = null;\n excel_Link_TaoTK = global.Read_Data_From_Excel(excelPath,\"ELEMENTS\",6,2);\n if(excel_Link_TaoTK == null){\n System.out.println(\"ERROR - Cell or Row No. is wrong.\");\n exTest.log(LogStatus.ERROR, \"ERROR - Cell or Row No. is wrong.\" );\n }\n // Locate element by Xpath\n WebElement ele_Link_TaoTK = null;\n ele_Link_TaoTK = global.Find_Element_By_XPath(driver,excel_Link_TaoTK);\n if(ele_Link_TaoTK == null){\n exTest.log(LogStatus.FAIL,\"::[\" + browser + \"]:: TC07 - Link Tao Tai Khoan is not displayed.\");\n } else {\n exTest.log(LogStatus.PASS,\"::[\" + browser + \"]:: TC07 - Link Tao Tai Khoan is displayed.\");\n }\n // Get text from Element.\n String textTaoTK = \"Tạo tài khoản\";\n String textGetFromEle_LinkTaoTK = ele_Link_TaoTK.getText();\n System.out.println(\"DEBUG --- \" + textGetFromEle_LinkTaoTK);\n if(textGetFromEle_LinkTaoTK != null && textGetFromEle_LinkTaoTK.equalsIgnoreCase(textTaoTK)){\n exTest.log(LogStatus.PASS,\"::[\" + browser + \"]:: TC07.1 - Link Tao Tai Khoan is correct.\");\n } else {\n exTest.log(LogStatus.FAIL,\"::[\" + browser + \"]:: TC07.1 - Link Tao Tai Khoan is not correct.\");\n }\n global.Wait_For_Page_Loading(3);\n }", "@Test(dataProviderClass = DataProviderUtils.class, dataProvider = \"excelDataReader\",testName=\"Test_42213\",description=\"Check if automatic login credentials field is enabled/disabled while enable and disabled the Automatic login checkbox\")\r\n\tpublic void Test_42213(HashMap<String,String> dataValues,String currentDriver,ITestContext context) throws Exception {\r\n\r\n\t\t//Variable Declaration\r\n\t\tWebDriver driver= null;\r\n\t\t\r\n\t\tConcurrentHashMap <String, String> testData=new ConcurrentHashMap <String, String>(dataValues);\r\n\t\tLoginPage loginPage=null;\r\n\t\tConfigurationPage configPage = null;\r\n\r\n\t\ttry {\r\n\r\n\t\t\t//Step-1: Launch configuration page\r\n\t\t\t//---------------------------------\r\n\t\t\tdriver = WebDriverUtils.getDriver(currentDriver,2);\r\n\t\t\tdriver.get(configSite);\r\n\t\t\tloginPage=new LoginPage(driver);//Instantiate Login page\r\n\t\t\tloginPage.loginToConfigurationUI(userName,password);//login with admin credentials\r\n\r\n\t\t\tLog.message(\"1. Logged in to the Configuration page with admin credentials.\", driver);\r\n\r\n\t\t\t//Verify if Login failed\r\n\t\t\tif (!loginPage.getErrorMessage().isEmpty())//Verify if error message is displayed\r\n\t\t\t\tthrow new Exception(\"Unable to login to Configuration Page, with Error :\"+loginPage.getErrorMessage());\r\n\r\n\t\t\t//Step-2: Navigated to the General page in Web Access Configuration.\r\n\t\t\t//-------------------------------------------------------------------\r\n\t\t\tconfigPage = new ConfigurationPage(driver);\r\n\t\t\tconfigPage.clickTreeViewItem(testData.get(\"GeneralSettings\")); //Selects General in the tree view of configuration page\r\n\r\n\t\t\tLog.message(\"2. Navigated to the General settings in Web Access Configuration.\", driver);\r\n\r\n\t\t\t//Step-3 : Set the automatic login credentials\r\n\t\t\t//--------------------------------------------\r\n\t\t\tconfigPage.configurationPanel.setDefaultAuthType(testData.get(\"AuthenticationType\")+\" user\");//Sets the default authentication type as Windows/M-Files user\r\n\r\n\t\t\tconfigPage.configurationPanel.setAutoLogin(true);//Select the auto login in configuration page\r\n\r\n\t\t\tLog.message(\"3. Automatic login is enabled for \"+testData.get(\"AuthenticationType\")+\" authentication type in the configuration page.\", driver);\r\n\r\n\t\t\t//Verification: Check corresponding fields are enabled or not based on the Authentication type\r\n\t\t\t//--------------------------------------------------------------------------------------------\r\n\t\t\tString result = \"\";\r\n\r\n\t\t\tif (testData.get(\"AuthenticationType\").contains(\"Windows\"))\r\n\t\t\t{\r\n\r\n\t\t\t\tif (!configPage.configurationPanel.isAutoLoginUserNameEnabled())\r\n\t\t\t\t\tresult = \" User name field is not enabled for windows user automatic login;\";\r\n\r\n\t\t\t\tif (!configPage.configurationPanel.isAutoLoginPasswordEnabled())\r\n\t\t\t\t\tresult += \" Password field is not enabled for windows user automatic login;\";\r\n\r\n\t\t\t\tif (!configPage.configurationPanel.isAutoLoginDomainEnabled())\r\n\t\t\t\t\tresult += \" Domain name field is not enabled for windows user automatic login;\";\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\tif (!configPage.configurationPanel.isAutoLoginUserNameEnabled())\r\n\t\t\t\t\tresult = \" User name field is not enabled for M-Files user automatic login;\";\r\n\r\n\t\t\t\tif (!configPage.configurationPanel.isAutoLoginPasswordEnabled())\r\n\t\t\t\t\tresult += \" Password field is not enabled for M-Files user automatic login;\";\r\n\r\n\t\t\t\tif (configPage.configurationPanel.isAutoLoginDomainEnabled())\r\n\t\t\t\t\tresult += \" Domain name field is enabled for M-Files user automatic login;\";\r\n\t\t\t}\r\n\r\n\t\t\tif(result.equals(\"\"))\r\n\t\t\t\tLog.pass(\"Test case passed. While enable Automatic login for \"+testData.get(\"AuthenticationType\")+\" user, UserName/DomainName/Password fields are enabled as expected\", driver);\r\n\t\t\telse\r\n\t\t\t\tLog.fail(\"Test case failed. While enable Automatic login for \"+testData.get(\"AuthenticationType\")+\" user, UserName/DomainName/Password fields are not enabled as expected. [Additional Info.: \"+ result +\"]\", driver);\r\n\r\n\r\n\t\t}//End try\r\n\t\tcatch (Exception e) {\r\n\t\t\tLog.exception(e, driver);\r\n\t\t} //End catch\r\n\t\tfinally {\r\n\t\t\tUtility.quitDriver(driver);\r\n\t\t} //End Finally\r\n\t}", "@Test(dataProviderClass = DataProviderUtils.class, dataProvider = \"excelDataReader\", groups = {\"Sprint36\", \"Breadcrumb\"}, \r\n\t\t\tdescription = \"Check the view path displayed in the breadcrumb .\")\r\n\tpublic void SprintTest36_1_7B(HashMap<String,String> dataValues, String driverType) throws Exception {\r\n\r\n\t\tdriver = null; \r\n\t\tLoginPage loginPage = null;\r\n\t\tConfigurationPage configurationPage = null;\r\n\t\tConfigurationPanel configSettingsPanel = null;\r\n\r\n\t\ttry {\r\n\r\n\r\n\r\n\r\n\t\t\tdriver = WebDriverUtils.getDriver();\r\n\r\n\t\t\tConcurrentHashMap <String, String> dataPool = new ConcurrentHashMap <String, String>(dataValues);\r\n\r\n\t\t\t//1. Login to Configuration\r\n\t\t\t//--------------------------\r\n\t\t\tdriver.get(configURL);\r\n\r\n\t\t\tloginPage = new LoginPage(driver);\r\n\t\t\tconfigurationPage = loginPage.loginToConfigurationUI(userName, password);\r\n\r\n\t\t\tLog.message(\"1. Logged in to Configuiration\");\r\n\r\n\t\t\t//2. Click the Vault folder \r\n\t\t\t//--------------------------\r\n\t\t\tconfigurationPage.treeView.clickTreeViewItem(\"Vault-specific settings>>\" + testVault);\r\n\r\n\t\t\tLog.message(\"2. Clicked the Vault folder.\");\r\n\r\n\t\t\t//4. Check the Prevent Navigation check box\r\n\t\t\t//------------------------------------------\r\n\t\t\tconfigSettingsPanel = new ConfigurationPanel(driver);\r\n\t\t\tconfigSettingsPanel.setPreventNavigation(true);\r\n\r\n\r\n\t\t\tLog.message(\"4. Checked the Prevent Navigation check box.\");\r\n\r\n\t\t\t//5. Save the changes\r\n\t\t\t//--------------------\r\n\t\t\tif (!configurationPage.configurationPanel.saveSettings())\r\n\t\t\t\tthrow new Exception(\"Configuration settings are not saved.\");\r\n\r\n\t\t\tconfigurationPage.logOut();\r\n\r\n\t\t\tLog.message(\"5. Saved the changes.\");\r\n\r\n\t\t\t//6. Login to the Test vault\r\n\t\t\t//---------------------------\r\n\t\t\tdriver.get(loginURL);\r\n\t\t\tHomePage homePage = loginPage.loginToWebApplication(userName, password, testVault);\r\n\r\n\t\t\tLog.message(\"6. Login to the Test Vault.\");\r\n\r\n\t\t\t//7. Navigate to the specified view\r\n\t\t\t//----------------------------------\r\n\t\t\thomePage.listView.navigateThroughView(dataPool.get(\"View\"));\r\n\r\n\t\t\tLog.message(\"7. Navigate to the specified view\");\r\n\r\n\t\t\t//8. Click the Parent view in the breadcrumb\r\n\t\t\t//--------------------------------------------\r\n\t\t\tif(!homePage.menuBar.clickBreadcrumbItem(dataPool.get(\"ParentView\")))\r\n\t\t\t\tthrow new Exception(\"Unable to click the Parent View in the breadcrumb.\");\r\n\r\n\r\n\t\t\tLog.message(\"8. Clicked the Parent view in the breadcrumb.\");\r\n\r\n\t\t\t//Verification: To verify if navigated to the parent view\r\n\t\t\t//--------------------------------------------------------\r\n\t\t\tif(driver.getCurrentUrl().endsWith(dataPool.get(\"ViewID\")))\r\n\t\t\t\tthrow new Exception(\"Navigation to parent view through breadcrumb failed.\");\r\n\r\n\t\t\tif(!homePage.menuBar.GetBreadCrumbItem().equals(testVault+\">\"+dataPool.get(\"ExpectedPath\")))\r\n\t\t\t\tthrow new Exception(\"The Expected Breadcrumb text was not displayed after navigating to the parent view.\");\r\n\r\n\t\t\tif(homePage.listView.isItemExists(dataPool.get(\"ChildView\")))\r\n\t\t\t\tLog.pass(\"Test case Passed. Navigation to parent view through breadcrumb was successful.\"); \r\n\t\t\telse\r\n\t\t\t\tLog.fail(\"Test Case Failed. Navigation to parent view through breadcrumb was not successful.\", driver);\r\n\r\n\r\n\t\t} //End try\r\n\r\n\t\tcatch(Exception e) \t{\r\n\t\t\tLog.exception(e, driver);\r\n\t\t} //End catch\r\n\r\n\t\tfinally {\r\n\r\n\t\t\tif(driver != null){\r\n\t\t\t\ttry\r\n\t\t\t\t{\r\n\t\t\t\t\tdriver.get(configURL);\r\n\r\n\t\t\t\t\tconfigurationPage = new ConfigurationPage(driver);\r\n\t\t\t\t\tconfigurationPage.treeView.clickTreeViewItem(\"Vault-specific settings>>\" + testVault);\r\n\r\n\t\t\t\t\tconfigSettingsPanel.setPreventNavigation(false);\r\n\r\n\t\t\t\t\tif (!configurationPage.configurationPanel.saveSettings())\r\n\t\t\t\t\t\tthrow new Exception(\"Configuration settings are not saved.\");\r\n\t\t\t\t}\r\n\t\t\t\tcatch(Exception e0)\r\n\t\t\t\t{\r\n\t\t\t\t\tLog.exception(e0, driver);\r\n\t\t\t\t}\r\n\r\n\t\t\t}\r\n\t\t\tUtility.quitDriver(driver);\r\n\t\t} //End finally\r\n\r\n\t}", "@Test\n\tpublic void verifyAbletoEditandUpdatetheAd() throws Exception{\n\t\tCreateStockTradusProPage createStockObj = new CreateStockTradusProPage(driver);\n\t\tAllStockTradusPROPage AllStockPage= new AllStockTradusPROPage(driver);\n\t\tLoginTradusPROPage loginPage = new LoginTradusPROPage(driver);\n\t\tloginPage.setAccountEmailAndPassword(userName, pwd);\n\t\tjsClick(driver, loginPage.LoginButton);\n\t\texplicitWaitFortheElementTobeVisible(driver, AllStockPage.myStockOptioninSiderBar);\n\t\tjsClick(driver, AllStockPage.myStockOptioninSiderBar);\n\t\texplicitWaitFortheElementTobeVisible(driver, AllStockPage.allMyStockOptioninSiderBar);\n\t\tjsClick(driver, AllStockPage.allMyStockOptioninSiderBar);\n\t\texplicitWaitFortheElementTobeVisible(driver, AllStockPage.MyStockText);\n\t\texplicitWaitFortheElementTobeVisible(driver, AllStockPage.firstStockVerificationElement);\n\t\tjsClick(driver, AllStockPage.editButtonforMANtires);\n\t\texplicitWaitFortheElementTobeVisible(driver, createStockObj.postingFormVerificationElement);\n\t\twaitTill(3000);\n\t\tscrollToElement(driver, createStockObj.vehicleVersionFieldPostingForm);\n\t\twaitTill(7000);\n\t\tclick(createStockObj.fuelTypeinPosting);\n\t\tclick(createStockObj.fuelTypeDropdownvalues\n\t\t\t\t.get(dynamicSelect(createStockObj.fuelTypeDropdownvalues)));\n\t\twaitTill(1000);\n\t\tscrollToElement(driver, createStockObj.conditioninPostingForm);\n\t\twaitTill(4000);\n\t\tclick(createStockObj.conditioninPostingForm);\n\t\tclick(createStockObj.conditionDropdownvalues\n\t\t\t\t.get(dynamicSelect(createStockObj.conditionDropdownvalues)));\n\t\twaitTill(1000);\n\t\tscrollToElement(driver, createStockObj.constructionYearAreainPostingForm);\n\t\twaitTill(3000);\n\t\tsendKeys(createStockObj.constructionYearAreainPostingForm,generateRandomNumber(2015,2021));\n\t\tsendKeys(createStockObj.sellerReferenceAreainPostingForm,generateRandomNumber(369258,369300));\n\t\tsendKeys(createStockObj.VINAreainPostingForm,generateRandomNumber(21144567,21144600));\n\t\twaitTill(3000);\n\t\tList<String> actualInputs=new ArrayList<String>();\n\t\tactualInputs.add(getAttribute(createStockObj.constructionYearAreainPostingForm,\"value\"));\n\t\tactualInputs.add(getAttribute(createStockObj.sellerReferenceAreainPostingForm,\"value\"));\n\t\tactualInputs.add(getAttribute(createStockObj.VINAreainPostingForm,\"value\"));\n\t\tactualInputs.add(getText(createStockObj.fuelTypeinPosting));\n\t\tactualInputs.add(getText(createStockObj.conditioninPostingForm));\n\t\twaitTill(2000);\n\t\tjsClick(driver,AllStockPage.saveButtoninPostingForm);\n\t\texplicitWaitFortheElementTobeVisible(driver, createStockObj.successToastInPostingForm);\n\t\tAssert.assertTrue(\n\t\t\t\tgetText(createStockObj.successToastInPostingForm).replace(\"\\n\", \", \").trim()\n\t\t\t\t\t\t.contains(\"Successful action, Your ad was posted.\"),\n\t\t\t\t\"Success message is not displayed while posting Ad with image and with all mandatory fields filled\");\n\t\tString pageURL=driver.getCurrentUrl();\n\t\tAssert.assertTrue(getCurrentUrl(driver).equals(pageURL)\n\t\t\t\t,\"Page is not navigating to All ads age after posting success\");\n\t\twaitTill(3000);\n\t\tString parentURL=driver.getCurrentUrl();\n\t\twhile(!verifyElementPresent(AllStockPage.tradusLinkforMANtires)) {\n\t\t\twaitTill(2000);\n\t\t\tdriver.navigate().refresh();\n\t\t}\n\t\tjsClick(driver,AllStockPage.tradusLinkforMANtires);\n\t\tswitchWindow(driver,parentURL);\n\t\texplicitWaitFortheElementTobeVisible(driver, AllStockPage.makeandModelonTradusADP);\n\t\twaitTill(3000);\n\t\tAssert.assertTrue(getText(AllStockPage.makeandModelonTradusADP).trim().equals(\"MAN MAN 18.324\"), \"Ad deatils for MAN MAN 18.324 ad is not displaying on Tradus\");\n\t\tWebElement[] updatedVal= {AllStockPage.makeYearonTradusADP,AllStockPage.sellerRefNoonTradusADP,AllStockPage.vinNumberonTradusADP};\n\t\tString[] attributeName= {\"MakeYear\",\"SellerRef\",\"VINNumber\"};\n\t\tfor(int i=0;i<updatedVal.length;i++) {\n\t\t\tAssert.assertTrue(getText(updatedVal[i]).trim().equals(actualInputs.get(i).trim()), \"\"+attributeName[i]+\" is not updated properly\");\n\t\t}\n\t\t\n\t}", "@Test(dataProviderClass = DataProviderUtils.class, dataProvider = \"excelDataReader\", groups = {\"Sprint36\", \"Breadcrumb\"}, \r\n\t\t\tdescription = \"Check the view path displayed in the breadcrumb.\")\r\n\tpublic void SprintTest36_1_11A(HashMap<String,String> dataValues, String driverType) throws Exception {\r\n\r\n\t\tdriver = null; \r\n\t\tLoginPage loginPage = null;\r\n\t\tConfigurationPage configurationPage = null;\r\n\t\tConfigurationPanel configSettingsPanel = null;\r\n\r\n\t\ttry {\r\n\r\n\r\n\r\n\r\n\t\t\tdriver = WebDriverUtils.getDriver();\r\n\r\n\t\t\tConcurrentHashMap <String, String> dataPool = new ConcurrentHashMap <String, String>(dataValues);\r\n\r\n\t\t\t//1. Login to Configuration\r\n\t\t\t//--------------------------\r\n\t\t\tdriver.get(configURL);\r\n\r\n\t\t\tloginPage = new LoginPage(driver);\r\n\t\t\tconfigurationPage = loginPage.loginToConfigurationUI(userName, password);\r\n\r\n\t\t\tLog.message(\"1. Logged in to Configuiration\");\r\n\r\n\t\t\t//2. Click the Vault folder \r\n\t\t\t//--------------------------\r\n\t\t\tconfigurationPage.treeView.clickTreeViewItem(\"Vault-specific settings>>\" + testVault);\r\n\r\n\r\n\t\t\tLog.message(\"2. Clicked the Vault folder.\");\r\n\r\n\t\t\t//3. Check the Prevent Navigation check box\r\n\t\t\t//------------------------------------------\r\n\t\t\tconfigSettingsPanel = new ConfigurationPanel(driver);\r\n\t\t\tconfigSettingsPanel.setLayout(dataPool.get(\"Layout\"));\r\n\r\n\t\t\tLog.message(\"3. Layout is selected\");\r\n\r\n\t\t\t//4. Save the changes\r\n\t\t\t//--------------------\r\n\t\t\tif (!configurationPage.configurationPanel.saveSettings())\r\n\t\t\t\tthrow new Exception(\"Configuration settings are not saved.\");\r\n\r\n\t\t\tconfigurationPage.logOut();\r\n\r\n\t\t\tLog.message(\"4. Saved the changes.\");\r\n\r\n\t\t\t//5. Login to the Test vault\r\n\t\t\t//---------------------------\r\n\t\t\tdriver.get(loginURL);\r\n\t\t\tHomePage homePage = loginPage.loginToWebApplication(userName, password, testVault);\r\n\r\n\t\t\tLog.message(\"5. Login to the Test Vault.\");\r\n\r\n\t\t\t//6. Navigate to the View\r\n\t\t\t//------------------------\r\n\t\t\thomePage.listView.navigateThroughView(dataPool.get(\"ExpectedPath\").replace(\">\", \">>\"));\r\n\r\n\t\t\tLog.message(\"6. Navigated to the View\");\r\n\r\n\t\t\t//Verification: To verify if the Breadcrumb shows the right path\r\n\t\t\t//---------------------------------------------------------------\r\n\t\t\tif(homePage.menuBar.GetBreadCrumbItem().equals(testVault+\">\"+dataPool.get(\"ExpectedPath\")) && driver.getCurrentUrl().endsWith(dataPool.get(\"ViewID\")))\r\n\t\t\t\tLog.pass(\"Test case Passed. The breadcrumb showed the right path when the layout was set as \" + dataPool.get(\"Layout\")); \r\n\t\t\telse\r\n\t\t\t\tLog.fail(\"Test Case Failed. The breadcrumb did not show the right path when the layout was set as \" + dataPool.get(\"Layout\"), driver);\r\n\r\n\r\n\t\t} //End try\r\n\r\n\t\tcatch(Exception e) \t{\r\n\t\t\tLog.exception(e, driver);\r\n\t\t} //End catch\r\n\r\n\t\tfinally {\r\n\t\t\tif(driver != null){\r\n\t\t\t\ttry\r\n\t\t\t\t{\r\n\t\t\t\t\tdriver.get(configURL);\r\n\r\n\t\t\t\t\tconfigurationPage = new ConfigurationPage(driver);\r\n\t\t\t\t\tconfigurationPage.treeView.clickTreeViewItem(\"Vault-specific settings>>\" + testVault);\r\n\r\n\t\t\t\t\tconfigSettingsPanel.setLayout(Caption.ConfigSettings.Config_Default.Value);\r\n\r\n\t\t\t\t\tif (!configurationPage.configurationPanel.saveSettings())\r\n\t\t\t\t\t\tthrow new Exception(\"Configuration settings are not saved.\");\r\n\t\t\t\t}\r\n\t\t\t\tcatch(Exception e0)\r\n\t\t\t\t{\r\n\t\t\t\t\tLog.exception(e0, driver);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tUtility.quitDriver(driver);\r\n\t\t} //End finally\r\n\r\n\t}", "@Test(priority = 4)\n\tpublic void select() throws InterruptedException {\n\t\tThread.sleep(800);\t\t\n\t\tWebElement click = driver.findElement(By.xpath(\"/html/body/div[1]/div[3]/div/div/div/div/ul/li[2]/a\"));\n\t\tclick.click();\n\t\tSystem.out.println(click.getText());\n\n\t\tWebElement item = driver.findElement(By.xpath(\"/html/body/div[2]/div/div/div/div/div/div/div[11]/div/div[2]/div/div/div[1]/div\"));\n\t\titem.click();\n\t\tThread.sleep(800);\n\t\t\n\t\tWebElement data = driver.findElement(By.xpath(\"/html/body/div[2]/div/div/div/div/div/div/div[12]/div/div/div[2]/div[2]\"));\n\t\tdata.click(); \n\t\tSystem.out.println(data.getText());\n\t\t\n\t\tThread.sleep(1000);\n\t\tWebElement expandsize = driver.findElement(By.id(\"headingOne265\"));\n\t\texpandsize.click();\n\t\n\t\tThread.sleep(2000);\n\t\tWebElement expandextra = driver.findElement(By.id(\"heading265\"));\n\t\texpandextra.click();\n\t\t\n\t\tThread.sleep(2000);\n\t\tWebElement closeitem = driver.findElement(By.xpath(\"/html/body/div[2]/div/div/div/div/div/div/div[12]/div/div/div[1]/button\"));\n\t\tcloseitem.click();\n\n\t\tJavascriptExecutor js = (JavascriptExecutor) driver;\n\t\tjs.executeScript(\"window.scrollBy(0,-800)\");\n\n\t\t// *********** changing the language of digital menu ***********\n\n\t\tWebElement restaurantlanguage = driver.findElement(By.xpath(\"/html/body/div[1]/div[1]/div/div/div/div[1]/a\"));\n\t\trestaurantlanguage.click();\n\t\tThread.sleep(800);\n\t\tclosedialog();\n\t\tThread.sleep(1000);\n\t\tjs.executeScript(\"window.scrollBy(0,1500)\");\n\n\t\t// *********** downloading the App ***********\n\n/**\t\tThread.sleep(800);\n\t\tWebElement downloadapp = driver.findElement(By.xpath(\"/html/body/div[3]/div[1]/div/section/div/div[4]/a[2]/img\"));\n\t\tdownloadapp.click();\n**/\n\n\t}", "@Test(dataProviderClass = DataProviderUtils.class, dataProvider = \"excelDataReader\", groups = { \"Sprint54\", \"Get Hyperlink\"}, \r\n\t\t\tdescription = \"No Java applet and no task area layout will be displayed for hyperlink url on selecting No Java applet and no task area layout in configuration and default in hyperlink dialog - Operations menu.\")\r\n\tpublic void SprintTest54_1_30_4A_1B(HashMap<String,String> dataValues, String driverType) throws Exception {\r\n\r\n\t\tdriver = null; \r\n\r\n\t\ttry {\r\n\r\n\r\n\r\n\r\n\r\n\t\t\tdriver = WebDriverUtils.getDriver();\r\n\r\n\r\n\t\t\tConcurrentHashMap <String, String> dataPool = new ConcurrentHashMap <String, String>(dataValues);\r\n\t\t\tConfigurationPage configurationPage = LoginPage.launchDriverAndLoginToConfig(driver, true); //Launched driver and logged in\r\n\r\n\t\t\t//Step-1 : Navigate to Vault in tree view\r\n\t\t\t//---------------------------------------\r\n\t\t\tconfigurationPage.treeView.clickTreeViewItem(Caption.ConfigSettings.VaultSpecificSettings.Value + \">>\" + testVault); //Clicks tree view item\r\n\r\n\r\n\t\t\tif (!configurationPage.configurationPanel.getPageName().toUpperCase().equalsIgnoreCase(testVault.toUpperCase())) //Checks if navigated to vault settings page\r\n\t\t\t\tthrow new Exception(\"Vault settings page in configuration is not opened.\");\r\n\r\n\t\t\tLog.message(\"1. Navigated to Vault settings page.\");\r\n\r\n\t\t\t//Step-2 : Select No Java applet and No task area layout layout and save the settings\r\n\t\t\t//--------------------------------------------------------------------\r\n\t\t\tconfigurationPage.configurationPanel.setJavaApplet(Caption.ConfigSettings.Config_Disable.Value);\r\n\r\n\t\t\tif(configurationPage.configurationPanel.isJavaAppletEnabled())\r\n\t\t\t\tthrow new Exception(\"Java applet is enabled\");\r\n\r\n\t\t\tconfigurationPage.configurationPanel.setLayout(Caption.ConfigSettings.Config_NoTaskArea.Value);\r\n\r\n\t\t\tif (!configurationPage.configurationPanel.saveSettings()) //Save the settings\r\n\t\t\t\tthrow new Exception(\"Configuration settings are not saved after changing its layout.\");\r\n\r\n\t\t\tLog.message(\"1. No java applet and no task area layout is selected and saved.\");\r\n\r\n\t\t\tif (!configurationPage.logOut()) //Logs out from configuration page\r\n\t\t\t\tthrow new Exception(\"Log out is not successful after saving the settings in configuration page.\");\r\n\r\n\t\t\tLog.message(\"2. No Java applet and no task area layout is selected and settings are saved in configuration page & log out from the configuration page.\");\r\n\r\n\t\t\t//Step-3 : Login to the default page and navigate to any view\r\n\t\t\t//--------------------------------------------------------------------------\r\n\t\t\tHomePage homePage = LoginPage.launchDriverAndLogin(driver, false); //Launches and logs into the default page\r\n\r\n\t\t\tString viewToNavigate = SearchPanel.searchOrNavigatetoView(driver, dataPool.get(\"NavigateToView\"), dataPool.get(\"ObjectName\"));\r\n\r\n\t\t\tLog.message(\"3. Logged into the default page and navigated to '\" + viewToNavigate + \"' view.\");\r\n\r\n\t\t\t//Step-4 : Open Get Hyperlink dialog for the object from operations menu\r\n\t\t\t//-----------------------------------------------------------------------\r\n\t\t\tif (!homePage.listView.clickItem(dataPool.get(\"ObjectName\"))) //Selects the Object in the list\r\n\t\t\t\tthrow new Exception(\"Object (\" + dataPool.get(\"ObjectName\") + \") is not got selected.\");\r\n\r\n\t\t\thomePage.menuBar.ClickOperationsMenu(Caption.MenuItems.GetMFilesWebURL.Value); //Selects Get Hyperlink from operations menu\r\n\r\n\t\t\tMFilesDialog mfilesDialog = new MFilesDialog(driver); //Instantiating MFilesDialog wrapper class\r\n\r\n\t\t\tif (!mfilesDialog.isGetMFilesWebURLDialogOpened()) //Checks for MFiles dialog title\r\n\t\t\t\tthrow new Exception(\"M-Files dialog with 'Get Hyperlink' title is not opened.\");\r\n\r\n\t\t\tLog.message(\"4. Hyperlink dialog of an object (\" + dataPool.get(\"ObjectName\") + \") is opened through operations menu.\");\r\n\r\n\t\t\t//Step-5 : Copy the link from text box and close the Get Hyperlink dialog\r\n\t\t\t//-----------------------------------------------------------------------\r\n\t\t\tString hyperlinkText = mfilesDialog.getHyperlink(); //Gets the hyperlink\r\n\t\t\tmfilesDialog.close(); //Closes the Get Hyperlink dialog\r\n\r\n\t\t\tLog.message(\"5. Hyperlink is copied and Get Hyperlink dialog is closed.\");\r\n\r\n\t\t\t//Step-6 : Open the copied Hyperlink in the browser\r\n\t\t\t//-------------------------------------------------\r\n\t\t\thomePage = Utility.navigateToPage(driver, hyperlinkText, userName, password, \"\"); //Navigates to the hyperlink url\r\n\r\n\r\n\t\t\tif (!driver.getCurrentUrl().equalsIgnoreCase(hyperlinkText))\r\n\t\t\t\tthrow new Exception (\"Browser is not opened with copied object Hyperlink.[Expected URL: \"+hyperlinkText+\" & Current URL : \"+ driver.getCurrentUrl() +\"]\");\r\n\r\n\t\t\tLog.message(\"6. Object Hyperlink is opened in the browser.\");\r\n\r\n\t\t\t//Verification : Verify if default layout is displayed\r\n\t\t\t//----------------------------------------------------\r\n\t\t\tString unAvailableLayouts = \"\";\r\n\r\n\t\t\tif (!homePage.isSearchbarPresent()) //Checks if Search bar present\r\n\t\t\t\tunAvailableLayouts = \"Search Bar is not available;\";\r\n\r\n\t\t\tif (homePage.isTaskPaneDisplayed()) //Checks if Task Pane present\r\n\t\t\t\tunAvailableLayouts = unAvailableLayouts + \"Task Pane is available;\";\r\n\r\n\t\t\tif (!homePage.previewPane.isTabExists(Caption.PreviewPane.MetadataTab.Value))\r\n\t\t\t\tunAvailableLayouts = unAvailableLayouts + \"Properties Pane is not available;\";\r\n\r\n\t\t\tif (!homePage.menuBar.isMenuInMenubarDisplayed()) //Checks if Menu Bar present\r\n\t\t\t\tunAvailableLayouts = unAvailableLayouts + \"Menu Bar is not available;\";\r\n\r\n\t\t\tif (!homePage.menuBar.isBreadCrumbDisplayed()) //Checks if Breadcrumb present\r\n\t\t\t\tunAvailableLayouts = unAvailableLayouts + \"Breadcrumb is not available;\";\r\n\r\n\t\t\tif (homePage.taskPanel.isAppletEnabled())\r\n\t\t\t\tunAvailableLayouts = unAvailableLayouts + \"Java Applet is available;\";\r\n\r\n\t\t\tif (!homePage.isListViewDisplayed())\r\n\t\t\t\tunAvailableLayouts = unAvailableLayouts + \"List View is not available;\";\r\n\r\n\t\t\tif (homePage.isTreeViewDisplayed())\r\n\t\t\t\tunAvailableLayouts = unAvailableLayouts + \"Tree View is available;\";\r\n\r\n\t\t\tif (unAvailableLayouts.equals(\"\")) //Verifies default layout have selected default custom layout\r\n\t\t\t\tLog.pass(\"Test case Passed. Hyperlink URL page is displayed as No java applet and No task area layout.\");\r\n\t\t\telse\r\n\t\t\t\tLog.fail(\"Test case Failed. Few layots are not as expected on selecting No java applet and No task area layout.\"\r\n\t\t\t\t\t\t+ unAvailableLayouts, driver);\r\n\t\t}\r\n\t\tcatch (Exception e) {\r\n\t\t\tLog.exception(e, driver);\r\n\t\t} //End catch\r\n\r\n\t\tfinally {\r\n\r\n\t\t\tif(driver != null){\r\n\t\t\t\ttry\r\n\t\t\t\t{\r\n\t\t\t\t\tdriver.get(configURL);\r\n\r\n\t\t\t\t\tConfigurationPage configurationPage = new ConfigurationPage(driver);\r\n\t\t\t\t\tconfigurationPage.treeView.clickTreeViewItem(Caption.ConfigSettings.VaultSpecificSettings.Value + \">>\" + testVault); //Clicks tree view item\r\n\r\n\t\t\t\t\tconfigurationPage.configurationPanel.setLayout(Caption.ConfigSettings.Config_Default.Value);\r\n\r\n\t\t\t\t\tif (!configurationPage.configurationPanel.saveSettings())\r\n\t\t\t\t\t\tthrow new Exception(\"Configuration settings are not saved.\");\r\n\t\t\t\t}\r\n\t\t\t\tcatch(Exception e0)\r\n\t\t\t\t{\r\n\t\t\t\t\tLog.exception(e0, driver);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tUtility.quitDriver(driver);\r\n\r\n\t\t} //End finally\r\n\r\n\t}", "@Test(dataProviderClass = DataProviderUtils.class, dataProvider = \"excelDataReader\", groups = { \"Sprint54\", \"Get Hyperlink\", \"SKIP_JavaApplet\"}, \r\n\t\t\tdescription = \"Default layout will be displayed for hyperlink url on selecting default layout in configuration and in hyperlink dialog - Context menu.\")\r\n\tpublic void SprintTest54_1_30_1A_1A(HashMap<String,String> dataValues, String driverType) throws Exception {\r\n\r\n\t\tdriver = null; \r\n\r\n\t\ttry {\r\n\r\n\r\n\r\n\t\t\tdriver = WebDriverUtils.getDriver();\r\n\r\n\t\t\tConcurrentHashMap <String, String> dataPool = new ConcurrentHashMap <String, String>(dataValues);\r\n\t\t\tHomePage homePage = LoginPage.launchDriverAndLogin(driver, true);\r\n\r\n\t\t\tConfigurationPage configurationPage = LoginPage.launchDriverAndLoginToConfig(driver, true); //Launched driver and logged in\r\n\r\n\t\t\t//Step-1 : Navigate to Vault in tree view\r\n\t\t\t//-----------------------------------------\r\n\t\t\tconfigurationPage.treeView.clickTreeViewItem(Caption.ConfigSettings.VaultSpecificSettings.Value + \">>\" + testVault); //Clicks tree view item\r\n\r\n\r\n\t\t\tif (!configurationPage.configurationPanel.getPageName().toUpperCase().equalsIgnoreCase(testVault.toUpperCase())) //Checks if navigated to vault settings page\r\n\t\t\t\tthrow new Exception(\"Vault settings page in configuration is not opened.\");\r\n\r\n\t\t\tLog.message(\"1. Navigated to Vault settings page.\");\r\n\r\n\t\t\t//Step-2 : Select Default layout and save the settings\r\n\t\t\t//----------------------------------------------------\r\n\t\t\tconfigurationPage.configurationPanel.setLayout(Caption.ConfigSettings.Config_Default.Value); //Sets as default layout\r\n\r\n\t\t\tconfigurationPage.configurationPanel.setJavaApplet(Caption.ConfigSettings.Config_Enable.Value);\r\n\r\n\r\n\t\t\tif (!configurationPage.configurationPanel.getLayout().equalsIgnoreCase(Caption.ConfigSettings.Config_Default.Value)) //Verifies if default layout is selected\r\n\t\t\t\tthrow new Exception(\"Default layout is not selected.\");\r\n\r\n\t\t\tif (!configurationPage.configurationPanel.saveSettings()) //Saves the settings\r\n\t\t\t\tthrow new Exception(\"Settings are not saved properly.\");\r\n\r\n\t\t\tif (!configurationPage.logOut()) //Logs out from configuration page\r\n\t\t\t\tthrow new Exception(\"Log out is not successful after saving the settings in configuration page.\");\r\n\r\n\t\t\tLog.message(\"2. Default layout is selected and settings are saved.\");\r\n\r\n\t\t\t//Step-3 : Login to the default page and navigate to any view\r\n\t\t\t//--------------------------------------------------------------------------\r\n\t\t\thomePage = LoginPage.launchDriverAndLogin(driver, false); //Launches and logs into the default page\r\n\r\n\t\t\tString viewToNavigate = SearchPanel.searchOrNavigatetoView(driver, dataPool.get(\"NavigateToView\"), dataPool.get(\"ObjectName\"));\r\n\r\n\t\t\tLog.message(\"3. Logged into the default page and navigated to '\" + viewToNavigate + \"' view.\");\r\n\r\n\t\t\t//Step-4 : Open Get Hyperlink dialog for the object from context menu\r\n\t\t\t//-------------------------------------------------------------------\r\n\t\t\tif (!homePage.listView.rightClickItem(dataPool.get(\"ObjectName\"))) //Selects the Object in the list\r\n\t\t\t\tthrow new Exception(\"Object (\" + dataPool.get(\"ObjectName\") + \") is not got selected.\");\r\n\r\n\t\t\thomePage.listView.clickContextMenuItem(Caption.MenuItems.GetMFilesWebURL.Value); //Selects Get Hyperlink from context menu\r\n\r\n\t\t\tMFilesDialog mfilesDialog = new MFilesDialog(driver); //Instantiating MFilesDialog wrapper class\r\n\r\n\t\t\tif (!mfilesDialog.isGetMFilesWebURLDialogOpened()) //Checks for MFiles dialog title\r\n\t\t\t\tthrow new Exception(\"M-Files dialog with 'Get Hyperlink' title is not opened.\");\r\n\r\n\t\t\tLog.message(\"4. Hyperlink dialog of an object (\" + dataPool.get(\"ObjectName\") + \") is opened through context menu.\");\r\n\r\n\t\t\t//Step-5 : Copy the link from text box and close the Get Hyperlink dialog\r\n\t\t\t//-----------------------------------------------------------------------\r\n\t\t\tString hyperlinkText = mfilesDialog.getHyperlink(); //Gets the hyperlink\r\n\t\t\tmfilesDialog.close(); //Closes the Get Hyperlink dialog\r\n\r\n\t\t\tLog.message(\"5. Hyperlink is copied and Get Hyperlink dialog is closed.\");\r\n\r\n\t\t\t//Step-6 : Open the copied Hyperlink in the browser\r\n\t\t\t//-------------------------------------------------\r\n\t\t\thomePage = Utility.navigateToPage(driver, hyperlinkText, userName, password, \"\"); //Navigates to the hyperlink url\r\n\r\n\t\t\tif (!driver.getCurrentUrl().equalsIgnoreCase(hyperlinkText))\r\n\t\t\t\tthrow new Exception (\"Browser is not opened with copied object Hyperlink.[Expected URL: \"+hyperlinkText+\" & Current URL : \"+ driver.getCurrentUrl() +\"]\");\r\n\r\n\t\t\tLog.message(\"6. Object Hyperlink is opened in the browser.\");\r\n\r\n\t\t\t//Verification : Verify if default layout is displayed\r\n\t\t\t//----------------------------------------------------\r\n\t\t\tString unAvailableLayouts = \"\";\r\n\r\n\t\t\tif (!homePage.isSearchbarPresent()) //Checks if Search bar present\r\n\t\t\t\tunAvailableLayouts = \"Search Bar\";\r\n\r\n\t\t\tif (!homePage.isTaskPaneDisplayed()) //Checks if Task Pane present\r\n\t\t\t\tunAvailableLayouts = unAvailableLayouts + \"Task Pane;\";\r\n\r\n\t\t\tif (!homePage.previewPane.isTabExists(Caption.PreviewPane.MetadataTab.Value))\r\n\t\t\t\tunAvailableLayouts = unAvailableLayouts + \"Properties Pane;\";\r\n\r\n\t\t\tif (!homePage.menuBar.isMenuInMenubarDisplayed()) //Checks if Menu Bar present\r\n\t\t\t\tunAvailableLayouts = unAvailableLayouts + \"Menu Bar;\";\r\n\r\n\t\t\tif (!homePage.menuBar.isBreadCrumbDisplayed()) //Checks if Breadcrumb present\r\n\t\t\t\tunAvailableLayouts = unAvailableLayouts + \"Breadcrumb;\";\r\n\r\n\t\t\tif (!homePage.taskPanel.isAppletEnabled())\r\n\t\t\t\tunAvailableLayouts = unAvailableLayouts + \"Java Applet;\";\r\n\r\n\t\t\tif (!homePage.isListViewDisplayed())\r\n\t\t\t\tunAvailableLayouts = unAvailableLayouts + \"Metadatacard;\";\r\n\r\n\t\t\tif (unAvailableLayouts.equals(\"\")) //Verifies default layout have selected default custom layout\r\n\t\t\t\tLog.pass(\"Test case Passed. Hyperlink URL page is displayed as Default layout.\");\r\n\t\t\telse\r\n\t\t\t\tLog.fail(\"Test case Failed. Few layots are missing on selecting 'Default' custom layout. Missed layots : \" \r\n\t\t\t\t\t\t+ unAvailableLayouts, driver);\r\n\r\n\t\t}\r\n\t\tcatch (Exception e) {\r\n\t\t\tLog.exception(e, driver);\r\n\t\t} //End catch\r\n\r\n\t\tfinally {\r\n\t\t\tUtility.quitDriver(driver);\r\n\t\t} //End finally\r\n\r\n\t}", "@Test(dataProviderClass = DataProviderUtils.class, dataProvider = \"excelDataReader\", groups = {\"Sprint16-2015\", \"Password\"}, \r\n\t\t\tdescription = \"Verify Vault/Logout link is displayed in task pane while selecting Show in configuration page for Vault option.\")\r\n\tpublic void SprintTest162015_18_1B(HashMap<String,String> dataValues, String driverType) throws Exception {\r\n\r\n\t\tdriver = null; \r\n\t\tString menuItem = null;\r\n\t\tString prevCommand = null;\r\n\t\tConfigurationPage configurationPage = null;\r\n\r\n\t\ttry {\r\n\r\n\r\n\r\n\t\t\tdriver = WebDriverUtils.getDriver();\r\n\r\n\t\t\tConcurrentHashMap <String, String> dataPool = new ConcurrentHashMap <String, String>(dataValues);\r\n\r\n\r\n\t\t\t//1. Click the Task area link \r\n\t\t\t//----------------------------\r\n\t\t\tconfigurationPage = LoginPage.launchDriverAndLoginToConfig(driver, true); //Launched driver and logged in\r\n\t\t\tconfigurationPage.treeView.clickTreeViewItem(Caption.ConfigSettings.VaultSpecificSettings.Value + \">>\" + testVault + \">>\" + Caption.ConfigSettings.Config_TaskArea.Value);\r\n\r\n\r\n\t\t\tLog.message(\"1. Navigated to task specific settings\");\r\n\r\n\t\t\t//2. Hide \"Vault\" shortcut in task area\r\n\r\n\t\t\tmenuItem = dataPool.get(\"MenuItem\");\r\n\r\n\r\n\t\t\tprevCommand = configurationPage.configurationPanel.getVaultCommands(menuItem);\r\n\t\t\tconfigurationPage.configurationPanel.setVaultCommands(menuItem,\"Show\");\r\n\r\n\t\t\tif (!configurationPage.configurationPanel.saveSettings())\r\n\t\t\t\tthrow new Exception(\"Configuration settings are not saved.\");\r\n\r\n\t\t\tLog.message(\"2. Vault option is hided from task area and settings are saved in configuration page\");\r\n\r\n\t\t\t//3. Logging out from configuration page and lauch the default webpage\r\n\r\n\t\t\tconfigurationPage.logOut();\r\n\r\n\t\t\tLoginPage loginPage = new LoginPage(driver);\r\n\t\t\tHomePage homePage = loginPage.loginToWebApplication(userName, password, testVault);\r\n\r\n\r\n\t\t\tLog.message(\"3. Logged out from configuration page and Default webpage is launched\");\r\n\r\n\t\t\t//Verification: To verify if Vault option is not displayed in the task pane\r\n\t\t\t//------------------------------------------------------------------------\r\n\t\t\tboolean result = homePage.taskPanel.isItemExists(dataPool.get(\"MenuItem\"));\r\n\r\n\t\t\tString passMsg = \"Test case Passed. The Task Panel item \" + dataPool.get(\"MenuItem\") + \" is displayed while selecting show in configuration page.\";\r\n\r\n\t\t\tif(dataPool.get(\"MenuItem\").contains(\"Vaults\") && result == false)\r\n\t\t\t{\r\n\t\t\t\tresult = true;\r\n\t\t\t\tpassMsg = \"Test case Passed. The Task Panel item \" + dataPool.get(\"MenuItem\") + \" is not displayed when user account exist in single vault, even though show selected in the configuration page.\";\r\n\t\t\t}\r\n\r\n\t\t\tif(result)\r\n\t\t\t\tLog.pass(passMsg, driver);\r\n\t\t\telse\r\n\t\t\t\tLog.fail(\"Test Case Failed. The Task Panel item \" + dataPool.get(\"MenuItem\") + \" is not displayed while selecting show in configuration page.\", driver);\r\n\r\n\t\t}//End Try\r\n\t\tcatch (Exception e) {\r\n\t\t\tLog.exception(e, driver);\r\n\t\t} //End catch\r\n\r\n\t\tfinally {\r\n\t\t\tif (driver != null)\r\n\t\t\t{\r\n\t\t\t\ttry\r\n\t\t\t\t{\r\n\t\t\t\t\tconfigurationPage.configurationPanel.resetVaultCommands(menuItem, prevCommand, testVault);\r\n\t\t\t\t}\r\n\t\t\t\tcatch(Exception e0)\r\n\t\t\t\t{\r\n\t\t\t\t\tLog.exception(e0, driver);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tUtility.quitDriver(driver);\r\n\r\n\t\t}//End Finally\r\n\r\n\t}", "@Test\n public void booksArrangedInAscendingOrderAtoZ() throws InterruptedException {\n\n //WebElement Books Link\n clickOnElement(By.xpath(\"//ul[@class='top-menu notmobile']//li[5]/a\"));\n\n //WebElement Position dropdown box\n selectByIndexFromDropDown(By.cssSelector(\"select#products-orderby\"),1);\n sleepMethod(2000);\n\n //Scroll down page\n windowScrollUpOrDown(0,500);\n sleepMethod(2000);\n\n arrayListForEachLoopAssertEqualsForString(By.xpath(\"//div[@class='product-grid']//h2/a\"));\n\n }", "@Test\n public void resaleClientMatch() throws UiObjectNotFoundException {\n device.findObject(new UiSelector().resourceId(Utils.PACKAGE_NAME_PREFIX + \"btn_create_post\")).click();\n device.findObject(new UiSelector().resourceId(Utils.PACKAGE_NAME_PREFIX + \"lbl_resale_client\")).click();\n device.findObject(new UiSelector().resourceId(Utils.PACKAGE_NAME_PREFIX + \"txt_name\")\n .childSelector(new UiSelector().className(Utils.EDIT_TEXT_CLASS))).setText(\"Icon Windsor Resale\");\n device.findObject(new UiSelector().resourceId(Utils.PACKAGE_NAME_PREFIX + \"dd_configuration\")).click();\n device.findObject(By.text(\"2 BHK\")).click();\n clickButton(device);\n device.findObject(new UiSelector().resourceId(Utils.PACKAGE_NAME_PREFIX + \"txt_pricing\")\n .childSelector(new UiSelector().index(1))).click();\n device.findObject(By.text(\"7\")).click();\n device.findObject(By.text(\"5\")).click();\n device.findObject(By.text(\"0\")).click();\n device.findObject(By.text(\"0\")).click();\n device.findObject(By.text(\"0\")).click();\n device.findObject(By.text(\"0\")).click();\n device.findObject(By.text(\"0\")).click();\n clickButton(device);\n device.wait(Until.findObject(By.text(\"Min Carpet Area\")), 2000);\n device.findObject(new UiSelector().resourceId(Utils.PACKAGE_NAME_PREFIX + \"txt_carpet_area\")\n .childSelector(new UiSelector().className(Utils.EDIT_TEXT_CLASS))).setText(\"880\");\n device.findObject(new UiSelector().resourceId(Utils.PACKAGE_NAME_PREFIX + \"dd_floor\")).click();\n device.findObject(By.text(\"Mid\")).click();\n clickButton(device);\n device.wait(Until.findObject(By.text(\"Min Parking\")), 2000);\n device.findObject(By.text(\"4\")).click();\n UiScrollable postView = new UiScrollable(new UiSelector().scrollable(true));\n UiSelector postSelector = new UiSelector().text(\"POST\");\n postView.scrollIntoView(postSelector);\n device.findObject(By.text(\"ADD BUILDING\")).click();\n device.findObject(new UiSelector().resourceId(Utils.PACKAGE_NAME_PREFIX + \"input_search\")).setText(\"Icon\");\n device.wait(Until.findObject(By.text(\"Icon Windsor Apartments\")), 10000);\n device.findObject(By.text(\"Icon Windsor Apartments\")).click();\n clickButton(device);\n postView.scrollIntoView(postSelector);\n device.findObject(postSelector).click();\n device.wait(Until.findObject(By.text(\"POST\").enabled(true)), 10000);\n String matchNameString = device.findObject(By.textContains(\"matches\")).getText().split(\" \")[0];\n device.findObject(By.text(\"POST\")).click();\n device.wait(Until.findObject(By.text(\"RESALE CLIENT\")), 9000);\n Assert.assertNotEquals(\"Test Case Failed...No Match found\", \"no\", matchNameString.toLowerCase());\n String postMatchName = device.findObject(new UiSelector().resourceId(Utils.PACKAGE_NAME_PREFIX + \"lbl_name\")).getText();\n Assert.assertEquals(\"Test Case Failed...Match should have had been found with\", \"dialectic test\", postMatchName.toLowerCase());\n\n device.findObject(new UiSelector().resourceId(Utils.PACKAGE_NAME_PREFIX + \"btn_close\")).click();\n Utils.markPostExpired(device);\n }", "@Test(dataProviderClass = DataProviderUtils.class, dataProvider = \"excelDataReader\", groups = { \"Sprint54\", \"Get Hyperlink\", \"SKIP_JavaApplet\"}, \r\n\t\t\tdescription = \"Default layout with navigation pane will be displayed for hyperlink url on selecting Default layout with navigation pane layout in configuration and default in hyperlink dialog - Operations menu.\")\r\n\tpublic void SprintTest54_1_30_2A_1B(HashMap<String,String> dataValues, String driverType) throws Exception {\r\n\r\n\t\tdriver = null; \r\n\r\n\t\ttry {\r\n\r\n\r\n\r\n\t\t\tdriver = WebDriverUtils.getDriver();\r\n\r\n\t\t\tConcurrentHashMap <String, String> dataPool = new ConcurrentHashMap <String, String>(dataValues);\r\n\r\n\t\t\tConfigurationPage configurationPage = LoginPage.launchDriverAndLoginToConfig(driver, true); //Launched driver and logged in\r\n\r\n\t\t\t//Step-1 : Navigate to Vault in tree view\r\n\t\t\t//-----------------------------------------\r\n\t\t\tconfigurationPage.treeView.clickTreeViewItem(Caption.ConfigSettings.VaultSpecificSettings.Value + \">>\" + testVault); //Clicks tree view item\r\n\r\n\r\n\t\t\tif (!configurationPage.configurationPanel.getPageName().toUpperCase().equalsIgnoreCase(testVault.toUpperCase())) //Checks if navigated to vault settings page\r\n\t\t\t\tthrow new Exception(\"Vault settings page in configuration is not opened.\");\r\n\r\n\t\t\tLog.message(\"1. Navigated to Vault settings page.\");\r\n\r\n\t\t\t//Step-2 : Select Default and navigate pane layout and save the settings\r\n\t\t\t//--------------------------------------------------------------------\r\n\t\t\tconfigurationPage.configurationPanel.setLayout(Caption.ConfigSettings.Config_DefaultAndNavigation.Value); //Sets as Default and navigate pane layout\r\n\r\n\t\t\tif (!configurationPage.configurationPanel.getLayout().equalsIgnoreCase(Caption.ConfigSettings.Config_DefaultAndNavigation.Value)) //Verifies if Default and navigate pane layout is selected\r\n\t\t\t\tthrow new Exception(Caption.ConfigSettings.Config_DefaultAndNavigation.Value + \" layout is not selected.\");\r\n\r\n\t\t\tif (!configurationPage.configurationPanel.saveSettings()) //Saves the settings\r\n\t\t\t\tthrow new Exception(\"Settings are not saved properly.\");\r\n\r\n\t\t\tif (!configurationPage.logOut()) //Logs out from configuration page\r\n\t\t\t\tthrow new Exception(\"Log out is not successful after saving the settings in configuration page.\");\r\n\r\n\t\t\tLog.message(\"2. \" + Caption.ConfigSettings.Config_DefaultAndNavigation.Value + \" layout is selected and settings are saved.\");\r\n\r\n\t\t\t//Step-3 : Login to the default page and navigate to any view\r\n\t\t\t//--------------------------------------------------------------------------\r\n\t\t\tHomePage homePage = LoginPage.launchDriverAndLogin(driver, false); //Launches and logs into the default page\r\n\r\n\t\t\tString viewToNavigate = SearchPanel.searchOrNavigatetoView(driver, dataPool.get(\"NavigateToView\"), dataPool.get(\"ObjectName\"));\r\n\r\n\t\t\tLog.message(\"3. Logged into the default page and navigated to '\" + viewToNavigate + \"' view.\");\r\n\r\n\t\t\t//Step-4 : Open Get Hyperlink dialog for the object from operations menu\r\n\t\t\t//-----------------------------------------------------------------------\r\n\t\t\tif (!homePage.listView.clickItem(dataPool.get(\"ObjectName\"))) //Selects the Object in the list\r\n\t\t\t\tthrow new Exception(\"Object (\" + dataPool.get(\"ObjectName\") + \") is not got selected.\");\r\n\r\n\t\t\thomePage.menuBar.ClickOperationsMenu(Caption.MenuItems.GetMFilesWebURL.Value); //Selects Get Hyperlink from operations menu\r\n\r\n\t\t\tMFilesDialog mfilesDialog = new MFilesDialog(driver); //Instantiating MFilesDialog wrapper class\r\n\r\n\t\t\tif (!mfilesDialog.isGetMFilesWebURLDialogOpened()) //Checks for MFiles dialog title\r\n\t\t\t\tthrow new Exception(\"M-Files dialog with 'Get Hyperlink' title is not opened.\");\r\n\r\n\t\t\tLog.message(\"4. Hyperlink dialog of an object (\" + dataPool.get(\"ObjectName\") + \") is opened through operations menu.\");\r\n\r\n\t\t\t//Step-5 : Copy the link from text box and close the Get Hyperlink dialog\r\n\t\t\t//-----------------------------------------------------------------------\r\n\t\t\tString hyperlinkText = mfilesDialog.getHyperlink(); //Gets the hyperlink\r\n\t\t\tmfilesDialog.close(); //Closes the Get Hyperlink dialog\r\n\r\n\t\t\tLog.message(\"5. Hyperlink is copied and Get Hyperlink dialog is closed.\");\r\n\r\n\t\t\t//Step-6 : Open the copied Hyperlink in the browser\r\n\t\t\t//-------------------------------------------------\r\n\t\t\thomePage = Utility.navigateToPage(driver, hyperlinkText, userName, password, \"\"); //Navigates to the hyperlink url\r\n\r\n\t\t\tif (!driver.getCurrentUrl().equalsIgnoreCase(hyperlinkText))\r\n\t\t\t\tthrow new Exception (\"Browser is not opened with copied object Hyperlink.[Expected URL: \"+hyperlinkText+\" & Current URL : \"+ driver.getCurrentUrl() +\"]\");\r\n\r\n\t\t\tLog.message(\"6. Object Hyperlink is opened in the browser.\");\r\n\r\n\t\t\t//Verification : Verify if default layout is displayed\r\n\t\t\t//----------------------------------------------------\r\n\t\t\tString unAvailableLayouts = \"\";\r\n\r\n\t\t\tif (!homePage.isSearchbarPresent()) //Checks if Search bar present\r\n\t\t\t\tunAvailableLayouts = \"Search Bar\";\r\n\r\n\t\t\tif (!homePage.isTaskPaneDisplayed()) //Checks if Task Pane present\r\n\t\t\t\tunAvailableLayouts = unAvailableLayouts + \"Task Pane;\";\r\n\r\n\t\t\tif (!homePage.previewPane.isTabExists(Caption.PreviewPane.MetadataTab.Value))\r\n\t\t\t\tunAvailableLayouts = unAvailableLayouts + \"Properties Pane;\";\r\n\r\n\t\t\tif (!homePage.menuBar.isMenuInMenubarDisplayed()) //Checks if Menu Bar present\r\n\t\t\t\tunAvailableLayouts = unAvailableLayouts + \"Menu Bar;\";\r\n\r\n\t\t\tif (!homePage.menuBar.isBreadCrumbDisplayed()) //Checks if Breadcrumb present\r\n\t\t\t\tunAvailableLayouts = unAvailableLayouts + \"Breadcrumb;\";\r\n\r\n\t\t\tif (!homePage.taskPanel.isAppletEnabled())\r\n\t\t\t\tunAvailableLayouts = unAvailableLayouts + \"Java Applet;\";\r\n\r\n\t\t\tif (!homePage.isListViewDisplayed())\r\n\t\t\t\tunAvailableLayouts = unAvailableLayouts + \"Metadatacard;\";\r\n\r\n\t\t\tif (!homePage.isTreeViewDisplayed())\r\n\t\t\t\tunAvailableLayouts = unAvailableLayouts + \"Tree View;\";\r\n\r\n\t\t\tif(!homePage.isNavigationPaneDisplayed())\r\n\t\t\t\tunAvailableLayouts = unAvailableLayouts + \"Navigation Pane;\";\r\n\r\n\t\t\tif (unAvailableLayouts.equals(\"\")) //Verifies default layout have selected default custom layout\r\n\t\t\t\tLog.pass(\"Test case Passed. Hyperlink URL page is displayed as Default layout with Navigation pane.\");\r\n\t\t\telse\r\n\t\t\t\tLog.fail(\"Test case Failed. Few layots are missing on selecting 'Default layout and navigation pane' layout. Missed layots : \" \r\n\t\t\t\t\t\t+ unAvailableLayouts, driver);\r\n\r\n\t\t}\r\n\t\tcatch (Exception e) {\r\n\t\t\tLog.exception(e, driver);\r\n\t\t} //End catch\r\n\r\n\t\tfinally {\r\n\r\n\t\t\tif(driver != null){\r\n\t\t\t\ttry\r\n\t\t\t\t{\r\n\t\t\t\t\tdriver.get(configURL);\r\n\r\n\t\t\t\t\tConfigurationPage configurationPage = new ConfigurationPage(driver);\r\n\t\t\t\t\tconfigurationPage.treeView.clickTreeViewItem(Caption.ConfigSettings.VaultSpecificSettings.Value + \">>\" + testVault); //Clicks tree view item\r\n\r\n\t\t\t\t\tconfigurationPage.configurationPanel.setLayout(Caption.ConfigSettings.Config_Default.Value);\r\n\t\t\t\t\tconfigurationPage.configurationPanel.setJavaApplet(Caption.ConfigSettings.Config_Disable.Value);\r\n\r\n\t\t\t\t\tif (!configurationPage.configurationPanel.saveSettings())\r\n\t\t\t\t\t\tthrow new Exception(\"Configuration settings are not saved.\");\r\n\t\t\t\t}\r\n\t\t\t\tcatch(Exception e0)\r\n\t\t\t\t{\r\n\t\t\t\t\tLog.exception(e0, driver);\r\n\t\t\t\t}\r\n\r\n\t\t\t}\r\n\t\t\tUtility.quitDriver(driver);\r\n\r\n\t\t} //End finally\r\n\r\n\t}", "@Test\n public void testAdvancedSearchCategoryResult() throws InterruptedException {\n log.info(\"Go to Homepage \" );\n log.info(\"Click on Advanced Search link in footer \" );\n WebElement advancedSearchButton = driver.findElement(By.partialLinkText(\"Advanced Search\"));\n advancedSearchButton.click();\n WebElement searchCassette = driver.findElement(By.id(\"AdvancedSearchResults\")).findElement(By.tagName(\"input\"));\n WebElement searchButton = driver.findElement(By.id(\"AdvancedSearchResults\")).findElement(By.tagName(\"button\"));\n searchCassette.click();\n searchCassette.sendKeys(\"sculpture\");\n log.info(\"Click on search Button \" );\n searchButton.click();\n log.info(\"Identify the Category Card list in results\" );\n List<WebElement> productGrid = driver.findElements(By.tagName(\"a\"));\n List<WebElement> categoryItems = new ArrayList<WebElement>();\n for (WebElement prod : productGrid)\n if (prod.getAttribute(\"class\").contains(\"category-item\"))\n categoryItems.add(prod);\n TestCase.assertTrue(categoryItems.size() != 0);\n log.info(\"Click first Category Card in results\" );\n categoryItems.get(0).click();\n log.info(\"Confirm category type page is displayed in browser\" );\n TestCase.assertTrue(driver.getCurrentUrl().contains(\"-c-\"));\n }", "@Test(dataProviderClass = DataProviderUtils.class, dataProvider = \"excelDataReader\",groups = {\"Sprint41\"}, description = \"Enabling Automatic Login checkbox should enable user name, password, domain and document vault fields based on the default authentication type\")\r\n\tpublic void SprintTest41_8_1A(HashMap<String,String> dataValues, String driverType) throws Exception {\r\n\r\n\t\tdriver = null; \r\n\r\n\t\ttry {\r\n\r\n\r\n\r\n\r\n\t\t\tdriver = WebDriverUtils.getDriver();\r\n\r\n\t\t\tConcurrentHashMap <String, String> dataPool = new ConcurrentHashMap <String, String>(dataValues);\r\n\r\n\t\t\tConfigurationPage configurationPage = LoginPage.launchDriverAndLoginToConfig(driver, true); //Launched driver and logged in\r\n\r\n\t\t\t//Step-1 : Navigate to General in tree view\r\n\t\t\t//-----------------------------------------\r\n\t\t\tconfigurationPage.treeView.clickTreeViewItem(Caption.ConfigSettings.GeneralSettings.Value + \">>\" + Caption.ConfigSettings.General.Value);\r\n\r\n\r\n\t\t\tif (!configurationPage.configurationPanel.getPageName().toUpperCase().equalsIgnoreCase(\"GENERAL - GENERAL SETTINGS\"))\r\n\t\t\t\tthrow new Exception(\"General settings page in configuration is not opened.\");\r\n\r\n\t\t\tLog.message(\"1. Navigated to General page.\");\r\n\r\n\t\t\t//Step-2 : Enable Default authentication type \r\n\t\t\t//-------------------------------------------\r\n\r\n\t\t\tconfigurationPage.configurationPanel.setDefaultAuthType(dataPool.get(\"AuthenticationType\")); //Enable automatic login checkbox\r\n\r\n\t\t\tif (!configurationPage.configurationPanel.getDefaultAuthType().equals(dataPool.get(\"AuthenticationType\")))\r\n\t\t\t\tthrow new Exception(\"Default authentication type (\" + dataPool.get(\"AuthenticationType\") + \") check box is not enabled.\");\r\n\r\n\t\t\tLog.message(\"2. Default authentication type (\" + dataPool.get(\"AuthenticationType\") + \") check box is enabled.\");\r\n\r\n\t\t\t//Step-3 : Enable Automatic Login check box\r\n\t\t\t//-----------------------------------------\r\n\t\t\tconfigurationPage.configurationPanel.setAutoLogin(true); //Enable automatic login checkbox\r\n\r\n\t\t\tif (!configurationPage.configurationPanel.getAutoLogin())\r\n\t\t\t\tthrow new Exception(\"Automatic login check box is not enabled.\");\r\n\r\n\t\t\tLog.message(\"3. Automatic login check box is enabled.\");\r\n\r\n\t\t\t//Verification : Verify that User name, password, domain and vault fields are in enabled state based on the authentication type\r\n\t\t\t//-----------------------------------------------------------------------------------------------------------------------------\r\n\t\t\tString addlInfo = \"\";\r\n\t\t\tString passInfo = \"\";\r\n\r\n\t\t\tif (!configurationPage.configurationPanel.isAutoLoginUserNameEnabled()) //Checks if User name enabled\r\n\t\t\t\taddlInfo = \"Auto Login User Name is not enabled;\";\r\n\t\t\telse\r\n\t\t\t\tpassInfo = \"User name,\";\r\n\r\n\t\t\tif (!configurationPage.configurationPanel.isAutoLoginPasswordEnabled()) //Checks if User name enabled\r\n\t\t\t\taddlInfo += \"Auto Login Password is not enabled;\";\r\n\t\t\telse\r\n\t\t\t\tpassInfo += \" Password,\";\r\n\r\n\t\t\tif (configurationPage.configurationPanel.getDefaultAuthType().equalsIgnoreCase(\"Windows user\"))\r\n\t\t\t\tif (!configurationPage.configurationPanel.isAutoLoginDomainEnabled()) //Checks if User name enabled\r\n\t\t\t\t\taddlInfo += \"Auto Login Domain is not enabled;\";\r\n\t\t\t\telse\r\n\t\t\t\t\tpassInfo += \" Domain,\";\r\n\r\n\t\t\tif (!configurationPage.configurationPanel.isAutoLoginVaultEnabled()) //Checks if User name enabled\r\n\t\t\t\taddlInfo += \"Auto Login Vault is not enabled;\";\r\n\t\t\telse\r\n\t\t\t\tpassInfo += \" Select vault\";\r\n\r\n\t\t\tif (addlInfo.equals(\"\")) //Verifies default layout have selected default custom layout\r\n\t\t\t\tLog.pass(\"Test case Passed. Enabling auto login enabled (\" + passInfo + \") for the default authentication type (\" + dataPool.get(\"AuthenticationType\") + \").\");\r\n\t\t\telse\r\n\t\t\t\tLog.fail(\"Test case Failed. Enabling auto login is not as expected. Additional information : \" \r\n\t\t\t\t\t\t+ addlInfo, driver);\r\n\r\n\t\t}\r\n\t\tcatch (Exception e) {\r\n\t\t\tLog.exception(e, driver);\r\n\t\t} //End catch\r\n\r\n\t\tfinally {\r\n\t\t\tUtility.quitDriver(driver);\r\n\t\t} //End finally\r\n\r\n\t}", "@Test\r\n public void Test3() throws InterruptedException {\n driver.navigate().to(\"http://webstrar99.fulton.asu.edu/page2/\");\r\n driver.findElement(By.id(\"number1\")).sendKeys(\"10\");\r\n driver.findElement(By.id(\"number2\")).sendKeys(\"5\");\r\n driver.findElement(By.id(\"mul\")).click();\r\n driver.findElement(By.id(\"calc\")).click();\r\n Assert.assertEquals(\"50\", driver.findElement(By.id(\"res\")).getText());\r\n driver.quit();\r\n }", "@Then(\"scroll the page\")\n\tpublic void scroll_the_page() throws InterruptedException {\n\t\tThread.sleep(5000);\n\t\tJavaScriptUtils.scrollPageDown(context.DRIVER);\n\t\tcontext.SCN.write(\"js scroll is successfully\");\n\n\t}", "@Test\n public void testClickingOnStepLoadsCorrectStepDetails() {\n onView(ViewMatchers.withId(R.id.recipeRecyclerView))\n .perform(RecyclerViewActions.actionOnItemAtPosition(0,\n click()));\n\n //Click on a Step tab on Tab Layout\n onView(withText(\"Steps\")).perform(click());\n\n //Click on each of the item of steps recycle view and verify the detailed step description\n //this logic works for both phone and tablet\n for(int i=0;i<stepsOfNutellaPie.length;i++){\n\n onView(withId(R.id.stepRecyclerView)).perform(\n RecyclerViewActions.actionOnItemAtPosition(i,click()));\n\n //do below only for phone - landscape\n if(!phone_landscape){\n onView(withId(R.id.description))\n .check(matches(withStepDetailedDescription(detailedStepsOfNutellaPie[i])));\n }\n\n //do below only for phones and not tablet\n if(phone_landscape || phone_portrait){\n //go back to previous screen\n Espresso.pressBack();\n }\n }\n\n\n }", "@Test\n\tpublic void TestAct9() {\n\t\tdriver.findElement(By.xpath(\"//li[5]/a\")).click();\n\t\tdriver.findElement(By.xpath(\"//div/section[2]/div[2]/div[2]/div[2]/div[2]/a\")).click();\n\t\tdriver.findElement(By.id(\"user_login\")).sendKeys(\"root\");\n\t\tdriver.findElement(By.id(\"user_pass\")).sendKeys(\"pa$$w0rd\");\n\t\tdriver.findElement(By.id(\"wp-submit\")).click();\n\n\t\t//Viewing the course for Activity 9\n\t\tdriver.findElement(By.xpath(\"//li[2]/a\")).click();\n\t\tdriver.findElement(By.xpath(\"//div[2]/p[2]/a\")).click();\n\t\tdriver.findElement(By.xpath(\"//div[1]/a/div[2]\")).click();\n\n\t\tString t = driver.getTitle();\n\t\tAssert.assertEquals(\"Developing Strategy – Alchemy LMS\", t);\n\n\t\tWebElement s = driver.findElement(By.xpath(\"//div[4]/div[2]\"));\n\t\tString a = s.getText();\n\t\tBoolean c = a.contains(\"Mark Completed\");\n\n\t\tif (c==true)\n\t\t{\n\t\t\ts.click();\n\t\t\tSystem.out.println(\"Found \"+a+\", hence clicking on it.\");\n\t\t} \n\t\telse {\n\t\t\tSystem.out.println(\"Found \"+a+\", hence not clicking on it.\");}\n\t}", "public static WebElement check_imgPAEnhancedEntranceIsChanged(Read_XLS xls, String sheetName, int rowNum, \r\n \t\tList<Boolean> testFail) throws Exception{\r\n \ttry{\r\n \t\tWebDriverWait waits = new WebDriverWait(driver, 15);\r\n \t\twaits.until(ExpectedConditions.visibilityOfElementLocated(By.cssSelector(\".paIco_check\")));\r\n \t\t\r\n \t//\tBoolean isImgBeforeClickedExists = driver.findElement(By.cssSelector(\".paIco\")).isDisplayed();\r\n \t\tBoolean isPAEnhanceEntranceImgChanged = driver.findElement(By.cssSelector(\".paIco_check\")).isDisplayed();\r\n \t//\tAdd_Log.info(\"Is image 'Update me on new products' exists ::\" + isImgBeforeClickedExists);\r\n \t\tAdd_Log.info(\"Is image 'View latest products' exists ::\" + isPAEnhanceEntranceImgChanged);\r\n \t\t\r\n \t//\tif(isImgBeforeClickedExists == false && isPAEnhanceEntranceImgChanged == true){\r\n \t\tif(isPAEnhanceEntranceImgChanged == true){\r\n \t\t\tAdd_Log.info(\"The PA Enhanced Entrance image is changed.\");\r\n \t\t\tSuiteUtility.WriteResultUtility(\r\n \t\t\t\t\txls, sheetName, Constant.COL_PA_ENHANCED_ENTRANCE_IMG_CHANGED, rowNum, Constant.KEYWORD_PASS);\r\n \t\t}else{\r\n \t\t\tAdd_Log.info(\"The PA Enhanced Entrance image is NOT changed.\");\r\n \t\t\tSuiteUtility.WriteResultUtility(\r\n \t\t\t\t\txls, sheetName, Constant.COL_PA_ENHANCED_ENTRANCE_IMG_CHANGED, rowNum, Constant.KEYWORD_FAIL);\r\n \t\t\ttestFail.set(0, true);\r\n \t\t}\r\n \t}catch(Exception e){\r\n \t\tAdd_Log.error(\"The PA Enhanced Entrance image is NOT found on the page.\");\r\n \t\t// Get the list of window handles\r\n \t\tArrayList<String> tabs = new ArrayList<String> (driver.getWindowHandles());\r\n \t\tAdd_Log.info(\"Print number of window opened ::\" + tabs.size());\r\n\r\n \t\tthrow(e);\r\n \t}\r\n \treturn element;\r\n }", "@Test(dataProviderClass = DataProviderUtils.class, dataProvider = \"excelDataReader\", groups = {\"Sprint36\", \"Breadcrumb\"}, \r\n\t\t\tdescription = \"Navigation to Parent View through TaskPanel ['Prevent navigation outside of the default view' - Checked, Other View(ID)].\")\r\n\tpublic void SprintTest36_1_12F(HashMap<String,String> dataValues, String driverType) throws Exception {\r\n\r\n\t\tdriver = null; \r\n\t\tLoginPage loginPage = null;\r\n\t\tConfigurationPage configurationPage = null;\r\n\t\tConfigurationPanel configSettingsPanel = null;\r\n\r\n\t\ttry {\r\n\r\n\r\n\r\n\t\t\tdriver = WebDriverUtils.getDriver();\r\n\r\n\t\t\tConcurrentHashMap <String, String> dataPool = new ConcurrentHashMap <String, String>(dataValues);\r\n\r\n\t\t\t//1. Login to Configuration\r\n\t\t\t//--------------------------\r\n\t\t\tdriver.get(configURL);\r\n\r\n\t\t\tloginPage = new LoginPage(driver);\r\n\t\t\tconfigurationPage = loginPage.loginToConfigurationUI(userName, password);\r\n\r\n\t\t\tLog.message(\"1. Logged in to Configuiration\");\r\n\r\n\t\t\t//2. Click the Vault folder \r\n\t\t\t//--------------------------\r\n\t\t\tconfigurationPage.treeView.clickTreeViewItem(\"Vault-specific settings>>\" + testVault);\r\n\r\n\r\n\t\t\tLog.message(\"2. Clicked the Vault folder.\");\r\n\r\n\t\t\t//3. Select the Default View\r\n\t\t\t//------------------------------\r\n\r\n\t\t\tconfigSettingsPanel = new ConfigurationPanel(driver);\r\n\t\t\tconfigSettingsPanel.setDefaultView(dataPool.get(\"ViewID\"));\r\n\r\n\t\t\tLog.message(\"3. Selected the Default View.\");\r\n\r\n\t\t\t//4. Check the Prevent Navigation check box\r\n\t\t\t//------------------------------------------\r\n\t\t\tconfigSettingsPanel.setPreventNavigation(true);\r\n\r\n\t\t\tLog.message(\"4. Checked the Prevent Navigation check box.\");\r\n\r\n\t\t\t//5. Save the changes\r\n\t\t\t//--------------------\r\n\t\t\tif (!configurationPage.configurationPanel.saveSettings())\r\n\t\t\t\tthrow new Exception(\"Configuration settings are not saved.\");\r\n\r\n\t\t\tconfigurationPage.logOut();\r\n\r\n\t\t\tLog.message(\"5. Saved the changes.\");\r\n\r\n\t\t\t//6. Login to the Vault\r\n\t\t\t//----------------------\r\n\t\t\tdriver.get(loginURL);\r\n\t\t\tHomePage homePage = loginPage.loginToWebApplication(userName, password, testVault);\r\n\r\n\t\t\tLog.message(\"6. logged in to the vault.\");\r\n\r\n\t\t\t//7. Navigate to Home View using the Task Panel\r\n\t\t\t//--------------------------------------------\r\n\t\t\tString expectedURL = driver.getCurrentUrl();\r\n\t\t\thomePage.taskPanel.clickItem(Caption.MenuItems.Home.Value);\r\n\r\n\t\t\tLog.message(\"7. Navigated to Home View using the Task Panel\");\r\n\r\n\t\t\t//Verification: To verify if the Breadcrumb show the right path to the default view\r\n\t\t\t//----------------------------------------------------------------------------------\r\n\t\t\tif(expectedURL.equals(driver.getCurrentUrl()) && driver.getCurrentUrl().endsWith(dataPool.get(\"ViewID\")))\r\n\t\t\t\tLog.pass(\"Test case Passed. Navigation to previous view was not possible as expected.\"); \r\n\t\t\telse\r\n\t\t\t\tLog.fail(\"Test Case Failed. The URL showed '\" + driver.getCurrentUrl() + \"' instead of '\" + expectedURL + \"'\", driver);\r\n\r\n\r\n\t\t} //End try\r\n\r\n\t\tcatch(Exception e) \t{\r\n\t\t\tLog.exception(e, driver);\r\n\t\t} //End catch\r\n\r\n\t\tfinally {\r\n\t\t\tif(driver != null){\r\n\t\t\t\ttry\r\n\t\t\t\t{\r\n\t\t\t\t\tdriver.get(configURL);\r\n\r\n\t\t\t\t\tconfigurationPage = new ConfigurationPage(driver);\r\n\t\t\t\t\tconfigurationPage.treeView.clickTreeViewItem(\"Vault-specific settings>>\" + testVault);\r\n\r\n\t\t\t\t\tconfigSettingsPanel.setDefaultView(Caption.MenuItems.Home.Value);\r\n\t\t\t\t\tconfigSettingsPanel.setPreventNavigation(false);\r\n\r\n\t\t\t\t\tif (!configurationPage.configurationPanel.saveSettings())\r\n\t\t\t\t\t\tthrow new Exception(\"Configuration settings are not saved.\");\r\n\t\t\t\t}\r\n\t\t\t\tcatch(Exception e0)\r\n\t\t\t\t{\r\n\t\t\t\t\tLog.exception(e0, driver);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tUtility.quitDriver(driver);\r\n\t\t} //End finally\r\n\r\n\t}", "@Test(dataProviderClass = DataProviderUtils.class, dataProvider = \"excelDataReader\", groups = { \"Sprint54\", \"Get Hyperlink\"}, \r\n\t\t\tdescription = \"No Java applet layout will be displayed for hyperlink url on selecting No Java applet in configuration and default in hyperlink dialog - Operations menu.\")\r\n\tpublic void SprintTest54_1_30_3A_1B(HashMap<String,String> dataValues, String driverType) throws Exception {\r\n\r\n\t\tdriver = null; \r\n\r\n\t\ttry {\r\n\r\n\r\n\r\n\r\n\t\t\tdriver = WebDriverUtils.getDriver();\r\n\r\n\r\n\t\t\tConcurrentHashMap <String, String> dataPool = new ConcurrentHashMap <String, String>(dataValues);\r\n\t\t\tConfigurationPage configurationPage = LoginPage.launchDriverAndLoginToConfig(driver, true); //Launched driver and logged in\r\n\r\n\t\t\t//Step-1 : Navigate to Vault in tree view\r\n\t\t\t//-----------------------------------------\r\n\t\t\tconfigurationPage.treeView.clickTreeViewItem(Caption.ConfigSettings.VaultSpecificSettings.Value + \">>\" + testVault); //Clicks tree view item\r\n\r\n\r\n\t\t\tif (!configurationPage.configurationPanel.getPageName().toUpperCase().equalsIgnoreCase(testVault.toUpperCase())) //Checks if navigated to vault settings page\r\n\t\t\t\tthrow new Exception(\"Vault settings page in configuration is not opened.\");\r\n\r\n\t\t\tLog.message(\"1. Navigated to Vault settings page.\");\r\n\r\n\t\t\t//Step-2 : Select No Java applet layout layout and save the settings\r\n\t\t\t//--------------------------------------------------------------------\r\n\t\t\tconfigurationPage.configurationPanel.setJavaApplet(Caption.ConfigSettings.Config_Disable.Value);//Disabled the java applet in configuration page\r\n\r\n\t\t\tif(configurationPage.configurationPanel.isJavaAppletEnabled())//Verify if java applet is disabled or not\r\n\t\t\t\tthrow new Exception(\"Java applet is enabled.\");\r\n\r\n\t\t\tif (!configurationPage.configurationPanel.saveSettings()) //Save the settings in configuration page\r\n\t\t\t\tthrow new Exception(\"Configuration settings are not saved after changing its layout.\");\r\n\r\n\t\t\tLog.message(\"1. Java applet is disabled and Configuration settings are saved.\");\r\n\r\n\t\t\tif (!configurationPage.logOut()) //Logs out from configuration page\r\n\t\t\t\tthrow new Exception(\"Log out is not successful after saving the settings in configuration page.\");\r\n\r\n\t\t\tLog.message(\"2. No java applet layout is selected and settings are saved.\");\r\n\r\n\t\t\t//Step-3 : Login to the default page and navigate to any view\r\n\t\t\t//--------------------------------------------------------------------------\r\n\t\t\tHomePage homePage = LoginPage.launchDriverAndLogin(driver, false); //Launches and logs into the default page\r\n\r\n\t\t\tString viewToNavigate = SearchPanel.searchOrNavigatetoView(driver, dataPool.get(\"NavigateToView\"), dataPool.get(\"ObjectName\"));\r\n\r\n\t\t\tLog.message(\"3. Logged into the default page and navigated to '\" + viewToNavigate + \"' view.\");\r\n\r\n\t\t\t//Step-4 : Open Get Hyperlink dialog for the object from operations menu\r\n\t\t\t//-----------------------------------------------------------------------\r\n\t\t\tif (!homePage.listView.clickItem(dataPool.get(\"ObjectName\"))) //Selects the Object in the list\r\n\t\t\t\tthrow new Exception(\"Object (\" + dataPool.get(\"ObjectName\") + \") is not got selected.\");\r\n\r\n\t\t\thomePage.menuBar.ClickOperationsMenu(Caption.MenuItems.GetMFilesWebURL.Value); //Selects Get Hyperlink from operations menu\r\n\r\n\t\t\tMFilesDialog mfilesDialog = new MFilesDialog(driver); //Instantiating MFilesDialog wrapper class\r\n\r\n\t\t\tif (!mfilesDialog.isGetMFilesWebURLDialogOpened()) //Checks for MFiles dialog title\r\n\t\t\t\tthrow new Exception(\"M-Files dialog with 'Get Hyperlink' title is not opened.\");\r\n\r\n\t\t\tLog.message(\"4. Hyperlink dialog of an object (\" + dataPool.get(\"ObjectName\") + \") is opened through operations menu.\");\r\n\r\n\t\t\t//Step-5 : Copy the link from text box and close the Get Hyperlink dialog\r\n\t\t\t//-----------------------------------------------------------------------\r\n\t\t\tString hyperlinkText = mfilesDialog.getHyperlink(); //Gets the hyperlink\r\n\t\t\tmfilesDialog.close(); //Closes the Get Hyperlink dialog\r\n\r\n\t\t\tLog.message(\"5. Hyperlink is copied and Get Hyperlink dialog is closed.\");\r\n\r\n\t\t\t//Step-6 : Open the copied Hyperlink in the browser\r\n\t\t\t//-------------------------------------------------\r\n\t\t\thomePage = Utility.navigateToPage(driver, hyperlinkText, userName, password, \"\"); //Navigates to the hyperlink url\r\n\r\n\r\n\t\t\tif (!driver.getCurrentUrl().equalsIgnoreCase(hyperlinkText))\r\n\t\t\t\tthrow new Exception (\"Browser is not opened with copied object Hyperlink.[Expected URL: \"+hyperlinkText+\" & Current URL : \"+ driver.getCurrentUrl() +\"]\");\r\n\r\n\t\t\tLog.message(\"6. Object Hyperlink is opened in the browser.\");\r\n\r\n\t\t\t//Verification : Verify if default layout is displayed\r\n\t\t\t//----------------------------------------------------\r\n\t\t\tString unAvailableLayouts = \"\";\r\n\r\n\t\t\tif (!homePage.isSearchbarPresent()) //Checks if Search bar present\r\n\t\t\t\tunAvailableLayouts = \"Search Bar is not available;\";\r\n\r\n\t\t\tif (!homePage.isTaskPaneDisplayed()) //Checks if Task Pane present\r\n\t\t\t\tunAvailableLayouts = unAvailableLayouts + \"Task Pane is not available;\";\r\n\r\n\t\t\tif (!homePage.previewPane.isTabExists(Caption.PreviewPane.MetadataTab.Value))\r\n\t\t\t\tunAvailableLayouts = unAvailableLayouts + \"Properties Pane is not available;\";\r\n\r\n\t\t\tif (!homePage.menuBar.isMenuInMenubarDisplayed()) //Checks if Menu Bar present\r\n\t\t\t\tunAvailableLayouts = unAvailableLayouts + \"Menu Bar is not available;\";\r\n\r\n\t\t\tif (!homePage.menuBar.isBreadCrumbDisplayed()) //Checks if Breadcrumb present\r\n\t\t\t\tunAvailableLayouts = unAvailableLayouts + \"Breadcrumb is not available;\";\r\n\r\n\t\t\tif (homePage.taskPanel.isAppletEnabled())\r\n\t\t\t\tunAvailableLayouts = unAvailableLayouts + \"Java Applet is available;\";\r\n\r\n\t\t\tif (!homePage.isListViewDisplayed())\r\n\t\t\t\tunAvailableLayouts = unAvailableLayouts + \"List View is not available;\";\r\n\r\n\t\t\tif (homePage.isTreeViewDisplayed())\r\n\t\t\t\tunAvailableLayouts = unAvailableLayouts + \"Tree View is available;\";\r\n\r\n\t\t\tif (unAvailableLayouts.equals(\"\")) //Verifies default layout have selected default custom layout\r\n\t\t\t\tLog.pass(\"Test case Passed. Hyperlink URL page is displayed as No Java Applet layout.\");\r\n\t\t\telse\r\n\t\t\t\tLog.fail(\"Test case Failed. Few layots are not as expected on selecting 'No Java Applet layout'. Refer additional information : \" \r\n\t\t\t\t\t\t+ unAvailableLayouts, driver);\r\n\r\n\t\t}\r\n\t\tcatch (Exception e) {\r\n\t\t\tLog.exception(e, driver);\r\n\t\t} //End catch\r\n\r\n\t\tfinally {\r\n\r\n\t\t\tif(driver != null){\r\n\t\t\t\ttry\r\n\t\t\t\t{\r\n\t\t\t\t\tdriver.get(configURL);\r\n\r\n\t\t\t\t\tConfigurationPage configurationPage = new ConfigurationPage(driver);\r\n\t\t\t\t\tconfigurationPage.treeView.clickTreeViewItem(Caption.ConfigSettings.VaultSpecificSettings.Value + \">>\" + testVault); //Clicks tree view item\r\n\r\n\t\t\t\t\tconfigurationPage.configurationPanel.setLayout(Caption.ConfigSettings.Config_Default.Value);\r\n\r\n\t\t\t\t\tif (!configurationPage.configurationPanel.saveSettings())\r\n\t\t\t\t\t\tthrow new Exception(\"Configuration settings are not saved.\");\r\n\t\t\t\t}\r\n\t\t\t\tcatch(Exception e0)\r\n\t\t\t\t{\r\n\t\t\t\t\tLog.exception(e0, driver);\r\n\t\t\t\t}\r\n\r\n\t\t\t}\r\n\t\t\tUtility.quitDriver(driver);\r\n\r\n\t\t} //End finally\r\n\r\n\t}", "public String ExcelRetrieve(int row,int col){\r\n\t\t//String username = getValue(Email);\r\n\t//\tString password = getValue(Password);\r\n\t\t\r\n\r\n\t//\tclass Local {};\r\n\t\t/*Reporter.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 should be clicked and user should get logged in\");*/\r\n\t\ttry{\r\n\t\t\tsleep(5000);\r\n\t\t\t//driver.findElement(locator_split(\"btn_privacyok\")).click();\r\n\t\t\t\r\n\t\t\tExcelUtils.setExcelFile(Constant.Path_TestData + Constant.File_TestData,\"USA\");\r\n\t\t\tusername=ExcelUtils.getCellData(row, col);\r\n\t\t\t/*Reporter.log(\"PASS_MESSAGE:- My Account is clicked and user is logged in\");*/\r\n\t\t}\r\n\t\tcatch(Exception e){\r\n\t\t\tReporter.log(\"FAIL_MESSAGE:- User is not logged in\");\r\n\t\t\tthrow new NoSuchElementException(\"The element with\"\r\n\t\t\t\t\t+ elementProperties.getProperty(\"LoginLogout\")\r\n\t\t\t\t\t+ \" not found\");\r\n\r\n\t\t}\r\n\t\treturn username;\r\n\r\n\t}", "public void testClickHelp(Tester t) {\n initData();\r\n Cell topLeft = (Cell) this.game2.indexHelp(0, 0);\r\n Cell topRight = (Cell) this.game2.indexHelp(1, 0);\r\n Cell botLeft = (Cell) this.game2.indexHelp(0, 1);\r\n Cell botRight = (Cell) this.game2.indexHelp(1, 1);\r\n\r\n t.checkExpect(topLeft.color, Color.ORANGE);\r\n t.checkExpect(topRight.color, Color.PINK);\r\n t.checkExpect(botLeft.color, Color.CYAN);\r\n t.checkExpect(botRight.color, Color.CYAN);\r\n\r\n\r\n topRight.clickHelp(this.game2, topLeft);\r\n topLeft = (Cell) this.game2.indexHelp(0, 0);\r\n topRight = (Cell) this.game2.indexHelp(1, 0);\r\n botLeft = (Cell) this.game2.indexHelp(0, 1);\r\n botRight = (Cell) this.game2.indexHelp(1, 1);\r\n\r\n t.checkExpect(topLeft.color, Color.PINK);\r\n t.checkExpect(topRight.color, Color.PINK);\r\n t.checkExpect(botLeft.color, Color.CYAN);\r\n t.checkExpect(botRight.color, Color.CYAN);\r\n\r\n t.checkExpect(this.game2.worklist,\r\n new ArrayList<ACell>(Arrays.asList(topLeft)));\r\n\r\n //testing that nothing changes over an end cell\r\n initData();\r\n FloodItWorld game2Copy = new FloodItWorld(1, 100, new Random(20),\r\n 2, 3);\r\n game2Copy.initializeBoard();\r\n t.checkExpect(this.game2, game2Copy);\r\n this.game2.indexHelp(-1, 0).clickHelp(this.game2, topLeft);\r\n t.checkExpect(this.game2, game2Copy);\r\n }", "@Test\n public void test(){\n ExcelUtil qa3Sheet = new ExcelUtil(\"src/test/resources/Vytrack testusers.xlsx\", \"QA3-short\");\n // 1 based , not 0 based\n int rowCount = qa3Sheet.rowCount();\n // 1 based, not 0 based\n int colCount = qa3Sheet.columnCount();\n System.out.println(\"rowCount = \" + rowCount);\n System.out.println(\"colCount = \" + colCount);\n\n List<String> columnsNames = qa3Sheet.getColumnsNames();\n System.out.println(\"columnsNames = \" + columnsNames);\n // 0 based, get specific cell value based on index\n String cellData = qa3Sheet.getCellData(2, 3);\n System.out.println(\"cellData = \" + cellData);\n\n // get all table values in a list\n List<Map<String, String>> dataList = qa3Sheet.getDataList();\n\n System.out.println(dataList.get(5).get(\"firstname\"));\n\n String[][] dataArray = qa3Sheet.getDataArray();\n\n System.out.println(dataArray[1][1]);\n\n }", "@Test(dataProviderClass = DataProviderUtils.class, dataProvider = \"excelDataReader\", groups = {\"Sprint36\", \"Breadcrumb\"}, \r\n\t\t\tdescription = \"Check the 'Prevent navigation outside of default view' option.\")\r\n\tpublic void SprintTest36_1_4(HashMap<String,String> dataValues, String driverType) throws Exception {\r\n\r\n\t\tdriver = null; \r\n\t\tLoginPage loginPage = null;\r\n\t\tConfigurationPage configurationPage = null;\r\n\t\tConfigurationPanel configSettingsPanel = null;\r\n\r\n\t\ttry {\r\n\r\n\r\n\r\n\r\n\t\t\tdriver = WebDriverUtils.getDriver();\r\n\r\n\t\t\tConcurrentHashMap <String, String> dataPool = new ConcurrentHashMap <String, String>(dataValues);\r\n\r\n\t\t\t//1. Login to Configuration\r\n\t\t\t//--------------------------\r\n\t\t\tdriver.get(configURL);\r\n\r\n\t\t\tloginPage = new LoginPage(driver);\r\n\t\t\tconfigurationPage = loginPage.loginToConfigurationUI(userName, password);\r\n\r\n\t\t\tLog.message(\"1. Logged in to Configuiration\");\r\n\r\n\t\t\t//2. Click the Vault folder \r\n\t\t\t//--------------------------\r\n\t\t\tconfigurationPage.treeView.clickTreeViewItem(\"Vault-specific settings>>\" + testVault);\r\n\r\n\r\n\t\t\tLog.message(\"2. Clicked the Vault folder.\");\r\n\r\n\t\t\t//3. Select the layout\r\n\t\t\t//---------------------\r\n\r\n\t\t\tconfigSettingsPanel = new ConfigurationPanel(driver);\r\n\t\t\tconfigSettingsPanel.setLayout(dataPool.get(\"Layout\"));\r\n\r\n\t\t\tLog.message(\"3. Selected the layout.\");\r\n\r\n\t\t\t//4. Check the Prevent Navigation check box\r\n\t\t\t//------------------------------------------\r\n\t\t\tconfigSettingsPanel.setPreventNavigation(true);\r\n\r\n\r\n\t\t\tLog.message(\"4. Checked the Prevent Navigation check box.\");\r\n\r\n\t\t\t//5. Save the changes\r\n\t\t\t//--------------------\r\n\t\t\tif (!configurationPage.configurationPanel.saveSettings())\r\n\t\t\t\tthrow new Exception(\"Configuration settings are not saved.\");\r\n\r\n\t\t\tLog.message(\"5. Saved the changes.\");\r\n\r\n\t\t\t//Verification: To verify if the Prevent Navigation check box remains checked\r\n\t\t\t//----------------------------------------------------------------------------\r\n\t\t\tif(configSettingsPanel.getPreventNavigation())\r\n\t\t\t\tLog.pass(\"Test case Passed. The Prevent Navigation Check box remains checked after clicking the save button.\"); \r\n\t\t\telse\r\n\t\t\t\tLog.fail(\"Test Case Failed. The Prevent Navigation Check box does not remain checked after clicking the save button.\", driver);\r\n\r\n\r\n\t\t} //End try\r\n\r\n\t\tcatch(Exception e) \t{\r\n\t\t\tLog.exception(e, driver);\r\n\t\t} //End catch\r\n\r\n\t\tfinally {\r\n\r\n\t\t\tif(driver != null){\r\n\t\t\t\ttry\r\n\t\t\t\t{\r\n\t\t\t\t\tconfigSettingsPanel.setLayout(Caption.ConfigSettings.Config_Default.Value);\r\n\t\t\t\t\tconfigSettingsPanel.setPreventNavigation(false);\r\n\r\n\t\t\t\t\tif (!configurationPage.configurationPanel.saveSettings())\r\n\t\t\t\t\t\tthrow new Exception(\"Configuration settings are not saved.\");\r\n\r\n\t\t\t\t}\r\n\t\t\t\tcatch(Exception e0)\r\n\t\t\t\t{\r\n\t\t\t\t\tLog.exception(e0, driver);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tUtility.quitDriver(driver);\r\n\t\t} //End finally\r\n\r\n\t}", "@Test(priority = 3)\n\tpublic void VirtualMechanic() throws Exception {\n\t\t\n\t\tdriver = DashboardPage.clickVirtualMechanic(driver);\n\t\t\n\t\t//ExcelUtils.setCellData(\"PASS\", 4, 1);\n\t\t\n\t}", "@Test(dataProviderClass = DataProviderUtils.class, dataProvider = \"excelDataReader\", groups = { \"Sprint54\", \"Get Hyperlink\"}, \r\n\t\t\tdescription = \"No Java applet layout will be displayed for hyperlink url on selecting No Java applet in configuration and default in hyperlink dialog - Context menu.\")\r\n\tpublic void SprintTest54_1_30_3A_1A(HashMap<String,String> dataValues, String driverType) throws Exception {\r\n\r\n\t\tdriver = null; \r\n\r\n\t\ttry {\r\n\r\n\r\n\r\n\r\n\t\t\tdriver = WebDriverUtils.getDriver();\r\n\r\n\t\t\tConcurrentHashMap <String, String> dataPool = new ConcurrentHashMap <String, String>(dataValues);\r\n\r\n\t\t\tConfigurationPage configurationPage = LoginPage.launchDriverAndLoginToConfig(driver, true); //Launched driver and logged in\r\n\r\n\t\t\t//Step-1 : Navigate to Vault in tree view\r\n\t\t\t//-----------------------------------------\r\n\t\t\tconfigurationPage.treeView.clickTreeViewItem(Caption.ConfigSettings.VaultSpecificSettings.Value + \">>\" + testVault); //Clicks tree view item\r\n\r\n\r\n\t\t\tif (!configurationPage.configurationPanel.getPageName().toUpperCase().equalsIgnoreCase(testVault.toUpperCase())) //Checks if navigated to vault settings page\r\n\t\t\t\tthrow new Exception(\"Vault settings page in configuration is not opened.\");\r\n\r\n\t\t\tLog.message(\"1. Navigated to Vault settings page.\");\r\n\r\n\t\t\t//Step-2 : Select No Java applet layout layout and save the settings\r\n\t\t\t//--------------------------------------------------------------------\r\n\t\t\tconfigurationPage.configurationPanel.setJavaApplet(Caption.ConfigSettings.Config_Disable.Value);//Disabled the java applet in configuration page\r\n\r\n\t\t\tif(configurationPage.configurationPanel.isJavaAppletEnabled())//Verify if java applet is disabled or not\r\n\t\t\t\tthrow new Exception(\"Java applet is enabled.\");\r\n\r\n\t\t\tif (!configurationPage.configurationPanel.saveSettings()) //Save the settings in configuration page\r\n\t\t\t\tthrow new Exception(\"Configuration settings are not saved after changing its layout.\");\r\n\r\n\t\t\tLog.message(\"1. Java applet is disabled and Configuration settings are saved.\");\r\n\r\n\t\t\tif (!configurationPage.logOut()) //Logs out from configuration page\r\n\t\t\t\tthrow new Exception(\"Log out is not successful after saving the settings in configuration page.\");\r\n\r\n\t\t\tLog.message(\"2. No java applet layout is selected and settings are saved.\");\r\n\r\n\t\t\t//Step-3 : Login to the default page and navigate to any view\r\n\t\t\t//--------------------------------------------------------------------------\r\n\t\t\tHomePage homePage = LoginPage.launchDriverAndLogin(driver, false); //Launches and logs into the default page\r\n\r\n\t\t\tString viewToNavigate = SearchPanel.searchOrNavigatetoView(driver, dataPool.get(\"NavigateToView\"), dataPool.get(\"ObjectName\"));\r\n\r\n\t\t\tLog.message(\"3. Logged into the default page and navigated to '\" + viewToNavigate + \"' view.\");\r\n\r\n\t\t\t//Step-4 : Open Get Hyperlink dialog for the object from context menu\r\n\t\t\t//-------------------------------------------------------------------\r\n\t\t\tif (!homePage.listView.rightClickItem(dataPool.get(\"ObjectName\"))) //Selects the Object in the list\r\n\t\t\t\tthrow new Exception(\"Object (\" + dataPool.get(\"ObjectName\") + \") is not got selected.\");\r\n\r\n\t\t\thomePage.listView.clickContextMenuItem(Caption.MenuItems.GetMFilesWebURL.Value); //Selects Get Hyperlink from context menu\r\n\r\n\t\t\tMFilesDialog mfilesDialog = new MFilesDialog(driver); //Instantiating MFilesDialog wrapper class\r\n\r\n\t\t\tif (!mfilesDialog.isGetMFilesWebURLDialogOpened()) //Checks for MFiles dialog title\r\n\t\t\t\tthrow new Exception(\"M-Files dialog with 'Get Hyperlink' title is not opened.\");\r\n\r\n\t\t\tLog.message(\"4. Hyperlink dialog of an object (\" + dataPool.get(\"ObjectName\") + \") is opened through context menu.\");\r\n\r\n\t\t\t//Step-5 : Copy the link from text box and close the Get Hyperlink dialog\r\n\t\t\t//-----------------------------------------------------------------------\r\n\t\t\tString hyperlinkText = mfilesDialog.getHyperlink(); //Gets the hyperlink\r\n\t\t\tmfilesDialog.close(); //Closes the Get Hyperlink dialog\r\n\r\n\t\t\tLog.message(\"5. Hyperlink is copied and Get Hyperlink dialog is closed.\");\r\n\r\n\t\t\t//Step-6 : Open the copied Hyperlink in the browser\r\n\t\t\t//-------------------------------------------------\r\n\t\t\thomePage = Utility.navigateToPage(driver, hyperlinkText, userName, password, \"\"); //Navigates to the hyperlink url\r\n\r\n\r\n\t\t\tif (!driver.getCurrentUrl().equalsIgnoreCase(hyperlinkText))\r\n\t\t\t\tthrow new Exception (\"Browser is not opened with copied object Hyperlink.[Expected URL: \"+hyperlinkText+\" & Current URL : \"+ driver.getCurrentUrl() +\"]\");\r\n\r\n\t\t\tLog.message(\"6. Object Hyperlink is opened in the browser.\");\r\n\r\n\t\t\t//Verification : Verify if default layout is displayed\r\n\t\t\t//----------------------------------------------------\r\n\t\t\tString unAvailableLayouts = \"\";\r\n\r\n\t\t\tif (!homePage.isSearchbarPresent()) //Checks if Search bar present\r\n\t\t\t\tunAvailableLayouts = \"Search Bar is not available;\";\r\n\r\n\t\t\tif (!homePage.isTaskPaneDisplayed()) //Checks if Task Pane present\r\n\t\t\t\tunAvailableLayouts = unAvailableLayouts + \"Task Pane is not available;\";\r\n\r\n\t\t\tif (!homePage.previewPane.isTabExists(Caption.PreviewPane.MetadataTab.Value))\r\n\t\t\t\tunAvailableLayouts = unAvailableLayouts + \"Properties Pane is not available;\";\r\n\r\n\t\t\tif (!homePage.menuBar.isMenuInMenubarDisplayed()) //Checks if Menu Bar present\r\n\t\t\t\tunAvailableLayouts = unAvailableLayouts + \"Menu Bar is not available;\";\r\n\r\n\t\t\tif (!homePage.menuBar.isBreadCrumbDisplayed()) //Checks if Breadcrumb present\r\n\t\t\t\tunAvailableLayouts = unAvailableLayouts + \"Breadcrumb is not available;\";\r\n\r\n\t\t\tif (homePage.taskPanel.isAppletEnabled())\r\n\t\t\t\tunAvailableLayouts = unAvailableLayouts + \"Java Applet is available;\";\r\n\r\n\t\t\tif (!homePage.isListViewDisplayed())\r\n\t\t\t\tunAvailableLayouts = unAvailableLayouts + \"List View is not available;\";\r\n\r\n\t\t\tif (homePage.isTreeViewDisplayed())\r\n\t\t\t\tunAvailableLayouts = unAvailableLayouts + \"Tree View is available;\";\r\n\r\n\t\t\tif (unAvailableLayouts.equals(\"\")) //Verifies default layout have selected default custom layout\r\n\t\t\t\tLog.pass(\"Test case Passed. Hyperlink URL page is displayed as No Java Applet layout.\");\r\n\t\t\telse\r\n\t\t\t\tLog.fail(\"Test case Failed. Few layots are not as expected on selecting 'No Java Applet layout'. Refer additional information : \" \r\n\t\t\t\t\t\t+ unAvailableLayouts, driver);\r\n\r\n\t\t}\r\n\t\tcatch (Exception e) {\r\n\t\t\tLog.exception(e, driver);\r\n\t\t} //End catch\r\n\r\n\t\tfinally {\r\n\r\n\t\t\tif(driver != null){\r\n\t\t\t\ttry\r\n\t\t\t\t{\r\n\r\n\t\t\t\t\tdriver.get(configURL);\r\n\r\n\t\t\t\t\tConfigurationPage configurationPage = new ConfigurationPage(driver);\r\n\t\t\t\t\tconfigurationPage.treeView.clickTreeViewItem(Caption.ConfigSettings.VaultSpecificSettings.Value + \">>\" + testVault); //Clicks tree view item\r\n\r\n\t\t\t\t\tconfigurationPage.configurationPanel.setLayout(Caption.ConfigSettings.Config_Default.Value);\r\n\r\n\t\t\t\t\tif (!configurationPage.configurationPanel.saveSettings())\r\n\t\t\t\t\t\tthrow new Exception(\"Configuration settings are not saved.\");\r\n\t\t\t\t}\r\n\t\t\t\tcatch(Exception e0)\r\n\t\t\t\t{\r\n\t\t\t\t\tLog.exception(e0, driver);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tUtility.quitDriver(driver);\r\n\r\n\t\t} //End finally\r\n\r\n\t}", "@Test(dataProviderClass = DataProviderUtils.class, dataProvider = \"excelDataReader\", groups = {\"PageTitle\"}, \r\n\t\t\tdescription = \"Verify the page title field for Script value\")\r\n\tpublic void TC_38635_1(HashMap<String,String> dataValues, String driverType) throws Exception {\r\n\r\n\t\tdriver = null; ConfigurationPage configPage = null; ConcurrentHashMap <String, String> dataPool = null;\r\n\r\n\t\ttry {\r\n\r\n\r\n\r\n\t\t\tdriver = WebDriverUtils.getDriver();\r\n\r\n\t\t\t//Step-1 : Login to MFiles Configuration Webpage\r\n\t\t\t//----------------------------------------------\r\n\t\t\tdataPool = new ConcurrentHashMap <String, String>(dataValues);\r\n\t\t\tconfigPage = LoginPage.launchDriverAndLoginToConfig(driver, true);//Launch the Configruation page\r\n\r\n\t\t\tLog.message(\"1. Logged into the configuration webpage\", driver);\r\n\r\n\t\t\t//Step-2 : Navigate to the General settings\r\n\t\t\t//-----------------------------------------\r\n\t\t\tconfigPage.treeView.clickTreeViewItem(\"General\");//Clicks the General settings in the configuration web page\r\n\r\n\t\t\tLog.message(\"2. Navigated to the General settings in the configuration webpage\", driver);\r\n\r\n\t\t\t//Step-3: Set the Page title in the configuration web page\r\n\t\t\t//--------------------------------------------------------\r\n\t\t\tconfigPage.configurationPanel.setPageTitle(dataPool.get(\"PageTitle\").replace(\"\\\"\", \"\"));//Enters the page title value in the configuration webpage\r\n\r\n\t\t\tLog.message(\"3. '\"+ (dataPool.get(\"PageTitle\").replace(\"\\\"\", \"\").replaceAll(\"<\", \"{\")).replaceAll(\">\", \"}\") +\"' is set in the page title field in the configuration webpage.\", driver);\r\n\r\n\t\t\t//Step-4: Save the changes\r\n\t\t\t//------------------------------------------------------------------------------------------\r\n\t\t\tconfigPage.configurationPanel.setAutoLogin(false);//Sets the auto login off in the configuration webpage\r\n\t\t\tconfigPage.saveSettings();//Clicks the save button in the configuration webpage\r\n\r\n\t\t\tif (!MFilesDialog.exists(driver))//Checks if MFiles dialog is displayed or not\r\n\t\t\t\tthrow new Exception(\"Warning dialog is not displayed while saving blank value in the Page title field\");\r\n\r\n\t\t\tMFilesDialog mfDialog = new MFilesDialog(driver);//Instantiates the MFiles Dialog\r\n\r\n\t\t\tString actualMsg = mfDialog.getMessage();//Gets the message from MFiles Dialog\r\n\r\n\t\t\tif (!actualMsg.contains(dataPool.get(\"SaveSuccessMsg\")))\r\n\t\t\t\tthrow new Exception(\"Save success warning dialog is not displayed\");\r\n\r\n\t\t\tLog.message(\"4. Script value is saved in the Configuration web page in the Page title field\", driver);\r\n\r\n\t\t\t//Verification: If Script value is displayed in the page title field\r\n\t\t\t//--------------------------------------------------------------------\r\n\t\t\tdriver.navigate().refresh();//Refresh the configuration webpage\r\n\r\n\t\t\tif (driver.getTitle().equalsIgnoreCase(dataPool.get(\"PageTitle\")))\r\n\t\t\t\tLog.pass(\"Test case passed. Script value(\"+ (dataPool.get(\"PageTitle\").replaceAll(\"<\", \"{\")).replaceAll(\">\", \"}\") +\") is displayed as expected in the page title.\", driver);\r\n\t\t\telse\r\n\t\t\t\tLog.fail(\"Test case failed. Script value(\"+ (dataPool.get(\"PageTitle\").replaceAll(\"<\", \"{\")).replaceAll(\">\", \"}\") +\") is not displayed as expected in the page title. [Actual page title : \"+driver.getTitle()+\"]\", driver);\r\n\r\n\t\t}//End try\r\n\t\tcatch (Exception e) {\r\n\t\t\tLog.exception(e, driver);\r\n\t\t}//End catch\r\n\t\tfinally {\r\n\t\t\tif (driver != null)\r\n\t\t\t{\r\n\t\t\t\ttry\r\n\t\t\t\t{\r\n\t\t\t\t\tconfigPage.treeView.clickTreeViewItem(\"General\");//Clicks the General settings in the configuration web page\r\n\t\t\t\t\tconfigPage.configurationPanel.setPageTitle(dataPool.get(\"DefaultPageTitle\").replace(\"\\\"\", \"\"));//Enters the page title value in the configuration webpage\r\n\t\t\t\t\tconfigPage.saveSettings();//Clicks the save button in the configuration webpage\r\n\t\t\t\t\tMFilesDialog.closeMFilesDialog(driver);//Closes the MFiles confirmation dialog\r\n\t\t\t\t}\r\n\t\t\t\tcatch(Exception e0)\r\n\t\t\t\t{\r\n\t\t\t\t\tLog.exception(e0, driver);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tUtility.quitDriver(driver);\r\n\t\t}//End finally\r\n\r\n\t}", "@Test\n public void testDAM30901001() {\n // Data preparation\n {\n clearAndCreateTestDataForBook();\n }\n\n // Index page\n DAM3IndexPage dam3IndexPage = new DAM3IndexPage(driver);\n\n TodoListPage todoListPage = dam3IndexPage.dam30901001Click();\n\n // Confirmation of database state before batch update\n assertThat(todoListPage.getCompletedTodoCount(), equalTo(\"3\"));\n assertThat(todoListPage.getIncompletTodoCount(), equalTo(\"7\"));\n assertThat(todoListPage.getTotalTodoCount(), equalTo(\"10\"));\n\n todoListPage.selectCompleteStatRadio();\n\n todoListPage = todoListPage.ifElementUsageSearch();\n\n // Confirmation of database state before batch update\n assertThat(todoListPage.getCompletedTodoCount(), equalTo(\"3\"));\n\n // 1 and 3 todos are incomplete. hence not displayed\n boolean isTodoPresent = todoListPage.isTodoDisplayed(\"0000000003\");\n assertThat(isTodoPresent, is(false));\n\n isTodoPresent = todoListPage.isTodoDisplayed(\"0000000001\");\n assertThat(isTodoPresent, is(false));\n // 10 todo is complete. hence displayed.\n isTodoPresent = todoListPage.isTodoDisplayed(\"0000000010\");\n assertThat(isTodoPresent, is(true));\n\n // default value of finished is now false.hence todos like 1,3 will be displayed\n // where as todo like 10 will not be displayed.\n todoListPage.selectInCompleteStatRadio();\n todoListPage = todoListPage.ifElementUsageSearch();\n\n isTodoPresent = todoListPage.isTodoDisplayed(\"0000000003\");\n assertThat(isTodoPresent, is(true));\n\n isTodoPresent = todoListPage.isTodoDisplayed(\"0000000001\");\n assertThat(isTodoPresent, is(true));\n // 10 todo is complete. hence displayed.\n isTodoPresent = todoListPage.isTodoDisplayed(\"0000000010\");\n assertThat(isTodoPresent, is(false));\n\n // scenario when finished property of criteria is null.\n\n }" ]
[ "0.6643793", "0.6553383", "0.64054793", "0.6321473", "0.6306204", "0.6196796", "0.6116646", "0.6115679", "0.6070061", "0.60696554", "0.60540915", "0.6043219", "0.6025589", "0.59912425", "0.5980582", "0.5950825", "0.59485114", "0.59389555", "0.5938072", "0.590883", "0.5903892", "0.58998996", "0.58978885", "0.5880288", "0.5874212", "0.58692104", "0.58658993", "0.58547187", "0.58410436", "0.58379257", "0.58339185", "0.58277035", "0.5823307", "0.5812126", "0.5807386", "0.57995117", "0.5784849", "0.57729715", "0.5769815", "0.5764534", "0.5763004", "0.5760964", "0.575216", "0.5744931", "0.57394224", "0.57207006", "0.57144445", "0.57131696", "0.5711231", "0.5695128", "0.56926674", "0.5689647", "0.5685672", "0.5682489", "0.5681965", "0.567378", "0.5670171", "0.56680286", "0.5661627", "0.56529874", "0.5650733", "0.5646605", "0.56464416", "0.5640785", "0.5637566", "0.5637428", "0.5637036", "0.56341165", "0.5631126", "0.5630597", "0.5618026", "0.56165236", "0.5608103", "0.5603576", "0.560148", "0.5598117", "0.55969554", "0.5595154", "0.5593529", "0.55822337", "0.55774444", "0.55773664", "0.5575821", "0.5574339", "0.5572918", "0.5568871", "0.55630827", "0.5560805", "0.55593103", "0.55581313", "0.55570877", "0.5547045", "0.55465955", "0.5538316", "0.5538223", "0.5537268", "0.5534745", "0.55341196", "0.5532757", "0.5530876" ]
0.78136003
0
Overrides the overloaded console method getString
@Override public String getString(String prompt, String value1, String value2) { String s; do { System.out.print(prompt); s = sc.nextLine(); // read user entry // Provides error message if response is empty or not 'y' or 'n' if (s.trim().isEmpty()) { System.out.println("Error! This entry is required. Try again."); } else if (!s.equalsIgnoreCase(value1) && !s.equalsIgnoreCase(value2)) { System.out.println("Error! Entry must be 'y' or 'n'. Try agian."); } } while (!s.equalsIgnoreCase(value1) && !s.equalsIgnoreCase(value2)); return s; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static String getString() {\n return consoleScanner.nextLine();\n }", "public String getString();", "public static String getString() throws IOException\n {\n InputStreamReader input=new InputStreamReader(System.in);\n BufferedReader b=new BufferedReader(input);\n String str=b.readLine();//reading the string from console\n return str;\n }", "public abstract String getString();", "public abstract String getString();", "String getString();", "String getString();", "String getString();", "public String getString() {\n\t\treturn scan.nextLine();\n\n\t}", "String getStringArgument() throws Exception {\n return this.readLine().split(\"\\\\s+\", 2)[1];\n }", "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 String getString() {\n return string;\n }", "public String getString() {\n return string;\n }", "public static String getString() {\n // Variable declarations\n String str = \"\"; // String object to hold user input\n\n // Prompt user to enter str\n str = scnr.nextLine();\n\n // Return the string\n return str;\n }", "public String getString() {\n return this.scanner.nextLine();\n }", "public String getString() {\n\t\treturn cp.getString();\n\t}", "public String readStringFromCmd() throws IOException {\r\n\t\tSystem.out.println(\"Enter your String:\");\r\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\r\n\t\tString string = null;\t\t\r\n\t\tstring = br.readLine();\r\n\t\treturn string;\r\n\t}", "public String getString() {\n\t\treturn getString(\"\\n\");\n\t}", "public String getString(String pPrompt) {\r\n\t\tSystem.out.println(pPrompt + \"\");\r\n\t\treturn input.nextLine();\r\n\t}", "public static String getString() throws IOException {\r\n InputStreamReader isr = new InputStreamReader(System.in);\r\n BufferedReader br = new BufferedReader(isr);\r\n String s = br.readLine();\r\n return s;\r\n }", "public static String getString() throws IOException {\n InputStreamReader isr = new InputStreamReader(System.in);\n BufferedReader br = new BufferedReader(isr);\n String s = br.readLine();\n return s;\n }", "@Override\n\tpublic String getString() {\n\t\treturn value;\n\t}", "private String getString() {\n\t\treturn null;\n\t}", "public String getString(String key) {\n return (String) commandData.get(key);\n }", "public String getString() {\r\n\t\tString s = value.getString();\r\n\t\t// System.out.println(\"Getting string of: \" + s);\r\n\t\tif (s == null)\r\n\t\t\treturn (s);\r\n\t\treturn (substitution(s));\r\n\t}", "public String getString(){\n\t\treturn \t_name + String.format(\"\\nWeight: %s\", _weight) + String.format( \"\\nNumber of wheels: %s\", _numberOfWheels ) + \n\t\t\t\tString.format( \"\\nMax of speed: %s\", _maxOfSpeed ) + String.format( \"\\nMax acceleration: %s\", _maxAcceleration ) + \n\t\t\t\tString.format( \"\\nHeight: %s\", _height ) + String.format( \"\\nLength: %s\", _length ) + String.format( \"\\nWidth: %s\", _width );\n\t}", "public String getString() {\n\t\treturn renderResult(this._result).trim();\n\t}", "public String getString() {\r\n\t\ttype(ConfigurationItemType.STRING);\r\n\t\treturn stringValue;\r\n\t}", "public java.lang.String getString() {\n return localString;\n }", "java.lang.String getStringValue();", "java.lang.String getStringValue();", "public static String receberSelecaoDoConsoleString() {\n\t\tScanner entrada = new Scanner(System.in);\n\t\t\n\t\t//pega o input que decide se a entrada será no terminal ou em arquivo\n\t\tString valor = entrada.nextLine();\n\t\t\n\t\treturn valor;\n\t}", "public java.lang.String getString() {\r\n return localString;\r\n }", "public static String getString (String ask)\r\n {\r\n Scanner keyboard = new Scanner(System.in);\r\n System.out.print(ask + \" -> \");\r\n String input = keyboard.nextLine();\r\n return input;\r\n }", "protected String getString(String text, Object... args){\n return text;\n }", "public static String getString(Scanner scnr, String prompt) {\n\t\t// This approach uses exception handling.\n\t\tSystem.out.print(prompt);\n\t\treturn scnr.nextLine();\n\t}", "public static String getString(String prompt) throws Exception {\n if (scanner == null) {\n throw new Exception(\"Input Utility's scanner is not set\");\n }\n String s;\n\n // enter the string\n if (prompt != null) {\n System.out.print(prompt);\n }\n s = scanner.nextLine();\n return s;\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 String getString() throws Exception {\n return getString(null);\n }", "public static String getString(String prompt)\n {\n System.out.print(prompt + \" \");\n return in.nextLine();\n }", "protected String getString () {\n int utf = 0;\n skipSpaces ();\n if (!eatChar ('\"')) { return null; }\n m_sb.setLength (0);\n char c = getChar ();\n while ( c != '\\0' && c != '\"' ) {\n if (c == '\\\\') {\n c = getNextChar ();\n switch (c) {\n case '\"': c = '\"'; break;\n case '\\\\': c = '\\\\'; break;\n case '/' : c = '/'; break;\n case 'b' : c = '\\b'; break;\n case 'f' : c = '\\f'; break;\n case 'n' : c = '\\n'; break;\n case 'r' : c = '\\r'; break;\n case 't' : c = '\\t'; break;\n case 'u' :\n utf = 0;\n utf += Character.digit(getNextChar (), 16) << 12;\n utf += Character.digit(getNextChar (), 16) << 8;\n utf += Character.digit(getNextChar (), 16) << 4;\n utf += Character.digit(getNextChar (), 16);\n c = (char)utf;\n break;\n }\n }\n m_sb.append (c);\n c = getNextChar ();\n }\n return eatChar ('\"') ? m_sb.toString () : null;\n }", "public String getString() {\n\t\treturn \"T\";\n\t}", "public static String readString(){\n\t\tstringInput = readInput();\n\t\treturn stringInput; \n\t}", "public String getStringValue();", "String getString() throws IOException {\n\n\t\t\tString encoding;\n\n\t\t\tswitch (this.type) {\n\n\t\t\t// Not all are ISO-8859-1 but it's the closest thing\n\t\t\tcase DerParser.NUMERIC_STRING:\n\t\t\tcase DerParser.PRINTABLE_STRING:\n\t\t\tcase DerParser.VIDEOTEX_STRING:\n\t\t\tcase DerParser.IA5_STRING:\n\t\t\tcase DerParser.GRAPHIC_STRING:\n\t\t\tcase DerParser.ISO646_STRING:\n\t\t\tcase DerParser.GENERAL_STRING:\n\t\t\t\tencoding = \"ISO-8859-1\";\n\t\t\t\tbreak;\n\n\t\t\tcase DerParser.BMP_STRING:\n\t\t\t\tencoding = \"UTF-16BE\";\n\t\t\t\tbreak;\n\n\t\t\tcase DerParser.UTF8_STRING:\n\t\t\t\tencoding = \"UTF-8\";\n\t\t\t\tbreak;\n\n\t\t\tcase DerParser.UNIVERSAL_STRING:\n\t\t\t\tthrow new IOException(\"Invalid DER: can't handle UCS-4 string\");\n\n\t\t\tcase DerParser.OID:\n\t\t\t\treturn getObjectIdentifier(this.value);\n\t\t\tdefault:\n\t\t\t\tthrow new IOException(String.format(\"Invalid DER: object (%d) is not a string\", this.type));\n\t\t\t}\n\n\t\t\treturn new String(this.value, encoding);\n\t\t}", "public String toString()\n {\n return this.string;\n }", "@Test\r\n\tpublic void testGetString() {\r\n\t\tString s = lattice1.getString();\r\n\t\tString ss = \"[10. 6. 4.](12.328828005937952)\"\r\n\t\t\t\t+ \"[7. 11. 5.](13.96424004376894)\"\r\n\t\t\t\t+ \"[6.8 -4. -9.](11.968291440301744)\";\r\n\t\tAssert.assertEquals(\"getString\", s, ss);\r\n\t}", "@java.lang.Override\n public java.lang.String getStringValue() {\n java.lang.Object ref = \"\";\n if (typeCase_ == 5) {\n ref = type_;\n }\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 (typeCase_ == 5) {\n type_ = s;\n }\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "public static String getCommandString() {\n String string = \"\";\n for (String validCommand : validCommands.keySet()) {\n string += \" \" + validCommand;\n }\n return string;\n }", "public String[] getString();", "public String getString(String key) {\n\t\tString sp = internal.getProperty(key);\n\t\tif (sp == null) {\n\t\t\tsp = (String) getDefault(key);\n\t\t}\n\t\treturn sp;\n\t}", "String getStringValue();", "String getStringValue();", "private String getString(String paramString) {\n }", "@Override\n\tpublic String getString() {\n\t\treturn \"Fizz\";\n\t}", "@Override\n String get();", "public java.lang.String getStringValue() {\n java.lang.Object ref = \"\";\n if (typeCase_ == 5) {\n ref = type_;\n }\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 (typeCase_ == 5) {\n type_ = s;\n }\n return s;\n }\n }", "public String getValue(String opt) {\n return (String)m_commandLine.getValue(opt);\n }", "@Override\n public String toString() {\n return string;\n }", "public java.lang.String toString() {\n return this.stringValue;\n }", "public String getGameString(){\n\treturn printString;\n }", "@Override\n\tpublic String toString() {\n\t\treturn CMD_NAME;\n\t}", "public java.lang.String toString()\n {\n return this.stringValue;\n }", "@Override String toString();", "String promptString();", "@Override\n\tpublic String toString() {\n\t\treturn \"string dari class Main\";\n\t}", "public String getString(int paramInt) {\n }", "public String getString1() {\n return string1;\n }", "public static String getStringInput() {\n Scanner in = new Scanner(System.in);\n return in.next();\n }", "@Override\n\tpublic String toString()\n\t{\n\t\treturn this.str;\n\t}", "public String getString() {\n\t\ttry {\n\t\t\treturn fromTextArea.take().trim();\n\t\t} catch (InterruptedException e) {\n\t\t\te.printStackTrace();\n\t\t\treturn null;\n\t\t}\n\t}", "java.lang.String getScStr();", "public String string() {\n\treturn string;\n }", "public void printString() {\n\t\tSystem.out.println(name);\n\t\t\n\t\t\n\t}", "public static String singleString()\n\t{\n\t\treturn(sc.nextLine());\n\t}", "public final String\tgetString() throws StandardException\n\t{\n\t\tif (getValue() == null)\n\t\t\treturn null;\n\t\telse if (dataValue.length * 2 < 0) //if converted to hex, length exceeds max int\n\t\t{\n\t\t\tthrow StandardException.newException(SQLState.LANG_STRING_TRUNCATION, getTypeName(),\n\t\t\t\t\t\t\t\t\t\"\",\n\t\t\t\t\t\t\t\t\tString.valueOf(Integer.MAX_VALUE));\n\t\t}\n\t\telse \n\t\t{\n\t\t\treturn org.apache.derby.iapi.util.StringUtil.toHexString(dataValue, 0, dataValue.length);\n\t\t}\n\t}", "public String userInputString() {\n Scanner scanner = new Scanner(System.in);\n return scanner.nextLine();\n }", "public String getString(String key, Object s1) {\n return MessageFormat.format(Platform.getResourceBundle(getBundle()).getString(key), new Object[]{s1});\n }", "public static String getString(String prop, String def)\n {\n return props.getProperty(prop, def);\n }", "public String getString(String key) {\n Object value = get(key);\n return ((value instanceof String) ? (String)value : \"\");\n }", "public String readString() {\n return readNextLine();\n }", "public String getString(String key)\n {\n return getString(key, null);\n }", "public static String readString() {\n return in.nextLine();\n }", "@Override\n public String toString() {\n return (this.str);\n }", "public String keyboardReadString() {\n BufferedReader myReader = new BufferedReader(new InputStreamReader(System.in));\n String stringItem = \"\";\n try {\n stringItem = myReader.readLine();\n } // try\n catch (IOException IOError) {\n System.out.println(\"Read Error in Termio.KeyboardReadString method\");\n } // catch\n return stringItem;\n }", "private String getString() {\n TableRow<Story> row = getTableRow();\n Story story = null;\n Integer priority;\n String priorityString = null;\n if (row != null) {\n story = row.getItem();\n }\n if (story != null) {\n priority = getModel().getStoryPriority(story);\n if (priority != -1) {\n priorityString = priority.toString();\n }\n else {\n priorityString = \"-\";\n }\n }\n\n return priorityString;\n }", "String getString_lit();", "String getString( String key, String def);", "public String getStr(String attr) {\n return (String) super.get(attr);\n }", "public String get()\n {\n return this.string;\n }", "java.lang.String getCommand();", "private static String getString(String key, Object s1) {\r\n\t\treturn ConfmlFeatureEditorPlugin.INSTANCE.getString(key,\r\n\t\t\t\tnew Object[] { s1 });\r\n\t}", "@Override\n\tpublic String toString()\n\t{\n\t\tString result = \"\";\n\t\tfor(String c : commands)\n\t\t\tresult += c + '\\n';\n\t\treturn result;\n\t}", "public static String readString(String prompt){ \n\t\tSystem.out.print(prompt+\": \");\n\t\tstringInput = readInput();\n\t\treturn stringInput; \n\t}", "public int getStr()\n\t{\n\t\treturn str; \n\t}", "public java.lang.String getArg() {\n\t\t\t\tjava.lang.Object ref = arg_;\n\t\t\t\tif (!(ref instanceof java.lang.String)) {\n\t\t\t\t\tcom.google.protobuf.ByteString bs =\n\t\t\t\t\t\t\t(com.google.protobuf.ByteString) ref;\n\t\t\t\t\tjava.lang.String s = bs.toStringUtf8();\n\t\t\t\t\targ_ = s;\n\t\t\t\t\treturn s;\n\t\t\t\t} else {\n\t\t\t\t\treturn (java.lang.String) ref;\n\t\t\t\t}\n\t\t\t}", "public int getStr() {\n return str;\n }", "public static String getString(JTEResourceType stringName) {\r\n rb = ResourceBundle.getBundle(PropertiesManager.getPropertiesManager().\r\n getProperty(JTEPropertyType.RESOURCE_LOCATION));\r\n return rb.getString(stringName.toString());\r\n }", "private String GetPlayerString_UI()\n {\n String ret = GetPlayerString_UI(mPositionComboBox.getSelectedItem().toString());\n return ret;\n }", "public String getString() {\t\t\t\n\t\tString result = \"\";\n\t\tfor (int row = 0; row < this.size; row ++) {\n\t\t\tString line = \"\";\n\t\t\tfor (int column = 0; column < this.size; column++) {\n\t\t\t\tline += printToken(this.getTokenAt(new Vector(column, row))) + \" \";\n\t\t\t}\n\t\t\t\n\t\t\tresult += line + System.lineSeparator();\n\t\t}\n\t\treturn result;\n\t}" ]
[ "0.7230889", "0.6914201", "0.6847531", "0.6840638", "0.6840638", "0.67236805", "0.67236805", "0.67236805", "0.66312176", "0.6558205", "0.65078807", "0.64706683", "0.64706683", "0.63858116", "0.638023", "0.6366365", "0.63621986", "0.63258183", "0.6276088", "0.62643653", "0.6236942", "0.621243", "0.61885685", "0.61453736", "0.6144047", "0.6058864", "0.60551715", "0.60219103", "0.6014413", "0.6009004", "0.6009004", "0.6001783", "0.59966767", "0.59846973", "0.59802884", "0.5965834", "0.5964227", "0.59462696", "0.59130585", "0.5912596", "0.5903726", "0.58679646", "0.5862924", "0.58613247", "0.585522", "0.58494943", "0.5848681", "0.58329016", "0.58025277", "0.5792884", "0.57802933", "0.57729894", "0.57729894", "0.5763365", "0.57568705", "0.57469773", "0.57423383", "0.57325757", "0.57289684", "0.5723566", "0.57228935", "0.57094496", "0.56975645", "0.5693257", "0.56928885", "0.56858265", "0.5671979", "0.56618005", "0.56580424", "0.565655", "0.5656323", "0.5655642", "0.565482", "0.5653967", "0.5650081", "0.5634106", "0.562315", "0.5621971", "0.561852", "0.5617466", "0.56091756", "0.56066984", "0.5603596", "0.5597309", "0.5585407", "0.55827534", "0.5582441", "0.55820686", "0.55814105", "0.5576536", "0.5573818", "0.55613637", "0.5561064", "0.55531436", "0.55443627", "0.55438274", "0.5534216", "0.5529999", "0.55289626", "0.5527079" ]
0.58087254
48
Invoke the given method
public Object invoke( Object instance, Object[] parameterValues, boolean validateArguments ) throws ActionExecutionException, InternalComponentException { try { if (isDeprecated()) { log.warn("Method '" + this.toString() + "' is deprecated"); } //convert string to Enumerations if necessary if (hasEnumParameter) { parameterValues = convertToEnums(parameterValues); } //validate the arguments if (validateArguments) { validateArguments(parameterValues); } //invoke the action return doInvoke(instance, this.parameterNames, parameterValues); } catch (IllegalArgumentException ae) { throw new ActionExecutionException("Illegal arguments passed to action '" + actionName + "'", ae); } catch (IllegalAccessException iae) { throw new ActionExecutionException("Could not access action '" + actionName + "'", iae); } catch (InvocationTargetException ite) { throw new InternalComponentException(componentName, actionName, ite.getTargetException()); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public abstract Object invoke(T target , Method method , Object[] args) throws Throwable;", "protected void invokeMethod(MetaMethod method) {\n Class callClass = method.getInterfaceClass();\n boolean useInterface = false;\n if (callClass == null) {\n callClass = method.getCallClass();\n }\n else {\n useInterface = true;\n }\n String type = BytecodeHelper.getClassInternalName(callClass.getName());\n String descriptor = BytecodeHelper.getMethodDescriptor(method.getReturnType(), method.getParameterTypes());\n\n // System.out.println(\"Method: \" + method);\n // System.out.println(\"Descriptor: \" + descriptor);\n\n if (method.isStatic()) {\n loadParameters(method, 3);\n cv.visitMethodInsn(INVOKESTATIC, type, method.getName(), descriptor);\n }\n else {\n cv.visitVarInsn(ALOAD, 2);\n helper.doCast(callClass);\n loadParameters(method, 3);\n cv.visitMethodInsn((useInterface) ? INVOKEINTERFACE : INVOKEVIRTUAL, type, method.getName(), descriptor);\n }\n\n helper.box(method.getReturnType());\n }", "InvocationResult invoke(RemoteService service, MethodInvocation invocation);", "public Object invoke(String name, Object... args) throws Exception;", "Result invoke(Invoker<?> invoker, Invocation invocation);", "@Override\n\t\t\t\t\tpublic void run() {\n\t\t\t\t\t\tinvoke();\n\t\t\t\t\t}", "K invoke(Map<String, Method> methods, T object);", "void callMethod(Object obj, String name, Object... args)\n throws ScriptRunnerException;", "@Override\r\n\tpublic Object invoke(Object proxy, Method method, Object[] args) throws Throwable {\n\t\tbeforeMethod();\r\n\t\tObject result = method.invoke(target, args);\r\n\t\tafterMethod();\r\n\t\treturn result;\r\n\t}", "public Object perform(MethodActionEvent event)\n throws Throwable;", "void callMethod(String name, Object... args)\n throws ScriptRunnerException;", "public ObjectType callMethod(String methodName, ObjectType... args) {\n\t\t// getting the member\n\t\tObjectType member = getProperty(methodName);\n\t\t//check if exists\n\t\tif (member.isUndefined())\n\t\t\t//call hosted one instead if not exist\n\t\t\treturn callHostedMethod(\"_\", methodName, args);\n\t\t\n\t\t//calling the function\n\t\treturn member.invoke(this, args);\n\t}", "public abstract void doInvoke(InvocationContext ic) throws Exception;", "Mono<Void> invokeMethod(String methodName);", "public Object invoke( Object[] args )\n {\n return invokeFromBytecode(args);\n }", "public static Object invoke(Method paramMethod, Object paramObject, Object[] paramArrayOfObject) throws InvocationTargetException, IllegalAccessException {\n/* */ try {\n/* 276 */ return bounce.invoke(null, new Object[] { paramMethod, paramObject, paramArrayOfObject });\n/* 277 */ } catch (InvocationTargetException invocationTargetException) {\n/* 278 */ Throwable throwable = invocationTargetException.getCause();\n/* */ \n/* 280 */ if (throwable instanceof InvocationTargetException)\n/* 281 */ throw (InvocationTargetException)throwable; \n/* 282 */ if (throwable instanceof IllegalAccessException)\n/* 283 */ throw (IllegalAccessException)throwable; \n/* 284 */ if (throwable instanceof RuntimeException)\n/* 285 */ throw (RuntimeException)throwable; \n/* 286 */ if (throwable instanceof Error) {\n/* 287 */ throw (Error)throwable;\n/* */ }\n/* 289 */ throw new Error(\"Unexpected invocation error\", throwable);\n/* */ }\n/* 291 */ catch (IllegalAccessException illegalAccessException) {\n/* */ \n/* 293 */ throw new Error(\"Unexpected invocation error\", illegalAccessException);\n/* */ } \n/* */ }", "public static Object invokeMethod(Method method, Object target) {\n return invokeMethod(method, target, new Object[0]);\n }", "protected final Object dynamicMethod(GeneratedMessageLite.MethodToInvoke paramMethodToInvoke, Object paramObject1, Object paramObject2) {\n }", "protected final Object dynamicMethod(GeneratedMessageLite.MethodToInvoke paramMethodToInvoke, Object paramObject1, Object paramObject2) {\n }", "@Override\n public Object invoke(Object proxy, Method method, Object[] args)\n throws Throwable {\n if (method.getDeclaringClass() == Object.class) {\n return method.invoke(this, args);\n }\n ServiceMethod<Object, Object> serviceMethod =\n (ServiceMethod<Object, Object>) loadServiceMethod(method);\n ServiceCall<Object> serviceCall = new ServiceCall<>(serviceMethod, args);\n return serviceMethod.adapt(serviceCall, args);\n }", "public Object invoke(Object obj, Object[] params) throws Exception {\r\n return this.method.invoke(obj, params);\r\n }", "Mono<Void> invokeMethod(String methodName, Object data);", "public Object invoke(MethodInvocation methodInvocation) throws Throwable\r\n\t{\r\n\t\tlong startTime = System.currentTimeMillis();\r\n\t\tLOG.info(\"Beginning executing method: \" + methodInvocation.getMethod().getDeclaringClass() + \"::\"\r\n\t\t\t\t+ methodInvocation.getMethod().getDeclaringClass() + \"::\"\r\n\t\t\t\t+ methodInvocation.getMethod().getName());\r\n\t\tif (LOG.isDebugEnabled())\r\n\t\t{\r\n\t\t\tLOG.debug(\"Method parameters: \" + methodInvocation.getArguments().length);\r\n\r\n\t\t\tfor (Object object : methodInvocation.getArguments())\r\n\t\t\t{\r\n\t\t\t\tLOG.debug(SensusStringUtil.createToString(object));\r\n\t\t\t}\r\n\t\t}\r\n\t\tObject returnValue = new Object();\r\n\t\ttry\r\n\t\t{\r\n\t\t\treturnValue = methodInvocation.proceed();\r\n\t\t}\r\n\t\tfinally\r\n\t\t{\r\n\t\t\tLOG.info(\"Finished executing method: \" + methodInvocation.getMethod().getDeclaringClass() + \"::\"\r\n\t\t\t\t\t+ methodInvocation.getMethod().getDeclaringClass() + \"::\"\r\n\t\t\t\t\t+ methodInvocation.getMethod().getName() + \"::\" + (System.currentTimeMillis() - startTime)\r\n\t\t\t\t\t+ \" msecs.\");\r\n\t\t\tif (LOG.isDebugEnabled())\r\n\t\t\t{\r\n\t\t\t\tLOG.debug(\"Return value of method: \" + SensusStringUtil.createToString(returnValue));\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn returnValue;\r\n\t}", "@Override\n\tpublic Object invoke(Object proxy, Method method, Object[] args) throws Throwable {\n\t\tmethodInvocation.invoke();\n\t\treturn method.invoke(bean, args);\n\t}", "private Object executeMethod(Object target, CallStatement callStatement)\n throws EngineException {\n try {\n CallStatement.CallStatementEntry entry = \n callStatement.getEntries().get(callStatement.getEntries().size() -1);\n Method[] methods = target.getClass().getMethods();\n for (Method method: methods) {\n if (methodsMatch(method,entry)) {\n return method.invoke(target, parameters.toArray(new Object[0]));\n }\n }\n } catch (EngineException ex) {\n throw ex;\n } catch (Exception ex) {\n throw new EngineException(\"Failed to execute the method because : \" \n + ex.getMessage(),ex);\n }\n throw new java.lang.NoSuchMethodError(\n \"No method matching the requirments was found\");\n }", "public Object call(Object[] args) {\r\n return invoke(args);\r\n }", "abstract protected Object invoke0 (Object obj, Object[] args);", "Object executeMethod(Object pObject, Method pMethod,Object[] pArgs) {\r\n\t\tObject result = null ;\r\n\t\ttry {\r\n\t\t\tresult = pMethod.invoke(pObject,pArgs) ;\r\n\t\t} catch (Exception e) {\r\n\t\t\tString message ;\r\n\t\t\tmessage = \"Error Capturing \" + getCallingClassSignature() ;\r\n\t\t\t_supervisor.echo(message) ;\r\n\t\t\tthrow new ExecutionException(message) ;\r\n\t\t}\r\n\t\treturn result ;\r\n\t}", "public static Object invokeMethod(Method method, Object target, Object... args) {\n try {\n return method.invoke(target, args);\n } catch (Exception e) {\n handleReflectionException(e);\n }\n throw new IllegalStateException(\"Should never get here\");\n }", "public java.lang.Object callMethod (Symbol methodName, java.lang.Object[] args, int timeOut)\n throws G2AccessException;", "@Override\r\n \tpublic Object invoke(Object arg0, Method arg1, Object[] arg2)\r\n \t\t\tthrows Throwable {\n \t\tString urlfortheobject = baseUrl+methodToID(arg1);\r\n \t\t\r\n \t\t// Get the IRemoteRestCall object for this method...\r\n\t\tClientResource cr = new ClientResource(urlfortheobject);\r\n \t\tIRemoteRestCall resource = cr.wrap(IRemoteRestCall.class, arg1.getReturnType());\r\n \t\t\r\n \t\t// Call\r\n \t\tObject returnObject = resource.doCall(arg2);\r\n\t\tcr.release();\r\n \t\t\r\n \t\t// return\r\n \t\treturn returnObject;\r\n \t}", "private void invoke(Method m, Object instance, Object... args) throws Throwable {\n if (!Modifier.isPublic(m.getModifiers())) {\n try {\n if (!m.isAccessible()) {\n m.setAccessible(true);\n }\n } catch (SecurityException e) {\n throw new RuntimeException(\"There is a non-public method that needs to be called. This requires \" +\n \"ReflectPermission('suppressAccessChecks'). Don't run with the security manager or \" +\n \" add this permission to the runner. Offending method: \" + m.toGenericString());\n }\n }\n \n try {\n m.invoke(instance, args);\n } catch (InvocationTargetException e) {\n throw e.getCause();\n }\n }", "public static Object invokeMethod(Method method, Object[] args) {\n try {\n return method.invoke(null, args);\n }\n catch (IllegalAccessException | InvocationTargetException e) {\n e.printStackTrace();\n }\n return null;\n }", "public JsonNode callMethod(final JsiiObjectRef objRef, final String method, final ArrayNode args) {\n ObjectNode req = makeRequest(\"invoke\", objRef);\n req.put(\"method\", method);\n req.set(\"args\", args);\n\n JsonNode resp = this.runtime.requestResponse(req);\n return resp.get(\"result\");\n }", "@Override\n\tpublic Object invoke(MethodInvocation method) throws Throwable {\n\n\t\ttry{\n\t\t\t//execute the method\n\t\t\tObject returnValue= method.proceed();// whatever method returns is now in the returnValue!!!!\n\t\t\treturn returnValue;\n\t\t}\n\t\tfinally \n\t\t{\n\t\t\t/*do sth after method is done executing eg. stop timer.\n\t\t\t * Now, you can CALCULATE how long the method took to execute and log it*/\n\t\t\t/*Note:\n\t\t\t * try block is there because line 16 might return with an exception depending on which method is being executed.\n\t\t\t * if exception was returned, line 17 does not execute! and this method is also terminated(??) by throwing an exception.\n\t\t\t * We don't catch it here but pass it to the client coz Client called us.\n\t\t\t * \n\t\t\t * finally block runs no matter what because \n\t\t\t * 1. The exception causing statement is in try block\n\t\t\t * 2. The method has throws clause\n\t\t\t */\n\t\t}\n\t}", "Object executeMethodCall(String actionName, String inMainParamValue) throws APIException;", "@Override\n\t\t\tprotected void invokeApplication() {\n\t\t\t\tinvokeMethod(\"#{testAction.testActionMethod}\");\n\t\t\t}", "public void invoke(Event ev){\n try{\n boolean wasAccessible = method.isAccessible();\n method.setAccessible(true);\n method.invoke(listener, ev);\n method.setAccessible(wasAccessible);\n }catch(IllegalAccessException ex){\n Commons.log.log(Level.WARNING, toString()+\" Failed to invoke method for \"+ev, ex);\n }catch(IllegalArgumentException ex){\n Commons.log.log(Level.WARNING, toString()+\" Failed to invoke method for \"+ev, ex);\n }catch(InvocationTargetException ex){\n Commons.log.log(Level.WARNING, toString()+\" Failed to invoke method for \"+ev, ex);\n }catch(SecurityException ex){\n Commons.log.log(Level.WARNING, toString()+\" Failed to invoke method for \"+ev, ex);\n }\n }", "protected void invokeListenerMethod(String methodName, Object[] arguments) {\n\t\ttry {\n\t\t\tinvoker.invoke(arguments);\n\t\t} catch (InvocationTargetException ex) {\n\t\t\tThrowable targetEx = ex.getTargetException();\n\t\t\tif (targetEx instanceof DataAccessException) {\n\t\t\t\tthrow (DataAccessException) targetEx;\n\t\t\t} else {\n\t\t\t\tthrow new RedisListenerExecutionFailedException(\"Listener method '\" + methodName + \"' threw exception\", targetEx);\n\t\t\t}\n\t\t} catch (Throwable ex) {\n\t\t\tthrow new RedisListenerExecutionFailedException(\"Failed to invoke target method '\" + methodName + \"' with arguments \" + ObjectUtils.nullSafeToString(arguments), ex);\n\t\t}\n\t}", "public static Object invokeMethod(Method method, Object instance, Object... params) {\n return performReflectionAction(() -> method.invoke(instance, params));\n }", "@Override\n public void run() {\n\n try {\n //AQUI VAI A FUNCÃO A SER EXECUTADA\n\n invokeMethod(method);\n\n } catch (IllegalAccessException | IllegalArgumentException | InvocationTargetException ex) {\n Logger.getLogger(JFrameSale_1.class.getName()).log(Level.SEVERE, null, ex);\n } catch (Exception ex) {\n Logger.getLogger(JFrameSale_1.class.getName()).log(Level.SEVERE, null, ex);\n }\n }", "@Override\r\n\tpublic void callMethod(MethodDescriptor method, RpcController controller, Message request, Message responsePrototype, RpcCallback<Message> done) {\n\t\t\r\n\t}", "private boolean invoke(sim.stm.Instruction.Invoke invoke) {\n\t\tString className = invoke.method.classType;\n\t\tsim.classs.Class clazz = executor.getClass(className.substring(1,\n\t\t\t\tclassName.length() - 1));\n\t\tif (clazz == null)\n\t\t\treturn false;\n\t\tsim.method.Method m = executor.getMethod(clazz, invoke.method);\n\t\tif (m == null)\n\t\t\treturn false;\n\n\t\t// target method found\n\n\t\tIPersistentMap pReg = PersistentHashMap.EMPTY;\n\t\t// arguments is stored at p{0..} register\n\t\tfor (int index = 0; index < invoke.args.size(); index++) {\n\t\t\tString src = invoke.args.get(index);\n\t\t\tString reg = \"p\" + index;\n\n\t\t\tpReg = pReg.assoc(reg, mapToSym.valAt(src));\n\t\t}\n\n\t\tstack = stack.cons(new StackItem(clazz, currentMethod, pc, mapToSym,\n\t\t\t\tlabelCount));\n\n\t\tthis.clazz = clazz;\n\t\tthis.currentMethod = m;\n\t\tthis.pc = -1;\n\t\tthis.mapToSym = pReg;\n\t\tthis.labelCount = new HashMap<String, AtomicInteger>();\n\t\tfor (sim.method.Method.Label label : m.labelList) {\n\t\t\tlabelCount.put(label.lab, new AtomicInteger(0));\n\t\t}\n\n\t\treturn true;\n\t}", "static String invokingMethod(ContributionDef def)\n {\n return MESSAGES.format(\"invoking-method\", def);\n }", "@Override\n\tpublic Object invoke(Object proxy, Method method, Object[] args) throws UnknownHostException, IOException, ClassNotFoundException {\n\t\tSocket sock = new Socket(IP_adr, Port);\n\t\tCommunicationModule cm = new CommunicationModule();\n\n\t\tTranSegment seg = new TranSegment(Obj_Key, method.getName(), args);\n\n\t\tboolean s = cm.SendObj(sock, seg);\n\t\tif (s) {\n\t\t\t//Get the invoking result returned from server end\n\t\t\tObject result = cm.RecObj(sock);\n\t\t\treturn result;\n\t\t}\n\t\treturn null;\n\t}", "<T> T callMethod(Object obj, String name, Class<T> resultType, Object... args)\n throws ScriptRunnerException;", "public void execute() {\n\t\ttry {\n\t\t\tMethod method = this.getClass().getMethod(parseMethod(), new Class[0]);\n\t\t\tmethod.invoke(this, new Object[0]);\n\t\t} catch (NoSuchMethodException | SecurityException e) {\n\t\t\tSystem.out.println(\"Unknown option: \" + command);\n\t\t} catch (IllegalAccessException | IllegalArgumentException e) {\n\t\t\tSystem.out.println(\n\t\t\t\t\t\"Invalid usage of: \" + command + \", the following error \" + \"was given: \" + e.getMessage());\n\t\t} catch (InvocationTargetException e) {\n\t\t\tSystem.out.println(\"An error occurred while executing '\" + command + \"'. The \"\n\t\t\t\t\t+ \"following error was given: \" + e.getCause());\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public abstract Object[] callMethod(IComputerAccess computer, ILuaContext context, int method,\n\t\t\t\tObject[] arguments) throws Exception;", "public Object invoke(Invocation invocation)\n throws Exception\n {\n String methodName;\n if (invocation.getMethod() != null)\n {\n methodName = invocation.getMethod().getName();\n }\n else\n {\n methodName = \"<no method>\";\n }\n\n boolean trace = log.isTraceEnabled();\n if (trace)\n {\n log.trace(\"Start method=\" + methodName);\n }\n\n // Log call details\n if (callLogging)\n {\n StringBuffer str = new StringBuffer(\"Invoke: \");\n if (invocation.getId() != null)\n {\n str.append(\"[\" + invocation.getId().toString() + \"] \");\n }\n str.append(methodName);\n str.append(\"(\");\n Object[] args = invocation.getArguments();\n if (args != null)\n {\n for (int i = 0; i < args.length; i++)\n {\n if (i > 0)\n {\n str.append(\",\");\n }\n str.append(args[i]);\n }\n }\n str.append(\")\");\n log.debug(str.toString());\n }\n\n try\n {\n return getNext().invoke(invocation);\n }\n catch(Throwable e)\n {\n throw handleException(e, invocation);\n }\n finally\n {\n if (trace)\n {\n log.trace(\"End method=\" + methodName);\n }\n }\n }", "private void emitInvoke () {\r\n Emitter.emit (\"protected Object invoke (\" + School.CELL + \" o) \");\r\n Emitter.emit (\"throws Exception {\");\r\n Emitter.indentPush ();\r\n Emitter.emitln ();\r\n Emitter.emitln (\"if (part != \" + part_no + \") return super.invoke (o);\");\r\n Emitter.emitln ();\r\n\r\n String global_class_id = global_class.getFullyQualifiedClassID ();\r\n Emitter.emitln (global_class_id + \" g = (\" + global_class_id + \") o;\");\r\n Emitter.emitln (\"Object result;\");\r\n Emitter.emitln ();\r\n Emitter.emit (\"switch (selector) {\");\r\n\r\n /* each public method */\r\n int i = 0;\r\n MethodTable mtable = method_table;\r\n\r\n for (java.util.Enumeration ms = mtable.elements ();\r\n\t ms.hasMoreElements (); i++) {\r\n ClassMember m = (ClassMember) ms.nextElement ();\r\n if (!m.isPublic () && !m.isNew ()) continue;\r\n\t\r\n Emitter.emitln ();\r\n Emitter.emit (\"case \" + i + \":\");\r\n Emitter.indentPush ();\r\n Emitter.emitln ();\r\n\t\r\n MethodType mt = (MethodType) m.getType ();\r\n Type rt = mt.getReturnType ();\r\n\t\r\n if (rt.isClass ())\r\n\tEmitter.emit (\"return \");\r\n else if (!rt.isVoid ()) \r\n\tEmitter.emit (rt + \" rval$\" + i + \" = \");\r\n Emitter.emit (\"g.\" + m + \"(\");\r\n\t\r\n /* emit arguements */\r\n ExpressionList args = mt.getArguments ();\r\n for (int j = 0, arg_size = args.size (); j < arg_size; j++) {\r\n\tIdentifier a = (Identifier) args.get (j);\r\n\temitArg (i, j, a);\r\n\tif (j + 1 < arg_size)\r\n\t Emitter.emit (\", \");\r\n }\r\n\t\r\n Emitter.emitln (\");\");\r\n if (!rt.isClass () && !rt.isVoid ()) {\r\n\tEmitter.emit (\"return new \");\r\n\temitType (rt);\r\n\tEmitter.emit (\"(rval$\" + i +\");\");\r\n } else if (rt.isVoid ())\r\n\tEmitter.emit (\"return null;\");\r\n Emitter.indentPop ();\r\n }\r\n\r\n Emitter.emitln ();\r\n Emitter.emit (\"default:\");\r\n Emitter.indentPush ();\r\n Emitter.emitln ();\r\n Emitter.emit (\"throw new Exception (\\\"\" + class_id \r\n\t\t + \": invalid selector = \\\" + selector);\");\r\n Emitter.indentPop ();\r\n Emitter.emitln ();\r\n Emitter.emit (\"}\");\r\n Emitter.indentPop ();\r\n Emitter.emitln ();\r\n Emitter.emitln (\"}\");\r\n }", "void invoke(T event);", "MethodName getMethod();", "protected synchronized Object call(final String method, final Object... params) throws XmlRpcException {\r\n\r\n\t\tLOGGER.finest(\"Executing call \" + method + \" \" + Arrays.toString(params));\r\n\t\treturn client.execute(method, params);\r\n\t}", "@Override\n\tpublic Object invoke(MethodInvocation arg0) throws Throwable {\n\t\tSystem.out.println(\"The name of the method that is getting executed is :\"+arg0.getMethod().getName());\n\t\tObject[] args=arg0.getArguments();\n\t\tSystem.out.println(\"First argument:\"+args[0]);\n\t\tSystem.out.println(\"Second argument:\"+args[1]);\n\t\tObject ret=arg0.proceed();\n\t\treturn ret;\n\t}", "protected abstract Object invokeInContext(MethodInvocation paramMethodInvocation)\r\n/* 111: */ throws Throwable;", "protected Object doInvoke( Object instance, List<String> parameterNames,\n Object[] parameterValues ) throws IllegalArgumentException,\n IllegalAccessException, InvocationTargetException,\n ActionExecutionException {\n if (log.isInfoEnabled()) {\n if (!actionName.matches(\"Internal.*Operations.*\")\n && !actionName.startsWith(\"InternalProcessTalker\")) {\n log.info(\"Executing '\" + actionName + \"' with arguments \"\n + StringUtils.methodInputArgumentsToString(parameterValues));\n } else {\n // internal action\n if (log.isDebugEnabled())\n log.debug(\"Executing '\" + actionName + \"' with arguments \"\n + StringUtils.methodInputArgumentsToString(parameterValues));\n }\n }\n\n return method.invoke(instance, parameterValues);\n }", "protected Object executeMethod(Object instance, Method method, Object args) {\n try {\n if (args == null) {\n return method.invoke(instance);\n } else {\n return method.invoke(instance, args);\n }\n } catch (Exception e) {\n exceptionHandling(e);\n return null;\n }\n }", "@Override\n\tpublic Void visit(OwnMethodCall method) {\n\t\tprintIndent(\"implicit dispatch\");\n\t\tindent++;\n\t\tmethod.methodName.accept(this);\n\t\tfor (var v : method.args) \n\t\t\tv.accept(this);\n\t\tindent--;\n\t\treturn null;\n\t}", "<R> Promise<R> invoke(String methodName, Class<R> returnType, Object... arguments);", "protected boolean applyImpl() throws Exception\n {\n MBeanServer mbeanServer = (MBeanServer) getCorrectiveActionContext()\n .getContextObject(CorrectiveActionContextConstants.Agent_MBeanServer);\n ObjectName objectName = (ObjectName) getCorrectiveActionContext()\n .getContextObject(CorrectiveActionContextConstants.MBean_ObjectName);\n\n Object result = mbeanServer.invoke(objectName, m_methodName, m_parameters, m_signature);\n\n return matchesDesiredResult(result);\n }", "int apply(MethodVisitor methodVisitor, Method method);", "@Override\n public void execute() throws EngineException {\n Object target = JavaReflectionUtil.getObject(this.target, \n callStatement.getEntries().subList(1,\n callStatement.getEntries().size() - 1));\n this.getParent().setResult(executeMethod(target, callStatement));\n pop();\n }", "@Test\npublic void testJudge() throws Exception { \n//TODO: Test goes here... \n/* \ntry { \n Method method = ResultService.getClass().getMethod(\"judge\", String.class, String.class); \n method.setAccessible(true); \n method.invoke(<Object>, <Parameters>); \n} catch(NoSuchMethodException e) { \n} catch(IllegalAccessException e) { \n} catch(InvocationTargetException e) { \n} \n*/ \n}", "<T> Mono<T> invokeMethod(String methodName, Object data, Class<T> clazz);", "void call();", "@Override\n public final Object invokeMethod(String name, Object args) {\n DSL dsl = (DSL) getBinding().getVariable(STEPS_VAR);\n return dsl.invokeMethod(name,args);\n }", "public abstract void call();", "public void simulateMethod(SootMethod method, ReferenceVariable thisVar, ReferenceVariable returnVar,\n ReferenceVariable params[]) {\n\n String subSignature = method.getSubSignature();\n\n if (subSignature.equals(\"java.lang.Object getObjectFieldValue(java.lang.Object,long)\")) {\n java_io_ObjectOutputStream_getObjectFieldValue(method, thisVar, returnVar, params);\n return;\n\n } else {\n defaultMethod(method, thisVar, returnVar, params);\n return;\n\n }\n }", "<T> Mono<T> invokeMethod(String methodName, Class<T> clazz);", "public Object invokeMethod(Object object, String methodName, Object arguments) {\n /*\n System\n .out\n .println(\n \"Invoker - Invoking method on object: \"\n + object\n + \" method: \"\n + methodName\n + \" arguments: \"\n + InvokerHelper.toString(arguments));\n \n */\n \n if (object == null) {\n throw new NullPointerException(\"Cannot invoke method: \" + methodName + \" on null object\");\n }\n \n if (object instanceof GroovyObject) {\n GroovyObject groovy = (GroovyObject) object;\n return groovy.invokeMethod(methodName, arguments);\n }\n else {\n if (object instanceof Class) {\n Class theClass = (Class) object;\n \n MetaClass metaClass = metaRegistry.getMetaClass(theClass);\n return metaClass.invokeStaticMethod(object, methodName, asArray(arguments));\n }\n else {\n Class theClass = object.getClass();\n \n MetaClass metaClass = metaRegistry.getMetaClass(theClass);\n return metaClass.invokeMethod(object, methodName, asArray(arguments));\n }\n }\n }", "<T> T callMethod(String name, Class<T> resultType, Object... args)\n throws ScriptRunnerException;", "Object executeMethodCall(ActionType actionType, String actionName, Map<String, Object> inParams) throws APIException;", "public Method getMethod();", "public void callMethod( String objectName )\n throws MraldException\n {\n AbstractStep mraldObject = ( AbstractStep )createObject( objectName );\n mraldObject.execute( messageObject );\n mraldObject = null;\n }", "@Override\n\tpublic Object invoke(Object proxy, Method method, Object[] args) throws Throwable {\n\t\tSystem.out.println(\"do some work before proxy\");\n\t\tObject invokeObj = method.invoke(delegator, args);\n\t\tSystem.out.println(\"do some work after proxy\");\n\t\treturn invokeObj;\n\t}", "@Override\n public Object invoke(Object proxy, Method method, Object[] args) throws Throwable {\n System.out.println(number);\n counter++;\n return method.invoke(target, args);\n\n //return ;\n\n }", "@Override\n\tpublic Object invoke(Object proxy, Method method, Object[] args)\n\t\t\tthrows Throwable {\n\t\tObject result = null;\n\t\ttry{\n\t\t\tSystem.out.println(\"Before is OK!\");\n\t\t\tresult = method.invoke(this.ob, args);\n\t\t\tSystem.out.println(\"After is OK!\");\n\t\t}catch(Exception e){\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn result;\n\t}", "private FamixMethod findInvokedMethodOnName(String fromClass, String fromMethod, String invokedClassName, String invokedMethodName) {\n \tFamixMethod result = null;\n\t\t/* Test Helper\n\t\tif (fromClass.equals(\"domain.direct.violating.AccessLocalVariable_SetArgumentValue\")){\n\t\t\tboolean breakpoint = true;\n\t\t} */\n\n \t// 1) If methodNameAsInInvocation matches with a method unique name, return that method. \n \tString searchKey = invokedClassName + \".\" + invokedMethodName;\n \tif (theModel.behaviouralEntities.containsKey(searchKey)) {\n \t\treturn (FamixMethod) theModel.behaviouralEntities.get(searchKey);\n \t}\n \t// 2) Find out if there are more methods with the same name of the invoked class. If only one method is found, then return this method. \n \tString methodName = invokedMethodName.substring(0, invokedMethodName.indexOf(\"(\")); // Methodname without signature\n \t searchKey = invokedClassName + \".\" + methodName;\n \tif (sequencesPerMethod.containsKey(searchKey)){\n \t\tArrayList<FamixMethod> methodsList = sequencesPerMethod.get(searchKey);\n \t\tif (methodsList.size() == 0) {\n \t\t\treturn result;\n \t\t} else if (methodsList.size() == 1) {\n \t\t\t// FamixMethod result1 = methodsList.get(0);\n \t\t\treturn methodsList.get(0);\n \t\t} else { // 3) if there are more methods with the same name, then compare the invocation arguments with the method parameters.\n \t\t\tString invocationSignature = invokedMethodName.substring(invokedMethodName.indexOf(\"(\"));;\n \t\t\tString contentsInvocationSignature = invocationSignature.substring(invocationSignature.indexOf(\"(\") + 1, invocationSignature.indexOf(\")\")); \n \t\t\tString[] invocationArguments = contentsInvocationSignature.split(\",\");\n \t\t\tint numberOfArguments = invocationArguments.length;\n \t\t\t// 3a) If there is only one method with the same number of parameters as invocationArguments, then return this method\n \t\t\tList<FamixMethod> matchingMethods1 = new ArrayList<FamixMethod>();\n\t \t\tfor (FamixMethod method : methodsList){\n\t \t\t\tif ((method.signature != null) && (!method.signature.equals(\"\"))) {\n\t\t \t\t\tString contentsmethodParameter = method.signature.substring(method.signature.indexOf(\"(\") + 1, method.signature.indexOf(\")\")); \n\t\t \t\t\tString[] methodParameters = contentsmethodParameter.split(\",\");\n\t\t \t\t\tif (methodParameters.length == numberOfArguments) {\n\t\t \t\t\t\tmatchingMethods1.add(method);\n\t\t \t\t\t}\n\t \t\t\t}\n\t \t\t} \n\t \t\tif (matchingMethods1.size() == 0)\n\t \t\t\treturn result;\n\t \t\tif (matchingMethods1.size() == 1)\n\t \t\t\treturn matchingMethods1.get(0);\n \t\t\t\n \t\t\t// 3b) If there is only one method where the first parameter type == the first argument type, then return this method \n \t\t\tList<FamixMethod> matchingMethods2 = new ArrayList<FamixMethod>();\n \t\t\tif (numberOfArguments >= 1) {\n \t\t\t\t// Replace the argument string by a type, in case of an attribute\n \t\t\t\tinvocationArguments[0] = getTypeOfAttribute(fromClass, fromMethod, invocationArguments[0]);\n \t \t\tfor (FamixMethod matchingMethod1 : matchingMethods1){\n \t \t\t\tString contentsmethodParameter = matchingMethod1.signature.substring(matchingMethod1.signature.indexOf(\"(\") + 1, matchingMethod1.signature.indexOf(\")\")); \n \t \t\t\tString[] methodParameters = contentsmethodParameter.split(\",\");\n \t \t\t\tif (methodParameters.length >= 1) {\n \t \t\t\tmethodParameters[0] = getfullPathOfDeclaredType(fromClass, methodParameters[0]);\n \t \t\t\t\tif (methodParameters[0].equals(invocationArguments[0])) {\n \t \t\t\t\t\tmatchingMethods2.add(matchingMethod1);\n \t \t\t\t\t}\n \t \t\t\t}\n \t \t\t\t\n \t \t\t} \n \t \t\tif (matchingMethods2.size() == 0)\n \t \t\t\treturn result;\n \t \t\tif (matchingMethods2.size() == 1)\n \t \t\t\treturn matchingMethods2.get(0);\n \t\t\t}\n \t\t\t// If there is only one method where the second parameter type == the first argument type, then return this method \n \t\t\tif (numberOfArguments >= 2) {\n \t\t\t\tmatchingMethods1.clear();\n \t\t\t\t// Replace the argument string by a type, in case of an attribute\n \t\t\t\tinvocationArguments[1] = getTypeOfAttribute(fromClass, fromMethod, invocationArguments[1]);\n \t \t\tfor (FamixMethod matchingMethod2 : matchingMethods2){\n \t \t\t\tString contentsmethodParameter = matchingMethod2.signature.substring(matchingMethod2.signature.indexOf(\"(\") + 1, matchingMethod2.signature.indexOf(\")\")); \n \t \t\t\tString[] methodParameters = contentsmethodParameter.split(\",\");\n \t \t\t\tif (methodParameters.length >= 2) {\n \t \t\t\tmethodParameters[1] = getfullPathOfDeclaredType(fromClass, methodParameters[1]);\n \t \t\t\t\tif (methodParameters[1].equals(invocationArguments[1])) {\n \t \t\t\t\t\tmatchingMethods1.add(matchingMethod2);\n \t \t\t\t\t}\n \t \t\t\t}\n \t \t\t\t\n \t \t\t} \n \t \t\tif (matchingMethods1.size() == 0)\n \t \t\t\treturn result;\n \t \t\tif (matchingMethods1.size() == 1)\n \t \t\t\treturn matchingMethods1.get(0);\n \t\t\t}\n \t\t}\n\t\t}\n \treturn result; \n }", "private void callHandler(String method, HttpServletRequest request, HttpServletResponse response) throws IOException {\n JsonElement payload = getPayload(request, response);\n RequestContext context = new RequestContext(\n request, response, urlVariables, request.getParameterMap(), payload);\n PathNode apiStructure = getApiStructure(method);\n\n if (request.getPathInfo() == null) {\n logger.warn(\"Received \" + method + \" request with empty path.\");\n return;\n }\n\n PathNode.PathNodeResult result = apiStructure.getBindingForSubPath(request.getPathInfo());\n if (result != null) {\n urlVariables.putAll(result.getArgValues());\n result.getApiSpec().apiInterface.call(context);\n }\n }", "<T> Mono<T> invokeMethod(String methodName, Object data, TypeRef<T> type);", "V call() throws StatusRuntimeException;", "public static InvocationExpression invoke(Expression expression, Expression arguments[]) { throw Extensions.todo(); }", "Method getMethod();", "Method getMethod();", "Object invoke(Object reqest) throws IOException, ClassNotFoundException,\n InvocationTargetException, IllegalAccessException, IllegalArgumentException;", "public void callit();", "public static <T> Object invokeAnyMethod(T instance, String method, Object... args) throws InvocationTargetException,\n NoSuchMethodException, IllegalAccessException {\n return invokeAnyMethod(instance, method, null, args);\n }", "public static Object perform(Object receiver, String methodName, Object[] arguments, Class[] types) throws DiagnoseException {\r\n if (\"this\".equals(methodName))\r\n return receiver;\r\n Object result = null;\r\n try {\r\n Class methodClass = receiver.getClass();\r\n if (methodClass == Class.class) // receiver is class?\r\n methodClass = (Class) receiver;\r\n Method method = methodClass.getMethod(methodName, types);\r\n result = method.invoke(receiver, arguments);\r\n } catch (IllegalArgumentException e) {\r\n throw new DiagnoseException(\"IllegalArgumentException invoking \" + methodName, e);\r\n } catch (IllegalAccessException e) {\r\n throw new DiagnoseException(\"IllegalAccessException invoking \" + methodName, e);\r\n } catch (InvocationTargetException e) {\r\n throw new DiagnoseException(\"InvocationTargetException invoking \" + methodName, e);\r\n } catch (SecurityException e) {\r\n throw new DiagnoseException(\"SecurityException invoking \" + methodName, e);\r\n } catch (NoSuchMethodException e) {\r\n throw new DiagnoseException(\"NoSuchMethodException invoking \" + methodName, e);\r\n }\r\n return result;\r\n }", "protected Object invokeWithRetries(Method m, Object... params)\n {\n long endTime = System.currentTimeMillis() + config.getTimeout();\n do\n {\n try\n {\n if (trace) log.trace(\"About to invoke operation \" + m);\n Object rv = m.invoke(this, params);\n if (trace) log.trace(\"Completed invocation of \" + m);\n return rv;\n }\n catch (IllegalAccessException e)\n {\n log.error(\"Should never get here!\", e);\n }\n catch (InvocationTargetException e)\n {\n if (e.getCause() instanceof IOException)\n {\n try\n {\n // sleep 250 ms\n if (log.isDebugEnabled()) log.debug(\"Caught IOException. Retrying.\", e);\n Thread.sleep(config.getReconnectWaitTime());\n restarter.restartComponent(this);\n }\n catch (InterruptedException e1)\n {\n Thread.currentThread().interrupt();\n }\n catch (Exception e1)\n {\n if (trace) log.trace(\"Unable to reconnect\", e1);\n }\n }\n else\n {\n throw new CacheException(\"Problems invoking method call!\", e);\n }\n }\n }\n while (System.currentTimeMillis() < endTime);\n throw new CacheException(\"Unable to communicate with TCPCacheServer(\" + config.getHost() + \":\" + config.getPort() + \") after \" + config.getTimeout() + \" millis, with reconnects every \" + config.getReconnectWaitTime() + \" millis.\");\n }", "@Override\n\tpublic void call() {\n\t\t\n\t}", "public void asynchExecution(String remoteMethod, String[] param) {\n return;\n }", "<T> Mono<T> invokeMethod(String methodName, TypeRef<T> type);", "public void methodInvoked(String methodName, String resultReturned) {\n final long timeNow = System.currentTimeMillis();\n\n// final CallStats callStats = stats.computeIfAbsent(methodName, k -> new CallStats(methodName, timeNow, resultReturned));\n CallStats callStats = stats.get(methodName);\n\n if (callStats != null) {\n callStats.count.increment();\n callStats.lastCall.set(timeNow);\n callStats.lastResult.set(resultReturned);\n }\n // do not track stats for non existing methods\n }", "void invoke(Map<String, Object> data, String sender);", "Methodsig getMethod();", "public void callmetoo(){\r\n\tSystem.out.println(\"This is a concrete method\");\r\n\t}", "void updateMethod(Method method);", "public JValue invokeMethodInternal(\n\t\tIFuncValue func,\r\n\t\tJMethodType methodType,\r\n\t\tString methodName,\r\n\t\tJValue[] values, \r\n\t\tJValue instance){\r\n\t\tArgument[] args = prepareArguments(methodName, methodType, values, instance, false);\r\n\t\treturn invokeFunction(func, methodType, methodName, args);\r\n\t}", "public void method() {\n\t\t\r\n\t\t\r\n\t\tnew Inter() {\t\t\t\t\t\t\t//实现Inter接口\r\n\t\t\tpublic void print() {\t\t\t\t//重写抽象方法\r\n\t\t\t\tSystem.out.println(\"print\");\r\n\t\t\t}\r\n\t\t}.print();\r\n\t\t\r\n\t\t\r\n\t}", "public final d invoke() {\n return a.a(this.receiver$0, this.$additionalAnnotations);\n }", "@Test\npublic void testCalFileUFP() throws Exception { \n//TODO: Test goes here... \n/* \ntry { \n Method method = ResultService.getClass().getMethod(\"calFileUFP\", int.class, int.class, int.class, EstimationFileData.class); \n method.setAccessible(true); \n method.invoke(<Object>, <Parameters>); \n} catch(NoSuchMethodException e) { \n} catch(IllegalAccessException e) { \n} catch(InvocationTargetException e) { \n} \n*/ \n}" ]
[ "0.7435669", "0.7317846", "0.6899856", "0.6883774", "0.6827061", "0.6799089", "0.6790459", "0.67697054", "0.67562723", "0.6735786", "0.6724518", "0.66814715", "0.66530776", "0.6638351", "0.6611305", "0.6594148", "0.65842384", "0.6527405", "0.6527405", "0.65032965", "0.6497988", "0.64804244", "0.6475876", "0.6472831", "0.64396083", "0.6426764", "0.6412695", "0.63871765", "0.6367275", "0.635175", "0.6349593", "0.6346373", "0.6323526", "0.63222593", "0.63185704", "0.63154083", "0.63009065", "0.6270576", "0.62496454", "0.62446535", "0.6243984", "0.62362623", "0.6212027", "0.62089264", "0.6202439", "0.6194352", "0.61917436", "0.6191463", "0.61829895", "0.6162225", "0.6138974", "0.61234605", "0.6118599", "0.6111676", "0.6101045", "0.6077611", "0.6074405", "0.60700494", "0.60596794", "0.60160553", "0.60046035", "0.6003704", "0.59979653", "0.59961313", "0.5995266", "0.5988307", "0.59856606", "0.59756196", "0.5970905", "0.59687895", "0.59669346", "0.5966822", "0.59619963", "0.5951143", "0.59446144", "0.5926985", "0.5893418", "0.5880683", "0.5869761", "0.5864259", "0.5859054", "0.58486724", "0.5846163", "0.5846163", "0.5834441", "0.5823724", "0.5816384", "0.5812113", "0.5803867", "0.5796646", "0.57870555", "0.57772267", "0.57711047", "0.5769085", "0.5763036", "0.5746373", "0.5745835", "0.5730265", "0.57203335", "0.57140917", "0.57088" ]
0.0
-1
/ Here we log the action we are going to be execute. ATS has some actions for internal usage and users should not see them. Currently we do not have some good way to distinguish these actions from the regular ones, for example we could use a new attribute in the Action annotation. For now we can filter these ATS internal actions by expecting their names match the next regular expression.
protected Object doInvoke( Object instance, List<String> parameterNames, Object[] parameterValues ) throws IllegalArgumentException, IllegalAccessException, InvocationTargetException, ActionExecutionException { if (log.isInfoEnabled()) { if (!actionName.matches("Internal.*Operations.*") && !actionName.startsWith("InternalProcessTalker")) { log.info("Executing '" + actionName + "' with arguments " + StringUtils.methodInputArgumentsToString(parameterValues)); } else { // internal action if (log.isDebugEnabled()) log.debug("Executing '" + actionName + "' with arguments " + StringUtils.methodInputArgumentsToString(parameterValues)); } } return method.invoke(instance, parameterValues); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void Log(String action) {\r\n\t}", "private static void LogStatic(String action) {\r\n\t}", "private void appendAction(String action) {\n \t\tif (board.isSetupPhase())\n \t\t\treturn;\n \n \t\tif (actionLog == \"\")\n \t\t\tactionLog += \"→ \" + action;\n \t\telse\n \t\t\tactionLog += \"\\n\" + \"→ \" + action;\n \n \t}", "public void executeAction( String actionInfo );", "LogAction createLogAction();", "private void appendAction(int action) {\n \t\tContext context = Settlers.getInstance().getContext();\n \t\tappendAction(context.getString(action));\n \t}", "public void setAction(String action) { this.action = action; }", "public void setAction (String action) {\n this.action = action;\n }", "public void setAction(String action) {\n this.action = action;\n }", "public void setAction(String action) {\n this.action = action;\n }", "public String getActionLog() {\n \t\treturn actionLog;\n \t}", "public void setAction(String action) {\n\t\tthis.action = action;\n\t}", "public void setActionInfo(String actionInfo);", "public static void LogIt(String action, File entity) {\n\t\t\r\n\t}", "@Override\n\tpublic void action() {\n\t\tSystem.out.println(\"action now!\");\n\t}", "public static void m5807a(Action action) {\n StringBuilder stringBuilder;\n String str = \"\";\n if (action.getInstantArticleData() != null) {\n str = action.getInstantArticleData().getTitle();\n } else if (action.getVideoData() != null) {\n str = action.getVideoData().getHeading();\n }\n if (f4669a != null) {\n Bundle bundle = new Bundle();\n bundle.putString(\"title\", str);\n FirebaseAnalytics firebaseAnalytics = f4669a;\n stringBuilder = new StringBuilder();\n stringBuilder.append(\"home_page_click_\");\n stringBuilder.append(action.getType().name());\n firebaseAnalytics.m12578a(stringBuilder.toString(), bundle);\n }\n Answers instance = Answers.getInstance();\n stringBuilder = new StringBuilder();\n stringBuilder.append(\"home page click \");\n stringBuilder.append(action.getType().name());\n instance.logCustom((CustomEvent) new CustomEvent(stringBuilder.toString()).putCustomAttribute(\"title\", str));\n }", "@Override\r\n\tpublic void visit(SimpleAction action)\r\n\t{\n\t\t\r\n\t}", "void noteActionEvaluationStarted(ActionLookupData actionLookupData, Action action);", "void executeAction(String action, Map params,\n IPSAgentHandlerResponse response);", "@Override\n public void onResult(final AIResponse result) {\n DobbyLog.i(\"Action: \" + result.getResult().getAction());\n }", "public void setAction(String action) {\n this.action = action == null ? null : action.trim();\n }", "public void performAction(HandlerData actionInfo) throws ActionException;", "public void setAction(String action);", "void applyAction(Action action, Session session) throws ActionException;", "public abstract ActionInMatch act();", "String getOnAction();", "private void act() {\n\t\tmyAction.embodiment();\n\t}", "public void setAction(String action) {\n\t\tthis.action.set(action);\n\t}", "public void recordAction(Action action) {\n recordAction(action, DEFAULT_SPEED);\n }", "public String getActionInfo() {\n\n String\taction\t= getAction();\n\n if (ACTION_AppsProcess.equals(action)) {\n return \"Process:AD_Process_ID=\" + getAD_Process_ID();\n } else if (ACTION_DocumentAction.equals(action)) {\n return \"DocumentAction=\" + getDocAction();\n } else if (ACTION_AppsReport.equals(action)) {\n return \"Report:AD_Process_ID=\" + getAD_Process_ID();\n } else if (ACTION_AppsTask.equals(action)) {\n return \"Task:AD_Task_ID=\" + getAD_Task_ID();\n } else if (ACTION_SetVariable.equals(action)) {\n return \"SetVariable:AD_Column_ID=\" + getAD_Column_ID();\n } else if (ACTION_SubWorkflow.equals(action)) {\n return \"Workflow:MPC_Order_Workflow_ID=\" + getMPC_Order_Workflow_ID();\n } else if (ACTION_UserChoice.equals(action)) {\n return \"UserChoice:AD_Column_ID=\" + getAD_Column_ID();\n } else if (ACTION_UserWorkbench.equals(action)) {\n return \"Workbench:?\";\n } else if (ACTION_UserForm.equals(action)) {\n return \"Form:AD_Form_ID=\" + getAD_Form_ID();\n } else if (ACTION_UserWindow.equals(action)) {\n return \"Window:AD_Window_ID=\" + getAD_Window_ID();\n }\n\n /*\n * else if (ACTION_WaitSleep.equals(action))\n * return \"Sleep:WaitTime=\" + getWaitTime();\n */\n return \"??\";\n\n }", "public void setAction(String str) {\n\t\taction = str;\n\t}", "public abstract String intercept(ActionInvocation invocation) throws Exception;", "public abstract void addAction(Context context, NAAction action);", "String[] getActions();", "@Override\n public String getActions() {\n\treturn \"\";\n }", "public void addAction(String act) {\n\t\tpathCost++;\n\t\tactionSequence += act;\n\t\t//System.out.println(\"Action: \" + act + \" H: \" + current.getValue() + \" \" + current.getString());\n\n\t}", "@Override\n\tpublic String getAction() {\n\t\treturn action;\n\t}", "protected String applyAction(PlayerAction action, Player player) {\n GameContext.log(0, \"ignoring action \" + action);\n return \"\";\n }", "private void setAction(String action)\r\n/* 46: */ {\r\n/* 47: 48 */ this.action = action;\r\n/* 48: */ }", "private void appendAction(int action, String additional) {\n \t\tContext context = Settlers.getInstance().getContext();\n \t\tappendAction(String.format(context.getString(action), additional));\n \t}", "@Override\n protected boolean executeAction(SUT system, State state, Action action){\n // adding the action that is going to be executed into HTML report:\n htmlReport.addSelectedAction(state.get(Tags.ScreenshotPath), action);\n return super.executeAction(system, state, action);\n }", "public void processAction(CIDAction action);", "protected abstract void actionExecuted(SUT system, State state, Action action);", "private String convertAction(String action) {\n\t\treturn action.toLowerCase();\n\t}", "public ActionList getActions();", "public String getAction() {\r\n\t\treturn action;\r\n\t}", "public String getAction() {\n return this.action;\n }", "com.cantor.drop.aggregator.model.CFTrade.TradeAction getAction();", "@AutoEscape\n\tpublic String getActionInfo();", "public String getAction() {\n Object ref = action_;\n if (!(ref instanceof String)) {\n com.google.protobuf.ByteString bs =\n (com.google.protobuf.ByteString) ref;\n String s = bs.toStringUtf8();\n action_ = s;\n return s;\n } else {\n return (String) ref;\n }\n }", "public void action() {\n action.action();\n }", "public abstract String getIntentActionString();", "public void act() \r\n {\r\n // Add your action code here.\r\n }", "public void act() \r\n {\r\n // Add your action code here.\r\n }", "private boolean processClientAction (EventData eventData, String actionRegex)\n {\n Object o = eventData.getData().get(\"actionName\");\n if (o == null) {\n return false;\n }\n\n String action = o.toString();\n\n if (!Pattern.matches(actionRegex, action)) {\n return false;\n }\n\n this.actions.add(action);\n return true;\n }", "public String getAction() {\n return action;\n }", "public com.google.protobuf.ByteString\n getActionBytes() {\n Object ref = action_;\n if (ref instanceof String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (String) ref);\n action_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "public String getAction() {\n\t\treturn action;\n\t}", "public String getAction() {\n\t\treturn action;\n\t}", "public String getAction() {\n\t\treturn action;\n\t}", "public String getAction() {\n\t\treturn action;\n\t}", "private void appendAction(int action, int additional) {\n \t\tContext context = Settlers.getInstance().getContext();\n \t\tappendAction(String.format(context.getString(action), context\n \t\t\t\t.getString(additional)));\n \t}", "public void handleAction(Action action){\n\t\tSystem.out.println(action.getActionType().getName() + \" : \" + action.getValue());\n\t\tDroneClientMain.runCommand(\"python george_helper.py \" + action.getActionType().getName().toLowerCase() + \" \" + action.getValue());\n\t}", "@Override\n\tpublic void HandleEvent(int action) {\n\t\tsetActiveAction(action);\n\t\tSystem.out.println(\"action is :\" + action);\n\t\t\n\t}", "@Override\n\tpublic void actionHandler(Actions action, int arg1, int arg2) {\n\t\tlogic.actionHandler(action, arg1, arg2);\n\t}", "public String getAction() {\n Object ref = action_;\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 action_ = s;\n return s;\n }\n }", "@Override\n public void action() {\n }", "@Override\n public void action() {\n }", "@Override\n public void action() {\n }", "public String getAction() {\n return action;\n }", "public String getAction() {\n return action;\n }", "public String getAction() {\n return action;\n }", "public String getAction () {\n return action;\n }", "public void actionSuccessful() {\n System.out.println(\"Action performed successfully!\");\n }", "public void act() \n {\n // Add your action code here.\n }", "public void act() \n {\n // Add your action code here.\n }", "public void act() \n {\n // Add your action code here.\n }", "public void act() \n {\n // Add your action code here.\n }", "public void act() \n {\n // Add your action code here.\n }", "public void act() \n {\n // Add your action code here.\n }", "public void act() \n {\n // Add your action code here.\n }", "public void act() \n {\n // Add your action code here.\n }", "@Override\r\n\tpublic void action() {\n\t\t\r\n\t}", "@Override\n\t\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\t\tSystem.out.print(\"Action: \" + e.getActionCommand() + \"\\n\");\n\t\t\t\t}", "public void setAction(A action) {\r\n\t\tthis.action = action;\r\n\t}", "public void action() {\n }", "protected void takeAction() {\n lastAction = System.currentTimeMillis();\n }", "public abstract Action getAction();", "public static Action action(String id) {\n/* 205 */ return actions.get(id);\n/* */ }", "public String[] getActions() {\n return impl.getActions();\n }", "private String performTheAction(HttpServletRequest request, HttpServletResponse response) {\r\n\t\tString servletPath = request.getServletPath();\r\n\t\tString action = getActionName(servletPath);\r\n\t\t// Let the logged in user run his chosen action\r\n\t\treturn Action.perform(action, request);\r\n\t}", "public int getActionType();", "@Override\n\tpublic void onActionError(int action, String message) {\n\t\t\n\t}", "public com.google.protobuf.ByteString\n getActionBytes() {\n Object ref = action_;\n if (ref instanceof String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (String) ref);\n action_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "@Override\n\tpublic void action() {\n\n\t}", "public boolean hasPlainAction() {\n return actionCase_ == 1;\n }", "@Override\n public void action() {\n System.out.println(\"do some thing...\");\n }", "public A getAction() {\r\n\t\treturn action;\r\n\t}", "public String getAction() {\n\t\treturn action.get();\n\t}", "Action(String desc){\n this.desc = desc;\n this.append = \"\";\n }", "public void setAction(Action action) {\n this.action = action;\n }" ]
[ "0.7537419", "0.65910584", "0.65850884", "0.6579393", "0.6409128", "0.6375389", "0.6361266", "0.62516433", "0.61732394", "0.61732394", "0.6172609", "0.6138329", "0.6084305", "0.60761803", "0.60553443", "0.6031759", "0.5975644", "0.59573627", "0.59375423", "0.59305996", "0.59189045", "0.59008086", "0.5896188", "0.5894805", "0.585343", "0.5850847", "0.5844017", "0.58395326", "0.58076245", "0.5802034", "0.5797159", "0.5793321", "0.5793163", "0.57678354", "0.57620996", "0.5736431", "0.57321775", "0.57267606", "0.5713663", "0.57112384", "0.5692809", "0.56781876", "0.56725746", "0.56599444", "0.5655048", "0.5648362", "0.5644373", "0.56391805", "0.5637298", "0.5635753", "0.5635017", "0.5633726", "0.5626245", "0.5626245", "0.5624026", "0.5617446", "0.56078494", "0.5592693", "0.5592693", "0.5592693", "0.5592693", "0.55880237", "0.55837333", "0.5572103", "0.55630547", "0.5554904", "0.5553663", "0.5553663", "0.5553663", "0.55520886", "0.55520886", "0.55520886", "0.5535995", "0.5535815", "0.5528421", "0.5528421", "0.5528421", "0.5528421", "0.5528421", "0.5528421", "0.5528421", "0.5528421", "0.55206895", "0.55122393", "0.5510825", "0.5508359", "0.550469", "0.5504205", "0.5499568", "0.54892004", "0.5487891", "0.54822147", "0.5479677", "0.54741174", "0.54711545", "0.5470084", "0.54699874", "0.5464574", "0.54625374", "0.5461937", "0.5459827" ]
0.0
-1
Has this action method been deprecated
public boolean isDeprecated() { return isDeprecated; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "default boolean isDeprecated() {\n return false;\n }", "@Deprecated\n public boolean isRequestCorrect(){\n\treturn true;\n }", "Boolean getDeprecated();", "@Deprecated\n/* */ public int getActions() {\n/* 289 */ throw new RuntimeException(\"Stub!\");\n/* */ }", "@Override\n public boolean getObsolete()\n {\n return false;\n }", "@Deprecated\n/* */ public void addAction(int action) {\n/* 330 */ throw new RuntimeException(\"Stub!\");\n/* */ }", "String getDeprecated();", "@Deprecated\n\tprivate void oldCode()\n\t{\n\t}", "public Boolean getDeprecated()\n {\n return deprecated;\n }", "public boolean isDeprecated()\n {\n if (m_deprecated.equals(\"yes\"))\n return true;\n\n return false;\n }", "public static final int getDeprecated();", "@Deprecated\n/* */ public void removeAction(int action) {\n/* 347 */ throw new RuntimeException(\"Stub!\");\n/* */ }", "public Boolean getIsDeprecated() {\n return isDeprecated;\n }", "public Boolean isDeprecated() {\n return m_deprecated;\n }", "@Deprecated\n\tpublic void alertStockIncrease(){\n\t}", "@java.lang.Deprecated\n public A withNewAction(java.lang.String arg0);", "@Override\r\n\t\tpublic void action()\r\n\t\t{\r\n// throw new UnsupportedOperationException(\"Not supported yet.\");\r\n\t\t}", "@Deprecated\n public boolean isEnable() {\n return !skip;\n }", "@Override\n public boolean isOutdated() {\n return false;\n }", "boolean hasDeprecatedHadithNo();", "public boolean isDeprecated()\n {\n ensureLoaded();\n return m_tblAttribute.contains(ATTR_DEPRECATED);\n }", "@Override\n @Deprecated\n public final String toString() {\n return asFormattedString();\n }", "public void setDeprecated(Boolean deprecated){\n m_deprecated = deprecated;\n }", "public void setIsDeprecated(Boolean deprecated) {\n isDeprecated = deprecated;\n }", "void setDeprecated(Operation operation, Method method);", "@Deprecated\n String getName();", "@DISPID(203)\r\n public boolean defaultVerbInvoked() {\r\n throw new UnsupportedOperationException();\r\n }", "private void headerDeprecationLog()\n\t{\n\t\tLog.w(TAG, \"Usage of 'TableViewRow.header' has been deprecated, use 'TableViewRow.headerTitle' instead.\");\n\t}", "@DISPID(202)\r\n public boolean verbInvoked() {\r\n throw new UnsupportedOperationException();\r\n }", "public boolean method_218() {\r\n return false;\r\n }", "boolean hasHas_action();", "@Override\r\n\tpublic void action() {\n\t\t\r\n\t}", "@Deprecated // use #maybeWarnOnOptions(ClientState) instead\n public void maybeWarnOnOptions()\n {\n }", "public void setDeprecated( Boolean pDeprecated )\n {\n deprecated = pDeprecated;\n }", "@Deprecated\r\n public String cancelTickets() {\r\n return Screen.SEARCH_SCREEN.getOutcome();\r\n }", "@Deprecated\n default boolean supportsManagedTable() {\n return false;\n }", "@Deprecated\n public f a() {\n return null;\n }", "public void actionOffered();", "public boolean method_196() {\r\n return false;\r\n }", "Boolean mo1305n() {\n throw new UnsupportedOperationException(getClass().getSimpleName());\n }", "@Override\n public void action() {\n }", "@Override\n public void action() {\n }", "@Override\n public void action() {\n }", "public boolean method_210() {\r\n return false;\r\n }", "boolean hasDeprecatedBookNo();", "@Deprecated\n @Override\n public Filter getQueryFilter() {\n throw new UnsupportedOperationException(\"Druid filters are being split from the ApiRequest model and \" +\n \"should be handled separately.\");\n }", "public abstract boolean isPreserveActionParams();", "public boolean method_216() {\r\n return false;\r\n }", "@Deprecated\n public static boolean startCacheTransaction() {\n return false;\n }", "@Deprecated\n public void processRequest(Request request) throws OperationException;", "@Override\n\tpublic void action() {\n\n\t}", "private AliasAction() {\n\n\t}", "@Override\n\t@Deprecated\n\tprotected final void rangeCheck ( int from , int to ) {\n\t}", "public boolean method_214() {\r\n return false;\r\n }", "@Override\n public void noteUserActivity() {\n throw new UnsupportedOperationException(\"noteUserActivity\");\n }", "@Deprecated\n\tpublic static void cleanDefaults(){\n\t}", "public boolean method_4088() {\n return false;\n }", "@Override\n public boolean isSupported() {\n return true;\n }", "@Override\n public boolean isSupported() {\n return true;\n }", "public boolean method_194() {\r\n return false;\r\n }", "@Deprecated\r\n\tpublic boolean isHDCPBurned(){\r\n\t\treturn mFactoryBurnUtil.isHDCPBurned();\r\n\t}", "@Deprecated\n\t@Override\n\tpublic void onDelete()\n\t{\n\t}", "@Deprecated\n\t@Override\n\tpublic void onDelete()\n\t{\n\t}", "public void action() {\n }", "void addDeprecatedHadithNo(Object newDeprecatedHadithNo);", "@Override\n protected boolean needReadActionToCreateState() {\n return false;\n }", "@Override\r\n public boolean isRequest() {\n return false;\r\n }", "public boolean method_4132() {\n return false;\n }", "@Deprecated\n protected void refreshProperties() {\n if (applicationProperties.size() > 0) {\n StringBuilder sb = new StringBuilder(\"/test/refreshUtil.jsp?actionType=1\");\n\n int i = 0;\n\n for (String s : applicationProperties.stringPropertyNames()) {\n logger.info(String.format(\"Property '%s' was set to '%s'\", s, applicationProperties.getProperty(s)));\n sb.append(\"&propName{0}={1}&propValue{0}={2}\".replace(\"{0}\", Integer.toString(i++)).replace(\"{1}\", s)\n .replace(\"{2}\", applicationProperties.getProperty(s)));\n }\n\n try {\n URL url = new URL(applicationUrl, sb.toString());\n HttpURLConnection connection = (HttpURLConnection) url.openConnection();\n connection.setRequestMethod(\"GET\");\n logger.info(String.format(\"refreshUtil returned response: %s\", connection.getResponseMessage()));\n }\n catch (IOException e) {\n throw new CucumberException(e);\n }\n }\n }", "@Deprecated\n @Override\n public Having getQueryHaving() {\n throw new UnsupportedOperationException(\"Druid havings are being split from the ApiRequest model and should \" +\n \"be handled separately.\");\n }", "protected boolean provideRefresh() {\n return false;\n }", "@Override\n\tpublic void newAction() {\n\t\t\n\t}", "@Deprecated\r\n\tpublic static int checkSecureKey(){\r\n\t\treturn -1;\r\n\t}", "@Deprecated\n @Override\n public String getCmsLocation() {\n return null;\n }", "public boolean method_2453() {\r\n return false;\r\n }", "public boolean method_208() {\r\n return false;\r\n }", "@Override\n public String getActions() {\n\treturn \"\";\n }", "@Deprecated\n final Method getter() {\n return this.getter;\n }", "@Override\n\tpublic boolean supportsUpdate() {\n\t\treturn false;\n\t}", "boolean hasRemarketingAction();", "@Override\n\t@Deprecated\n\tpublic void OnUpdateTrafficFacility(TrafficFacilityInfo arg0) {\n\n\t}", "public void onHandleIntent(Intent intent) {\n StringBuilder sb = new StringBuilder();\n sb.append(\"@Deprecated :: onHandleIntent(\");\n sb.append(intent);\n sb.append(\")\");\n Log.d(\"SettingsBackup\", sb.toString());\n }", "@Override\r\n\tprotected ActionListener refreshBtnAction() {\n\t\treturn null;\r\n\t}", "@Deprecated\n/* */ public static boolean attack2(Creature performer, Creature defender, int counter, Action act) {\n/* 82 */ return attack(performer, defender, counter, -1, act);\n/* */ }", "public boolean isRequest(){\n return false;\n }", "public boolean method_4093() {\n return false;\n }", "default void showChanges() {\n\t\tthrow new UnsupportedVersionControlSystemSupportException();\n\t}", "@Deprecated\n @Override\n public DruidFilterBuilder getFilterBuilder() {\n throw new UnsupportedOperationException(\"Druid filters are being split from the ApiRequest model and \" +\n \"should be handled separately.\");\n }", "@Deprecated\npublic interface OrderCompanyJournalReadRpcService {\n\n\n}", "@Override\n\tpublic String getMoreInformation() {\n\t\tthrow new UnsupportedOperationException();\n\t}", "@Deprecated\n/* */ public COSStream getStream() {\n/* 290 */ return this.stream;\n/* */ }", "public boolean mo1266f() {\n throw new UnsupportedOperationException(getClass().getSimpleName());\n }", "boolean hasPlainAction();", "@Override\n\t\tprotected boolean validateAction(int actionID, String... arguments) {\n\t\t\treturn false;\n\t\t}", "@Override\r\n\tprotected ActionListener updateBtnAction() {\n\t\treturn null;\r\n\t}", "public boolean method_2434() {\r\n return false;\r\n }", "protected ActionListener createHelpActionListener() {\r\n return null;\r\n }", "@Override\n public void refresh() {\n throw new UnsupportedOperationException(\"operation not supported\");\n }", "@Override\r\n\t\tpublic boolean isRefreshNeeded() {\n\t\t\treturn false;\r\n\t\t}", "@Override\r\n\t\tpublic boolean isRefreshNeeded() {\n\t\t\treturn false;\r\n\t\t}" ]
[ "0.72046626", "0.7170946", "0.6798744", "0.6583601", "0.6578919", "0.6424395", "0.64046186", "0.6370021", "0.6362938", "0.63255095", "0.6206438", "0.61473393", "0.6050472", "0.6042166", "0.6000964", "0.5951614", "0.58887535", "0.58551276", "0.5782117", "0.5759873", "0.5742483", "0.5695861", "0.5660608", "0.5641583", "0.5633838", "0.5602452", "0.55468166", "0.54745317", "0.5462941", "0.54382455", "0.54216254", "0.5403286", "0.5394857", "0.5352404", "0.5340051", "0.53364503", "0.53339237", "0.532761", "0.53206754", "0.5317893", "0.5317889", "0.5317889", "0.5317889", "0.5317533", "0.53136265", "0.53046185", "0.52956885", "0.5280225", "0.5257148", "0.5240284", "0.523981", "0.5225231", "0.52197444", "0.5212616", "0.5199635", "0.5196645", "0.5192095", "0.5190664", "0.518897", "0.5182876", "0.5179976", "0.5173851", "0.5173851", "0.5172719", "0.51697785", "0.51617295", "0.5159282", "0.5142527", "0.51420313", "0.5139523", "0.5138166", "0.51349485", "0.5116362", "0.5107322", "0.5106704", "0.5104052", "0.5103306", "0.5101349", "0.5084447", "0.5083575", "0.507757", "0.5074203", "0.5070694", "0.50689536", "0.50607854", "0.50587684", "0.505744", "0.50573677", "0.5048147", "0.5046902", "0.504559", "0.50374675", "0.5035812", "0.50311637", "0.5016736", "0.5008045", "0.5007737", "0.5003446", "0.49999198", "0.49999198" ]
0.6245414
10
Get the transfer unit associated with this action
public String getTransferUnit() { if (transferUnit.length() > 0) { return transferUnit + "/sec"; } else { return transferUnit; // default value is empty string } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Unit<?> getUnit() {\n return _unit;\n }", "public String getUnit() {\n\t\tString unit;\n\t\ttry {\n\t\t\tunit = this.getString(\"unit\");\n\t\t} catch (Exception e) {\n\t\t\tunit = null;\n\t\t}\n\t\treturn unit;\n\t}", "public String getToUnit() {\r\n return this.toUnit;\r\n }", "@Accessor(qualifier = \"Unit\", type = Accessor.Type.GETTER)\n\tpublic B2BUnitModel getUnit()\n\t{\n\t\treturn getPersistenceContext().getPropertyValue(UNIT);\n\t}", "public Unit getUnit() {\n\t\treturn unit;\n\t}", "public final Unit getUnit()\n { \n return Unit.forValue(m_Unit);\n }", "public gov.weather.graphical.xml.dwmlgen.schema.dwml_xsd.UnitType.Enum getUnit()\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.apache.xmlbeans.SimpleValue target = null;\n target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(UNIT$6, 0);\n if (target == null)\n {\n return null;\n }\n return (gov.weather.graphical.xml.dwmlgen.schema.dwml_xsd.UnitType.Enum)target.getEnumValue();\n }\n }", "public jkt.hms.masters.business.MasStoreAirForceDepot getUnit () {\n\t\treturn unit;\n\t}", "public Unit getUnit() {\n return unit;\n }", "public String getUnit()\n {\n return (this.unit);\n }", "public gov.weather.graphical.xml.dwmlgen.schema.dwml_xsd.UnitType xgetUnit()\n {\n synchronized (monitor())\n {\n check_orphaned();\n gov.weather.graphical.xml.dwmlgen.schema.dwml_xsd.UnitType target = null;\n target = (gov.weather.graphical.xml.dwmlgen.schema.dwml_xsd.UnitType)get_store().find_element_user(UNIT$6, 0);\n return target;\n }\n }", "Unit getUnit();", "TimeUnit getUnit();", "public Long getTransferId() {\n return transferId;\n }", "public Long getTransferId() {\n return transferId;\n }", "public StorageUnit getStorageUnit() {\n\t\t// find the StorageUnit for the destination container\n\t\tStorageUnit storageUnit = null;\n\t\tProductContainer parentContainer = this;\n\t\twhile (storageUnit == null) {\n\t\t\tif (parentContainer.getClass() == StorageUnit.class) {\n\t\t\t\tstorageUnit = (StorageUnit) parentContainer;\n\t\t\t} else {\n\t\t\t\tparentContainer = ((ProductGroup) parentContainer)\n\t\t\t\t\t\t.getParent();\n\t\t\t}\n\t\t}\n\t\treturn storageUnit;\n\t}", "public String getChargeUnit() {\n return this.ChargeUnit;\n }", "public String getUnit() {\n return unit;\n }", "public String getUnit() {\n return unit;\n }", "public String getUnit() {\n return unit;\n }", "public String getTaskUnit() {\n\t\treturn taskUnit;\n\t}", "public String getUnit() {\n\t\treturn unit;\n\t}", "public Long getTransferToId() {\n return transferToId;\n }", "public String getUnit() {\n\t\treturn(symbol);\n\t}", "public String getUnit () {\n\treturn this.unit;\n }", "public UnitTypes GetCurrentUnitType()\n {\n return MethodsCommon.GetTypeFromUnit(Unit);\n }", "@Updatable\n public String getUnit() {\n return unit;\n }", "public String getUnit();", "String getUnit();", "public String getFromUnit() {\r\n return this.fromUnit;\r\n }", "public int getMovement() {\n return tempUnit.getMovement();\n }", "public byte getTemperature_unit() throws IOException\n\t{\n\t\tif ((__io__pointersize == 8)) {\n\t\t\treturn __io__block.readByte(__io__address + 11);\n\t\t} else {\n\t\t\treturn __io__block.readByte(__io__address + 11);\n\t\t}\n\t}", "public String getUnitName () {\n return unitName;\n }", "public String getUnitName() {\n return unitName;\n }", "public String getUnitName() {\n return unitName;\n }", "public String unit() {\n return this.unit;\n }", "public jkt.hms.masters.business.MasUnit getOtherUnit () {\n\t\treturn otherUnit;\n\t}", "public String getUnitName() {\r\n return unitName;\r\n }", "public Unit getUnit(){\r\n return tacUnit;\r\n }", "public java.lang.String getUnitPassenger() {\n\t\treturn _tempNoTiceShipMessage.getUnitPassenger();\n\t}", "public abstract String getUnit();", "public ITransferObject getTo() {\r\n return getController().getTo();\r\n }", "TimeUnit getTimeUnit() {\n return timeUnit;\n }", "public byte getMass_unit() throws IOException\n\t{\n\t\tif ((__io__pointersize == 8)) {\n\t\t\treturn __io__block.readByte(__io__address + 9);\n\t\t} else {\n\t\t\treturn __io__block.readByte(__io__address + 9);\n\t\t}\n\t}", "public String getUnitcd() {\r\n return unitcd;\r\n }", "public com.mpe.financial.model.ItemUnit getItemUnit () {\r\n\t\treturn itemUnit;\r\n\t}", "public java.lang.String getUnitDWT() {\n\t\treturn _tempNoTiceShipMessage.getUnitDWT();\n\t}", "public Integer getUnitId() {\n return unitId;\n }", "public Integer getUnitId() {\n return unitId;\n }", "public int getUnit_id() {\r\n\t\treturn unitId;\r\n\t}", "public Transmission getTransmission() {\n return transmission;\n }", "public String getUnitShortcut() {\r\n return unitShortcutName;\r\n }", "public String getUnitnm() {\r\n return unitnm;\r\n }", "public String getUnitName() throws Exception {\r\n return (String) getField(BaseAuditContestInterceptor.class, this, \"unitName\");\r\n }", "public String getDataUnit() {\n return dataUnit;\n }", "public double getMinTransfer() {\n\t\treturn minTransfer;\n\t}", "public SammelTransfer getSammelTransfer() throws RemoteException;", "public PDAction getU() {\n/* 158 */ COSDictionary u = (COSDictionary)this.actions.getDictionaryObject(\"U\");\n/* 159 */ PDAction retval = null;\n/* 160 */ if (u != null)\n/* */ {\n/* 162 */ retval = PDActionFactory.createAction(u);\n/* */ }\n/* 164 */ return retval;\n/* */ }", "public java.lang.String getUnitGRT() {\n\t\treturn _tempNoTiceShipMessage.getUnitGRT();\n\t}", "String getBaseUnit() {\n return baseUnit;\n }", "public String getDurationUnit() {\n\t\treturn (String) get_Value(\"DurationUnit\");\n\t}", "public double getUnitCost() {\r\n return unitCost;\r\n }", "public String getTimeUnit()\n\t{\n\t\treturn timeUnit;\n\t}", "public Integer getUnitid() {\n return unitid;\n }", "public BigDecimal getUnitAmount() {\n return unitAmount;\n }", "@JsonGetter(\"transfer\")\r\n @JsonInclude(JsonInclude.Include.NON_NULL)\r\n public InventoryTransfer getTransfer() {\r\n return transfer;\r\n }", "public Unit<? extends Quantity> getUnit(int index) {\n return _elements[index].getUnit();\n }", "public String getDestinUnits() {\n return this.destinUnits;\n }", "public AIUnit getAIUnit(Unit unit) {\n AIObject aio = getAIObject(unit.getId());\n return (aio instanceof AIUnit) ? (AIUnit) aio : null;\n }", "Unit getReciever();", "public java.lang.String getDELIV_UNIT() {\r\n return DELIV_UNIT;\r\n }", "public jkt.hms.masters.business.MasUnitOfMeasurement getUnitOfMeasurement() {\n\t\treturn unitOfMeasurement;\n\t}", "DefiningUnitType getDefiningUnit();", "public OrgUnit getOrgUnit() {\n return OrgUnitDao.getOrgUnitByRefId(getOrgUnitRefId());\n }", "public String getWeightUnit() {\n return (String) get(\"weight_unit\");\n }", "public String getTargetCapacityUnitType() {\n return this.targetCapacityUnitType;\n }", "public java.lang.String getUnitBreadth() {\n\t\treturn _tempNoTiceShipMessage.getUnitBreadth();\n\t}", "public BigDecimal getUnitAmount() {\n return this.unitAmount;\n }", "public com.cantor.drop.aggregator.model.CFTrade.TradeAction getAction() {\n com.cantor.drop.aggregator.model.CFTrade.TradeAction result = com.cantor.drop.aggregator.model.CFTrade.TradeAction.valueOf(action_);\n return result == null ? com.cantor.drop.aggregator.model.CFTrade.TradeAction.EXECUTED : result;\n }", "public static ToolsEnums.UnitMovementType getMovementType(int unitType){\n\t\t\n\t\tswitch(unitType){\n\t\t\tcase unitWaypoint:\n\t\t\t\treturn ToolsEnums.UnitMovementType.NULL;\n\t\t\t\t\n\t\t\tcase unitNull:\n\t\t\t\treturn ToolsEnums.UnitMovementType.NULL;\n\t\t\t\t\n\t\t\tcase unitAvatar:\n\t\t\t\treturn ToolsEnums.UnitMovementType.GROUND;\n\t\t\t\t\n\t\t\tcase unitNovice:\n\t\t\t\treturn ToolsEnums.UnitMovementType.GROUND;\n\t\t\t\t\n\t\t\tdefault: \n\t\t\t\treturn ToolsEnums.UnitMovementType.NULL;\n\t\t}\n\t}", "public com.cantor.drop.aggregator.model.CFTrade.TradeAction getAction() {\n com.cantor.drop.aggregator.model.CFTrade.TradeAction result = com.cantor.drop.aggregator.model.CFTrade.TradeAction.valueOf(action_);\n return result == null ? com.cantor.drop.aggregator.model.CFTrade.TradeAction.EXECUTED : result;\n }", "public String getUnit() {\n String unit = (String) comboUnits.getSelectedItem();\n if (\"inch\".equals(unit)) {\n return \"in\";\n } else if (\"cm\".equals(unit)) {\n return \"cm\";\n } else if (\"mm\".equals(unit)) {\n return \"mm\";\n } else if (\"pixel\".equals(unit)) {\n return \"px\";\n }\n return \"\";\n }", "public String getExecUnit() {\n return execUnit;\n }", "ChronoUnit getUnit();", "public String getTransferFormat() {\n return transferFormat;\n }", "public BigDecimal getUnitCost() {\r\n return unitCost;\r\n }", "public SepaDauerauftrag getTransfer() throws RemoteException\n\t{\n if (transfer != null)\n return transfer;\n\n Object o = getCurrentObject();\n if (o != null && (o instanceof SepaDauerauftrag))\n return (SepaDauerauftrag) o;\n \n transfer = (SepaDauerauftrag) Settings.getDBService().createObject(SepaDauerauftrag.class,null);\n return transfer;\n\t}", "public java.lang.String getUnitCrew() {\n\t\treturn _tempNoTiceShipMessage.getUnitCrew();\n\t}", "public double getMaxTransfer() {\n\t\treturn maxTransfer;\n\t}", "@Override\r\n public String toString() {\r\n return unit.getName();\r\n }", "@Override\r\n\tpublic Unit getUnit(String uuid) {\n\r\n\t\treturn unitRepo.getUnit(uuid);\r\n\t}", "public TransactionOutput getUtxo()\n {\n return utxo;\n }", "public java.lang.String getTransferTxt() {\n java.lang.Object ref = transferTxt_;\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 transferTxt_ = s;\n return s;\n }\n }", "public double getValueOfTransceiver() {\n\t\treturn valueOfTransceiver;\n\t}", "public java.lang.String getTransferTxt() {\n java.lang.Object ref = transferTxt_;\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 transferTxt_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "public io.dstore.values.IntegerValue getUnitId() {\n if (unitIdBuilder_ == null) {\n return unitId_ == null ? io.dstore.values.IntegerValue.getDefaultInstance() : unitId_;\n } else {\n return unitIdBuilder_.getMessage();\n }\n }", "public Transition getCurrentTransition () {\n return ttb.getCurrentTransition();\n }", "@javax.persistence.Column(name = \"unit\", precision = 5)\n\tpublic java.lang.String getUnit() {\n\t\treturn getValue(org.jooq.examples.cubrid.demodb.tables.Record.RECORD.UNIT);\n\t}", "public UnitType getUnitType() {\n\t\treturn unitType;\n\t}", "@Override\n public byte getSubtype() {\n return SUBTYPE_MONETARY_SYSTEM_CURRENCY_TRANSFER;\n }" ]
[ "0.63375723", "0.6284964", "0.61982065", "0.6192772", "0.6181646", "0.6127088", "0.6089513", "0.60790604", "0.6046319", "0.59814024", "0.59757006", "0.59606683", "0.59427524", "0.59229624", "0.59129804", "0.5903676", "0.58906555", "0.5882376", "0.5882376", "0.5882376", "0.5879033", "0.58781576", "0.5876444", "0.5849539", "0.5791768", "0.5784912", "0.5775694", "0.57742965", "0.5755534", "0.5745889", "0.5726883", "0.56732064", "0.56671345", "0.56151414", "0.56151414", "0.5610268", "0.5606497", "0.5606385", "0.5510294", "0.5463109", "0.54628485", "0.54605114", "0.54401", "0.5429534", "0.54230684", "0.54192543", "0.54183245", "0.54143316", "0.54143316", "0.5412341", "0.54082024", "0.5389101", "0.53851783", "0.5376719", "0.5335361", "0.5331014", "0.5324815", "0.5317412", "0.53163797", "0.5314765", "0.53134745", "0.5311964", "0.530091", "0.52968955", "0.5287865", "0.52836764", "0.52757543", "0.52532303", "0.5233208", "0.52215785", "0.5213867", "0.52125233", "0.5182381", "0.5180983", "0.5171764", "0.5170268", "0.51664454", "0.51631576", "0.5150165", "0.5127046", "0.51264817", "0.51226324", "0.50995725", "0.50953317", "0.50945044", "0.5090109", "0.5088303", "0.50877583", "0.50876445", "0.50762737", "0.5073973", "0.5072367", "0.5071726", "0.5071396", "0.5058678", "0.50573546", "0.50485754", "0.5048296", "0.5044482", "0.503969" ]
0.74654156
0
In case of using abstract action methods, we need to make an instance of the child class where the implementation is, not the abstract parent class
public Class<?> getTheActualClass() { if (actualClass != null) { return actualClass; } else { return method.getDeclaringClass(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public abstract void action();", "public abstract void action();", "public abstract void action();", "public abstract void action();", "abstract public void performAction();", "@Override\n public void action() {\n }", "@Override\n public void action() {\n }", "@Override\n public void action() {\n }", "@Override\n\tpublic void action() {\n\n\t}", "protected abstract void action(Object obj);", "public abstract void onAction();", "@Override\r\n\tpublic void action() {\n\t\t\r\n\t}", "@Override\n\tpublic void newAction() {\n\t\t\n\t}", "protected PMBaseAction() {\r\n super();\r\n }", "public abstract Action getAction();", "public abstract void executeActionButton();", "public interface ICreateAction extends IAction{\r\n\t\r\n\t\r\n}", "public void createAction() {\n }", "@Override\n public void act() {\n }", "public void action() {\n action.action();\n }", "public abstract ActionInMatch act();", "public void act(){\n super.act();\n }", "@Override\n\tpublic void setAction() {\n\t}", "public abstract void onClick();", "public abstract void onClick();", "@Override\n protected void doAct() {\n }", "@Override\r\n\t\tpublic void action()\r\n\t\t{\r\n// throw new UnsupportedOperationException(\"Not supported yet.\");\r\n\t\t}", "public void doAction(){}", "public void action() {\n }", "abstract void method();", "protected abstract void perform(ActiveActor a);", "Action createAction();", "Action createAction();", "Action createAction();", "public abstract void init_actions() throws Exception;", "public interface Action {\n\t\n\t/**\n\t * @return The action's printable value\n\t */\n\tpublic String toString();\n\n\tpublic Action actionClone();\n \t\n}", "public CreateIndividualPreAction() {\n }", "public void a_Action(){}", "@Override\n public void action() {\n System.out.println(\"do some thing...\");\n }", "@Override\n\tpublic void handleAction(Action action, Object sender, Object target) {\n\t\t\n\t}", "abstract protected String performAction(String input);", "@Override\r\n public void initAction() {\n \r\n }", "@Override\n public void matiz() {\n System.out.println(\"New not Abstract method\");\n }", "@Override\n\tpublic void createAction(Model m) {\n\t\t\n\t}", "CaseAction createCaseAction();", "protected abstract void switchOnCustom();", "public interface Action {\n\n /** Containing custom action. */\n void action();\n}", "public abstract void operation();", "protected abstract boolean actionImplementation(iNamedObject node);", "public abstract void mh();", "abstract void sub();", "protected abstract void actionExecuted(SUT system, State state, Action action);", "@Override\n public void accept(Action action) {\n }", "protected Reaction() {/* intentionally empty block */}", "interface Action {\n /**\n * Executes the action. Called upon state entry or exit by an automaton.\n */\n void execute();\n }", "@Override\r\n\tpublic void visit(SimpleAction action)\r\n\t{\n\t\t\r\n\t}", "public void act() {\n\t}", "protected abstract Action stringToAction(String stringAction);", "public void performAction();", "@Override\n\tpublic void doExecute(Runnable action) {\n\t\t\n\t}", "@Override\r\n\tpublic void act() {\n\t\tausgeben();\r\n\t}", "public MemberAction() {\n\t\tsuper();\n\t}", "@Test\n public void testInheritance() {\n assertTrue(\n \"ClientsPrepopulatingBaseAction does not subclass BaseAction.\",\n ClientsPrepopulatingBaseAction.class.getSuperclass() == BaseAction.class);\n }", "public interface Action {\n String execute(GameController gameController);\n}", "public ActionManager() {\n\t\tsuper();\n\t}", "public abstract void call();", "public void act() \n {\n // Add your action code here.\n }", "public void act() \n {\n // Add your action code here.\n }", "public void act() \n {\n // Add your action code here.\n }", "public void act() \n {\n // Add your action code here.\n }", "public void act() \n {\n // Add your action code here.\n }", "public void act() \n {\n // Add your action code here.\n }", "public void act() \n {\n // Add your action code here.\n }", "public void act() \n {\n // Add your action code here.\n }", "public void act() \r\n {\n }", "public void act() \r\n {\n }", "public void act() \r\n {\n }", "@Override\n\tpublic void action() {\n\t\tSystem.out.println(\"action now!\");\n\t}", "protected abstract void createTriggerOrAction();", "public abstract Action takeTurn();", "public abstract void Do();", "@Test\r\n public void testInheritance() throws Exception {\r\n TestHelper.assertSuperclass(instance.getClass().getSuperclass(), GetDocumentsContestAction.class);\r\n }", "public void setupAbstract() {\n \r\n }", "public abstract void create();", "public interface PoCardAction extends UseGameUnitAction {\n}", "public interface Action { //придумываем интерфейс для описания действий, присущих роботу\n Action dogo(MapOfAction mapOfAction); //объявляем функцию для действий, которой передаём карту\n\n}", "public void act() \r\n {\r\n // Add your action code here.\r\n }", "public void act() \r\n {\r\n // Add your action code here.\r\n }", "private AliasAction() {\n\n\t}", "public T caseAbstractActionDefinition(AbstractActionDefinition object) {\n\t\treturn null;\n\t}", "public void act() \n {\n }", "public void act() \n {\n }", "public void act() \n {\n }", "public void act() \n {\n }", "public void act() \n {\n }", "public void act() \n {\n }", "public void act() \n {\n }", "public abstract void abstractone();", "public interface Actionable {\n void executeAction(Action action);\n}", "@Override\n\tvoid methodAbstractAndSubclassIsAbstract() {\n\t\t\n\t}", "public interface Action {\n /**\n * Takes an action based on the provided state\n * If the action for the state is forbidden it must return NULL\n * @param state Generic State Object (MAY NEED CAST TO YOUR OWN STATE OBJECT)\n * @return State This method must return your new State declaration created after taking the action using the second constructor.\n */\n State takeAction(State state);\n}" ]
[ "0.77044946", "0.77044946", "0.77044946", "0.77044946", "0.73627245", "0.70438135", "0.70438135", "0.70438135", "0.7026913", "0.7025211", "0.6980425", "0.69758606", "0.6972928", "0.6891487", "0.6874076", "0.6659947", "0.6636764", "0.65929294", "0.65667075", "0.6462211", "0.6451395", "0.64097357", "0.63950187", "0.633679", "0.633679", "0.6311224", "0.6278679", "0.6239296", "0.6225014", "0.62216383", "0.6218634", "0.61869675", "0.61869675", "0.61869675", "0.6129908", "0.6123", "0.61222976", "0.6094607", "0.6085949", "0.6074496", "0.60667723", "0.6057234", "0.60511696", "0.60476404", "0.60449004", "0.60387063", "0.60296607", "0.60187423", "0.6006814", "0.59696037", "0.5963679", "0.5960872", "0.59528494", "0.59438384", "0.5936649", "0.5932911", "0.5913981", "0.5913891", "0.59027994", "0.5900668", "0.5880452", "0.58789897", "0.58736664", "0.58716804", "0.58700985", "0.5865612", "0.58650476", "0.58650476", "0.58650476", "0.58650476", "0.58650476", "0.58650476", "0.58650476", "0.58650476", "0.5857731", "0.5857731", "0.5857731", "0.5848562", "0.58475333", "0.58474004", "0.5847355", "0.5843183", "0.58339465", "0.5831439", "0.58303094", "0.5830063", "0.58196616", "0.58196616", "0.5818251", "0.58145374", "0.58106613", "0.58106613", "0.58106613", "0.58106613", "0.58106613", "0.58106613", "0.58106613", "0.58089006", "0.580485", "0.58044916", "0.5804113" ]
0.0
-1
Convert any String arguments to proper Enumerations if necessary
@SuppressWarnings( { "rawtypes", "unchecked" }) protected Object[] convertToEnums( Object[] args ) throws ActionExecutionException { Object[] processedArgs = new Object[args.length]; //try to convert all strings to enums Class<?>[] parameterTypes = method.getParameterTypes(); for (int i = 0; i < parameterTypes.length; i++) { if (args[i] == null) { processedArgs[i] = null; continue; } boolean isParamArray = parameterTypes[i].isArray(); Class<?> paramType; Class<?> argType; if (isParamArray) { paramType = parameterTypes[i].getComponentType(); argType = args[i].getClass().getComponentType(); } else { paramType = parameterTypes[i]; argType = args[i].getClass(); } if (argType == String.class && paramType.isEnum()) { try { if (isParamArray) { Object convertedEnums = Array.newInstance(paramType, Array.getLength(args[i])); //convert all array elements to enums for (int j = 0; j < Array.getLength(args[i]); j++) { String currentValue = (String) Array.get(args[i], j); if (currentValue != null) { Array.set(convertedEnums, j, Enum.valueOf((Class<? extends Enum>) paramType, currentValue)); } } processedArgs[i] = convertedEnums; } else { processedArgs[i] = Enum.valueOf((Class<? extends Enum>) paramType, (String) args[i]); } } catch (IllegalArgumentException iae) { throw new ActionExecutionException("Could not convert string " + args[i] + " to enumeration of type " + paramType.getName()); } } else { processedArgs[i] = args[i]; } } return processedArgs; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private static <T extends Enum<T>> EnumMap<T, String> parseOptions(\n Deque<String> params, Class<T> type, Deque<String> args) {\n EnumMap<T, String> options = new EnumMap<T, String>(type);\n\n for (String param; null != (param = params.peek());) {\n params.pop();\n if (param.startsWith(\"--\")) {\n param = param.substring(2).replace('-', '_').toUpperCase(\n Locale.ROOT);\n options.put(valueOf(type, param), params.pop());\n } else {\n args.add(param);\n }\n }\n\n return options;\n }", "private EnumUnderTest( String... strings ) {\n\t\tlanguages = Arrays.asList( strings );\n\t}", "public Map<String, Object> processArgs(String[] args)\n {\n for (int ii=0; ii<args.length; ii++) {\n String token = args[ii];\n char firstC = token.charAt(0);\n if (firstC != '-' && firstC != '+') {\n return null;\n }\n // look up the token\n token = token.substring(1);\n String type = _meta.get(token);\n if (type == null) {\n return null;\n }\n\n // most types expect a following token - check\n Object argument = null;\n if (StringArg.equals(type) || ListArg.equals(type) || IntegerArg.equals(type)) {\n if (args.length < ii+2) {\n return null;\n }\n if (firstC != '-') {\n // these types all expect a - in front of the token\n return null;\n }\n argument = args[ii+1];\n ii++;\n }\n if (DoubleListArg.equals(type)) {\n if (args.length < ii+3) {\n return null;\n }\n if (firstC != '-') {\n return null;\n }\n String[] a2 = new String[2];\n a2[0] = args[ii+1];\n a2[1] = args[ii+2];\n argument = a2;\n ii += 2;\n }\n\n Object old;\n if (StringArg.equals(type)) {\n old = _result.put(token, argument);\n if (old != null) {\n return null;\n }\n }\n else if (ListArg.equals(type)) {\n List<String> oldList = (List<String>)_result.get(token);\n if (oldList == null) {\n oldList = new ArrayList<String>();\n _result.put(token, oldList);\n }\n oldList.add((String)argument);\n }\n else if (DoubleListArg.equals(type)) {\n List<String[]> oldList = (List<String[]>)_result.get(token);\n if (oldList == null) {\n oldList = new ArrayList<String[]>();\n _result.put(token, oldList);\n }\n oldList.add((String[])argument);\n }\n else if (IntegerArg.equals(type)) {\n Integer val = Integer.parseInt((String)argument);\n old = _result.put(token, val);\n if (old != null) {\n return null;\n }\n }\n else if (FlagArgFalse.equals(type) || FlagArgTrue.equals(type)) {\n // note that we always have a default value for flag args\n Boolean val = (firstC == '-');\n _result.put(token, val);\n }\n }\n\n return _result;\n }", "public void testValidEnums () {\t\n\t\tString example = \"AM\";\n\t\tRadioBand enumAm = RadioBand.valueForString(example);\n\t\texample = \"FM\";\n\t\tRadioBand enumFm = RadioBand.valueForString(example);\n\t\texample = \"XM\";\n\t\tRadioBand enumXm = RadioBand.valueForString(example);\n\n\t\tassertNotNull(\"AM returned null\", enumAm);\n\t\tassertNotNull(\"FM returned null\", enumFm);\n\t\tassertNotNull(\"XM returned null\", enumXm);\n\t}", "public void testValidEnums () {\t\n\t\tString example = \"NORMAL\";\n\t\tECallConfirmationStatus enumNormal = ECallConfirmationStatus.valueForString(example);\n\t\texample = \"CALL_IN_PROGRESS\";\n\t\tECallConfirmationStatus enumCallInProgress = ECallConfirmationStatus.valueForString(example);\n\t\texample = \"CALL_CANCELLED\";\n\t\tECallConfirmationStatus enumCancelled = ECallConfirmationStatus.valueForString(example);\n\t\texample = \"CALL_COMPLETED\";\n\t\tECallConfirmationStatus enumCompleted = ECallConfirmationStatus.valueForString(example);\n\t\texample = \"CALL_UNSUCCESSFUL\";\n\t\tECallConfirmationStatus enumUnsuccessful = ECallConfirmationStatus.valueForString(example);\n\t\texample = \"ECALL_CONFIGURED_OFF\";\n\t\tECallConfirmationStatus enumConfiguredOff = ECallConfirmationStatus.valueForString(example);\n\t\texample = \"CALL_COMPLETE_DTMF_TIMEOUT\";\n\t\tECallConfirmationStatus enumCompleteDtmfTimeout = ECallConfirmationStatus.valueForString(example);\n\t\t\n\t\tassertNotNull(\"NORMAL returned null\", enumNormal);\n\t\tassertNotNull(\"CALL_IN_PROGRESS returned null\", enumCallInProgress);\n\t\tassertNotNull(\"CALL_CANCELLED returned null\", enumCancelled);\n\t\tassertNotNull(\"CALL_COMPLETED returned null\", enumCompleted);\n\t\tassertNotNull(\"CALL_UNSUCCESSFUL returned null\", enumUnsuccessful);\n\t\tassertNotNull(\"ECALL_CONFIGURED_OFF returned null\", enumConfiguredOff);\n\t\tassertNotNull(\"CALL_COMPLETE_DTMF_TIMEOUT returned null\", enumCompleteDtmfTimeout);\n\t}", "public static CommandEnum stringToEnum(String commandEnum) {\n if (lookup.containsKey(commandEnum)) {\n return lookup.get(commandEnum);\n } else {\n return CommandEnum.INVALID;\n }\n }", "private static List<Pair<OvsDbConverter.Entry, Object>> parseArguments(\n Deque<String> arguments) {\n\n List<Pair<OvsDbConverter.Entry, Object>> args = new ArrayList<>();\n\n for (String arg; null != (arg = arguments.peek()); ) {\n arguments.pop();\n if (arg.startsWith(\"~\")) {\n arg = arg.substring(1).replace('-', '_').toLowerCase(\n Locale.ROOT);\n // Get the converter entry for this argument type.\n OvsDbConverter.Entry entry = OvsDbConverter.get(arg);\n\n // If there is no entry, thrown an exception.\n if (null == entry) {\n throw new IllegalArgumentException(\n \"Unknown argument type: \" + arg);\n }\n\n // Add the entry to the arguments list.\n if (entry.hasConverter()) {\n args.add(new Pair<>(entry, entry.convert(arguments.pop())));\n } else {\n args.add(new Pair<>(entry, null));\n }\n\n } else throw new IllegalArgumentException(\n \"Unknown argument type: \" + arg);\n }\n\n return args;\n }", "public void testValidEnums () {\t\n\t\tString example = \"8KHZ\";\n\t\tSamplingRate enum8Khz = SamplingRate.valueForString(example);\n\t\texample = \"16KHZ\";\n\t\tSamplingRate enum16Khz = SamplingRate.valueForString(example);\n\t\texample = \"22KHZ\";\n\t\tSamplingRate enum22Khz = SamplingRate.valueForString(example);\n\t\texample = \"44KHZ\";\n\t\tSamplingRate enum44Khz = SamplingRate.valueForString(example);\n\t\t\n\t\tassertNotNull(\"8KHZ returned null\", enum8Khz);\n\t\tassertNotNull(\"16KHZ returned null\", enum16Khz);\n\t\tassertNotNull(\"22KHZ returned null\", enum22Khz);\n\t\tassertNotNull(\"44KHZ returned null\", enum44Khz);\n\t}", "@Override\n protected PacketArgs.ArgumentType[] getArgumentTypes() {\n return new PacketArgs.ArgumentType[] { PacketArgs.ArgumentType.String };\n }", "public static void main( String[] args ) {\n\t\tEnumUnderTest[] enumValues = EnumUnderTest.values();\n\t\t// this converts a string to an enum value\n\t\tEnumUnderTest stringConvertedEnumValue = EnumUnderTest.valueOf( \"ENUMS\" );\n\t\t\n\t\tfor( EnumUnderTest e : enumValues ) {\n\t\t\t// gives the enum name\n\t\t\tSystem.out.println( e.name() );\n\t\t\t// gives the enum name (again)\n\t\t\tSystem.out.println( e.toString() );\n\t\t\t// gives the index of the enum value in the enum\n\t\t\tSystem.out.println( e.ordinal() );\n\t\t\t// returns the difference in the ordinal of the two enum values\n\t\t\tSystem.out.println( e.compareTo( stringConvertedEnumValue ) );\n\t\t\t\n\t\t\t// calling a user defined enum method\n\t\t\tSystem.out.println( \"Languages: \" );\n\t\t\te.printLanguages();\n\t\t}\n\t\t\n\t\tSystem.out.println( \"Seasonal fruits: \" );\n\t\t// testing the abstract enum\n\t\tfor( AbstractMethodEnum e : AbstractMethodEnum.values() ) {\n\t\t\te.printSeasonalFruit();\n\t\t}\n\t}", "public void testValidEnums () {\t\n\t\tString example = \"USER_EXIT\";\n\t\tAppInterfaceUnregisteredReason enumUserExit = AppInterfaceUnregisteredReason.valueForString(example);\n\t\texample = \"IGNITION_OFF\";\n\t\tAppInterfaceUnregisteredReason enumIgnitionOff = AppInterfaceUnregisteredReason.valueForString(example);\n\t\texample = \"BLUETOOTH_OFF\";\n\t\tAppInterfaceUnregisteredReason enumBluetoothOff = AppInterfaceUnregisteredReason.valueForString(example);\n\t\texample = \"USB_DISCONNECTED\";\n\t\tAppInterfaceUnregisteredReason enumUsbDisconnected = AppInterfaceUnregisteredReason.valueForString(example);\n\t\texample = \"REQUEST_WHILE_IN_NONE_HMI_LEVEL\";\n\t\tAppInterfaceUnregisteredReason enumRequestWhileInNoneHmiLevel = AppInterfaceUnregisteredReason.valueForString(example);\n\t\texample = \"TOO_MANY_REQUESTS\";\n\t\tAppInterfaceUnregisteredReason enumTooManyRequests = AppInterfaceUnregisteredReason.valueForString(example);\n\t\texample = \"DRIVER_DISTRACTION_VIOLATION\";\n\t\tAppInterfaceUnregisteredReason enumDriverDistractionViolation = AppInterfaceUnregisteredReason.valueForString(example);\n\t\texample = \"LANGUAGE_CHANGE\";\n\t\tAppInterfaceUnregisteredReason enumLanguageChange = AppInterfaceUnregisteredReason.valueForString(example);\n\t\texample = \"MASTER_RESET\";\n\t\tAppInterfaceUnregisteredReason enumMasterReset = AppInterfaceUnregisteredReason.valueForString(example);\n\t\texample = \"FACTORY_DEFAULTS\";\n\t\tAppInterfaceUnregisteredReason enumFactoryDefaults = AppInterfaceUnregisteredReason.valueForString(example);\n\t\texample = \"APP_UNAUTHORIZED\";\n\t\tAppInterfaceUnregisteredReason enumAppAuthorized = AppInterfaceUnregisteredReason.valueForString(example);\n\t\texample = \"PROTOCOL_VIOLATION\";\n\t\tAppInterfaceUnregisteredReason enumProtocolViolation = AppInterfaceUnregisteredReason.valueForString(example);\n\t\t\t\t\n\t\tassertNotNull(\"USER_EXIT returned null\", enumUserExit);\n\t\tassertNotNull(\"IGNITION_OFF returned null\", enumIgnitionOff);\n\t\tassertNotNull(\"BLUETOOTH_OFF returned null\", enumBluetoothOff);\n\t\tassertNotNull(\"USB_DISCONNECTED returned null\", enumUsbDisconnected);\n\t\tassertNotNull(\"REQUEST_WHILE_IN_NONE_HMI_LEVEL returned null\", enumRequestWhileInNoneHmiLevel);\n\t\tassertNotNull(\"TOO_MANY_REQUESTS returned null\", enumTooManyRequests);\n\t\tassertNotNull(\"DRIVER_DISTRACTION_VIOLATION returned null\", enumDriverDistractionViolation);\n\t\tassertNotNull(\"LANGUAGE_CHANGE returned null\", enumLanguageChange);\n\t\tassertNotNull(\"MASTER_RESET returned null\", enumMasterReset);\n\t\tassertNotNull(\"FACTORY_DEFAULTS returned null\", enumFactoryDefaults);\n\t\tassertNotNull(\"APP_UNAUTHORIZED returned null\", enumAppAuthorized);\n\t\tassertNotNull(\"PROTOCOL_VIOLATION returned null\", enumProtocolViolation);\n\t}", "private static ContextType stringToContextType(String s) \n {\n for (ContextType enumVal : ContextType.values())\n {\n if (enumVal.toString().equals(s))\n return enumVal;\n }\n \n // in case of failure:\n return ContextType.UNKNOWN;\n }", "@Override\n\tpublic void parseInput() throws InvalidArgumentValueException {\n\t\t\n\t\t\n\t\ttry {\n\t\t\tstringArgBytes = stringToArrayOfByte(stringText.getText());\n\t\t} catch (NumberFormatException e) {\n\n\t\t\tthrow new InvalidArgumentValueException(\n\t\t\t\t\t\"This string cannot be converted to ASCII for some reason. Maybe there are non asci characters used in it\");\n\t\t}\n\t}", "public static final StatusOrder stringToEnum(int statusInt) throws Exception {\n\t\tswitch (statusInt) {\n\t\tcase 0:\n\t\t\treturn AWAITING;\n\t\tcase 1:\n\t\t\treturn APPROVED;\n\t\tcase 2:\n\t\t\treturn REJECTED;\n\t\tcase 3:\n\t\t\treturn CLOSED;\n\t\tdefault:\n\t\t\tthrow new EnumNotFindException(\"Значение <\"+statusInt+\"> не входит в заданный список\");\n\t\t}\n\t}", "public static Arguments convert(List<String> args){\n List<ArgumentPair> sortedArgPairs = sortArgs(args);\n return processArgs(sortedArgPairs);\n }", "Enumeration getParameterNames();", "public static Enum forString(java.lang.String s)\r\n { return (Enum)table.forString(s); }", "private DirType(String... names) {\n\t\t\t//This should never happen as constructor is never called outside enum.\n\t\t\tif (names.length < 1) { //No String names provided.\n\t\t\t\tthrow new IllegalArgumentException(\"Insufficient arguments.\");\n\t\t\t}\n\t\t\taliases = names;\n\t\t}", "public static Enum forString(java.lang.String s)\n { return (Enum)table.forString(s); }", "public static Enum forString(java.lang.String s)\n { return (Enum)table.forString(s); }", "private static ContextState stringToContextState(String s) \n {\n for (ContextState enumVal : ContextState.values())\n {\n if (enumVal.toString().equals(s))\n return enumVal;\n }\n \n // in case of failure:\n return ContextState.PUBLISHED;\n }", "public static Enum forString(java.lang.String s)\n { return (Enum)table.forString(s); }", "public static Enum forString(java.lang.String s)\n { return (Enum)table.forString(s); }", "public static Enum forString(java.lang.String s)\n { return (Enum)table.forString(s); }", "int mo5866a(State state, String... strArr);", "@Test\n @TestForIssue(jiraKey = \"HHH-10402\")\n public void testEnumeratedTypeResolutions() {\n final MetadataImplementor mappings = ((MetadataImplementor) (addAnnotatedClass(EnumeratedSmokeTest.EntityWithEnumeratedAttributes.class).buildMetadata()));\n mappings.validate();\n final PersistentClass entityBinding = mappings.getEntityBinding(EnumeratedSmokeTest.EntityWithEnumeratedAttributes.class.getName());\n validateEnumMapping(entityBinding.getProperty(\"notAnnotated\"), ORDINAL);\n validateEnumMapping(entityBinding.getProperty(\"noEnumType\"), ORDINAL);\n validateEnumMapping(entityBinding.getProperty(\"ordinalEnumType\"), ORDINAL);\n validateEnumMapping(entityBinding.getProperty(\"stringEnumType\"), STRING);\n }", "public void testInvalidEnum () {\n\t\tString example = \"noRMal\";\n\t\ttry {\n\t\t ECallConfirmationStatus temp = ECallConfirmationStatus.valueForString(example);\n assertNull(\"Result of valueForString should be null.\", temp);\n\t\t}\n\t\tcatch (IllegalArgumentException exception) {\n fail(\"Null string throws NullPointerException.\");\n\t\t}\n\t}", "public static void main(String arg[])\r\n\t {\n\t \r\n\t color ob=color.RED;\r\n\t \r\n\t // System.out.println(\"An Enumeration Object:\"+ob);\r\n\t \r\n\t System.out.println(\"Enumeration Objects Ordinal Values:\"+ob.ordinal());\r\n\t }", "<E> Argument choices(E... values);", "AstroArg unpack(Astro litChars);", "EnumType(String p_i45705_1_, int p_i45705_2_, int p_i45705_3_, String p_i45705_4_, String p_i45705_5_) {\n/* */ this.field_176893_h = p_i45705_3_;\n/* */ this.field_176894_i = p_i45705_4_;\n/* */ this.field_176891_j = p_i45705_5_;\n/* */ }", "public static List<String> formPossibleValues(String enumeraion){\n\t\tList<String> ret = new ArrayList<String>();\n\t\tfor (String value : enumeraion.split(\";\"))\n\t\t\tret.add(value);\n\t\t\n\t\treturn ret;\n\t}", "public static BasicEnum fromString(String s)\n {\n for (int i = 0; i < _ENUMERATION_NAMES.length; i++)\n {\n if (_ENUMERATION_NAMES[i].equals(s))\n {\n return _ENUMERATIONS[i];\n }\n }\n return null;\n }", "public E parse(String argument);", "private Object parseArgument(CommandSender sender, Class<?> type, String argument) throws CommandException {\n logger.fine(\"Attempting to parse string \\\"%s\\\" as type %s\", argument, type.getName());\n try {\n if(type == String.class) {\n return argument;\n } else if(type == World.class) {\n return parseWorld(sender, argument);\n } else if(type == int.class) {\n return Integer.parseInt(argument);\n } else if(type == short.class) {\n return Short.parseShort(argument);\n } else if(type == long.class) {\n return Long.parseLong(argument);\n } else if(type == byte.class) {\n return Byte.parseByte(argument);\n } else if(type == boolean.class) {\n if(argument.equalsIgnoreCase(\"true\") || argument.equalsIgnoreCase(\"yes\")) {\n return true;\n }\n if(argument.equalsIgnoreCase(\"false\") || argument.equalsIgnoreCase(\"no\")) {\n return false;\n }\n throw new CommandException(messageConfig.getErrorMessage(\"invalidBoolean\").replace(\"{arg}\", argument));\n } else if(type.isPrimitive()) {\n throw new InvalidCommandException(\"Unknown primitive type on command argument\");\n } else {\n return runValueOfMethod(type, argument);\n }\n\n } catch(IllegalArgumentException ex) {\n throw new CommandException(messageConfig.getErrorMessage(\"invalidArgs\"), ex);\n }\n }", "public static ArrayList parseEnumeration(String d, String s) {\n ArrayList result = new ArrayList();\n if (s != null) {\n AttributeTokenizer at = new AttributeTokenizer(s);\n do {\n\tString key = at.getKey();\n\tif (key == null) {\n\t throw new IllegalArgumentException(\"Directive \" + d + \", unexpected character at: \"\n\t\t\t\t\t + at.getRest());\n\t}\n\tif (!at.getEntryEnd()) {\n\t throw new IllegalArgumentException(\"Directive \" + d + \", expected end of entry at: \"\n\t\t\t\t\t + at.getRest());\n\t}\n\tint i = Math.abs(binarySearch(result, strComp, key) + 1);\n\tresult.add(i, key);\n } while (!at.getEnd());\n return result;\n } else {\n return null;\n }\n }", "public String argTypes() {\n return \"I\";//NOI18N\n }", "Enumeration createEnumeration();", "private static void validateInputArguments(String args[]) {\n\n\t\tif (args == null || args.length != 2) {\n\t\t\tthrow new InvalidParameterException(\"invalid Parameters\");\n\t\t}\n\n\t\tString dfaFileName = args[DFA_FILE_ARGS_INDEX];\n\t\tif (dfaFileName == null || dfaFileName.trim().isEmpty()) {\n\t\t\tthrow new InvalidParameterException(\"Invalid file name\");\n\t\t}\n\n\t\tString delimiter = args[DELIMITER_SYMBOL_ARGS_INDEX];\n\t\tif (delimiter == null || delimiter.trim().isEmpty()) {\n\t\t\tthrow new InvalidParameterException(\"Invalid delimiter symbol\");\n\t\t}\n\t}", "public interface ParamsParser<E extends Enum<E>> {\n\n Pair<EnumMap<E, String>, List<Parameter>> parse(String data) throws HeaderParseErrorException;\n\n boolean checkQuotedParam(E param, String data);\n\n boolean checkTokenParam(E param, String data);\n\n}", "private FunctionEnum(String value) {\n\t\tthis.value = value;\n\t}", "<E> Argument choices(Collection<E> values);", "@JsMethod\n // Pass through an enum value as if it were coming from and going to JavaScript.\n private static Object passThrough(Object o) {\n assertTrue(o instanceof String || o instanceof Double || o instanceof Boolean);\n return o;\n }", "public static String decode(String str){\r\n\t\treturn HtmlCodec.DefaultChar2ENUM.decode(str);\r\n\t}", "public Object[] getInitArgs(String[] input){\n Object result[] = new Object[input.length];\n for (int i = 0; i < input.length; i++){\n if (isNumeric(input[i])){\n result[i] = Integer.parseInt(input[i]);\n }else{\n result[i] = input[i];\n }\n }\n return result;\n }", "abstract char[] parseFlags(String rawFlags);", "public static void main(String[] args) throws Exception {\n testEnum();\r\n }", "private Integer mapParameterType(String parameterStr) {\n\n\t\tswitch (parameterStr) {\n\n\t\tcase Parameter.PRIORITY_ARGUMENT:\n\t\t\treturn Parameter.PRIORITY_ARGUMENT_TYPE;\n\n\t\tcase Parameter.START_DATE_ARGUMENT:\n\t\t\treturn Parameter.START_DATE_ARGUMENT_TYPE;\n\n\t\tcase Parameter.PLACE_ARGUMENT:\n\t\t\treturn Parameter.PLACE_ARGUMENT_TYPE;\n\t\tcase Parameter.END_DATE_ARGUMENT:\n\t\t\treturn Parameter.END_DATE_ARGUMENT_TYPE;\n\t\tcase Parameter.TYPE_ARGUMENT:\n\t\t\treturn Parameter.TYPE_ARGUMENT_TYPE;\n\n\t\tdefault:\n\t\t\treturn ERROR_COMMAND_TYPE;\n\n\t\t}\n\n\t}", "static public void parseArgs(String[] args) {\r\n\r\n\t\tfor (int nA = 0; nA < args.length; nA++ ) {\r\n\t\t\tif (args[nA].length() > 7 && args[nA].substring(0,7).equals( \"--lang=\")) {\r\n\t\t\t\t//set the language to the given string\r\n\t\t\t\tTranslationBundle.setLanguage( args[nA].substring(7) );\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public static DataStructure getEnum(String s) {\n for (DataStructure e : DataStructure.values())\n if (e.getString().equals(s))\n return e;\n return NONE;\n }", "public interface MybatisStringTypeHandlerEnum {\n public String getString();\n}", "EnumListValue createEnumListValue();", "public Enum(String val) \n { \n set(val);\n }", "public void testEnum() {\n assertNotNull(MazeCell.valueOf(MazeCell.UNEXPLORED.toString()));\n assertNotNull(MazeCell.valueOf(MazeCell.INVALID_CELL.toString()));\n assertNotNull(MazeCell.valueOf(MazeCell.CURRENT_PATH.toString()));\n assertNotNull(MazeCell.valueOf(MazeCell.FAILED_PATH.toString()));\n assertNotNull(MazeCell.valueOf(MazeCell.WALL.toString()));\n }", "@Override\n public void verifyArgs(ArrayList<String> args) throws ArgumentFormatException {\n super.checkNumArgs(args);\n _args = true;\n }", "private static HashMap<String, String> parseArgs(String... args)\n {\n final HashMap<String, String> map = new HashMap();\n //TODO convert args to map\n String lastArg = null;\n for (String string : args)\n {\n //Store new arg\n if (string.startsWith(\"-\"))\n {\n lastArg = string.trim().replaceFirst(\"-\", \"\");\n if (lastArg.contains(\"=\"))\n {\n String[] split = lastArg.split(\"=\");\n lastArg = split[0];\n map.put(lastArg, split[1].replace(\"\\\\\\\"\", \"\"));\n continue;\n }\n map.put(lastArg, null);\n }\n else\n {\n //Store arg value, or append value\n String v = map.get(lastArg);\n if (v == null)\n {\n v = string;\n }\n else\n {\n v += \",\" + string;\n }\n map.put(lastArg, v);\n }\n }\n return map;\n }", "@org.junit.jupiter.api.Test\n public void testEnums() {\n assertEquals(GameOptions.ControlType.MIXED, Enums.getIfPresent(GameOptions.ControlType.class, iniReader.getString(\"enumDefault\", \"MIXED\")).or(GameOptions.ControlType.KEYBOARD));\n assertEquals(GameOptions.ControlType.MIXED, Enums.getIfPresent(GameOptions.ControlType.class, iniReader.getString(\"enumDefault\", \"MIXED\")).or(GameOptions.ControlType.MIXED));\n assertEquals(GameOptions.ControlType.KEYBOARD, Enums.getIfPresent(GameOptions.ControlType.class, iniReader.getString(\"enumEmpty\", \"KEYBOARD\")).or(GameOptions.ControlType.MIXED));\n\n // When the value in the file isn't a valid enum, use the default value in getIfPresent\n assertEquals(GameOptions.ControlType.MIXED, Enums.getIfPresent(GameOptions.ControlType.class, iniReader.getString(\"enumInvalid\", \"KEYBOARD\")).or(GameOptions.ControlType.MIXED));\n assertEquals(GameOptions.ControlType.MIXED, Enums.getIfPresent(GameOptions.ControlType.class, iniReader.getString(\"enumInvalid\", \"MIXED\")).or(GameOptions.ControlType.MIXED));\n\n // When the value is in the file, use that value regardless of the default values.\n assertEquals(GameOptions.ControlType.KEYBOARD, Enums.getIfPresent(GameOptions.ControlType.class, iniReader.getString(\"enumValid\", \"MIXED\")).or(GameOptions.ControlType.MIXED));\n }", "private static ContextLabel stringToContextLabel(String s)\n {\n \tfor (ContextLabel enumVal : ContextLabel.values())\n \t{\n \t\tif (enumVal.toString().equals(s))\n \t\t\treturn enumVal;\n \t}\n \t\n \t// in case of failure\n \treturn ContextLabel.UNKNOWN;\n }", "public void mapArguments(List<TokenDef> tokendefs) {\n for (Argument arg : this.arguments) {\n for (TokenDef tokenDef : tokendefs) {\n if (arg.type.equals(tokenDef.tokenname)) {\n arg.type = \"String\";\n }\n }\n }\n }", "private Enums(String s, int j)\n\t {\n\t System.out.println(3);\n\t }", "public void testCompletionOnEEnums() throws BadLocationException {\n \t\tsetUpIntentProject(\"completionTest\", INTENT_DOC_WITH_ENUMS_PATH);\n \t\teditor = openIntentEditor();\n \t\tdocument = editor.getDocumentProvider().getDocument(editor.getEditorInput());\n \t\tcontentAssistant = editor.getViewerConfiguration().getContentAssistant(editor.getProjectionViewer());\n \n \t\tICompletionProposal[] proposals = getCompletionProposals(112);\n \t\tassertEquals(4, proposals.length);\n \t\tString enumSuffix = \" value (of type CompilationStatusSeverity) - Default: WARNING - Set a simple value of type CompilationStatusSeverity\";\n \t\tassertEquals(\"'WARNING'\" + enumSuffix, proposals[0].getDisplayString());\n \t\tassertEquals(\"'ERROR'\" + enumSuffix, proposals[1].getDisplayString());\n \t\tassertEquals(\"'INFO'\" + enumSuffix, proposals[2].getDisplayString());\n \t\tassertEquals(\"'OK'\" + enumSuffix, proposals[3].getDisplayString());\n \t}", "public static AudioNormalizationAlgorithm fromValue(String value) {\n if (value == null || \"\".equals(value)) {\n throw new IllegalArgumentException(\"Value cannot be null or empty!\");\n }\n\n for (AudioNormalizationAlgorithm enumEntry : AudioNormalizationAlgorithm.values()) {\n if (enumEntry.toString().equals(value)) {\n return enumEntry;\n }\n }\n\n throw new IllegalArgumentException(\"Cannot create enum from \" + value + \" value!\");\n }", "private static List<Scenario> parseScenario(String[] args){\n\t\targs = new String[]{\"software_manage/software_search.scenario\"};\n\t\tList<Scenario> list = new LinkedList<Scenario>();\n\t\tfor(String arg : args)\n\t\t\tlist.add(new Scenario(arg));\n\t\t\n\t\treturn list;\n\t}", "private static AbstractType<?>[] argumentsType(@Nullable StringType algorithmArgumentType)\n {\n return algorithmArgumentType == null\n ? DEFAULT_ARGUMENTS\n : new AbstractType<?>[]{ algorithmArgumentType };\n }", "public static ListMap parseArguments(String[] asArg, String[] asCommand, boolean fCaseSens)\n {\n ListMap map = new ListMap();\n String sCommand = null;\n int iArg = -1;\n\n for (int i = 0; i < asArg.length; i++)\n {\n String sArg = asArg[i];\n\n if (sArg.charAt(0) == '-')\n {\n // encountered a new command\n if (sCommand != null)\n {\n // the previous command had no value\n addArgToResultsMap(sCommand, null, map);\n }\n\n sCommand = sArg.substring(1);\n if (sCommand.length() == 0)\n {\n throw new IllegalArgumentException(\"An empty command\");\n }\n\n int of = sCommand.indexOf('=');\n if (of < 0)\n {\n of = sCommand.indexOf(':');\n }\n\n if (of > 0)\n {\n String sValue = sCommand.substring(of + 1);\n\n sCommand = validateCommand(sCommand.substring(0, of),\n asCommand, fCaseSens);\n addArgToResultsMap(sCommand, sValue, map);\n sCommand = null;\n }\n else\n {\n sCommand = validateCommand(sCommand, asCommand, fCaseSens);\n }\n }\n else\n {\n if (sCommand == null)\n {\n // encountered an argument\n map.put(Integer.valueOf(++iArg), sArg);\n }\n else\n {\n // encountered an cmd-value\n addArgToResultsMap(sCommand, sArg, map);\n sCommand = null;\n }\n }\n }\n\n if (sCommand != null)\n {\n // the last arg was an command without a value\n map.put(sCommand, null);\n }\n return map;\n }", "@Test\n\tpublic void testEnumSize1BadInput() throws Exception {\n\t\tCategory category = program.getListing()\n\t\t\t\t.getDataTypeManager()\n\t\t\t\t.getCategory(new CategoryPath(CategoryPath.ROOT, \"Category1\"));\n\t\tEnum enumm = createEnum(category, \"TestEnum\", 1);\n\t\tedit(enumm);\n\n\t\tEnumEditorPanel panel = findEditorPanel(tool.getToolFrame());\n\t\tassertNotNull(panel);\n\n\t\taddEnumValue();\n\n\t\twaitForSwing();\n\t\tDockingActionIf applyAction = getApplyAction();\n\t\tassertTrue(applyAction.isEnabled());\n\t\tassertTrue(panel.needsSave());\n\n\t\tJTable table = panel.getTable();\n\t\tEnumTableModel model = (EnumTableModel) table.getModel();\n\n\t\tassertEquals(\"New_Name\", model.getValueAt(0, NAME_COL));\n\t\tassertEquals(0L, model.getValueAt(0, VALUE_COL));\n\n\t\taddEnumValue();\n\n\t\tString editName = \"New_Name_(1)\";\n\t\tassertEquals(editName, model.getValueAt(1, NAME_COL));\n\t\tassertEquals(1L, model.getValueAt(1, VALUE_COL));\n\n\t\taddEnumValue();\n\n\t\tassertEquals(\"New_Name_(2)\", model.getValueAt(2, NAME_COL));\n\t\tassertEquals(2L, model.getValueAt(2, VALUE_COL));\n\n\t\tint row = getRowFor(editName);\n\n\t\teditValueInTable(row, \"0x777\");\n\n\t\trow = getRowFor(editName); // the row may have changed if we are sorted on the values col\n\t\tassertEquals(0x77L, model.getValueAt(row, VALUE_COL));\n\t}", "public void parseUserInput(String[] args)\n {\n this.args = args;\n// Class cls = this.getClass();\n Method method;\n String parameter;\n int parameterPrefix = USER_OPTION.length();\n\n for (int parameterIndex=0; parameterIndex<args.length; parameterIndex++)\n {\n // Parse the input to find the corresponding function\n try\n {\n parameter = args[parameterIndex].substring(parameterPrefix);\n method = UserInput.class.getDeclaredMethod(parameter, Integer.class);\n parameterIndex = (int) method.invoke(this, parameterIndex);\n }\n catch (NoSuchMethodException | IllegalAccessException e )\n {\n throw new RuntimeException(\"Unhandled parameter: \" + args[parameterIndex] + \"\\n\" + e);\n }\n catch (InvocationTargetException e)\n {\n// e.printStackTrace();\n throw new RuntimeException(\"Missing or wrong parameters for the option: \" + args[parameterIndex] + \"\\n\" + e);\n }\n }\n }", "public void testInvalidEnum () {\n\t\tString example = \"aM\";\n\t\ttry {\n\t\t\tRadioBand temp = RadioBand.valueForString(example);\n assertNull(\"Result of valueForString should be null.\", temp);\n\t\t}\n\t\tcatch (IllegalArgumentException exception) {\n fail(\"Invalid enum throws IllegalArgumentException.\");\n\t\t}\n\t}", "public static void main(String[] args)\n\t {\n\t \n\t \n\t\t Enums en = Enums.B; //All enum constants are created while executing this statement. \n\t\t \n\t //While creating each enum constant, corresponding constructor is called\n\t \n\t Enums en2 = Enums.C; //No enum constant is created here.\n\t \n\t Enums en3 = Enums.A; //No enum constant is created here.\n\t \n\t \n}", "private static ArgumentsPair parseArgs(String args[]) {\n String allArgs[] = new String[] {\n PARAMETER_NEW_FORMAT,\n PARAMETER_TRANSFORM,\n PARAMETER_BASE,\n PARAMETER_BITS,\n PARAMETER_BYTES,\n PARAMETER_DIFFERENCE,\n PARAMETER_STRENGTH,\n PARAMETER_TIME\n };\n Set<String> allArgsSet = new HashSet<>(Arrays.asList(allArgs));\n ArgumentsPair argumentsPair = new ArgumentsPair();\n\n for (int i = 0; i < args.length; i++) {\n String param = args[i].substring(1);\n if (allArgsSet.contains(param)) {\n argumentsPair.paramsAdd(param);\n } else if (param.equals(PARAMETER_ALL)) {\n argumentsPair.paramsAddAll(allArgsSet);\n argumentsPair.getParams().remove(PARAMETER_NEW_FORMAT);\n argumentsPair.getParams().remove(PARAMETER_TRANSFORM);\n } else if (param.equals(PARAMETER_GENERATE)) {\n if (args.length <= i + 1) {\n System.err.println(\"Wrong -\" + PARAMETER_GENERATE + \" parameter. Use -\" + PARAMETER_GENERATE + \" keyBitLength. (keyBitLength = 512|1024)\");\n }\n else {\n int keyBitLength = Integer.valueOf(args[++i]);\n switch (keyBitLength) {\n case 1024:\n GENERATE_KEYS = true;\n GENERATED_PRIME_BIT_LENGTH = 512;\n break;\n case 512:\n GENERATE_KEYS = true;\n GENERATED_PRIME_BIT_LENGTH = 256;\n break;\n default:\n System.err.println(\"Wrong -\" + PARAMETER_GENERATE + \" parameter. Use -\" + PARAMETER_GENERATE + \" keyBitLength. (keyBitLength = 512|1024)\");\n }\n }\n } else {\n argumentsPair.filesAdd(args[i]);\n }\n }\n return argumentsPair;\n }", "static void perform_in(String passed){\n\t\tint type = type_of_in(passed);\n\t\tswitch(type){\n\t\tcase 1:\n\t\t\ttry {\n\t\t\t\tin_to_acc(passed);\n\t\t\t} catch (IOException e) {\n\t\t\t}\n\t\t\tbreak;\n\t\t}\n\t}", "<C, EL> EnumLiteralExp<C, EL> createEnumLiteralExp();", "protected abstract void parseArgs() throws IOException;", "public void processArgs(String[] args){\r\n\t\tPattern pat = Pattern.compile(\"-[a-z]\");\r\n\t\tfor (int i = 0; i<args.length; i++){\r\n\t\t\tString lcArg = args[i].toLowerCase();\r\n\t\t\tMatcher mat = pat.matcher(lcArg);\r\n\t\t\tif (mat.matches()){\r\n\t\t\t\tchar test = args[i].charAt(1);\r\n\t\t\t\ttry{\r\n\t\t\t\t\tswitch (test){\r\n\t\t\t\t\tcase 'f': directory = new File(args[i+1]); i++; break;\r\n\t\t\t\t\tcase 'o': orderedFileNames = args[++i].split(\",\"); break;\r\n\t\t\t\t\tcase 'c': output = new File(args[++i]); break;\r\n\t\t\t\t\tcase 'h': printDocs(); System.exit(0);\r\n\t\t\t\t\tdefault: Misc.printErrAndExit(\"\\nProblem, unknown option! \" + mat.group());\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tcatch (Exception e){\r\n\t\t\t\t\tSystem.out.print(\"\\nSorry, something doesn't look right with this parameter request: -\"+test);\r\n\t\t\t\t\tSystem.out.println();\r\n\t\t\t\t\tSystem.exit(0);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\t//check to see if they entered required params\r\n\t\tif (directory==null || directory.isDirectory() == false){\r\n\t\t\tSystem.out.println(\"\\nCannot find your directory!\\n\");\r\n\t\t\tSystem.exit(0);\r\n\t\t}\r\n\t}", "public void processArgs(String[] args){\n\t\tPattern pat = Pattern.compile(\"-[a-z]\");\n\t\tfor (int i = 0; i<args.length; i++){\n\t\t\tString lcArg = args[i].toLowerCase();\n\t\t\tMatcher mat = pat.matcher(lcArg);\n\t\t\tif (mat.matches()){\n\t\t\t\tchar test = args[i].charAt(1);\n\t\t\t\ttry{\n\t\t\t\t\tswitch (test){\n\t\t\t\t\tcase 'a': ucscGeneTableFileAll = new File(args[i+1]); i++; break;\n\t\t\t\t\tcase 'g': ucscGeneTableFileSelect = new File(args[i+1]); i++; break;\n\t\t\t\t\tcase 'b': barDirectory = new File(args[i+1]); i++; break;\n\t\t\t\t\tcase 'r': rApp = new File(args[i+1]); i++; break;\n\t\t\t\t\tcase 's': threshold = Float.parseFloat(args[i+1]); i++; break;\n\t\t\t\t\tcase 'e': extension = Integer.parseInt(args[i+1]); i++; break;\n\t\t\t\t\tcase 'f': extensionToSegment = Integer.parseInt(args[i+1]); i++; break;\n\t\t\t\t\tcase 'x': bpPositionOffSetBar = Integer.parseInt(args[i+1]); i++; break;\n\t\t\t\t\tcase 'y': bpPositionOffSetRegion = Integer.parseInt(args[i+1]); i++; break;\n\t\t\t\t\tcase 'h': printDocs(); System.exit(0);\n\t\t\t\t\tdefault: Misc.printExit(\"\\nError: unknown option! \" + mat.group());\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tcatch (Exception e){\n\t\t\t\t\tMisc.printExit(\"\\nSorry, something doesn't look right with this parameter: -\"+test+\"\\n\");\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t//parse text\n\t\tselectName = Misc.removeExtension(ucscGeneTableFileSelect.getName());\n\n\t}", "public void testInvalidEnum () {\n\t\tString example = \"uSer_ExiT\";\n\t\ttry {\n\t\t AppInterfaceUnregisteredReason temp = AppInterfaceUnregisteredReason.valueForString(example);\n assertNull(\"Result of valueForString should be null.\", temp);\n\t\t}\n\t\tcatch (IllegalArgumentException exception) {\n fail(\"Invalid enum throws IllegalArgumentException.\");\n\t\t}\n\t}", "public interface IArgsParser {\r\n\tvoid parse(String [] aParams, Iterable<IArgument> args);\r\n}", "public void testInvalidEnum () {\n\t\tString example = \"8kHz\";\n\t\ttry {\n\t\t SamplingRate temp = SamplingRate.valueForString(example);\n assertNull(\"Result of valueForString should be null.\", temp);\n\t\t}\n\t\tcatch (IllegalArgumentException exception) {\n fail(\"Invalid enum throws IllegalArgumentException.\");\n\t\t}\n\t}", "protected void parseArgs(String[] args) {\n // Arguments are pretty simple, so we go with a basic switch instead of having\n // yet another dependency (e.g. commons-cli).\n for (int i = 0; i < args.length; i++) {\n int nextIdx = (i + 1);\n String arg = args[i];\n switch (arg) {\n case \"--prop-file\":\n if (++i < args.length) {\n loadPropertyFile(args[i]);\n } else {\n throw new IllegalArgumentException(\"Missing value for argument at posn: \" + i);\n }\n break;\n case \"--schema-name\":\n if (++i < args.length) {\n DataDefinitionUtil.assertValidName(args[i]);\n\n // Force upper-case to avoid tricky-to-catch errors related to quoting names\n this.schemaName = args[i];\n } else {\n throw new IllegalArgumentException(\"Missing value for argument at posn: \" + i);\n }\n break;\n case \"--grant-to\":\n if (++i < args.length) {\n DataDefinitionUtil.assertValidName(args[i]);\n\n // Force upper-case because user names are case-insensitive\n this.grantTo = args[i].toUpperCase();\n } else {\n throw new IllegalArgumentException(\"Missing value for argument at posn: \" + i);\n }\n break;\n case \"--target\":\n if (++i < args.length) {\n DataDefinitionUtil.assertValidName(args[i]);\n List<String> targets = Arrays.asList(args[i].split(\",\"));\n for (String target : targets) {\n String tmp = target.toUpperCase();\n nextIdx++;\n if (tmp.startsWith(\"BATCH\")) {\n this.grantJavaBatchSchema = true;\n if (nextIdx < args.length && !args[nextIdx].startsWith(\"--\")) {\n this.javaBatchSchemaName = args[nextIdx];\n i++;\n } else {\n throw new IllegalArgumentException(\"Missing value for argument at posn: \" + i);\n }\n } else if (tmp.startsWith(\"OAUTH\")){\n this.grantOauthSchema = true;\n if (nextIdx < args.length && !args[nextIdx].startsWith(\"--\")) {\n this.oauthSchemaName = args[nextIdx];\n i++;\n } else {\n throw new IllegalArgumentException(\"Missing value for argument at posn: \" + i);\n }\n } else if (tmp.startsWith(\"DATA\")){\n this.grantFhirSchema = true;\n if (nextIdx < args.length && !args[nextIdx].startsWith(\"--\")) {\n this.schemaName = args[nextIdx];\n i++;\n } else {\n throw new IllegalArgumentException(\"Missing value for argument at posn: \" + i);\n }\n } else {\n throw new IllegalArgumentException(\"Missing value for argument at posn: \" + i);\n }\n }\n } else {\n throw new IllegalArgumentException(\"Missing value for argument at posn: \" + i);\n }\n break;\n case \"--add-tenant-key\":\n if (++i < args.length) {\n this.addKeyForTenant = args[i];\n } else {\n throw new IllegalArgumentException(\"Missing value for argument at posn: \" + i);\n }\n break;\n case \"--update-proc\":\n this.updateProc = true;\n break;\n case \"--check-compatibility\":\n this.checkCompatibility = true;\n break;\n case \"--drop-admin\":\n this.dropAdmin = true;\n break;\n case \"--test-tenant\":\n if (++i < args.length) {\n this.tenantName = args[i];\n this.testTenant = true;\n } else {\n throw new IllegalArgumentException(\"Missing value for argument at posn: \" + i);\n }\n break;\n case \"--tenant-key\":\n if (++i < args.length) {\n this.tenantKey = args[i];\n } else {\n throw new IllegalArgumentException(\"Missing value for argument at posn: \" + i);\n }\n break;\n case \"--tenant-key-file\":\n if (++i < args.length) {\n tenantKeyFileName = args[i];\n } else {\n throw new IllegalArgumentException(\"Missing value for argument at posn: \" + i);\n }\n break;\n case \"--list-tenants\":\n this.listTenants = true;\n break;\n case \"--update-schema\":\n this.updateFhirSchema = true;\n this.updateOauthSchema = true;\n this.updateJavaBatchSchema = true;\n this.dropSchema = false;\n break;\n case \"--update-schema-fhir\":\n this.updateFhirSchema = true;\n if (nextIdx < args.length && !args[nextIdx].startsWith(\"--\")) {\n this.schemaName = args[nextIdx];\n i++;\n } else {\n this.schemaName = DATA_SCHEMANAME;\n }\n break;\n case \"--update-schema-batch\":\n this.updateJavaBatchSchema = true;\n if (nextIdx < args.length && !args[nextIdx].startsWith(\"--\")) {\n this.javaBatchSchemaName = args[nextIdx];\n i++;\n }\n break;\n case \"--update-schema-oauth\":\n this.updateOauthSchema = true;\n if (nextIdx < args.length && !args[nextIdx].startsWith(\"--\")) {\n this.oauthSchemaName = args[nextIdx];\n i++;\n }\n break;\n case \"--create-schemas\":\n this.createFhirSchema = true;\n this.createOauthSchema = true;\n this.createJavaBatchSchema = true;\n break;\n case \"--create-schema-fhir\":\n this.createFhirSchema = true;\n if (nextIdx < args.length && !args[nextIdx].startsWith(\"--\")) {\n this.schemaName = args[nextIdx];\n i++;\n }\n break;\n case \"--create-schema-batch\":\n this.createJavaBatchSchema = true;\n if (nextIdx < args.length && !args[nextIdx].startsWith(\"--\")) {\n this.javaBatchSchemaName = args[nextIdx];\n i++;\n }\n break;\n case \"--create-schema-oauth\":\n this.createOauthSchema = true;\n if (nextIdx < args.length && !args[nextIdx].startsWith(\"--\")) {\n this.oauthSchemaName = args[nextIdx];\n i++;\n }\n break;\n case \"--drop-schema\":\n this.updateFhirSchema = false;\n this.dropSchema = true;\n break;\n case \"--drop-schema-fhir\":\n this.dropFhirSchema = Boolean.TRUE;\n break;\n case \"--drop-schema-batch\":\n this.dropJavaBatchSchema = Boolean.TRUE;\n break;\n case \"--drop-schema-oauth\":\n this.dropOauthSchema = Boolean.TRUE;\n break;\n case \"--pool-size\":\n if (++i < args.length) {\n this.maxConnectionPoolSize = Integer.parseInt(args[i]);\n } else {\n throw new IllegalArgumentException(\"Missing value for argument at posn: \" + i);\n }\n break;\n case \"--prop\":\n if (++i < args.length) {\n // properties are given as name=value\n addProperty(args[i]);\n } else {\n throw new IllegalArgumentException(\"Missing value for argument at posn: \" + i);\n }\n break;\n case \"--confirm-drop\":\n this.confirmDrop = true;\n break;\n case \"--allocate-tenant\":\n if (++i < args.length) {\n this.tenantName = args[i];\n this.allocateTenant = true;\n this.dropTenant = false;\n } else {\n throw new IllegalArgumentException(\"Missing value for argument at posn: \" + i);\n }\n break;\n case \"--drop-tenant\":\n if (++i < args.length) {\n this.tenantName = args[i];\n this.dropTenant = true;\n this.allocateTenant = false;\n } else {\n throw new IllegalArgumentException(\"Missing value for argument at posn: \" + i);\n }\n break;\n case \"--freeze-tenant\":\n if (++i < args.length) {\n this.tenantName = args[i];\n this.freezeTenant = true;\n this.dropTenant = false;\n this.allocateTenant = false;\n } else {\n throw new IllegalArgumentException(\"Missing value for argument at posn: \" + i);\n }\n break;\n case \"--drop-detached\":\n if (++i < args.length) {\n this.tenantName = args[i];\n this.dropDetached = true;\n this.dropTenant = false;\n this.allocateTenant = false;\n } else {\n throw new IllegalArgumentException(\"Missing value for argument at posn: \" + i);\n }\n break;\n case \"--delete-tenant-meta\":\n if (++i < args.length) {\n this.tenantName = args[i];\n this.deleteTenantMeta = true;\n } else {\n throw new IllegalArgumentException(\"Missing value for argument at posn: \" + i);\n }\n break;\n case \"--dry-run\":\n this.dryRun = Boolean.TRUE;\n break;\n case \"--db-type\":\n if (++i < args.length) {\n this.dbType = DbType.from(args[i]);\n } else {\n throw new IllegalArgumentException(\"Missing value for argument at posn: \" + i);\n }\n switch (dbType) {\n case DERBY:\n translator = new DerbyTranslator();\n // For some reason, embedded derby deadlocks if we use multiple threads\n maxConnectionPoolSize = 1;\n break;\n case POSTGRESQL:\n translator = new PostgreSqlTranslator();\n break;\n case DB2:\n default:\n break;\n }\n break;\n default:\n throw new IllegalArgumentException(\"Invalid argument: \" + arg);\n }\n }\n }", "private void processInput(String str) {\r\n String[] strs = str.split(\":\")[1].split(\",\");\r\n for (String s : strs) {\r\n color.add(s.trim().toUpperCase());\r\n }\r\n }", "@SuppressWarnings(\"unchecked\")\r\n public EnumByteConverter(final String theEnumType) {\r\n super((Class<E>) SystemUtils.forName(theEnumType));\r\n constants = init();\r\n }", "public void parseArguments(String queryString, String contentEncoding) {\n String[] args = JOrphanUtils.split(queryString, QRY_SEP);\n final boolean isDebug = log.isDebugEnabled();\n for (String arg : args) {\n if (isDebug) {\n log.debug(\"Arg: \" + arg);\n }\n // need to handle four cases:\n // - string contains name=value\n // - string contains name=\n // - string contains name\n // - empty string\n \n String metaData; // records the existence of an equal sign\n String name;\n String value;\n int length = arg.length();\n int endOfNameIndex = arg.indexOf(ARG_VAL_SEP);\n if (endOfNameIndex != -1) {// is there a separator?\n // case of name=value, name=\n metaData = ARG_VAL_SEP;\n name = arg.substring(0, endOfNameIndex);\n value = arg.substring(endOfNameIndex + 1, length);\n } else {\n metaData = \"\";\n name = arg;\n value = \"\";\n }\n if (name.length() > 0) {\n if (isDebug) {\n log.debug(\"Name: \" + name + \" Value: \" + value + \" Metadata: \" + metaData);\n }\n // If we know the encoding, we can decode the argument value,\n // to make it easier to read for the user\n if (!StringUtils.isEmpty(contentEncoding)) {\n addEncodedArgument(name, value, metaData, contentEncoding);\n } else {\n // If we do not know the encoding, we just use the encoded value\n // The browser has already done the encoding, so save the values as is\n addNonEncodedArgument(name, value, metaData);\n }\n }\n }\n }", "public Object parse(String arg) {\n return (arg);\n }", "private Arguments validateAndReturnType(String[] arguments) {\n\t\tif(arguments == null || arguments.length == 0 || arguments.length > 3)\n \t\treturn Arguments.INVALID;\n\t\tString arg1 = arguments[0].toLowerCase();\n\t\tif(arg1.equals(\"increase\") || arg1.equals(\"reduce\") || arg1.equals(\"inrange\")){\n\t\t\tif(arguments.length != 3)\n\t\t\t\treturn Arguments.INVALID;\n\t\t\telse\n\t\t\t{\n\t\t\t\tif(arg1.equals(\"increase\"))\n\t\t\t\t\treturn Arguments.INCREASE;\n\t\t\t\telse if(arg1.equals(\"reduce\"))\n\t\t\t\t\treturn Arguments.REDUCE;\n\t\t\t\telse if(arg1.equals(\"inrange\"))\n\t\t\t\t\treturn Arguments.INRANGE;\n\t\t\t}\n\t\t} else if(arg1.equals(\"next\") || arg1.equals(\"previous\") || arg1.equals(\"count\")) {\n\t\t\tif(arguments.length != 2)\n\t\t\t\treturn Arguments.INVALID;\n\t\t\telse\n\t\t\t{\n\t\t\t\tif(arg1.equals(\"next\"))\n\t\t\t\t\treturn Arguments.NEXT;\n\t\t\t\telse if(arg1.equals(\"previous\"))\n\t\t\t\t\treturn Arguments.PREVIOUS;\n\t\t\t\telse if(arg1.equals(\"count\"))\n\t\t\t\t\treturn Arguments.COUNT;\n\t\t\t}\n\t\t} else if(arg1.equals(\"quit\")) {\n\t\t\treturn Arguments.QUIT;\n\t\t} else\n\t\t\treturn Arguments.INVALID;\n\t\t\t\n\t\treturn null;\n\t}", "public void fixmetestPositiveStringArray() {\n\n fail(\"Array conversions not implemented yet.\");\n\n Object value;\n final String[] stringArray = {};\n final String[] stringArray1 = { \"abc\" };\n final String[] stringArray2 = { \"abc\", \"de,f\" };\n\n value = LocaleConvertUtils.convert(\"\", stringArray.getClass());\n checkStringArray(value, stringArray);\n value = LocaleConvertUtils.convert(\" \", stringArray.getClass());\n checkStringArray(value, stringArray);\n value = LocaleConvertUtils.convert(\"{}\", stringArray.getClass());\n checkStringArray(value, stringArray);\n value = LocaleConvertUtils.convert(\"{ }\", stringArray.getClass());\n checkStringArray(value, stringArray);\n\n value = LocaleConvertUtils.convert(\"abc\", stringArray.getClass());\n checkStringArray(value, stringArray1);\n value = LocaleConvertUtils.convert(\"{abc}\", stringArray.getClass());\n checkStringArray(value, stringArray1);\n value = LocaleConvertUtils.convert(\"\\\"abc\\\"\", stringArray.getClass());\n checkStringArray(value, stringArray1);\n value = LocaleConvertUtils.convert(\"{\\\"abc\\\"}\", stringArray.getClass());\n checkStringArray(value, stringArray1);\n value = LocaleConvertUtils.convert(\"'abc'\", stringArray.getClass());\n checkStringArray(value, stringArray1);\n value = LocaleConvertUtils.convert(\"{'abc'}\", stringArray.getClass());\n checkStringArray(value, stringArray1);\n\n value = LocaleConvertUtils.convert(\"abc 'de,f'\", stringArray.getClass());\n checkStringArray(value, stringArray2);\n value = LocaleConvertUtils.convert(\"{abc, 'de,f'}\", stringArray.getClass());\n checkStringArray(value, stringArray2);\n value = LocaleConvertUtils.convert(\"\\\"abc\\\",\\\"de,f\\\"\", stringArray.getClass());\n checkStringArray(value, stringArray2);\n value = LocaleConvertUtils.convert(\"{\\\"abc\\\" 'de,f'}\", stringArray.getClass());\n checkStringArray(value, stringArray2);\n value = LocaleConvertUtils.convert(\"'abc' 'de,f'\", stringArray.getClass());\n checkStringArray(value, stringArray2);\n value = LocaleConvertUtils.convert(\"{'abc', \\\"de,f\\\"}\", stringArray.getClass());\n checkStringArray(value, stringArray2);\n\n }", "T convert(String value);", "void parse(String[] args);", "public void processArgs(String[] args){\n\t\tPattern pat = Pattern.compile(\"-[a-z]\");\n\t\tSystem.out.println(\"\\n\"+IO.fetchUSeqVersion()+\" Arguments: \"+Misc.stringArrayToString(args, \" \")+\"\\n\");\n\t\tfor (int i = 0; i<args.length; i++){\n\t\t\tString lcArg = args[i].toLowerCase();\n\t\t\tMatcher mat = pat.matcher(lcArg);\n\t\t\tif (mat.matches()){\n\t\t\t\tchar test = args[i].charAt(1);\n\t\t\t\ttry{\n\t\t\t\t\tswitch (test){\n\t\t\t\t\tcase 'b': bedFile = new File (args[i+1]); i++; break;\n\t\t\t\t\tcase 'm': minNumExons = Integer.parseInt(args[i+1]); i++; break;\n\t\t\t\t\tcase 'a': requiredAnnoType = args[i+1]; i++; break;\n\t\t\t\t\tcase 'h': printDocs(); System.exit(0);\n\t\t\t\t\tdefault: System.out.println(\"\\nProblem, unknown option! \" + mat.group());\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tcatch (Exception e){\n\t\t\t\t\tMisc.printExit(\"\\nSorry, something doesn't look right with this parameter: -\"+test+\"\\n\");\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif (bedFile == null || bedFile.canRead() == false) Misc.printExit(\"\\nError: cannot find your bed file!\\n\");\t\n\t}", "public abstract void fromString(String s, String context);", "private static DirType getEnum(String name) {\n\t\t\t//Find provided string in directions map.\n\t\t\tDirType direction = directions.get(name.toUpperCase());\n\t\t\tif (direction == null) {\n\t\t\t\tdirection = DirType.NONE;\n\t\t\t}\n\t\t\treturn direction;\n\t\t}", "private List<Argument> convertArguments(List<gherkin.formatter.Argument> arguments) {\n if (null == arguments) {\n return new ArrayList<>();\n }\n\n return arguments.stream().map(argument -> {\n Argument hookArgument = new Argument();\n String argVal = argument.getVal();\n argVal = argVal.replace(\"<\", \"\").replace(\">\", \"\");\n hookArgument.setArgumentValue(argVal);\n hookArgument.setOffset(argument.getOffset());\n\n return hookArgument;\n }).collect(Collectors.toList());\n }", "@Test\n public void testValueOf() {\n System.out.println(\"valueOf\");\n String[] values = {\"DELETED\"};\n StatusType[] expResults = {StatusType. DELETED};\n for (int index1 = 0; index1 < values.length; index1++) {\n StatusType result = StatusType.valueOf(values[index1].toUpperCase());\n assertEquals(expResults[index1], result);\n }\n }", "protected abstract SimpleType doParseString(String s);", "public void parseArguments(String queryString, String contentEncoding) {\n String[] args = JOrphanUtils.split(queryString, QRY_SEP);\n final boolean isDebug = log.isDebugEnabled();\n for (int i = 0; i < args.length; i++) {\n if (isDebug) {\n log.debug(\"Arg: \" + args[i]);\n }\n // need to handle four cases:\n // - string contains name=value\n // - string contains name=\n // - string contains name\n // - empty string\n \n String metaData; // records the existance of an equal sign\n String name;\n String value;\n int length = args[i].length();\n int endOfNameIndex = args[i].indexOf(ARG_VAL_SEP);\n if (endOfNameIndex != -1) {// is there a separator?\n // case of name=value, name=\n metaData = ARG_VAL_SEP;\n name = args[i].substring(0, endOfNameIndex);\n value = args[i].substring(endOfNameIndex + 1, length);\n } else {\n metaData = \"\";\n name=args[i];\n value=\"\";\n }\n if (name.length() > 0) {\n if (isDebug) {\n log.debug(\"Name: \" + name+ \" Value: \" + value+ \" Metadata: \" + metaData);\n }\n // If we know the encoding, we can decode the argument value,\n // to make it easier to read for the user\n if(!StringUtils.isEmpty(contentEncoding)) {\n addEncodedArgument(name, value, metaData, contentEncoding);\n }\n else {\n // If we do not know the encoding, we just use the encoded value\n // The browser has already done the encoding, so save the values as is\n addNonEncodedArgument(name, value, metaData);\n }\n }\n }\n }", "private PatternType matchPatternEnum(String s){\n s = s.toLowerCase();\n switch(s){\n case \"factory method\":\n return PatternType.FACTORY_METHOD;\n case \"prototype\":\n return PatternType.PROTOTYPE;\n case \"singleton\":\n return PatternType.SINGLETON;\n case \"(object)adapter\":\n return PatternType.OBJECT_ADAPTER;\n case \"command\":\n return PatternType.COMMAND;\n case \"composite\":\n return PatternType.COMPOSITE;\n case \"decorator\":\n return PatternType.DECORATOR;\n case \"observer\":\n return PatternType.OBSERVER;\n case \"state\":\n return PatternType.STATE;\n case \"strategy\":\n return PatternType.STRATEGY;\n case \"bridge\":\n return PatternType.BRIDGE;\n case \"template method\":\n return PatternType.TEMPLATE_METHOD;\n case \"visitor\":\n return PatternType.VISITOR;\n case \"proxy\":\n return PatternType.PROXY;\n case \"proxy2\":\n return PatternType.PROXY2;\n case \"chain of responsibility\":\n return PatternType.CHAIN_OF_RESPONSIBILITY;\n default:\n System.out.println(\"Was not able to match pattern with an enum. Exiting because this should not happen\");\n System.exit(0);\n\n }\n //should never get here because we exit on the default case\n return null;\n }", "public void analyseArguments(String[] args) throws ArgumentsException {\n \t\t\n for (int i=0;i<args.length;i++){ \n \n \n if (args[i].matches(\"-s\")){\n affichage = true;\n }\n else if (args[i].matches(\"-seed\")) {\n aleatoireAvecGerme = true;\n i++; \n \t// traiter la valeur associee\n try { \n seed =new Integer(args[i]);\n \n }\n catch (Exception e) {\n throw new ArgumentsException(\"Valeur du parametre -seed invalide :\" + args[i]);\n } \t\t\n }\n \n else if (args[i].matches(\"-mess\")){\n i++; \n \t// traiter la valeur associee\n messageString = args[i];\n if (args[i].matches(\"[0,1]{7,}\")) {\n messageAleatoire = false;\n nbBitsMess = args[i].length();\n \n } \n else if (args[i].matches(\"[0-9]{1,6}\")) {\n messageAleatoire = true;\n nbBitsMess = new Integer(args[i]);\n if (nbBitsMess < 1) \n throw new ArgumentsException (\"Valeur du parametre -mess invalide : \" + nbBitsMess);\n }\n else \n throw new ArgumentsException(\"Valeur du parametre -mess invalide : \" + args[i]);\n }\n \n else throw new ArgumentsException(\"Option invalide :\"+ args[i]);\n \n }\n \n }", "public void testListEnum() {\n \t\tList<RadioBand> enumValueList = Arrays.asList(RadioBand.values());\n\n\t\tList<RadioBand> enumTestList = new ArrayList<RadioBand>();\n\t\tenumTestList.add(RadioBand.AM);\n\t\tenumTestList.add(RadioBand.FM);\n\t\tenumTestList.add(RadioBand.XM);\n\n\t\tassertTrue(\"Enum value list does not match enum class list\", \n\t\t\t\tenumValueList.containsAll(enumTestList) && enumTestList.containsAll(enumValueList));\n\t}", "static int type_of_in(String passed){\n\t\treturn 1;\n\t}", "public static Obj enumType(String type) {\n\t\tif ((type != null) && !type.isEmpty() && (StrObj.containsKey(type)))\n\t\t\treturn StrObj.get(type);\n\t\telse\n\t\t\treturn Obj.UNKOBJ;\n\t}", "@Test(expectedExceptions=InvalidArgumentValueException.class)\n public void argumentValidationTest() {\n String[] commandLine = new String[] {\"--value\",\"521\"};\n\n parsingEngine.addArgumentSource( ValidatingArgProvider.class );\n parsingEngine.parse( commandLine );\n parsingEngine.validate();\n\n ValidatingArgProvider argProvider = new ValidatingArgProvider();\n parsingEngine.loadArgumentsIntoObject( argProvider );\n\n Assert.assertEquals(argProvider.value.intValue(), 521, \"Argument is not correctly initialized\");\n\n // Try some invalid arguments\n commandLine = new String[] {\"--value\",\"foo\"};\n parsingEngine.parse( commandLine );\n parsingEngine.validate();\n }" ]
[ "0.5959601", "0.57087374", "0.5524504", "0.539436", "0.5329585", "0.5282918", "0.52469164", "0.5189764", "0.5188317", "0.5186463", "0.5184061", "0.5182493", "0.5165234", "0.5145509", "0.51130235", "0.5106279", "0.50973755", "0.50486994", "0.50149065", "0.50017226", "0.49974084", "0.4981292", "0.4981292", "0.4981292", "0.49722096", "0.49680164", "0.49235505", "0.4904239", "0.48926547", "0.4881131", "0.4874642", "0.48692685", "0.48547637", "0.48378006", "0.48300385", "0.4816348", "0.47932717", "0.47804812", "0.47631449", "0.4762596", "0.4757144", "0.47513458", "0.47446433", "0.47280836", "0.4722271", "0.47124887", "0.47120133", "0.47054932", "0.46774754", "0.46649578", "0.46641064", "0.46586826", "0.46578023", "0.46550032", "0.46523565", "0.46512318", "0.46400478", "0.4638611", "0.46315685", "0.4619717", "0.46187854", "0.46178675", "0.46157825", "0.4607515", "0.4596019", "0.45883584", "0.4585927", "0.4585672", "0.45835704", "0.4581356", "0.4580064", "0.4578221", "0.45616215", "0.45614898", "0.4540966", "0.45392394", "0.45381865", "0.45354006", "0.45344824", "0.45326063", "0.4528471", "0.45281437", "0.4525318", "0.4524499", "0.4522967", "0.4519715", "0.4516603", "0.45127934", "0.4507153", "0.45050818", "0.4503958", "0.45035353", "0.44910744", "0.44832265", "0.4482523", "0.44798622", "0.44745237", "0.44741735", "0.446966", "0.44690752" ]
0.7100209
0
Validate the arguments according to the rules specified in the action using the Parameter annotations
protected void validateArguments( Object[] args ) throws ActionExecutionException { Annotation[][] annotations = method.getParameterAnnotations(); for (int i = 0; i < annotations.length; i++) { Annotation[] paramAnnotations = annotations[i]; for (Annotation paramAnnotation : paramAnnotations) { if (paramAnnotation instanceof Parameter) { Parameter paramDescriptionAnnotation = (Parameter) paramAnnotation; ValidationType validationType = paramDescriptionAnnotation.validation(); String[] validationArgs; // if we are checking for valid constants, then the // args array should contain // the name of the array holding the valid constants if (validationType == ValidationType.STRING_CONSTANT || validationType == ValidationType.NUMBER_CONSTANT) { try { String arrayName = paramDescriptionAnnotation.args()[0]; // get the field and set access level if // necessary Field arrayField = method.getDeclaringClass().getDeclaredField(arrayName); if (!arrayField.isAccessible()) { arrayField.setAccessible(true); } Object arrayValidConstants = arrayField.get(null); // convert the object array to string array String[] arrayValidConstatnsStr = new String[Array.getLength(arrayValidConstants)]; for (int j = 0; j < Array.getLength(arrayValidConstants); j++) { arrayValidConstatnsStr[j] = Array.get(arrayValidConstants, j).toString(); } validationArgs = arrayValidConstatnsStr; } catch (IndexOutOfBoundsException iobe) { // this is a fatal error throw new ActionExecutionException("You need to specify the name of the array with valid constants in the 'args' field of the Parameter annotation"); } catch (Exception e) { // this is a fatal error throw new ActionExecutionException("Could not get array with valid constants - action annotations are incorrect"); } } else { validationArgs = paramDescriptionAnnotation.args(); } List<BaseType> typeValidators = createBaseTypes(paramDescriptionAnnotation.validation(), paramDescriptionAnnotation.name(), args[i], validationArgs); //perform validation for (BaseType baseType : typeValidators) { if (baseType != null) { try { baseType.validate(); } catch (TypeException e) { throw new InvalidInputArgumentsException("Validation failed while validating argument " + paramDescriptionAnnotation.name() + e.getMessage()); } } else { log.warn("Could not perform validation on argument " + paramDescriptionAnnotation.name()); } } } } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void validateInputParameters(){\n\n }", "public void checkParameters() {\n }", "public abstract ValidationResults validArguments(String[] arguments);", "@Override\n\tprotected void validateParameterValues() {\n\t\t\n\t}", "@Override\n\t\tprotected boolean validateAction(int actionID, String... arguments) {\n\t\t\treturn false;\n\t\t}", "@Override\n\tprotected boolean validateRequiredParameters() throws Exception {\n\t\treturn true;\n\t}", "private void validateParameters() {\r\n if (command == null) {\r\n throw new BuildException(\r\n \"'command' parameter should not be null for coverity task.\");\r\n }\r\n\r\n }", "protected void validateFact(Fact[] param) {\r\n\r\n }", "protected abstract Object validateParameter(Object constraintParameter);", "protected void validateAttribute(FactAttribute[] param) {\r\n\r\n }", "private boolean validateParams(int amount) {\n\t\tString paramArray[] = {param1,param2,param3,param4,param5,param6};\r\n\t\tfor(int i = 0; i < amount; i++) {\r\n\t\t\tif(paramArray[i] == null) {\r\n\t\t\t\t//Error\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn true;\r\n\t}", "private void checkArgTypes() {\n Parameter[] methodParams = method.getParameters();\n if(methodParams.length != arguments.length + 1) {\n throw new InvalidCommandException(\"Incorrect number of arguments on command method. Commands must have 1 argument for the sender and one argument per annotated argument\");\n }\n\n Class<?> firstParamType = methodParams[0].getType();\n\n boolean isFirstArgValid = true;\n if(requiresPlayer) {\n if(firstParamType.isAssignableFrom(IPlayerData.class)) {\n usePlayerData = true; // Command methods annotated with a player requirement can also use IPlayerData as their first argument\n } else if(!firstParamType.isAssignableFrom(Player.class)) {\n isFirstArgValid = false; // Otherwise, set it to invalid if we can't assign it from a player\n }\n } else if(!firstParamType.isAssignableFrom(CommandSender.class)) { // Non player requirement annotated commands must just take a CommandSender\n isFirstArgValid = false;\n }\n\n if(!isFirstArgValid) {\n throw new InvalidCommandException(\"The first argument for a command must be a CommandSender. (or a Player/IPlayerData if annotated with a player requirement)\");\n }\n }", "boolean isValid(final Parameter... parameters);", "@Override\r\n\tprotected void validateData(ActionMapping arg0, HttpServletRequest arg1) {\n\t\t\r\n\t}", "protected void validateAttenuator(int[] param) {\n }", "@Override\r\n public void validateParameters(PluginRequest request) {\n }", "@Test(expectedExceptions=InvalidArgumentValueException.class)\n public void argumentValidationTest() {\n String[] commandLine = new String[] {\"--value\",\"521\"};\n\n parsingEngine.addArgumentSource( ValidatingArgProvider.class );\n parsingEngine.parse( commandLine );\n parsingEngine.validate();\n\n ValidatingArgProvider argProvider = new ValidatingArgProvider();\n parsingEngine.loadArgumentsIntoObject( argProvider );\n\n Assert.assertEquals(argProvider.value.intValue(), 521, \"Argument is not correctly initialized\");\n\n // Try some invalid arguments\n commandLine = new String[] {\"--value\",\"foo\"};\n parsingEngine.parse( commandLine );\n parsingEngine.validate();\n }", "@Test\n public void testValidateParams() {\n String[] params;\n\n // valid params - just the application name\n params = new String[]{\"Application\"};\n instance.validateParams(params);\n\n // valid params - extra junk\n params = new String[]{\"Application\", \"Other\", \"Other\"};\n instance.validateParams(params);\n\n // invalid params - empty\n params = new String[0];\n try {\n instance.validateParams(params);\n fail(\"Expected IllegalArgumentException\");\n } catch (IllegalArgumentException ex) {\n // expected\n }\n\n // invalid params - null first param\n params = new String[]{null};\n try {\n instance.validateParams(params);\n fail(\"Expected IllegalArgumentException\");\n } catch (IllegalArgumentException ex) {\n // expected\n }\n\n // invalid params - empty string\n params = new String[]{\"\"};\n try {\n instance.validateParams(params);\n fail(\"Expected IllegalArgumentException\");\n } catch (IllegalArgumentException ex) {\n // expected\n }\n }", "@Override\n public void verifyArgs(ArrayList<String> args) throws ArgumentFormatException {\n super.checkNumArgs(args);\n _args = true;\n }", "private FunctionParametersValidator() {}", "private boolean validateArguments() {\n return !isEmpty(getWsConfig()) && !isEmpty(getVirtualServer()) && !isEmpty(getVirtualServer()) && !isEmpty(getAppContext()) && !isEmpty(getWarFile()) && !isEmpty(getUser()) && !isEmpty(getPwdLocation());\n }", "public static void verifyParams(String title, Map<?,?> defparams, Param... params) throws MissingArgumentException {\n\t\tString mapstr = title + \":\" + MapUtils.map2str(defparams);\n\t\t\n\t\t// Verify parameters\n\t\tfor (Param param: params) {\n\t\t\tif (!defparams.containsKey(param.getName())) {\n\t\t\t\tthrow new MissingArgumentException(String.format(\"The action %s is missing the parameter [%s]\", mapstr, param));\n\t\t\t} else if (!param.isInstance(defparams.get(param.getName()))) {\n\t\t\t\tthrow new IllegalArgumentException(String.format(\"The parameter %s in action %s should be [%s], but got [%s]\", param.getName(), mapstr, param.getClazz(), defparams.get(param.getName()).getClass()));\n\t\t\t}\n\t\t}\n\t}", "private void validateInitialParams() throws IllegalArgumentException {\n if (StringUtils.isBlank(this.apiKey)) {\n throw new IllegalArgumentException(\"API key is not specified!\");\n }\n if (StringUtils.isBlank(this.baseUrl)) {\n throw new IllegalArgumentException(\"The Comet base URL is not specified!\");\n }\n }", "private void validateBuildParameters() {\n if (TextUtils.isEmpty(consumerKey)) {\n throw new IllegalArgumentException(\"CONSUMER_KEY not set\");\n }\n if (TextUtils.isEmpty(consumerSecret)) {\n throw new IllegalArgumentException(\"CONSUMER_SECRET not set\");\n }\n if (TextUtils.isEmpty(token)) {\n throw new IllegalArgumentException(\"TOKEN not set, the user must be logged it\");\n }\n if (TextUtils.isEmpty(tokenSecret)) {\n throw new IllegalArgumentException(\"TOKEN_SECRET not set, the user must be logged it\");\n }\n }", "protected void validatePreamp(int[] param) {\n }", "@Override\n public ValidationResults validArguments(String[] arguments) {\n final int MANDATORY_NUM_OF_ARGUMENTS = 1;\n if (arguments.length == MANDATORY_NUM_OF_ARGUMENTS) {\n // Check if CommandMAN was called on itself (Checker doesn't need to\n // validate CommandMAN twice).\n if (arguments[0].equals(this.getCommandName())) {\n this.toDocument = this; // man will document itself.\n } else {\n // Man will document this command object.\n try {\n this.toDocument = Checker.getCommand(arguments[0], true);\n } catch (Exception ex) {\n return new ValidationResults(false, \"No manual entry for \"\n + arguments[0]); // CMD does not exist.\n }\n }\n return new ValidationResults(true, null);\n }\n return new ValidationResults(false, \"Requires \"\n + MANDATORY_NUM_OF_ARGUMENTS + \" argument.\");\n }", "private static void validateInputArguments(String args[]) {\n\n\t\tif (args == null || args.length != 2) {\n\t\t\tthrow new InvalidParameterException(\"invalid Parameters\");\n\t\t}\n\n\t\tString dfaFileName = args[DFA_FILE_ARGS_INDEX];\n\t\tif (dfaFileName == null || dfaFileName.trim().isEmpty()) {\n\t\t\tthrow new InvalidParameterException(\"Invalid file name\");\n\t\t}\n\n\t\tString delimiter = args[DELIMITER_SYMBOL_ARGS_INDEX];\n\t\tif (delimiter == null || delimiter.trim().isEmpty()) {\n\t\t\tthrow new InvalidParameterException(\"Invalid delimiter symbol\");\n\t\t}\n\t}", "private static boolean arePostRequestParametersValid(String title, String description,\n String imageUrl, String releaseDate, String runtime, String genre, String directors,\n String writers, String actors, String omdbId) {\n return isParameterValid(title, MAX_TITLE_CHARS) && isParameterValid(description, MAX_CHARS)\n && isParameterValid(imageUrl, MAX_CHARS) && isParameterValid(releaseDate, MAX_CHARS)\n && isParameterValid(runtime, MAX_CHARS) && isParameterValid(genre, MAX_CHARS)\n && isParameterValid(directors, MAX_CHARS) && isParameterValid(writers, MAX_CHARS)\n && isParameterValid(actors, MAX_CHARS) && isParameterValid(omdbId, MAX_CHARS);\n }", "public void testValidateArgs() {\n\t\tString[] args = new String[]{\"name\",\"bob\",\"jones\"};\n\t\ttry {\n\t\t\tnew HasAttributeWithValueContains(args);\n\t\t\tfail(\"An InvalidFunctionArguements exception should have been thrown by the constructor!\");\n\t\t} catch (InvalidFunctionArguments ifa) {\n\t\t\tassertTrue(ifa.getMessage().contains(\"HasAttributeWithValueContains takes exactly 2 arguments.\"));\n\t\t}\n\t\t\n\t\t//test with 1 argument, should fail\n\t\targs = new String[]{\"name\"};\n\t\ttry {\n\t\t\tnew HasAttributeWithValueContains(args);\n\t\t\tfail(\"An InvalidFunctionArguements exception should have been thrown by the constructor!\");\n\t\t} catch (InvalidFunctionArguments ifa) {\n\t\t\tassertTrue(ifa.getMessage().contains(\"HasAttributeWithValueContains takes exactly 2 arguments.\"));\n\t\t}\n\t\t\n\t\t//test with 0 arguments, should be a problem\n\t\targs = new String[]{};\n\t\ttry {\n\t\t\tnew HasAttributeWithValueContains(args);\n\t\t\tfail(\"An InvalidFunctionArguements exception should have been thrown by the constructor!\");\n\t\t} catch (InvalidFunctionArguments ifa) {\n\t\t\tassertTrue(ifa.getMessage().contains(\"HasAttributeWithValueContains takes exactly 2 arguments.\"));\n\t\t}\n\t\t\n\t\t//test with null arguments, should be a problem\n\t\ttry {\n\t\t\tnew HasAttributeWithValueContains(args);\n\t\t\tfail(\"An InvalidFunctionArguements exception should have been thrown by the constructor!\");\n\t\t} catch (InvalidFunctionArguments ifa) {\n\t\t\tassertTrue(ifa.getMessage().contains(\"HasAttributeWithValueContains takes exactly 2 arguments.\"));\n\t\t}\n\t\t\n\t\t//test with correct arguments, first one is zero, should work\n\t\targs = new String[]{\"name\",\"bob\"};\n\t\ttry {\n\t\t\tnew HasAttributeWithValueContains(args);\n\t\t} catch (InvalidFunctionArguments ifa) {\n\t\t\tfail(\"An InvalidFunctionArguements exception should have NOT been thrown by the constructor!\");\n\t\t}\n\t}", "@Override\n public void validateArgs(String[] args, ArgsValidation check) throws ArgsException\n {\n try\n {\n check.validateTwoArgs(args);\n }\n catch(ArgsException exception)\n {\n throw exception;\n }\n }", "private void checkMandatoryArgs(UserResource target, Errors errors) {\n final String proc = PACKAGE_NAME + \".checkMandatoryArgs.\";\n final String email = target.getEmail();\n final String password = target.getPassword();\n final String lastName = target.getLastName();\n\n logger.debug(\"Entering: \" + proc + \"10\");\n\n if (TestUtils.isEmptyOrWhitespace(email)) {\n errors.rejectValue(\"email\", \"user.email.required\");\n }\n logger.debug(proc + \"20\");\n\n if (TestUtils.isEmptyOrWhitespace(password)) {\n errors.rejectValue(\"password\", \"user.password.required\");\n }\n logger.debug(proc + \"30\");\n\n if (TestUtils.isEmptyOrWhitespace(lastName)) {\n errors.rejectValue(\"lastName\", \"userLastName.required\");\n }\n logger.debug(\"Leaving: \" + proc + \"40\");\n }", "private static void validateCommandLineArguments(AutomationContext context, String extendedCommandLineArgs[])\r\n\t{\r\n\t\t//fetch the argument configuration types required\r\n\t\tCollection<IPlugin<?, ?>> plugins = PluginManager.getInstance().getPlugins();\r\n \t\tList<Class<?>> argBeanTypes = plugins.stream()\r\n\t\t\t\t.map(config -> config.getArgumentBeanType())\r\n\t\t\t\t.filter(type -> (type != null))\r\n\t\t\t\t.collect(Collectors.toList());\r\n\t\t\r\n\t\targBeanTypes = new ArrayList<>(argBeanTypes);\r\n\t\t\r\n\t\t//Add basic arguments type, so that on error its properties are not skipped in error message\r\n\t\targBeanTypes.add(AutoxCliArguments.class);\r\n\r\n\t\t//if any type is required creation command line options and parse command line arguments\r\n\t\tCommandLineOptions commandLineOptions = OptionsFactory.buildCommandLineOptions(argBeanTypes.toArray(new Class<?>[0]));\r\n\t\t\r\n\t\ttry\r\n\t\t{\r\n\t\t\tcommandLineOptions.parseBeans(extendedCommandLineArgs);\r\n\t\t} catch(MissingArgumentException e)\r\n\t\t{\r\n\t\t\tSystem.err.println(\"Error: \" + e.getMessage());\r\n\t\t\tSystem.err.println(commandLineOptions.fetchHelpInfo(COMMAND_SYNTAX));\r\n\t\t\tSystem.exit(-1);\r\n\t\t} catch(Exception ex)\r\n\t\t{\r\n\t\t\tex.printStackTrace();\r\n\t\t\tSystem.err.println(commandLineOptions.fetchHelpInfo(COMMAND_SYNTAX));\r\n\t\t\tSystem.exit(-1);\r\n\t\t}\r\n\t}", "private void validate() {\n\n if (this.clsname == null)\n throw new IllegalArgumentException();\n if (this.dimension < 0)\n throw new IllegalArgumentException();\n if (this.generics == null)\n throw new IllegalArgumentException();\n }", "private static void checkNumOfArguments(String[] args) throws IllegalArgumentException{\n\t\ttry{\n\t\t\tif(args.length != App.numberOfExpectedArguments ) {\t\n\t\t\t\tthrow new IllegalArgumentException(\"Expected \" + App.numberOfExpectedArguments + \" arguments but received \" + args.length);\n\t\t\t}\n }\n\t\tcatch(Exception e) {\n\t\t\tSystem.out.println(e);\n\t\t\texitArgumentError();\n\t\t}\n\t\t\n\t}", "@Override\n\tpublic void validate(Object arg0, Errors arg1) {\n\n\t}", "@Override\n\tpublic void check(String arguments, Map<String, String> defValue, Set<String> errors) {\n\n\t}", "private void validateArgumentValues() throws ArgBoxException {\n\t\tfinal List<String> errorMessages = new ArrayList<>();\n\t\tparsedArguments.values().stream()\n\t\t\t\t.filter(parsedArg -> parsedArg.isValueRequired())\n\t\t\t\t.filter(parsedArg -> {\n\t\t\t\t\tfinal boolean emptyValue = null == parsedArg.getValue();\n\t\t\t\t\tif (emptyValue) {\n\t\t\t\t\t\terrorMessages.add(String.format(\"The argument %1s has no value !\", parsedArg.getCommandArg()));\n\t\t\t\t\t}\n\t\t\t\t\treturn !emptyValue;\n\t\t\t\t})\n\t\t\t\t.peek(parsedArg -> {\n\t\t\t\t\tif (parsedArg.getValidator().negate().test(parsedArg.getValue())) {\n\t\t\t\t\t\terrorMessages.add(String.format(\"The value %1s for the argument %2s is not valid !\",\n\t\t\t\t\t\t\t\tparsedArg.getValue(), parsedArg.getCommandArg()));\n\t\t\t\t\t}\n\t\t\t\t})\n\t\t\t\t.close();\n\t\tthrowException(() -> CollectionUtils.isNotEmpty(errorMessages),\n\t\t\t\tgetArgBoxExceptionSupplier(\"One or more arguments have errors with their values !\", errorMessages));\n\t}", "protected abstract boolean isValidParameter(String parameter);", "@Override\n public boolean validate(final String param) {\n return false;\n }", "Optional<String> validate(String command, List<String> args);", "private static void checkPassedInArguments(String[] args, EquationManipulator manipulator) {\n // Convert arguments to a String\n StringBuilder builder = new StringBuilder();\n for (String argument: args) {\n builder.append(argument + \" \");\n }\n \n // check if equation is valid\n String[] equation = manipulator.getEquation(builder.toString());\n if (equation.length == 0) {\n // unable to parse passed in arguments\n printErrorMessage();\n handleUserInput(manipulator);\n } else {\n // arguments were passed in correctly\n System.out.println(\"Wohoo! It looks like everything was passed in correctly!\"\n + \"\\nYour equation is: \" + builder.toString() + \"\\n\");\n handleArguments(equation, manipulator);\n }\n }", "private void checkMandatoryArguments() throws ArgBoxException {\n\t\tfinal List<String> errors = registeredArguments.stream()\n\t\t\t\t.filter(arg -> arg.isMandatory())\n\t\t\t\t.filter(arg -> !parsedArguments.containsKey(arg))\n\t\t\t\t.map(arg -> String.format(\"The argument %1s is required !\", arg.getLongCall()))\n\t\t\t\t.collect(Collectors.toList());\n\t\tthrowException(() -> !errors.isEmpty(), getArgBoxExceptionSupplier(\"Some arguments are missing !\", errors));\n\t}", "private static void verifyArgs()\r\n\t{\r\n\t\tif(goFile == null)\r\n\t\t{\r\n\t\t\tSystem.err.println(\"Error: you must specify an input GO file.\");\r\n\t\t\texitError();\r\n\t\t}\r\n\t\tif(annotFile == null)\r\n\t\t{\r\n\t\t\tSystem.err.println(\"Error: you must specify an input annotation file.\");\r\n\t\t\texitError();\r\n\t\t}\r\n\t\tif(goSlimFile == null)\r\n\t\t{\r\n\t\t\tSystem.err.println(\"Error: you must specify an input GOslim file.\");\r\n\t\t\texitError();\r\n\t\t}\r\n\t\tif(slimAnnotFile == null)\r\n\t\t{\r\n\t\t\tSystem.err.println(\"Error: you must specify an output file.\");\r\n\t\t\texitError();\r\n\t\t}\r\n\t}", "private void checkGameListenerMethodsArguments(@Nullable Game game, @Nullable ValueEventListener listener) {\n if (game == null) {\n throw new IllegalArgumentException(\"game should not be null.\");\n }\n if (listener == null) {\n throw new IllegalArgumentException(\"event listener should not be null.\");\n }\n }", "protected void validateParameter(String... param) throws NavigationException {\r\n\t\tif (param.length > 0){\r\n\t\t\tfor(int i = 0; i < param.length; i++){\r\n\t\t\t\tif (param[i] != null && param[i].isEmpty()) {\r\n\t\t\t\t\tthrow new NavigationException(\"parametro no enviado\");\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}", "@Override\n protected void runHandler() {\n checkContainsAny(MSG_PARAM_DEFINITIONS_WITH_CHECK,\n NullnessAnnotation.CHECK_FOR_NULL, NullnessAnnotation.CHECK_RETURN_VALUE);\n checkContainsAny(MSG_PARAM_DEFINITION_WITH_OVERRIDE,\n NullnessAnnotation.OVERRIDE);\n checkContainsAny(MSG_PARAM_DEFINITION_WITH_NONNULL_BY_DEFAULT,\n NullnessAnnotation.PARAMETERS_ARE_NONNULL_BY_DEFAULT);\n checkContainsAny(MSG_PARAM_DEFINITION_WITH_NULLABLE_BY_DEFAULT,\n NullnessAnnotation.PARAMETERS_ARE_NULLABLE_BY_DEFAULT);\n checkContainsAny(MSG_PARAM_DEFINITION_WITH_RETURN_DEFAULT,\n NullnessAnnotation.RETURN_VALUES_ARE_NONNULL_BY_DEFAULT);\n checkContainsAll(MSG_PARAM_NONNULL_AND_NULLABLE,\n NullnessAnnotation.NONNULL, NullnessAnnotation.NULLABLE);\n\n final DetailAST ast = getAst();\n if (isPrimitiveType(ast)) {\n checkContainsAny(MSG_PRIMITIVES_WITH_NULLNESS_ANNOTATION,\n NullnessAnnotation.CHECK_FOR_NULL, NullnessAnnotation.NONNULL,\n NullnessAnnotation.NULLABLE);\n }\n else {\n final NullnessAnnotation firstAncestorAnnotation =\n getParentMethodOrClassAnnotation(\n NullnessAnnotation.PARAMETERS_ARE_NONNULL_BY_DEFAULT,\n NullnessAnnotation.PARAMETERS_ARE_NULLABLE_BY_DEFAULT);\n final boolean isMethodOverridden = isMethodOverridden();\n final boolean parametersAreNonnullByDefault = firstAncestorAnnotation\n == NullnessAnnotation.PARAMETERS_ARE_NONNULL_BY_DEFAULT;\n final boolean parametersAreNullableByDefault = firstAncestorAnnotation\n == NullnessAnnotation.PARAMETERS_ARE_NULLABLE_BY_DEFAULT;\n\n if (isMethodOverridden && !allowOverridingParameter) {\n checkContainsAny(MSG_OVERRIDDEN_WITH_INCREASED_CONSTRAINT,\n NullnessAnnotation.NONNULL);\n }\n if (parametersAreNonnullByDefault) {\n checkContainsAny(MSG_REDUNDANT_NONNULL_PARAM_ANNOTATION,\n NullnessAnnotation.NONNULL);\n }\n if (parametersAreNullableByDefault) {\n checkContainsAny(MSG_REDUNDANT_NULLABLE_PARAM_ANNOTATION,\n NullnessAnnotation.NULLABLE);\n }\n\n if (!isMethodOverridden && !parametersAreNonnullByDefault\n && !parametersAreNullableByDefault) {\n checkContainsNone(MSG_PARAMETER_WITHOUT_NULLNESS_ANNOTATION,\n NullnessAnnotation.NONNULL, NullnessAnnotation.NULLABLE);\n }\n }\n }", "static Boolean verifyArguments(String[] args)\n {\n if (args.length < 2)\n {\n return false;\n }\n \n return true;\n }", "private void validateParameters(CustomMap<String, CustomList<String>> parameters) {\n /* Verify if the parameters are the students number. */\n if(parameters == null || parameters.size() > 3){\n errorValidator.addError(\"name\", \"This parameter must exist.\");\n errorValidator.addError(\"num\", \"This parameter must exist.\");\n errorValidator.addError(\"email\", \"This parameter must exist.\");\n return;\n }\n\n /* Verify if the parameters are correct. */\n CustomList nameAux = parameters.get(\"name\"), numAux = parameters.get(\"num\"), emailAux = parameters.get(\"email\");\n\n if(nameAux == null)\n errorValidator.addError(\"name\", \"This parameter must exist.\");\n\n if(numAux == null)\n errorValidator.addError(\"num\", \"This parameter must exist.\");\n\n if(emailAux == null)\n errorValidator.addError(\"email\", \"This parameter must exist.\");\n\n if(errorValidator.hasError())\n return;\n\n /* Verify num, pid email and name parameters type. */\n num = numAux.getVerifiedInt(0, errorValidator, \"num\");\n email = emailAux.getVerifiedString(0, errorValidator, \"email\");\n name = nameAux.getVerifiedString(0, errorValidator, \"name\");\n }", "protected void validatePetModel(PetModel[] param) {\n }", "private void validateParameter(short validationType, String parmName, String parmValue,\n\t\tshort parmLength, String errCd) throws CustomerWebServiceException\n\t{\n\t\t// if parameter is null throw an exception\n\t\tif(parmValue == null || parmValue.trim().length() == 0)\n\t\t{\n\t\t\tString errMsg = INV_PARM_TXT_1 + parmName + INV_PARM_NULL_TXT;\n\t\t\tmLogger.info(errMsg); \n\t\t\t// throw exception\n\t\t\tthrow new CustomerWebServiceException(errCd, errMsg);\n\t\t} // end if\n\t\t\n\t\t// strip any wildcards from the parameter value\n\t\tparmValue = stripWildcardChars(parmValue);\n\t\t\n\t\t// determine the type of validation to perform\n\t\tswitch(validationType)\n\t\t{\n\t\t\t// validation not under minimum length\n\t\t\tcase VAL_MIN_LEN:\n\t\t\t{\n\t\t\t\t// if the parameter is < length provided\n\t\t\t\tif(parmValue.trim().length() < parmLength)\n\t\t\t\t{\n\t\t\t\t\tString errMsg = INV_PARM_TXT_1 + parmName + INV_PARM_TXT_2 + parmValue + \n\t\t\t\t\t\tINV_PARM_LESS_MIN + parmLength;\n\t\t\t\t\tmLogger.info(errMsg);\n\t\t\t\t\tthrow new CustomerWebServiceException(errCd, errMsg);\n\t\t\t\t} // end if\n\t\t\t\tbreak;\n\t\t\t} // end case\n\t\t\tcase VAL_MAX_LEN: \n\t\t\t{\n\t\t\t\t// if the parameter is > length provided\n\t\t\t\tif(parmValue.trim().length() > parmLength)\n\t\t\t\t{\n\t\t\t\t\tString errMsg = INV_PARM_TXT_1 + parmName + INV_PARM_TXT_2 + parmValue +\n\t\t\t\t\t\tINV_PARM_GREAT_MAX + parmLength;\n\t\t\t\t\tthrow new CustomerWebServiceException(errCd, errMsg);\n\t\t\t\t} // end if\n\t\t\t\tbreak;\n\t\t\t} // end case\n\t\t} // end switch\n\t}", "public ArgumentChecker(String[] titles, String[] wordsRequired, String[] wordsExcluded) {\n for (String word : wordsRequired) {\n if (word.isEmpty() || word == null) {\n throw new IllegalArgumentException();\n }\n }\n for (String word : wordsExcluded) {\n if (word.isEmpty() || word == null) {\n throw new IllegalArgumentException();\n }\n }\n for (String title: titles) {\n if (title.length() < 1 || title == null) {\n throw new IllegalArgumentException();\n }\n }\n }", "@Override\n public void prepareArguments(ActionInvocation invocation)\n throws InvalidValueException {\n }", "@Override\n public void prepareArguments(ActionInvocation invocation)\n throws InvalidValueException {\n }", "@Override\n public void prepareArguments(ActionInvocation invocation)\n throws InvalidValueException {\n }", "@Override\n public void prepareArguments(ActionInvocation invocation)\n throws InvalidValueException {\n }", "@Override\n public void prepareArguments(ActionInvocation invocation)\n throws InvalidValueException {\n }", "@Override\n public void prepareArguments(ActionInvocation invocation)\n throws InvalidValueException {\n }", "@Override\n public void prepareArguments(ActionInvocation invocation)\n throws InvalidValueException {\n }", "@Override\n public void prepareArguments(ActionInvocation invocation)\n throws InvalidValueException {\n }", "@Override\n public void prepareArguments(ActionInvocation invocation)\n throws InvalidValueException {\n }", "@Override\n public void prepareArguments(ActionInvocation invocation)\n throws InvalidValueException {\n }", "@Override\n public void prepareArguments(ActionInvocation invocation)\n throws InvalidValueException {\n }", "@Override\n public void prepareArguments(ActionInvocation invocation)\n throws InvalidValueException {\n }", "@Override\n public void prepareArguments(ActionInvocation invocation)\n throws InvalidValueException {\n }", "@Override\n public void prepareArguments(ActionInvocation invocation)\n throws InvalidValueException {\n }", "@Override\n public void prepareArguments(ActionInvocation invocation)\n throws InvalidValueException {\n }", "@Override\n public void prepareArguments(ActionInvocation invocation)\n throws InvalidValueException {\n }", "@Override\n public void prepareArguments(ActionInvocation invocation)\n throws InvalidValueException {\n }", "public interface ActionInputParameter {\n\n\tString MIN = \"min\";\n\n\tString MAX = \"max\";\n\n\tString STEP = \"step\";\n\n\tString MIN_LENGTH = \"minLength\";\n\n\tString MAX_LENGTH = \"maxLength\";\n\n\tString PATTERN = \"pattern\";\n\n\tString READONLY = \"readonly\";\n\n\t/**\n\t * Raw field value, without conversion.\n\t *\n\t * @return value\n\t */\n\tObject getValue();\n\n\t/**\n\t * Formatted field value to be used as preset value (e.g. using ConversionService).\n\t *\n\t * @return formatted value\n\t */\n\tString getValueFormatted();\n\n\t/**\n\t * Type of parameter when used in html-like contexts (e.g. Siren, Uber, XHtml)\n\t *\n\t * @return input field type\n\t */\n\tType getHtmlInputFieldType();\n\n\t/**\n\t * Set the type of parameter when used in html-like contexts (e.g. Siren, Uber, XHtml)\n\t * \n\t * @param type the {@link Type} to set\n\t */\n\tvoid setHtmlInputFieldType(Type type);\n\n\t/**\n\t * Parameter has input constraints (like range, step etc.)\n\t *\n\t * @return true for input constraints\n\t * @see #getInputConstraints()\n\t */\n\tboolean hasInputConstraints();\n\n\t/**\n\t * Gets possible values for this parameter.\n\t *\n\t * @param actionDescriptor in case that access to the other parameters is necessary to determine the possible values.\n\t * @param <T> This is the type parameter\n\t * @return possible values or empty array\n\t */\n\t<T> List<Suggest<T>> getPossibleValues(ActionDescriptor<? extends ActionInputParameter> actionDescriptor);\n\n\t/**\n\t * Establish possible values for this parameter\n\t * \n\t * @param possibleValues possible values for this parameter.\n\t */\n\tvoid setPossibleValues(List<? extends Suggest<?>> possibleValues);\n\n\t/**\n\t * Retrieve the suggest type\n\t * \n\t * @return the {@link SuggestType}\n\t */\n\tSuggestType getSuggestType();\n\n\t/**\n\t * Sets the suggest type\n\t * \n\t * @param type the {@link SuggestType} to set.\n\t */\n\tvoid setSuggestType(SuggestType type);\n\n\t/**\n\t * Parameter is an array or collection, think {?val*} in uri template.\n\t *\n\t * @return true for collection or array\n\t */\n\tboolean isArrayOrCollection();\n\n\t/**\n\t * Is this action input parameter required, based on the presence of a default value, the parameter annotations and the kind of input\n\t * parameter.\n\t *\n\t * @return true if required\n\t */\n\tboolean isRequired();\n\n\t/**\n\t * If parameter is an array or collection, the default values.\n\t *\n\t * @return values\n\t * @see #isArrayOrCollection()\n\t */\n\tObject[] getValues();\n\n\t/**\n\t * Does the parameter have a value?\n\t *\n\t * @return true if a value is present\n\t */\n\tboolean hasValue();\n\n\t/**\n\t * Name of parameter.\n\t *\n\t * @return the name of parameter.\n\t */\n\tString getParameterName();\n\n\t/**\n\t * Type of parameter.\n\t *\n\t * @return the type of parameter.\n\t */\n\tClass<?> getParameterType();\n\n\t/**\n\t * Gets input constraints.\n\t *\n\t * @return constraints where the key is one of {@link ActionInputParameter#MAX} etc. and the value is a string or number, depending on\n\t * the input constraint.\n\t * @see ActionInputParameter#MAX\n\t * @see ActionInputParameter#MIN\n\t * @see ActionInputParameter#MAX_LENGTH\n\t * @see ActionInputParameter#MIN_LENGTH\n\t * @see ActionInputParameter#STEP\n\t * @see ActionInputParameter#PATTERN\n\t * @see ActionInputParameter#READONLY\n\t */\n\tMap<String, Object> getInputConstraints();\n\n\tString getName();\n\n\tvoid setReadOnly(boolean readOnly);\n\n\tvoid setRequired(boolean required);\n\n\tParameterType getType();\n\n\tboolean isReadOnly();\n\n\tboolean isIgnored();\n\n\tvoid setValue(final Object value);\n\n}", "private static void checkArg(Object s) {\n if (s == null) {\n throw new NullPointerException(\"Argument must not be null\");\n }\n }", "public ArgumentChecker(String word) {\n\n if (word.isEmpty() || word == null) {\n throw new IllegalArgumentException();\n }\n }", "@Override\n protected void validateParameters(String uri, Map<String, Object> parameters, String optionPrefix) {\n }", "protected void validateItem(Item[] param) {\r\n }", "@Override\n protected boolean hasValidNumberOfArguments(int numberOfParametersEntered) {\n return numberOfParametersEntered == 3;\n }", "void apply(Validator validator, List<Exp> args);", "private void checkParameters(List actualParameters)\n throws AbnormalTerminationException {\n if (actualParameters.size() != this._formalParameters.size()) {\n throw new AbnormalTerminationException(\"Ongeldig aantal parameters in \" + this.getName() + \"!\");\n }\n }", "public void validate() {}", "private void argumentChecker(String[] args) {\n\t\t// TODO Auto-generated method stub\n\t\tif (args.length != 2) {\n\t\t\tSystem.out.println(\"Invalid arguments. \\nExpected:\\tDriver inputFile.txt outputFile.txt\");\n\t\t}\n\t}", "@Override\r\n public boolean isValidParameterCount(int parameterCount) {\n return parameterCount> 0;\r\n }", "protected void validateAnimalModel(AnimalModel[] param) {\n }", "private void checkParams() throws InvalidParamException{\r\n String error = svm.svm_check_parameter(this.problem, this.param);\r\n if(error != null){\r\n throw new InvalidParamException(\"Invalid parameter setting!\" + error);\r\n }\r\n }", "@Parameters({\"name\", \"lastName\"})\n @Test\n public void test1(String name, String lastName){\n System.out.println(\"Name is \"+ name);\n System.out.println(\"Last name is \"+ lastName);\n }", "ActionParameterTypes getFormalParameterTypes();", "int validate(ValidationContext ctx) {\n\t\tint count = 0;\n\t\tif (this.name == null) {\n\t\t\tctx.addError(\n\t\t\t\t\t\"Parameter has to have a name. This need not be the same as the one in the db though.\");\n\t\t\tcount++;\n\t\t}\n\t\tcount += ctx.checkDtExistence(this.dataType, \"dataType\", false);\n\t\tcount += ctx.checkRecordExistence(this.recordName, \"recordName\", false);\n\n\t\tif (this.defaultValue != null) {\n\t\t\tif (this.dataType == null) {\n\t\t\t\tthis.addError(ctx,\n\t\t\t\t\t\t\" is non-primitive but a default value is specified.\");\n\t\t\t\tcount++;\n\t\t\t} else {\n\t\t\t\tDataType dt = ComponentManager.getDataTypeOrNull(this.dataType);\n\t\t\t\tif (dt != null && dt.parseValue(this.defaultValue) == null) {\n\t\t\t\t\tthis.addError(ctx, \" default value of \" + this.defaultValue\n\t\t\t\t\t\t\t+ \" is invalid as per dataType \" + this.dataType);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif (this.recordName != null) {\n\t\t\tif (this.dataType != null) {\n\t\t\t\tthis.addError(ctx,\n\t\t\t\t\t\t\" Both dataType and recordName specified. Use dataType if this is primitive type, or record if it as array or a structure.\");\n\t\t\t\tcount++;\n\t\t\t}\n\t\t\tif (this.sqlObjectType == null) {\n\t\t\t\tthis.addError(ctx,\n\t\t\t\t\t\t\" recordName is specified which means that it is a data-structure. Please specify sqlObjectType as the type of this parameter in the stored procedure\");\n\t\t\t}\n\t\t} else {\n\t\t\tif (this.dataType == null) {\n\t\t\t\tthis.addError(ctx,\n\t\t\t\t\t\t\" No data type or recordName specified. Use dataType if this is primitive type, or record if it as an array or a data-structure.\");\n\t\t\t\tcount++;\n\t\t\t} else if (this.sqlObjectType != null) {\n\t\t\t\tctx.addError(\n\t\t\t\t\t\t\"sqlObjectType is relevant only if this parameter is non-primitive.\");\n\t\t\t}\n\n\t\t}\n\n\t\tif (this.isArray) {\n\t\t\tif (this.sqlArrayType == null) {\n\t\t\t\tthis.addError(ctx,\n\t\t\t\t\t\t\" is an array, and hence sqlArrayType must be specified as the type with which this parameter is defined in the stored procedure\");\n\t\t\t\tcount++;\n\t\t\t}\n\t\t}\n\n\t\treturn count;\n\t}", "private ErrorCode checkParameters() {\n\t\t\n\t\t// Check Batch Size\n\t\ttry {\n\t\t\tInteger.parseInt(batchSizeField.getText());\n\t\t\t\n\t\t} catch (NumberFormatException e) {\n\t\t\treturn ErrorCode.BatchSize;\n\t\t}\n\t\t\n\t\t// Check confidenceFactor\n\t\ttry {\n\t\t\tDouble.parseDouble(confidenceFactorField.getText());\n\t\t\t\n\t\t} catch (NumberFormatException e) {\n\t\t\treturn ErrorCode.ConfidenceFactor;\n\t\t}\n\t\t\n\t\t// Check minNumObj\n\t\ttry {\n\t\t\tInteger.parseInt(minNumObjField.getText());\n\t\t\t\n\t\t} catch (NumberFormatException e) {\n\t\t\treturn ErrorCode.MinNumObj;\n\t\t}\n\t\t\n\t\t// Check numDecimalPlaces\n\t\ttry {\n\t\t\tInteger.parseInt(numDecimalPlacesField.getText());\n\t\t\t\n\t\t} catch (NumberFormatException e) {\n\t\t\treturn ErrorCode.NumDecimalPlaces;\n\t\t}\n\t\t\n\t\t// Check numFolds\n\t\ttry {\n\t\t\tInteger.parseInt(numFoldsField.getText());\n\t\t\t\n\t\t} catch (NumberFormatException e) {\n\t\t\treturn ErrorCode.NumFolds;\n\t\t}\n\t\t\n\t\t// Check seed\n\t\ttry {\n\t\t\tInteger.parseInt(seedField.getText());\n\t\t\t\n\t\t} catch (NumberFormatException e) {\n\t\t\treturn ErrorCode.Seed;\n\t\t}\n\t\t\n\t\treturn ErrorCode.Fine;\n\t\t\n\t}", "@Test\n public void testArguments() {\n System.out.println(\"arguments\");\n assertThat(Arguments.valueOf(\"d\"), is(notNullValue()));\n assertThat(Arguments.valueOf(\"i\"), is(notNullValue()));\n assertThat(Arguments.valueOf(\"num\"), is(notNullValue()));\n }", "@Override\r\n protected boolean validateAction() {\n Set inputNames = getInputNames();\r\n Iterator inputNamesIterator = inputNames.iterator();\r\n String inputName;\r\n IActionParameter actionParameter;\r\n while (inputNamesIterator.hasNext()) {\r\n inputName = (String) inputNamesIterator.next();\r\n actionParameter = getInputParameter(inputName);\r\n message(Messages.getString(\"TestComponent.DEBUG_INPUT_DESCRIPTION\", inputName, actionParameter.getType())); //$NON-NLS-1$\r\n }\r\n\r\n Set outputNames = getOutputNames();\r\n Iterator outputNamesIterator = outputNames.iterator();\r\n String outputName;\r\n while (outputNamesIterator.hasNext()) {\r\n outputName = (String) outputNamesIterator.next();\r\n actionParameter = getOutputItem(outputName);\r\n message(Messages.getString(\"TestComponent.DEBUG_OUTPUT_DESCRIPTION\", outputName, actionParameter.getType())); //$NON-NLS-1$\r\n }\r\n\r\n Set resourceNames = getResourceNames();\r\n Iterator resourceNamesIterator = resourceNames.iterator();\r\n String resourceName;\r\n IActionSequenceResource actionResource;\r\n while (resourceNamesIterator.hasNext()) {\r\n resourceName = (String) resourceNamesIterator.next();\r\n actionResource = getResource(resourceName);\r\n message(Messages\r\n .getString(\r\n \"TestComponent.DEBUG_RESOURCE_DESCRIPTION\", resourceName, actionResource.getMimeType(), PentahoSystem.getApplicationContext().getSolutionPath(actionResource.getAddress()))); //$NON-NLS-1$\r\n try {\r\n String content = getResourceAsString(actionResource);\r\n message(Messages.getString(\r\n \"TestComponent.DEBUG_RESOURCE_CONTENTS\", ((content == null) ? \"null\" : content.substring(0, 100)))); //$NON-NLS-1$ //$NON-NLS-2$\r\n } catch (Exception e) {\r\n message(Messages.getString(\"TestComponent.ERROR_0005_RESOURCE_NOT_LOADED\", e.getMessage())); //$NON-NLS-1$\r\n }\r\n }\r\n\r\n return true;\r\n }", "private void checkParams(String[] params) throws MethodCallWithNonexistentParameter,\n OutmatchingParametersToMethodCall, OutmatchingParameterType, InconvertibleTypeAssignment {\n ArrayList<Variable> methodParams = this.method.getMethodParameters();\n if (params.length != methodParams.size()) {\n // not enough params somewhere, or more than enough.\n throw new OutmatchingParametersToMethodCall();\n }\n int i = 0;\n for (String toBeParam : params) {\n toBeParam = toBeParam.trim();\n Variable toBeVariable = findParamByName(toBeParam);\n VariableVerifier.VerifiedTypes type = methodParams.get(i).getType();\n if (toBeVariable == null) {\n VariableVerifier.VerifiedTypes typeOfString = VariableVerifier.VerifiedTypes.getTypeOfString(toBeParam);\n if (!type.getConvertibles().contains(typeOfString)) {\n throw new MethodCallWithNonexistentParameter();\n }\n } else {\n checkTypes(toBeVariable, methodParams.get(i));\n checkValue(toBeVariable);\n }\n i++;\n }\n }", "public ArgumentChecker(String[] words) {\n\n if (words.length < 1 || words == null) {\n throw new IllegalArgumentException();\n }\n for (String word : words) {\n if (word.isEmpty() || word == null) {\n throw new IllegalArgumentException();\n }\n }\n }", "@Override\n public final int parseArguments(Parameters params) {\n return 1;\n }", "private Arguments validateAndReturnType(String[] arguments) {\n\t\tif(arguments == null || arguments.length == 0 || arguments.length > 3)\n \t\treturn Arguments.INVALID;\n\t\tString arg1 = arguments[0].toLowerCase();\n\t\tif(arg1.equals(\"increase\") || arg1.equals(\"reduce\") || arg1.equals(\"inrange\")){\n\t\t\tif(arguments.length != 3)\n\t\t\t\treturn Arguments.INVALID;\n\t\t\telse\n\t\t\t{\n\t\t\t\tif(arg1.equals(\"increase\"))\n\t\t\t\t\treturn Arguments.INCREASE;\n\t\t\t\telse if(arg1.equals(\"reduce\"))\n\t\t\t\t\treturn Arguments.REDUCE;\n\t\t\t\telse if(arg1.equals(\"inrange\"))\n\t\t\t\t\treturn Arguments.INRANGE;\n\t\t\t}\n\t\t} else if(arg1.equals(\"next\") || arg1.equals(\"previous\") || arg1.equals(\"count\")) {\n\t\t\tif(arguments.length != 2)\n\t\t\t\treturn Arguments.INVALID;\n\t\t\telse\n\t\t\t{\n\t\t\t\tif(arg1.equals(\"next\"))\n\t\t\t\t\treturn Arguments.NEXT;\n\t\t\t\telse if(arg1.equals(\"previous\"))\n\t\t\t\t\treturn Arguments.PREVIOUS;\n\t\t\t\telse if(arg1.equals(\"count\"))\n\t\t\t\t\treturn Arguments.COUNT;\n\t\t\t}\n\t\t} else if(arg1.equals(\"quit\")) {\n\t\t\treturn Arguments.QUIT;\n\t\t} else\n\t\t\treturn Arguments.INVALID;\n\t\t\t\n\t\treturn null;\n\t}", "@Override\n public void validate(Map<String, String[]> parameters) {\n final String itemId = parameters.get(ITEM_ID)[0];\n final String amount = parameters.get(AMOUNT)[0];\n commonValidator.validateLong(itemId);\n commonValidator.validateFloat(amount);\n }", "private boolean hasParameterCheckAnnotations(Annotation annotation) {\n\t\tfor (Annotation anno : annotation.annotationType().getAnnotations()) {\n\t\t\tClass<? extends Annotation> annotationType = anno.annotationType();\n\t\t\tif (annotationType.isAnnotationPresent(ParameterCheck.class)) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\n\t\treturn false;\n\t}", "@Test\n public void verifyParametersInput() {\n // act\n book.setISBN(isbn);\n book.setAuthors(array);\n book.setPublisher(publisher);\n // verify\n verify(book).setISBN(isbn);\n verify(book).setAuthors(array);\n verify(book).setPublisher(publisher);\n }", "private void validate(WikiMacroParameters parameters, String macroContent) throws MacroExecutionException\n {\n // First verify that all mandatory parameters are provided.\n // Note that we currently verify automatically mandatory parameters in Macro Transformation but for the moment\n // this is only checked for Java-based macros. Hence why we need to check here too.\n Map<String, ParameterDescriptor> parameterDescriptors = getDescriptor().getParameterDescriptorMap();\n for (String parameterName : parameterDescriptors.keySet()) {\n ParameterDescriptor parameterDescriptor = parameterDescriptors.get(parameterName);\n Object parameterValue = parameters.get(parameterName);\n if (parameterDescriptor.isMandatory() && (null == parameterValue)) {\n throw new MacroParameterException(String.format(\"Parameter [%s] is mandatory\", parameterName));\n }\n\n // Set default parameter value if applicable.\n Object parameterDefaultValue = parameterDescriptor.getDefaultValue();\n if (parameterValue == null && parameterDefaultValue != null) {\n parameters.set(parameterName, parameterDefaultValue);\n }\n }\n\n // Verify the a macro content is not empty if it was declared mandatory.\n if (getDescriptor().getContentDescriptor() != null && getDescriptor().getContentDescriptor().isMandatory()) {\n if (macroContent == null || macroContent.length() == 0) {\n throw new MacroExecutionException(\"Missing macro content: this macro requires content (a body)\");\n }\n }\n }", "private void validateParameter(){\n\t\tif(hrNum > upperBound){\n\t\t\thrNum = upperBound;\n\t\t}\n\t\telse if(hrNum < lowerBound){\n\t\t\thrNum = lowerBound;\n\t\t}\n\t}", "@Override\n protected boolean hasValidArgumentValues(@NotNull ImmutableList<Parameter> arguments) {\n boolean valid = true;\n Value rowIndex = arguments.get(0).value();\n Value columnIndex = arguments.get(1).value();\n\n Preconditions.checkValueType(rowIndex, ValueType.NUMBER);\n Preconditions.checkValueType(columnIndex, ValueType.NUMBER);\n\n checkArgument(!rowIndex.hasImaginaryValue(), \"Row index may not be imaginary\");\n checkArgument(!columnIndex.hasImaginaryValue(), \"Column index may not be imaginary\");\n\n // Check for value bounds on row index\n if (!NumberUtil.isInteger(rowIndex.realPart()) || rowIndex.realPart() < 0 || rowIndex.realPart() > getEnvironment().getHomeScreen().getMaxRows()) {\n valid = false;\n }\n\n // Check for value bounds on column index\n if (!NumberUtil.isInteger(columnIndex.realPart()) || columnIndex.realPart() < 0 || columnIndex.realPart() > getEnvironment().getHomeScreen().getMaxColumns()) {\n valid = false;\n }\n\n return valid;\n }", "public boolean isParameterProvided();", "public abstract void validate(List<String> validationMessages);", "boolean hasParameters();" ]
[ "0.70880544", "0.69344324", "0.69075656", "0.6803252", "0.6636857", "0.65446174", "0.643526", "0.636816", "0.6339766", "0.61951953", "0.61938864", "0.618019", "0.6171033", "0.6165563", "0.60613644", "0.60549474", "0.604648", "0.598217", "0.59734535", "0.5965768", "0.59506017", "0.59490156", "0.59447104", "0.5942364", "0.5923481", "0.59135616", "0.58904", "0.5827393", "0.5805425", "0.57882315", "0.5721341", "0.5701158", "0.56950545", "0.5684093", "0.56806713", "0.5671186", "0.5661558", "0.56442153", "0.56438303", "0.56210506", "0.5610437", "0.5605373", "0.5605212", "0.5594718", "0.55934954", "0.5582975", "0.5578089", "0.55761296", "0.555714", "0.5556351", "0.55523354", "0.5551377", "0.5551377", "0.5551377", "0.5551377", "0.5551377", "0.5551377", "0.5551377", "0.5551377", "0.5551377", "0.5551377", "0.5551377", "0.5551377", "0.5551377", "0.5551377", "0.5551377", "0.5551377", "0.5551377", "0.55510825", "0.55372655", "0.55221343", "0.55039155", "0.5503268", "0.54973996", "0.54912597", "0.5478755", "0.5469069", "0.5459567", "0.54541385", "0.5450331", "0.544736", "0.5442345", "0.54408455", "0.5439899", "0.54357123", "0.5431271", "0.54077554", "0.5406124", "0.5394639", "0.53877187", "0.5362566", "0.53384644", "0.53266615", "0.53241545", "0.53163767", "0.53152853", "0.5308018", "0.53007543", "0.5299932", "0.52992463" ]
0.7940522
0
Creates as much validation types as needed to validate the input data
private List<BaseType> createBaseTypes( ValidationType type, String paramName, Object values, Object[] args ) { List<BaseType> typeValidators = new ArrayList<BaseType>(); // if this is an array of types to be validated, then add each // of them separately to the list if ( (values != null) && values.getClass().isArray()) { for (int i = 0; i < Array.getLength(values); i++) { Object value = Array.get(values, i); TypeFactory factory = TypeFactory.getInstance(); BaseType baseType = factory.createValidationType(type, paramName, value, args); typeValidators.add(baseType); } // otherwise just add the single validation type } else { TypeFactory factory = TypeFactory.getInstance(); BaseType baseType = factory.createValidationType(type, paramName, values, args); typeValidators.add(baseType); } return typeValidators; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void validateData() {\n }", "public interface BuiltinTypeValidator {\n // -------------------------------------------------------------------------\n // CONSTANTS\n // -------------------------------------------------------------------------\n\n /** validation error string for Bit String failures */\n String BIT_STRING_VALIDATION_ERROR =\n \"Supplied bytes do not conform to the BIT STRING format. The first byte must be within the range 0x00 - 0x07. Supplied bytes contain a byte with invalid value: \";\n\n /** validation error string for GeneralizedTime failures */\n String GENERALIZEDTIME_VALIDATION_ERROR =\n \"Supplied bytes do not conform to the GeneralizedTime format. Supplied bytes contain a byte with invalid value: \";\n\n /** validation error string for Bit String failures */\n String EMPTY_BYTE_ARRAY_VALIDATION_ERROR =\n \"ASN.1 %s type must contain at least one byte. Supplied array contains 0 bytes\";\n\n /** validation error string for IA5String failures */\n String IA5STRING_VALIDATION_ERROR =\n \"Supplied bytes do not conform to the IA5String format. All bytes must be within the range 0x00 - 0x7f. Supplied bytes contain a byte with invalid value: \";\n\n /** validation error string for Null failures */\n String NULL_VALIDATION_ERROR = \"Null type must be zero length.\";\n\n /** validation error string for NumericString failures */\n String NUMERICSTRING_VALIDATION_ERROR =\n \"Supplied bytes do not conform to the NumericString format. All bytes must be within the range '0' - '9' (0x30 - 0x39). Supplied bytes contain a byte with invalid value: \";\n\n /** validation error string for Oid failures */\n String OID_VALIDATION_ERROR =\n \"Supplied bytes do not conform to the OID format. The first byte must be with the range 0x00 - 0x7F. Supplied bytes contain a byte with invalid value: \";\n\n /** validation error string for incomplete Oid */\n String OID_VALIDATION_ERROR_INCOMPLETE =\n \"Supplied bytes do not conform to the OID format. The OID encoding is incomplete: \";\n\n /** validation error string for PrintableString failures */\n String PRINTABLESTRING_VALIDATION_ERROR =\n \"Supplied bytes do not conform to the PrintableString format. Supplied bytes contain a byte with invalid value: \";\n\n /** validation error string for UTCTime failures */\n String UTCTIME_VALIDATION_ERROR =\n \"Supplied bytes do not conform to the UTCTime format. Supplied bytes contain a byte with invalid value: \";\n\n /** validation error string for VisibleString failures */\n String VISIBLESTRING_VALIDATION_ERROR =\n \"Supplied bytes do not conform to the VisibleString format. All bytes must be within the range 0x20 - 0x7e. Supplied bytes contain invalid values: \";\n\n // -------------------------------------------------------------------------\n // CLASS VARIABLES\n // -------------------------------------------------------------------------\n\n /** null instance */\n BuiltinTypeValidator.Null NULL = new BuiltinTypeValidator.Null();\n\n // -------------------------------------------------------------------------\n // PUBLIC METHODS\n // -------------------------------------------------------------------------\n\n /**\n * Validates the supplied tag in the data based on the the kind of ASN.1 Built-in Type\n * represented by this validator\n *\n * @param tag tag to validate\n * @param asnData data to retrieve tag from\n * @return any failures encountered while validating the tag\n */\n ImmutableSet<DecodedTagValidationFailure> validate(String tag, AsantiAsnData asnData);\n\n /**\n * Validates the supplied bytes based on the the kind of ASN.1 Built-in Type represented by this\n * validator\n *\n * @param bytes bytes to validate\n * @return any failures encountered while validating the bytes\n */\n ImmutableSet<ByteValidationFailure> validate(byte[] bytes);\n\n // -------------------------------------------------------------------------\n // INTERNAL CLASS: Null\n // -------------------------------------------------------------------------\n\n /**\n * Null instance of {@link BuiltinTypeDecoder}.\n *\n * <p>The {@code validate} methods will return an empty set.\n *\n * @author brightSPARK Labs\n */\n class Null implements BuiltinTypeValidator {\n // ---------------------------------------------------------------------\n // CONSTRUCTION\n // ---------------------------------------------------------------------\n\n /**\n * Default constructor. This is private, use {@link BuiltinTypeValidator#NULL} to obtain an\n * instance\n */\n private Null() {}\n\n // ---------------------------------------------------------------------\n // IMPLEMENTATION: BuiltinTypeValidator\n // ---------------------------------------------------------------------\n\n @Override\n public ImmutableSet<DecodedTagValidationFailure> validate(\n final String tag, final AsantiAsnData asnData) {\n return ImmutableSet.of();\n }\n\n @Override\n public ImmutableSet<ByteValidationFailure> validate(final byte[] bytes) {\n return ImmutableSet.of();\n }\n }\n}", "private void validateTypes() {\r\n\t\tfor (int i = 0; i < types.length; i++) {\r\n\t\t\tString type = types[i];\r\n\t\t\tif (!TypedItem.isValidType(type))\r\n\t\t\t\tthrow new IllegalArgumentException(String.format(\"The monster type %s is invalid\", type));\r\n\t\t\tfor (int j = i + 1; j < types.length; j++) {\r\n\t\t\t\tif (type.equals(types[j])) {\r\n\t\t\t\t\tthrow new IllegalArgumentException(\"The monster cant have two similar types..\");\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t}", "private void validate() {\n\n if (this.clsname == null)\n throw new IllegalArgumentException();\n if (this.dimension < 0)\n throw new IllegalArgumentException();\n if (this.generics == null)\n throw new IllegalArgumentException();\n }", "private void setupRequiredValidation() {\n requiredMafExpressions.put(FIELD_HUGO_SYMBOL, Pattern.compile(\"\\\\S+\"));\r\n requiredFieldDescriptions.put(FIELD_HUGO_SYMBOL, \"may not be blank\");\r\n requiredMafExpressions.put(FIELD_ENTREZ_GENE_ID, Pattern.compile(\"\\\\d+\")); // number\r\n requiredFieldDescriptions.put(FIELD_ENTREZ_GENE_ID, \"must be an integer number\");\r\n requiredMafExpressions.put(FIELD_MATCHED_NORM_SAMPLE_BARCODE, QcLiveBarcodeAndUUIDValidatorImpl.ALIQUOT_BARCODE_PATTERN);\r\n requiredFieldDescriptions.put(FIELD_MATCHED_NORM_SAMPLE_BARCODE, \"must be a full aliquot barcode\");\r\n requiredMafExpressions.put(FIELD_TUMOR_SAMPLE_BARCODE, QcLiveBarcodeAndUUIDValidatorImpl.ALIQUOT_BARCODE_PATTERN);\r\n requiredFieldDescriptions.put(FIELD_TUMOR_SAMPLE_BARCODE, \"must be a full aliquot barcode\");\r\n requiredMafExpressions.put(FIELD_VALIDATION_STATUS, Pattern.compile(\"Valid|Wildtype|Unknown|\\\\S?\"));\r\n requiredFieldDescriptions.put(FIELD_VALIDATION_STATUS, \"must be Valid, Wildtype, Unknown, or blank\");\r\n requiredMafExpressions.put(FIELD_CHROMOSOME, Pattern.compile(\"\\\\S+\"));\r\n requiredFieldDescriptions.put(FIELD_CHROMOSOME, \"must be one of: X, Y, M, 1-22, or full name of unassigned fragment\");\r\n setupMafSpecificChecks();\r\n }", "TypeDescription validated();", "private void validate() {\n\t\t// just in case;\n\t\tfor (int i=0;i<NR_OF_FIELDS; i++) {\n\t\t\tvalid[i] = \"0\";\n\t\t}\n\t\t//\n\t\t// Validate name and surname:\n\t\t//\n\t\tif ( ! this.isUpperAlpha(nume)) {\n\t\t\tfields[0] = \"1\";\n\t\t}\n\t\t\n\t\tif ( ! this.isUpperAlphaWithSpace(nume)) {\n\t\t\tfields[1] = \"1\";\n\t\t}\n\t\t//\n\t\t// validate seria\n\t\t//\n\t\tvalid[2] = \"1\";\t\t\t\t\t\t\t// presupun ca seria este invalida, si incerc sa o validez\n\t\tfor (int i=0; i<seriiBuletin.length; i++) {\n\t\t\tif (seriiBuletin[i].equals(seria)) {\n\t\t\t\tvalid[2] = \"0\";\n\t\t\t}\n\t\t}\n\t\t//\n\t\t// validate numarul\n\t\t//\n\t\ttry {\n\t\t\tvalid[3] = \"1\";\n\t\t\tint nr = Integer.valueOf(numarul);\n\t\t\tif ( nr >= 100000 && nr <= 999999 ) {\n\t\t\t\tvalid[3] = \"0\";\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\tLog.d(TAG, \"Error validating seria.\");\n\t\t}\n\n\t\t//\n\t\t// validate sex\n\t\t//\n\t\tif ( ! (sex == 'M' || sex == 'F')) {\n\t\t\tvalid[6] = \"1\";\n\t\t}\n\t\t//\n\t\t// Validate valabilitate\n\t\t//\n\t\tif ( ! isNumber(this.valabilitate)) {\n\t\t\tvalid[7] = \"1\";\n\t\t}\n\t\t//\n\t\t// validate CNP\n\t\t//\n\t\tif ( ! (isNumber(CNP) && isValidCNP(CNP))) {\n\t\t\tvalid[8] = \"1\";\n\t\t}\n\t\t\n\t}", "@Override\n public Set<String> validTypes() {\n return factory.validTypes();\n }", "public void validate() {}", "private void validateInputParameters(){\n\n }", "public void validate() {\n transportStats.validate(this);\n\n for (String unitName : produces) {\n Args.validate(!UnitFactory.hasUnitForName(unitName), \"Illegal unit name \" + unitName + \" in build unit stats\");\n }\n\n for (Map.Entry<String, String> entry : buildCities.entrySet()) {\n String terrainName = entry.getKey();\n String cityName = entry.getValue();\n Args.validate(!TerrainFactory.hasTerrainForName(terrainName), \"Illegal terrain \" + terrainName + \" in build cities stats\");\n Args.validate(!CityFactory.hasCityForName(cityName), \"Illegal city \" + cityName + \" in build cities stats\");\n }\n\n for (String unitName : supplyUnits) {\n Args.validate(!UnitFactory.hasUnitForName(unitName), \"Illegal unit \" + unitName + \" in supply units stats\");\n }\n\n for (String unitName : supplyUnitsInTransport) {\n Args.validate(!UnitFactory.hasUnitForName(unitName), \"Illegal unit \" + unitName + \" in supply units in transport stats\");\n }\n\n Args.validate(StringUtil.hasContent(primaryWeaponName) && !WeaponFactory.hasWeapon(primaryWeaponName),\n \"Illegal primary weapon \" + primaryWeaponName + \" for unit \" + name);\n Args.validate(StringUtil.hasContent(secondaryWeaponName) && !WeaponFactory.hasWeapon(secondaryWeaponName),\n \"Illegal secondary weapon \" + secondaryWeaponName + \" for unit \" + name);\n }", "public void validate() throws org.apache.thrift.TException {\n if (version == null) {\n throw new org.apache.thrift.protocol.TProtocolException(\"Required field 'version' was not present! Struct: \" + toString());\n }\n if (am_handle == null) {\n throw new org.apache.thrift.protocol.TProtocolException(\"Required field 'am_handle' was not present! Struct: \" + toString());\n }\n if (user == null) {\n throw new org.apache.thrift.protocol.TProtocolException(\"Required field 'user' was not present! Struct: \" + toString());\n }\n if (resources == null) {\n throw new org.apache.thrift.protocol.TProtocolException(\"Required field 'resources' was not present! Struct: \" + toString());\n }\n // alas, we cannot check 'gang' because it's a primitive and you chose the non-beans generator.\n // check for sub-struct validity\n if (am_handle != null) {\n am_handle.validate();\n }\n if (reservation_id != null) {\n reservation_id.validate();\n }\n }", "@Override\n\tpublic void validate()\n\t{\n\n\t}", "public String validate(Data[] data);", "public abstract void validate(String value) throws DatatypeException;", "@Override\r\n\tpublic void validate() {\n\t\t\r\n\t}", "@Override\r\n public void validate() {\r\n }", "@Override\n\tpublic void validate() {\n\t}", "protected void validate(String operationType) throws Exception\r\n\t{\r\n\t\tsuper.validate(operationType);\r\n\r\n\t\tMPSString id_validator = new MPSString();\r\n\t\tid_validator.validate(operationType, id, \"\\\"id\\\"\");\r\n\t\t\r\n\t\tMPSBoolean secure_access_only_validator = new MPSBoolean();\r\n\t\tsecure_access_only_validator.validate(operationType, secure_access_only, \"\\\"secure_access_only\\\"\");\r\n\t\t\r\n\t\tMPSString svm_ns_comm_validator = new MPSString();\r\n\t\tsvm_ns_comm_validator.setConstraintMaxStrLen(MPSConstants.GENERIC_CONSTRAINT, 10);\r\n\t\tsvm_ns_comm_validator.setConstraintMinStrLen(MPSConstants.GENERIC_CONSTRAINT, 1);\r\n\t\tsvm_ns_comm_validator.validate(operationType, svm_ns_comm, \"\\\"svm_ns_comm\\\"\");\r\n\t\t\r\n\t\tMPSString ns_br_interface_validator = new MPSString();\r\n\t\tns_br_interface_validator.setConstraintMaxStrLen(MPSConstants.GENERIC_CONSTRAINT, 10);\r\n\t\tns_br_interface_validator.setConstraintMinStrLen(MPSConstants.GENERIC_CONSTRAINT, 1);\r\n\t\tns_br_interface_validator.validate(operationType, ns_br_interface, \"\\\"ns_br_interface\\\"\");\r\n\t\t\r\n\t\tMPSBoolean vm_auto_poweron_validator = new MPSBoolean();\r\n\t\tvm_auto_poweron_validator.validate(operationType, vm_auto_poweron, \"\\\"vm_auto_poweron\\\"\");\r\n\t\t\r\n\t\tMPSString ns_br_interface_2_validator = new MPSString();\r\n\t\tns_br_interface_2_validator.setConstraintMaxStrLen(MPSConstants.GENERIC_CONSTRAINT, 10);\r\n\t\tns_br_interface_2_validator.setConstraintMinStrLen(MPSConstants.GENERIC_CONSTRAINT, 1);\r\n\t\tns_br_interface_2_validator.validate(operationType, ns_br_interface_2, \"\\\"ns_br_interface_2\\\"\");\r\n\t\t\r\n\t\tMPSInt init_status_validator = new MPSInt();\r\n\t\tinit_status_validator.validate(operationType, init_status, \"\\\"init_status\\\"\");\r\n\t\t\r\n\t}", "@Override\r\n\tprotected void validate() {\n\t}", "private void validate() throws BaseException\n {\n boolean okay = true;\n\n //TODO: check the bases in seq for validity\n // If the type is RNA, the base T is not allowed\n // If the type is DNA, the base U is not allowed\n // If a disallowed type is present, set okay to false.\n \n if (!okay)\n {\n throw new BaseException();\n }\n }", "void validate();", "void validate();", "public void validateObjectMetier() throws NSValidation.ValidationException {\n\n\t}", "public void validateObjectMetier() throws NSValidation.ValidationException {\n\n\t}", "public void validateObjectMetier() throws NSValidation.ValidationException {\n\n\t}", "@Override\n public void customValidation() {\n }", "@Override\n public void customValidation() {\n }", "@Override\n public void customValidation() {\n }", "public void validate() throws org.apache.thrift.TException {\n if (type != null) {\n type.validate();\n }\n if (returnType != null) {\n returnType.validate();\n }\n }", "protected boolean isValidData() {\n return true;\n }", "private boolean validateInputs(String iStart, String iEnd, String country, String type) {\n \thideErrors();\n \tint validStart;\n \tint validEnd;\n boolean valid = true;\n// \t//will not occur due to UI interface\n// if (isComboBoxEmpty(type)) {\n// \tvalid = false;\n// \tT3_type_error_Text.setVisible(true);\n// }\n if (isComboBoxEmpty(country)) {\n \tvalid = false;\n \tT3_country_error_Text.setVisible(true);\n }\n \t//checking if start year and end year are set\n if (isComboBoxEmpty(iStart)){\n //start is empty\n T3_start_year_error_Text.setVisible(true);\n valid = false;\n }\n if (isComboBoxEmpty(iEnd)){\n //end is empty\n T3_end_year_error_Text.setVisible(true);\n valid = false;\n }\n \tif (valid){\n //if years are not empty and valid perform further testing\n \t\t//fetch valid data range\n \tPair<String,String> validRange = DatasetHandler.getValidRange(type, country);\n \tvalidStart = Integer.parseInt(validRange.getKey());\n \tvalidEnd = Integer.parseInt(validRange.getValue());\n //check year range validity\n \t\tint start = Integer.parseInt(iStart);\n \t\tint end = Integer.parseInt(iEnd);\n \tif (start>=end) {\n \t\tT3_range_error_Text.setText(\"Start year should be < end year\");\n \t\tT3_range_error_Text.setVisible(true);\n \t\tvalid=false;\n \t}\n// \t//will not occur due to UI interface\n// \telse if (start<validStart) {\n// \t\tT3_range_error_Text.setText(\"Start year should be >= \" + Integer.toString(validStart));\n// \t\tT3_range_error_Text.setVisible(true);\n// \t\tvalid=false;\n// \t}else if (end>validEnd) {\n// \t\tT3_range_error_Text.setText(\"End year should be <= \" + Integer.toString(validEnd));\n// \t\tT3_range_error_Text.setVisible(true);\n// \t\tvalid=false;\n// \t}\n \t}\n// \t//will not occur due to UI interface\n// \tif(isComboBoxEmpty(type)) {\n// \t\t//if type is not set\n// T3_type_error_Text.setVisible(true);\n// \t}\n \t\n if(isComboBoxEmpty(country)) {\n //if country is not set\n T3_country_error_Text.setVisible(true);\n }\n \treturn valid;\n }", "public void validateInput(Information information) {\n information.validateFirstName();\n information.validateLastName();\n information.validateZipcode();\n information.validateEmployeeID();\n }", "public abstract boolean validate();", "public void validate() throws org.apache.thrift.TException {\n if (!is_set_inputs()) {\n throw new org.apache.thrift.protocol.TProtocolException(\"Required field 'inputs' is unset! Struct:\" + toString());\n }\n\n if (!is_set_streams()) {\n throw new org.apache.thrift.protocol.TProtocolException(\"Required field 'streams' is unset! Struct:\" + toString());\n }\n\n // check for sub-struct validity\n }", "private void validate() {\n\n etCardNumber.validate();\n\n etCardExpiryDate.validate();\n\n etCardCvv.validate();\n\n etCardHolderName.validate();\n\n etPhoneNumber.validate();\n\n etCustomerName.validate();\n }", "public Object validate(String content, Object state) throws InvalidDatatypeValueException {\n \n if ( fDerivedByList == false ) { //derived by restriction\n \n if ( this.fBaseValidator != null ) {//validate against parent type if any\n //System.out.println( \"validator = \" + this.fBaseValidator );\n this.fBaseValidator.validate( content, state );\n }\n \n \n if ( (fFacetsDefined & DatatypeValidator.FACET_PATTERN ) != 0 ) {\n if ( fRegex == null || fRegex.matches( content) == false )\n throw new InvalidDatatypeValueException(\"Value'\"+content+\n \"' does not match regular expression facet \" + fRegex.getPattern() );\n }\n \n BigDecimal d = null; // Is content a Decimal \n try {\n d = new BigDecimal( stripPlusIfPresent( content));\n } catch (Exception nfe) {\n throw new InvalidDatatypeValueException(\n getErrorString(DatatypeMessageProvider.NotDecimal,\n DatatypeMessageProvider.MSG_NONE,\n new Object[] { \"'\" + content +\"'\"}));\n }\n //} \n //catch (IOException ex ) {\n // throw new InvalidDatatypeValueException(\n // getErrorString(DatatypeMessageProvider.NotDecimal,\n // DatatypeMessageProvider.MSG_NONE,\n // new Object[] { \"'\" + content +\"'\"}));\n //}\n \n \n if ( isScaleDefined == true ) {\n if (d.scale() > fScale)\n throw new InvalidDatatypeValueException(\n getErrorString(DatatypeMessageProvider.ScaleExceeded,\n DatatypeMessageProvider.MSG_NONE,\n new Object[] { content}));\n }\n if ( isPrecisionDefined == true ) {\n int precision = d.movePointRight(d.scale()).toString().length() - \n ((d.signum() < 0) ? 1 : 0); // account for minus sign\n\n if (precision > fPrecision)\n throw new InvalidDatatypeValueException(\n getErrorString(DatatypeMessageProvider.PrecisionExceeded,\n DatatypeMessageProvider.MSG_NONE,\n new Object[] { \"'\" + content + \"'\" , \"'\" + precision + \"'\" } ));\n }\n boundsCheck(d);\n if ( fEnumDecimal != null )\n enumCheck(d);\n \n \n } else { //derivation by list Revisit\n \n }\n return null;\n }", "ValidationResponse validate();", "public void validate() throws org.apache.thrift.TException {\n if (!is_set_status()) {\n throw new org.apache.thrift.protocol.TProtocolException(\"Required field 'status' is unset! Struct:\" + toString());\n }\n\n if (!is_set_data()) {\n throw new org.apache.thrift.protocol.TProtocolException(\"Required field 'data' is unset! Struct:\" + toString());\n }\n\n if (!is_set_feature()) {\n throw new org.apache.thrift.protocol.TProtocolException(\"Required field 'feature' is unset! Struct:\" + toString());\n }\n\n if (!is_set_predictResult()) {\n throw new org.apache.thrift.protocol.TProtocolException(\"Required field 'predictResult' is unset! Struct:\" + toString());\n }\n\n if (!is_set_msg()) {\n throw new org.apache.thrift.protocol.TProtocolException(\"Required field 'msg' is unset! Struct:\" + toString());\n }\n\n // check for sub-struct validity\n if (feature != null) {\n feature.validate();\n }\n }", "protected void validate(String operationType) throws Exception\r\n\t{\r\n\t\tsuper.validate(operationType);\r\n\r\n\t\tMPSString id_validator = new MPSString();\r\n\t\tid_validator.setConstraintIsReq(MPSConstants.DELETE_CONSTRAINT, true);\r\n\t\tid_validator.setConstraintIsReq(MPSConstants.MODIFY_CONSTRAINT, true);\r\n\t\tid_validator.validate(operationType, id, \"\\\"id\\\"\");\r\n\t\t\r\n\t\tMPSString name_validator = new MPSString();\r\n\t\tname_validator.setConstraintCharSetRegEx(MPSConstants.GENERIC_CONSTRAINT,\"[ a-zA-Z0-9_#.:@=-]+\");\r\n\t\tname_validator.setConstraintMaxStrLen(MPSConstants.GENERIC_CONSTRAINT, 128);\r\n\t\tname_validator.setConstraintMinStrLen(MPSConstants.GENERIC_CONSTRAINT, 1);\r\n\t\tname_validator.setConstraintIsReq(MPSConstants.ADD_CONSTRAINT, true);\r\n\t\tname_validator.validate(operationType, name, \"\\\"name\\\"\");\r\n\t\t\r\n\t\tMPSString type_validator = new MPSString();\r\n\t\ttype_validator.setConstraintMaxStrLen(MPSConstants.GENERIC_CONSTRAINT, 128);\r\n\t\ttype_validator.setConstraintMinStrLen(MPSConstants.GENERIC_CONSTRAINT, 1);\r\n\t\ttype_validator.validate(operationType, type, \"\\\"type\\\"\");\r\n\t\t\r\n\t\tMPSBoolean is_default_validator = new MPSBoolean();\r\n\t\tis_default_validator.validate(operationType, is_default, \"\\\"is_default\\\"\");\r\n\t\t\r\n\t\tMPSString username_validator = new MPSString();\r\n\t\tusername_validator.setConstraintCharSetRegEx(MPSConstants.GENERIC_CONSTRAINT,\"[ a-zA-Z0-9_#.:@=-]+\");\r\n\t\tusername_validator.setConstraintMaxStrLen(MPSConstants.GENERIC_CONSTRAINT, 127);\r\n\t\tusername_validator.setConstraintMinStrLen(MPSConstants.GENERIC_CONSTRAINT, 1);\r\n\t\tusername_validator.setConstraintIsReq(MPSConstants.ADD_CONSTRAINT, true);\r\n\t\tusername_validator.validate(operationType, username, \"\\\"username\\\"\");\r\n\t\t\r\n\t\tMPSString password_validator = new MPSString();\r\n\t\tpassword_validator.setConstraintMaxStrLen(MPSConstants.GENERIC_CONSTRAINT, 127);\r\n\t\tpassword_validator.setConstraintMinStrLen(MPSConstants.GENERIC_CONSTRAINT, 1);\r\n\t\tpassword_validator.setConstraintIsReq(MPSConstants.ADD_CONSTRAINT, true);\r\n\t\tpassword_validator.validate(operationType, password, \"\\\"password\\\"\");\r\n\t\t\r\n\t\tMPSString snmpversion_validator = new MPSString();\r\n\t\tsnmpversion_validator.validate(operationType, snmpversion, \"\\\"snmpversion\\\"\");\r\n\t\t\r\n\t\tMPSString snmpcommunity_validator = new MPSString();\r\n\t\tsnmpcommunity_validator.setConstraintMaxStrLen(MPSConstants.GENERIC_CONSTRAINT, 31);\r\n\t\tsnmpcommunity_validator.validate(operationType, snmpcommunity, \"\\\"snmpcommunity\\\"\");\r\n\t\t\r\n\t\tMPSString snmpsecurityname_validator = new MPSString();\r\n\t\tsnmpsecurityname_validator.setConstraintMaxStrLen(MPSConstants.GENERIC_CONSTRAINT, 31);\r\n\t\tsnmpsecurityname_validator.validate(operationType, snmpsecurityname, \"\\\"snmpsecurityname\\\"\");\r\n\t\t\r\n\t\tMPSString snmpsecuritylevel_validator = new MPSString();\r\n\t\tsnmpsecuritylevel_validator.validate(operationType, snmpsecuritylevel, \"\\\"snmpsecuritylevel\\\"\");\r\n\t\t\r\n\t\tMPSString snmpauthprotocol_validator = new MPSString();\r\n\t\tsnmpauthprotocol_validator.validate(operationType, snmpauthprotocol, \"\\\"snmpauthprotocol\\\"\");\r\n\t\t\r\n\t\tMPSString snmpauthpassword_validator = new MPSString();\r\n\t\tsnmpauthpassword_validator.setConstraintMaxStrLen(MPSConstants.GENERIC_CONSTRAINT, 31);\r\n\t\tsnmpauthpassword_validator.setConstraintMinStrLen(MPSConstants.GENERIC_CONSTRAINT, 8);\r\n\t\tsnmpauthpassword_validator.validate(operationType, snmpauthpassword, \"\\\"snmpauthpassword\\\"\");\r\n\t\t\r\n\t\tMPSString snmpprivprotocol_validator = new MPSString();\r\n\t\tsnmpprivprotocol_validator.validate(operationType, snmpprivprotocol, \"\\\"snmpprivprotocol\\\"\");\r\n\t\t\r\n\t\tMPSString snmpprivpassword_validator = new MPSString();\r\n\t\tsnmpprivpassword_validator.setConstraintMaxStrLen(MPSConstants.GENERIC_CONSTRAINT, 31);\r\n\t\tsnmpprivpassword_validator.setConstraintMinStrLen(MPSConstants.GENERIC_CONSTRAINT, 8);\r\n\t\tsnmpprivpassword_validator.validate(operationType, snmpprivpassword, \"\\\"snmpprivpassword\\\"\");\r\n\t\t\r\n\t}", "public void validate() throws org.apache.thrift.TException {\n if (partition_exprs == null) {\n throw new org.apache.thrift.protocol.TProtocolException(\"Required field 'partition_exprs' was not present! Struct: \" + toString());\n }\n if (partition_infos == null) {\n throw new org.apache.thrift.protocol.TProtocolException(\"Required field 'partition_infos' was not present! Struct: \" + toString());\n }\n if (rollup_schemas == null) {\n throw new org.apache.thrift.protocol.TProtocolException(\"Required field 'rollup_schemas' was not present! Struct: \" + toString());\n }\n // check for sub-struct validity\n }", "public void checkTypeValid(List<Object> types) {\n if(types.size() != inputs.size()) {\n throw new IllegalArgumentException(\"Not matched passed parameter count.\");\n }\n }", "public TestStepReportType validate(List<Configuration> configurations, Map<String, DataType> inputs);", "public void validate() throws org.apache.thrift.TException {\n if (!is_set_destApp()) {\n throw new org.apache.thrift.protocol.TProtocolException(\"Required field 'destApp' is unset! Struct:\" + toString());\n }\n\n if (!is_set_destPellet()) {\n throw new org.apache.thrift.protocol.TProtocolException(\"Required field 'destPellet' is unset! Struct:\" + toString());\n }\n\n if (!is_set_data()) {\n throw new org.apache.thrift.protocol.TProtocolException(\"Required field 'data' is unset! Struct:\" + toString());\n }\n\n // check for sub-struct validity\n }", "@Override\n\tpublic boolean checkTypes() {\n\t\treturn false;\n\t}", "public void validate() throws org.apache.thrift.TException {\n if (functionName == null) {\n throw new org.apache.thrift.protocol.TProtocolException(\"Required field 'functionName' was not present! Struct: \" + toString());\n }\n if (className == null) {\n throw new org.apache.thrift.protocol.TProtocolException(\"Required field 'className' was not present! Struct: \" + toString());\n }\n if (resources == null) {\n throw new org.apache.thrift.protocol.TProtocolException(\"Required field 'resources' was not present! Struct: \" + toString());\n }\n // check for sub-struct validity\n }", "private boolean validate(){\n return EditorUtils.editTextValidator(generalnformation,etGeneralnformation,\"Type in information\") &&\n EditorUtils.editTextValidator(symptoms,etSymptoms, \"Type in symptoms\") &&\n EditorUtils.editTextValidator(management,etManagement, \"Type in management\");\n }", "protected void validate(String operationType) throws Exception\r\n\t{\r\n\t\tsuper.validate(operationType);\r\n\r\n\t\tMPSString id_validator = new MPSString();\r\n\t\tid_validator.setConstraintIsReq(MPSConstants.DELETE_CONSTRAINT, true);\r\n\t\tid_validator.setConstraintIsReq(MPSConstants.MODIFY_CONSTRAINT, true);\r\n\t\tid_validator.validate(operationType, id, \"\\\"id\\\"\");\r\n\t\t\r\n\t\tMPSInt adapter_id_validator = new MPSInt();\r\n\t\tadapter_id_validator.validate(operationType, adapter_id, \"\\\"adapter_id\\\"\");\r\n\t\t\r\n\t\tMPSInt pdcount_validator = new MPSInt();\r\n\t\tpdcount_validator.validate(operationType, pdcount, \"\\\"pdcount\\\"\");\r\n\t\t\r\n\t\tMPSInt ldcount_validator = new MPSInt();\r\n\t\tldcount_validator.validate(operationType, ldcount, \"\\\"ldcount\\\"\");\r\n\t\t\r\n\t}", "protected void validate() {\n // no implementation.\n }", "@Value.Check\n default void checkPreconditions()\n {\n RangeCheck.checkIncludedInInteger(\n this.feedback(),\n \"Feedback\",\n RangeInclusiveI.of(0, 7),\n \"Valid feedback values\");\n\n RangeCheck.checkIncludedInInteger(\n this.transpose(),\n \"Transpose\",\n RangeInclusiveI.of(-24, 24),\n \"Valid transpose values\");\n\n RangeCheck.checkIncludedInInteger(\n this.pitchEnvelopeR1Level(),\n \"Pitch R1 Level\",\n RangeInclusiveI.of(0, 99),\n \"Valid levels\");\n\n RangeCheck.checkIncludedInInteger(\n this.pitchEnvelopeR1Rate(),\n \"Pitch R1 Rate\",\n RangeInclusiveI.of(0, 99),\n \"Valid rates\");\n\n RangeCheck.checkIncludedInInteger(\n this.pitchEnvelopeR2Level(),\n \"Pitch R2 Level\",\n RangeInclusiveI.of(0, 99),\n \"Valid levels\");\n\n RangeCheck.checkIncludedInInteger(\n this.pitchEnvelopeR2Rate(),\n \"Pitch R2 Rate\",\n RangeInclusiveI.of(0, 99),\n \"Valid rates\");\n\n RangeCheck.checkIncludedInInteger(\n this.pitchEnvelopeR3Level(),\n \"Pitch R3 Level\",\n RangeInclusiveI.of(0, 99),\n \"Valid levels\");\n\n RangeCheck.checkIncludedInInteger(\n this.pitchEnvelopeR3Rate(),\n \"Pitch R3 Rate\",\n RangeInclusiveI.of(0, 99),\n \"Valid rates\");\n\n RangeCheck.checkIncludedInInteger(\n this.pitchEnvelopeR4Level(),\n \"Pitch R4 Level\",\n RangeInclusiveI.of(0, 99),\n \"Valid levels\");\n\n RangeCheck.checkIncludedInInteger(\n this.pitchEnvelopeR4Rate(),\n \"Pitch R4 Rate\",\n RangeInclusiveI.of(0, 99),\n \"Valid rates\");\n\n RangeCheck.checkIncludedInInteger(\n this.lfoPitchModulationDepth(),\n \"LFO Pitch Modulation Depth\",\n RangeInclusiveI.of(0, 99),\n \"Valid pitch modulation depth values\");\n\n RangeCheck.checkIncludedInInteger(\n this.lfoPitchModulationSensitivity(),\n \"LFO Pitch Modulation Sensitivity\",\n RangeInclusiveI.of(0, 7),\n \"Valid pitch modulation sensitivity values\");\n\n RangeCheck.checkIncludedInInteger(\n this.lfoAmplitudeModulationDepth(),\n \"LFO Amplitude Modulation Depth\",\n RangeInclusiveI.of(0, 99),\n \"Valid amplitude modulation depth values\");\n\n RangeCheck.checkIncludedInInteger(\n this.lfoSpeed(),\n \"LFO Speed\",\n RangeInclusiveI.of(0, 99),\n \"Valid LFO speed values\");\n\n RangeCheck.checkIncludedInInteger(\n this.lfoDelay(),\n \"LFO Delay\",\n RangeInclusiveI.of(0, 99),\n \"Valid LFO delay values\");\n }", "public GenericSchemaValidator() {}", "public void validate() throws org.apache.thrift.TException {\n if (institutionID == null) {\n throw new org.apache.thrift.protocol.TProtocolException(\"Required field 'institutionID' was not present! Struct: \" + toString());\n }\n if (productids == null) {\n throw new org.apache.thrift.protocol.TProtocolException(\"Required field 'productids' was not present! Struct: \" + toString());\n }\n // check for sub-struct validity\n }", "public interface validator {\n //what are the minimum requirements\n //what we need for our methods\n\n //write down the methods/processes that are in common\n //define the methods\n\n public boolean isValid();\n public String errorMessage();\n\n\n}", "public void validate() throws org.apache.thrift.TException {\n if (tableType == null) {\n throw new org.apache.thrift.protocol.TProtocolException(\"Required field 'tableType' was not present! Struct: \" + toString());\n }\n // alas, we cannot check 'numCols' because it's a primitive and you chose the non-beans generator.\n // alas, we cannot check 'numClusteringCols' because it's a primitive and you chose the non-beans generator.\n if (tableName == null) {\n throw new org.apache.thrift.protocol.TProtocolException(\"Required field 'tableName' was not present! Struct: \" + toString());\n }\n if (dbName == null) {\n throw new org.apache.thrift.protocol.TProtocolException(\"Required field 'dbName' was not present! Struct: \" + toString());\n }\n // check for sub-struct validity\n if (hdfsTable != null) {\n hdfsTable.validate();\n }\n if (hbaseTable != null) {\n hbaseTable.validate();\n }\n if (dataSourceTable != null) {\n dataSourceTable.validate();\n }\n }", "void validate(T regData, Errors errors);", "private ValidationError() {\n }", "public void validate() throws org.apache.thrift.TException {\n if (key_column_name == null) {\n throw new org.apache.thrift.protocol.TProtocolException(\"Required field 'key_column_name' was not present! Struct: \" + toString());\n }\n if (key_column_type == null) {\n throw new org.apache.thrift.protocol.TProtocolException(\"Required field 'key_column_type' was not present! Struct: \" + toString());\n }\n // alas, we cannot check 'is_preaggregation' because it's a primitive and you chose the non-beans generator.\n // check for sub-struct validity\n }", "public abstract void validate(List<String> validationMessages);", "void validate(N ndcRequest, ErrorsType errorsType);", "private void validateType(Errors errors, MultiValueConstraints con, List<String> answers) {\n for (int i=0; i < answers.size(); i++) {\n validateMultiValueType(errors, con, answers.get(i));\n }\n if (!con.getAllowOther()) {\n for (int i=0; i < answers.size(); i++) {\n if (!isEnumeratedValue(con, answers.get(i))) {\n rejectField(errors, \"constraints\", \"%s is not an enumerated value for this question\", answers.get(i));\n }\n }\n }\n }", "protected void validate() {\n // no op\n }", "@Test\n\tpublic void testValidate()\n\t{\n\t\tSystem.out.println(\"validate\");\n\t\tUserTypeCode userTypeCode = new UserTypeCode();\n\t\tuserTypeCode.setCode(\"Test\");\n\t\tuserTypeCode.setDescription(\"Test\");\n\n\t\tValidationModel validateModel = new ValidationModel(userTypeCode);\n\t\tvalidateModel.setConsumeFieldsOnly(true);\n\n\t\tValidationResult result = ValidationUtil.validate(validateModel);\n\t\tSystem.out.println(\"Any Valid consume: \" + result.toString());\n\t\tif (result.valid() == false) {\n\t\t\tAssert.fail(\"Failed validation when it was expected to pass.\");\n\t\t}\n\t\tSystem.out.println(\"---------------------------\");\n\n\t\tvalidateModel = new ValidationModel(userTypeCode);\n\t\tresult = ValidationUtil.validate(validateModel);\n\t\tSystem.out.println(\"Faild: \" + result.toString());\n\t}", "public List<ValidationError> validate() {\n\n List<ValidationError> errors = new ArrayList<>();\n\n // isActive\n if (this.isActive != null && !this.isActive.equals(\"\") && this.getIsActiveAsBoolean() == null) {\n errors.add(new ValidationError(\"isActive\", \"isActive is not correctly formated, should be a true or false\"));\n }\n\n // actorTypeRefId\n if (this.actorTypeRefId != null && !this.actorTypeRefId.equals(\"\") && this.getActorType() == null) {\n errors.add(new ValidationError(\"actorTypeRefId\", String.format(\"ActorType %s does not exist\", this.actorTypeRefId)));\n }\n\n // login\n if (this.login != null && !this.login.equals(\"\")) {\n Actor testActor = ActorDao.getActorByUid(this.login);\n if (testActor != null) {\n Actor actor = ActorDao.getActorByRefId(this.refId);\n if (actor != null) { // edit\n if (!testActor.id.equals(actor.id)) {\n errors.add(new ValidationError(\"login\", \"The login \\\"\" + this.login + \"\\\" is already used by another actor\"));\n }\n } else { // create\n errors.add(new ValidationError(\"login\", \"The login \\\"\" + this.login + \"\\\" is already used by another actor\"));\n }\n }\n }\n\n return errors.isEmpty() ? null : errors;\n }", "@Test\n public void testValidator() throws Exception {\n\n // No warnings/error\n Device device = buildDevice();\n List<Issue> issues = FHIRValidator.validator().validate(device);\n assertEquals(FHIRValidationUtil.countErrors(issues), 0);\n assertEquals(FHIRValidationUtil.countWarnings(issues), 0);\n\n // Error for missing statusReason\n device = buildDevice().toBuilder().statusReason(Collections.emptyList()).build();\n issues = FHIRValidator.validator().validate(device);\n assertEquals(FHIRValidationUtil.countErrors(issues), 1);\n assertEquals(FHIRValidationUtil.countWarnings(issues), 0);\n\n // Warning for statusReason\n device = buildDevice().toBuilder().statusReason(Arrays.asList(\n CodeableConcept.builder().coding(Coding.builder().system(Uri.of(\"http://terminology.hl7.org/CodeSystem/device-status-reason\")).code(Code.of(\"invalidCode\")).build()).build(),\n CodeableConcept.builder().coding(Coding.builder().system(Uri.of(\"invalidSystem\")).code(Code.of(\"online\")).build()).build()\n )).build();\n issues = FHIRValidator.validator().validate(device);\n assertEquals(FHIRValidationUtil.countErrors(issues), 0);\n assertEquals(FHIRValidationUtil.countWarnings(issues), 2);\n\n // Warning for type\n device = buildDevice().toBuilder()\n .type(CodeableConcept.builder().coding(Coding.builder().system(Uri.of(ValidationSupport.BCP_47_URN)).code(Code.of(\"tlh\")).build()).build()).build();\n issues = FHIRValidator.validator().validate(device);\n assertEquals(FHIRValidationUtil.countErrors(issues), 0);\n assertEquals(FHIRValidationUtil.countWarnings(issues), 1);\n\n // Error for type\n device = buildDevice().toBuilder()\n .type(CodeableConcept.builder().coding(Coding.builder().system(Uri.of(ValidationSupport.BCP_47_URN)).code(Code.of(\"invalidLanguage\")).build()).build()).build();\n issues = FHIRValidator.validator().validate(device);\n assertEquals(FHIRValidationUtil.countErrors(issues), 2);\n assertEquals(FHIRValidationUtil.countWarnings(issues), 1);\n\n // Warning and error for specialization.systemType\n device = buildDevice().toBuilder().specialization(Arrays.asList(\n Specialization.builder().systemType(CodeableConcept.builder().coding(Coding.builder().system(Uri.of(ValidationSupport.BCP_47_URN)).code(Code.of(\"tlh\")).build()).build()).build(),\n Specialization.builder().systemType(CodeableConcept.builder().coding(Coding.builder().system(Uri.of(ValidationSupport.BCP_47_URN)).code(Code.of(\"invalidSystem\")).build()).build()).build())).build();\n issues = FHIRValidator.validator().validate(device);\n assertEquals(FHIRValidationUtil.countErrors(issues), 2);\n assertEquals(FHIRValidationUtil.countWarnings(issues), 2);\n\n // Warning and error for safety\n device = buildDevice().toBuilder().safety(Arrays.asList(\n CodeableConcept.builder().coding(Coding.builder().system(Uri.of(ValidationSupport.BCP_47_URN)).code(Code.of(\"tlh\")).build()).build(),\n CodeableConcept.builder().coding(Coding.builder().system(Uri.of(\"invalidSystem\")).code(Code.of(ENGLISH_US)).build()).build()\n )).build();\n issues = FHIRValidator.validator().validate(device);\n assertEquals(FHIRValidationUtil.countErrors(issues), 2);\n assertEquals(FHIRValidationUtil.countWarnings(issues), 2);\n\n // Warning for test-language-primary-extension\n device = buildDevice().toBuilder()\n .extension(Collections.singletonList(Extension.builder().url(\"http://ibm.com/fhir/StructureDefinition/test-language-primary-extension\")\n .value(CodeableConcept.builder().coding(Coding.builder().system(Uri.of(ValidationSupport.BCP_47_URN)).code(Code.of(\"tlh\")).build()).build()).build())).build();\n issues = FHIRValidator.validator().validate(device);\n issues.forEach(System.out::println);\n assertEquals(FHIRValidationUtil.countErrors(issues), 0);\n assertEquals(FHIRValidationUtil.countWarnings(issues), 1);\n\n // Error for test-language-primary-extension\n device = buildDevice().toBuilder()\n .extension(Collections.singletonList(Extension.builder().url(\"http://ibm.com/fhir/StructureDefinition/test-language-primary-extension\")\n .value(CodeableConcept.builder().coding(Coding.builder().system(Uri.of(ValidationSupport.BCP_47_URN)).code(Code.of(\"invalidLanguage\")).build()).build()).build())).build();\n issues = FHIRValidator.validator().validate(device);\n assertEquals(FHIRValidationUtil.countErrors(issues), 2);\n assertEquals(FHIRValidationUtil.countWarnings(issues), 1);\n assertEquals(FHIRValidationUtil.countInformation(issues), 1);\n\n // Warning for test-language-secondary-extension\n device = buildDevice().toBuilder()\n .extension(Collections.singletonList(Extension.builder().url(\"http://ibm.com/fhir/StructureDefinition/test-language-secondary-extension\")\n .value(Coding.builder().system(Uri.of(ValidationSupport.BCP_47_URN)).code(Code.of(\"tlh\")).build()).build())).build();\n issues = FHIRValidator.validator().validate(device);\n assertEquals(FHIRValidationUtil.countErrors(issues), 0);\n assertEquals(FHIRValidationUtil.countWarnings(issues), 2);\n\n // Error for test-language-secondary-extension\n device = buildDevice().toBuilder()\n .extension(Collections.singletonList(Extension.builder().url(\"http://ibm.com/fhir/StructureDefinition/test-language-secondary-extension\")\n .value(Coding.builder().system(Uri.of(ValidationSupport.BCP_47_URN)).code(Code.of(\"invalidLanguage\")).build()).build())).build();\n issues = FHIRValidator.validator().validate(device);\n assertEquals(FHIRValidationUtil.countErrors(issues), 2);\n assertEquals(FHIRValidationUtil.countWarnings(issues), 2);\n assertEquals(FHIRValidationUtil.countInformation(issues), 1);\n\n // Warning for test-language-tertiary-extension\n device = buildDevice().toBuilder()\n .extension(Collections.singletonList(Extension.builder().url(\"http://ibm.com/fhir/StructureDefinition/test-language-tertiary-extension\")\n .value(Code.of(\"tlh\")).build())).build();\n issues = FHIRValidator.validator().validate(device);\n assertEquals(FHIRValidationUtil.countErrors(issues), 0);\n assertEquals(FHIRValidationUtil.countWarnings(issues), 2);\n\n // Error for test-language-tertiary-extension\n device = buildDevice().toBuilder()\n .extension(Collections.singletonList(Extension.builder().url(\"http://ibm.com/fhir/StructureDefinition/test-language-tertiary-extension\")\n .value(Code.of(\"invalidLanguage\")).build())).build();\n issues = FHIRValidator.validator().validate(device);\n assertEquals(FHIRValidationUtil.countErrors(issues), 2);\n assertEquals(FHIRValidationUtil.countWarnings(issues), 2);\n }", "@Test\n public void testSimpleValidType() throws Exception {\n ArrayList<Type> typeList = Lists.newArrayList();\n typeList.add(TimestampedEvent.class);\n typeList.add(GenericRecord.class);\n typeList.add(Integer.class);\n typeList.add(Object.class);\n PipelineRegisterer.validateTypes(typeList);\n }", "@Override\n\tpublic void validate() {\n\t\tsuper.validate();\n\t}", "protected boolean validateData(String [] data) {\n return true;\n }", "@Override\r\n public boolean validate() {\n return true;\r\n }", "public interface ArchetypeValidation {\n\n List<ValidationMessage> validate(MetaModels models, Archetype archetype, Archetype flatParent, FullArchetypeRepository repository, ArchetypeValidationSettings settings);\n\n}", "public void validate() {\n\t\terrors.clear();\n\t\t\n\t\tif(!this.id.isEmpty()) {\n\t\t\ttry {\n\t\t\t\tLong.parseLong(this.id);\n\t\t\t} catch(NumberFormatException ex) {\n\t\t\t\terrors.put(\"id\", \"Id is not valid.\");\n\t\t\t}\n\t\t}\n\t\t\n\t\tif(this.firstName.isEmpty()) {\n\t\t\terrors.put(\"firstName\", \"First name is obligatory!\");\n\t\t}\n\t\t\n\t\tif(this.lastName.isEmpty()) {\n\t\t\terrors.put(\"lastName\", \"Last name is obligatory!\");\n\t\t}\n\t\t\n\t\tif(this.nick.isEmpty()) {\n\t\t\terrors.put(\"nick\", \"Nick is obligatory!\");\n\t\t}\n\t\t\n\t\tif(DAOProvider.getDAO().doesNickAlreadyExist(nick)) {\n\t\t\terrors.put(\"nick\", \"Nick already exist!\");\n\t\t}\n\n\t\tif(this.email.isEmpty()) {\n\t\t\terrors.put(\"email\", \"EMail is obligatory!\");\n\t\t} else {\n\t\t\tint l = email.length();\n\t\t\tint p = email.indexOf('@');\n\t\t\tif(l<3 || p==-1 || p==0 || p==l-1) {\n\t\t\t\terrors.put(\"email\", \"EMail is not valid.\");\n\t\t\t}\n\t\t}\n\t\t\n\t\tif(this.password.isEmpty()) {\n\t\t\terrors.put(\"password\", \"Password is obligatory!\");\n\t\t}\n\t}", "public void validate (Set classes) throws ValidationException;", "public void validate() throws org.apache.thrift.TException {\n if (!isSetUserProfileId()) {\n throw new org.apache.thrift.protocol.TProtocolException(\"Required field 'userProfileId' is unset! Struct:\" + toString());\n }\n\n if (!isSetEntityId()) {\n throw new org.apache.thrift.protocol.TProtocolException(\"Required field 'entityId' is unset! Struct:\" + toString());\n }\n\n if (!isSetEntityType()) {\n throw new org.apache.thrift.protocol.TProtocolException(\"Required field 'entityType' is unset! Struct:\" + toString());\n }\n\n // check for sub-struct validity\n }", "int validate(ValidationContext ctx) {\n\t\tint count = 0;\n\t\tif (this.name == null) {\n\t\t\tctx.addError(\n\t\t\t\t\t\"Parameter has to have a name. This need not be the same as the one in the db though.\");\n\t\t\tcount++;\n\t\t}\n\t\tcount += ctx.checkDtExistence(this.dataType, \"dataType\", false);\n\t\tcount += ctx.checkRecordExistence(this.recordName, \"recordName\", false);\n\n\t\tif (this.defaultValue != null) {\n\t\t\tif (this.dataType == null) {\n\t\t\t\tthis.addError(ctx,\n\t\t\t\t\t\t\" is non-primitive but a default value is specified.\");\n\t\t\t\tcount++;\n\t\t\t} else {\n\t\t\t\tDataType dt = ComponentManager.getDataTypeOrNull(this.dataType);\n\t\t\t\tif (dt != null && dt.parseValue(this.defaultValue) == null) {\n\t\t\t\t\tthis.addError(ctx, \" default value of \" + this.defaultValue\n\t\t\t\t\t\t\t+ \" is invalid as per dataType \" + this.dataType);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif (this.recordName != null) {\n\t\t\tif (this.dataType != null) {\n\t\t\t\tthis.addError(ctx,\n\t\t\t\t\t\t\" Both dataType and recordName specified. Use dataType if this is primitive type, or record if it as array or a structure.\");\n\t\t\t\tcount++;\n\t\t\t}\n\t\t\tif (this.sqlObjectType == null) {\n\t\t\t\tthis.addError(ctx,\n\t\t\t\t\t\t\" recordName is specified which means that it is a data-structure. Please specify sqlObjectType as the type of this parameter in the stored procedure\");\n\t\t\t}\n\t\t} else {\n\t\t\tif (this.dataType == null) {\n\t\t\t\tthis.addError(ctx,\n\t\t\t\t\t\t\" No data type or recordName specified. Use dataType if this is primitive type, or record if it as an array or a data-structure.\");\n\t\t\t\tcount++;\n\t\t\t} else if (this.sqlObjectType != null) {\n\t\t\t\tctx.addError(\n\t\t\t\t\t\t\"sqlObjectType is relevant only if this parameter is non-primitive.\");\n\t\t\t}\n\n\t\t}\n\n\t\tif (this.isArray) {\n\t\t\tif (this.sqlArrayType == null) {\n\t\t\t\tthis.addError(ctx,\n\t\t\t\t\t\t\" is an array, and hence sqlArrayType must be specified as the type with which this parameter is defined in the stored procedure\");\n\t\t\t\tcount++;\n\t\t\t}\n\t\t}\n\n\t\treturn count;\n\t}", "private ErrorCode checkParameters() {\n\t\t\n\t\t// Check Batch Size\n\t\ttry {\n\t\t\tInteger.parseInt(batchSizeField.getText());\n\t\t\t\n\t\t} catch (NumberFormatException e) {\n\t\t\treturn ErrorCode.BatchSize;\n\t\t}\n\t\t\n\t\t// Check confidenceFactor\n\t\ttry {\n\t\t\tDouble.parseDouble(confidenceFactorField.getText());\n\t\t\t\n\t\t} catch (NumberFormatException e) {\n\t\t\treturn ErrorCode.ConfidenceFactor;\n\t\t}\n\t\t\n\t\t// Check minNumObj\n\t\ttry {\n\t\t\tInteger.parseInt(minNumObjField.getText());\n\t\t\t\n\t\t} catch (NumberFormatException e) {\n\t\t\treturn ErrorCode.MinNumObj;\n\t\t}\n\t\t\n\t\t// Check numDecimalPlaces\n\t\ttry {\n\t\t\tInteger.parseInt(numDecimalPlacesField.getText());\n\t\t\t\n\t\t} catch (NumberFormatException e) {\n\t\t\treturn ErrorCode.NumDecimalPlaces;\n\t\t}\n\t\t\n\t\t// Check numFolds\n\t\ttry {\n\t\t\tInteger.parseInt(numFoldsField.getText());\n\t\t\t\n\t\t} catch (NumberFormatException e) {\n\t\t\treturn ErrorCode.NumFolds;\n\t\t}\n\t\t\n\t\t// Check seed\n\t\ttry {\n\t\t\tInteger.parseInt(seedField.getText());\n\t\t\t\n\t\t} catch (NumberFormatException e) {\n\t\t\treturn ErrorCode.Seed;\n\t\t}\n\t\t\n\t\treturn ErrorCode.Fine;\n\t\t\n\t}", "@Override\r\n public void validate() {\n\r\n }", "@Test\n\tpublic void testValidation() throws Exception {\n\t\tSchema schema = factory.create(basicSchema);\n\t\tschema.validate(parser.read(basicJson));\n\t}", "public interface FieldValidator {\n static boolean validateStringIfPresent(Object o, int len) {\n return o == null || o instanceof String && !((String) o).isEmpty() && ((String) o).length() < len;\n }\n\n static boolean validateString(Object o, int len) {\n return !(o == null || !(o instanceof String) || ((String) o).isEmpty() || (((String) o).length() > len));\n }\n\n static boolean validateInteger(Object o) {\n if (o == null) {\n return false;\n }\n try {\n Integer.valueOf(o.toString());\n } catch (NumberFormatException e) {\n return false;\n }\n return true;\n }\n\n static boolean validateDateWithFormat(Object o, DateTimeFormatter formatter, boolean allowedInPast) {\n if (o == null) {\n return false;\n }\n try {\n LocalDate date = LocalDate.parse(o.toString(), formatter);\n if (!allowedInPast) {\n return date.isAfter(LocalDate.now());\n }\n } catch (DateTimeParseException e) {\n return false;\n }\n return true;\n }\n\n static boolean validateJsonIfPresent(Object o) {\n return o == null || o instanceof JsonObject && !((JsonObject) o).isEmpty();\n }\n\n static boolean validateJson(Object o) {\n return !(o == null || !(o instanceof JsonObject) || ((JsonObject) o).isEmpty());\n }\n\n static boolean validateJsonArrayIfPresent(Object o) {\n return o == null || o instanceof JsonArray && !((JsonArray) o).isEmpty();\n }\n\n static boolean validateJsonArray(Object o) {\n return !(o == null || !(o instanceof JsonArray) || ((JsonArray) o).isEmpty());\n }\n\n static boolean validateDeepJsonArrayIfPresent(Object o, FieldValidator fv) {\n if (o == null) {\n return true;\n } else if (!(o instanceof JsonArray) || ((JsonArray) o).isEmpty()) {\n return false;\n } else {\n JsonArray array = (JsonArray) o;\n for (Object element : array) {\n if (!fv.validateField(element)) {\n return false;\n }\n }\n }\n return true;\n }\n\n static boolean validateDeepJsonArray(Object o, FieldValidator fv) {\n if (o == null || !(o instanceof JsonArray) || ((JsonArray) o).isEmpty()) {\n return false;\n }\n JsonArray array = (JsonArray) o;\n for (Object element : array) {\n if (!fv.validateField(element)) {\n return false;\n }\n }\n return true;\n }\n\n static boolean validateBoolean(Object o) {\n return o != null && o instanceof Boolean;\n }\n\n static boolean validateBooleanIfPresent(Object o) {\n return o == null || o instanceof Boolean;\n }\n\n static boolean validateUuid(Object o) {\n try {\n UUID uuid = UUID.fromString((String) o);\n return true;\n } catch (IllegalArgumentException e) {\n return false;\n }\n }\n\n static boolean validateUuidIfPresent(String o) {\n return o == null || validateUuid(o);\n }\n\n boolean validateField(Object value);\n\n Pattern EMAIL_PATTERN =\n Pattern.compile(\"^[_A-Za-z0-9-\\\\+]+(\\\\.[_A-Za-z0-9-]+)*@[A-Za-z0-9-]+(\\\\.[A-Za-z0-9]+)*(\\\\.[A-Za-z]{2,})$\");\n\n static boolean validateEmail(Object o) {\n Matcher matcher = EMAIL_PATTERN.matcher((String) o);\n return matcher.matches();\n }\n}", "@Test\n\tpublic void testIsValid()\n\t{\n\t\tSystem.out.println(\"isValid\");\n\n\t\tUserTypeCode userTypeCode = new UserTypeCode();\n\t\tuserTypeCode.setCode(\"Test\");\n\t\tuserTypeCode.setDescription(\"Test\");\n\n\t\tValidationModel validateModel = new ValidationModel(userTypeCode);\n\t\tvalidateModel.setConsumeFieldsOnly(true);\n\n\t\tboolean expResult = true;\n\t\tboolean result = ValidationUtil.isValid(validateModel);\n\t\tassertEquals(expResult, result);\n\n\t\tvalidateModel = new ValidationModel(userTypeCode);\n\n\t\texpResult = false;\n\t\tresult = ValidationUtil.isValid(validateModel);\n\t\tassertEquals(expResult, result);\n\t}", "protected abstract boolean isInputValid();", "@Override\r\n\tpublic void Validate() {\n\r\n\t}", "void validate(T object);", "public interface ValueRequired {\r\n\t/**\r\n\t * Richiede all'utente di inserire un valore e ne verifica la validità in base al campo\r\n\t * @param ctx il contesto su cui si deve operare\r\n\t * @param field campo su cui verificare la validità del dato\r\n\t * @param message richiesta all'utente di inserire il dato\r\n\t * @return Oggetto correttamente elaborato in base al campo\r\n\t */\r\n\tpublic default Object acceptValue(Context ctx, FieldHeading field, String message) {\r\n\t\tboolean valid = false;\r\n\t\tObject obj = null;\r\n\t\tdo {\r\n\t\t\tString value = ctx.getIOStream().read(\"\\t\" + message);\r\n\t\t\tif(!field.isBinding() && !field.isOptional() && value.isEmpty())\r\n\t\t\t\tvalid = true;\r\n\t\t\tctx.getIOStream().write(StringConstant.NEW_LINE);\r\n\t\t\tif(field.getClassType().isValidType(value)) {\r\n\t\t\t\tobj = field.getClassType().parse(value);\r\n\t\t\t\tvalid = true;\r\n\t\t\t}\r\n\t\t\tif(!valid)\r\n\t\t\t\tctx.getIOStream().writeln(\"\\tIl valore inserito non è corretto.\\n\\tInserisca qualcosa del tipo: \" + field.getClassType().getSyntax());\r\n\t\t}while(!valid);\r\n\t\treturn obj;\r\n\t}\r\n}", "public void validate() throws org.apache.thrift.TException {\n if (classification == null) {\n throw new org.apache.thrift.protocol.TProtocolException(\"Required field 'classification' was not present! Struct: \" + toString());\n }\n // check for sub-struct validity\n }", "protected void validate()\r\n\t{\r\n\t\tif( this.mapper==null )\r\n\t\t\tthrow new IllegalStateException(\"Please specify the Mapper of this dataset.\");\r\n\t\tif( this.input_format==null )\r\n\t\t\tthrow new IllegalStateException(\"Please specify the InputFormat of this dataset.\");\r\n\t\tif( this.inputs==null || this.inputs.size()==0 )\r\n\t\t\tthrow new IllegalStateException(\"Please specify the input path(s) of this dataset\");\r\n\t\tif ( this.getSchema()==null || this.getSchema().size()==0 )\r\n\t\t\tthrow new IllegalStateException(\"Please specify the schema of this dataset first\");\r\n\t}", "public void setListener(JFXTextField field, int type) {\n if (type == 1) {\n NumberValidator numValidator = new NumberValidator();\n santa_List.add(numValidator);\n field.getValidators().add(numValidator);\n numValidator.setMessage(\"Enter a number\");\n RequiredFieldValidator validator = new RequiredFieldValidator();\n field.getValidators().add(validator);\n validator.setMessage(\"* Required\");\n }\n if (type == 2) {\n RegexValidator regexValidator = new RegexValidator();\n santa_List.add(regexValidator);\n regexValidator.setRegexPattern(\"^[a-zA-Z]+(([',. -][a-zA-Z ])?[a-zA-Z]*)*$\");\n field.getValidators().add(regexValidator);\n regexValidator.setMessage(\"Enter your name!\");\n RequiredFieldValidator validator = new RequiredFieldValidator();\n field.getValidators().add(validator);\n validator.setMessage(\"* Required\");\n }\n if (type == 3) {\n RegexValidator validEmail = new RegexValidator();\n santa_List.add(validEmail);\n validEmail.setRegexPattern(\".+\\\\@.+\\\\..+\");\n field.getValidators().add(validEmail);\n validEmail.setMessage(\"Enter a valid email\");\n RequiredFieldValidator validator = new RequiredFieldValidator();\n field.getValidators().add(validator);\n validator.setMessage(\"* Required\");\n }\n if (type == 4) {\n RegexValidator validEmail = new RegexValidator();\n santa_List.add(validEmail);\n validEmail.setRegexPattern(\"^\\\\D?(\\\\d{3})\\\\D?\\\\D?(\\\\d{3})\\\\D?(\\\\d{4})$\");\n field.getValidators().add(validEmail);\n validEmail.setMessage(\"Enter a valid phone number\");\n RequiredFieldValidator validator = new RequiredFieldValidator();\n field.getValidators().add(validator);\n validator.setMessage(\"* Required\");\n }\n if (type == 5) {\n RegexValidator validEmail = new RegexValidator();\n santa_List.add(validEmail);\n validEmail.setRegexPattern(\"^\\\\d{2}$\");\n field.getValidators().add(validEmail);\n validEmail.setMessage(\"Enter the last two digits of the year\");\n RequiredFieldValidator validator = new RequiredFieldValidator();\n field.getValidators().add(validator);\n validator.setMessage(\"* Required\");\n }\n if (type == 6) {\n RegexValidator validEmail = new RegexValidator();\n santa_List.add(validEmail);\n validEmail.setRegexPattern(\"^[0-9]+(\\\\.[0-9][0-9]*)?$\"); // Doesn't account for decimals\n field.getValidators().add(validEmail);\n validEmail.setMessage(\"Enter a valid pH\");\n RequiredFieldValidator validator = new RequiredFieldValidator();\n field.getValidators().add(validator);\n validator.setMessage(\"* Required\");\n }\n if (type == 7) {\n RegexValidator validRepId = new RegexValidator();\n santa_List.add(validRepId);\n validRepId.setRegexPattern(\"^[a-zA-Z0-9]{0,16}$\"); // Doesn't account for decimals\n field.getValidators().add(validRepId);\n validRepId.setMessage(\"Enter a valid rep id\");\n }\n if (type == 8) {\n RegexValidator validSerial = new RegexValidator();\n santa_List.add(validSerial);\n validSerial.setRegexPattern(\"^\\\\d{4}$\");\n field.getValidators().add(validSerial);\n validSerial.setMessage(\"The serial number must be at most four digits\");\n RequiredFieldValidator validator = new RequiredFieldValidator();\n field.getValidators().add(validator);\n validator.setMessage(\"* Required\");\n }\n\n field.focusedProperty().addListener(new ChangeListener<Boolean>() {\n @Override\n public void changed(ObservableValue<? extends Boolean> observable, Boolean oldValue, Boolean newValue) {\n if (!newValue) {\n field.validate();\n\n boolean t = true;\n for (ValidatorBase vb : santa_List) {\n t = t && !vb.getHasErrors();\n// System.out.println(vb.getHasErrors());\n }\n\n if (t) {\n// System.out.println(\"Fields has no errors\");\n SendApp.setOpacity(1);\n SendApp.setDisable(false);\n } else {\n// System.out.println(\"Fields has errors\");\n SendApp.setDisable(true);\n SendApp.setOpacity(0.5);\n\n }\n }\n }\n });\n }", "@Override\n\tpublic void validate(Object arg0, Errors arg1) {\n\n\t}", "public abstract Value validateValue(Value value);", "@Override\n\tprotected void validateModelSpecificInfo() throws InvalidDataTypeException {\n\t\t// Does each unwind map entry refer to a valid action?\n\t\tProgram program = getProgram();\n\t\tint numEntries = getCount();\n\t\tfor (int unwindBlockOrdinal = 0; unwindBlockOrdinal < numEntries; unwindBlockOrdinal++) {\n\t\t\tAddress actionAddress = getActionAddress(unwindBlockOrdinal);\n\t\t\tif ((actionAddress != null) &&\n\t\t\t\t!EHDataTypeUtilities.isValidForFunction(program, actionAddress)) {\n\t\t\t\tthrow new InvalidDataTypeException(getName() + \" data type at \" + getAddress() +\n\t\t\t\t\t\" doesn't refer to a valid location for an action.\");\n\t\t\t}\n\t\t}\n\t}", "public void validate() throws org.apache.thrift.TException {\n if (limb == null) {\n throw new org.apache.thrift.protocol.TProtocolException(\"Required field 'limb' was not present! Struct: \" + toString());\n }\n if (pos == null) {\n throw new org.apache.thrift.protocol.TProtocolException(\"Required field 'pos' was not present! Struct: \" + toString());\n }\n if (ori == null) {\n throw new org.apache.thrift.protocol.TProtocolException(\"Required field 'ori' was not present! Struct: \" + toString());\n }\n if (speed == null) {\n throw new org.apache.thrift.protocol.TProtocolException(\"Required field 'speed' was not present! Struct: \" + toString());\n }\n if (angls == null) {\n throw new org.apache.thrift.protocol.TProtocolException(\"Required field 'angls' was not present! Struct: \" + toString());\n }\n if (mode == null) {\n throw new org.apache.thrift.protocol.TProtocolException(\"Required field 'mode' was not present! Struct: \" + toString());\n }\n if (kin == null) {\n throw new org.apache.thrift.protocol.TProtocolException(\"Required field 'kin' was not present! Struct: \" + toString());\n }\n // check for sub-struct validity\n if (pos != null) {\n pos.validate();\n }\n if (ori != null) {\n ori.validate();\n }\n if (speed != null) {\n speed.validate();\n }\n if (angls != null) {\n angls.validate();\n }\n }", "ValidationError getValidationError();", "private void validateCreateCustomer(CustomersInputDTO inputData, String formatDate) {\n if (inputData == null) {\n throw new CustomRestException(ConstantsCustomers.MSG_PARAMETER_VALUE_INVALID,\n CommonUtils.putError(\"inputData\", Constants.RIQUIRED_CODE));\n }\n List<Map<String, Object>> listValidate = new ArrayList<>();\n if (inputData.getCustomerName() == null || inputData.getCustomerName().isBlank()) {\n listValidate.add(CommonUtils.putError(ConstantsCustomers.PARAM_CUSTOMER_NAME, Constants.RIQUIRED_CODE));\n }\n if (inputData.getBusinessMainId() == null) {\n listValidate.add(CommonUtils.putError(ConstantsCustomers.PARAM_BUSINESS_MAIN_ID, Constants.RIQUIRED_CODE));\n }\n if (inputData.getBusinessSubId() == null) {\n listValidate.add(CommonUtils.putError(ConstantsCustomers.PARAM_BUSINESS_SUB_ID, Constants.RIQUIRED_CODE));\n }\n\n // build map parameters\n CommonValidateJsonBuilder jsonBuilder = new CommonValidateJsonBuilder();\n String validateJson = jsonBuilder.build(FieldBelongEnum.CUSTOMER.getCode(), (Map<String, Object>) null,\n buildParamsValidateCustomersInput(inputData, jsonBuilder), formatDate);\n String token = SecurityUtils.getTokenValue().orElse(null);\n String tenantName = jwtTokenUtil.getTenantIdFromToken();\n listValidate.addAll(CustomersCommonUtil.validateCommon(validateJson, restOperationUtils, token, tenantName));\n if (!listValidate.isEmpty()) {\n throw new CustomRestException(ConstantsCustomers.VALIDATE_MSG_FAILED, listValidate);\n }\n }", "private boolean checkInputFields(){\r\n\t\tString allertMsg = \"Invalid input: \" + System.getProperty(\"line.separator\");\r\n\t\t\r\n\t\t//Check input for MCS text field\r\n\t\ttry{\r\n\t\t\tFloat testValue = Float.parseFloat(m_MCSTf.getText());\r\n\t\t\tif(testValue < 0 || testValue > 1)\r\n\t\t\t\tthrow new NumberFormatException();\r\n\t\t}catch (NumberFormatException e){\r\n\t\t\tallertMsg += \"Please enter a number between 0 and 1 as a MCS score.\" + System.getProperty(\"line.separator\");\r\n\t\t}\r\n\t\t//Check input for relevance score weight and coherence score weight text fields\r\n\t\ttry{\r\n\t\t\tFloat relScoreW = Float.parseFloat(m_RelScoreTf.getText());\r\n\t\t\tFloat cohScoreW = Float.parseFloat(m_CohScoreTf.getText());\r\n\t\t\tif(relScoreW < 0 || relScoreW > 1)\r\n\t\t\t\tthrow new NumberFormatException();\r\n\t\t\tif(cohScoreW < 0 || cohScoreW > 1)\r\n\t\t\t\tthrow new NumberFormatException();\r\n\t\t\tif((relScoreW + cohScoreW) != 1)\r\n\t\t\t\tthrow new NumberFormatException();\r\n\t\t}catch (NumberFormatException e){\r\n\t\t\tallertMsg += \"Please enter a number between 0 and 1 as a weight for relevance and coherence score.\" + System.getProperty(\"line.separator\");\r\n\t\t\tallertMsg += \"Sum of the weights for relevance and coherence score must be 1.\" + System.getProperty(\"line.separator\");\r\n\t\t}\r\n\t\t//Check input for MCS text field\r\n\t\ttry{\r\n\t\t\tFloat testValue = Float.parseFloat(m_KeyTf.getText());\r\n\t\t\tif(testValue < 0)\r\n\t\t\t\tthrow new NumberFormatException();\r\n\t\t}catch (NumberFormatException e){\r\n\t\t\tallertMsg += \"Please enter a positive number as multiplier for keyword concepts.\" + System.getProperty(\"line.separator\");\r\n\t\t}\r\n\t\t//Check input for category confidence weight\r\n\t\ttry{\r\n\t\t\tFloat testValue = Float.parseFloat(m_CatConfTf.getText());\r\n\t\t\tif(testValue < 0)\r\n\t\t\t\tthrow new NumberFormatException();\r\n\t\t}catch (NumberFormatException e){\r\n\t\t\tallertMsg += \"Please enter a positive number as a weight for the weight of the category confidence of concepts.\" + System.getProperty(\"line.separator\");\r\n\t\t}\r\n\t\t//Check input for weight of repeated concepts\r\n\t\ttry{\r\n\t\t\tFloat testValue = Float.parseFloat(m_RepeatTf.getText());\r\n\t\t\tif(testValue < 0)\r\n\t\t\t\tthrow new NumberFormatException();\r\n\t\t}catch (NumberFormatException e){\r\n\t\t\tallertMsg += \"Please enter a positive number as a weight for repeated concepts.\" + System.getProperty(\"line.separator\");\r\n\t\t}\r\n\t\t//Check input for number of output categories\r\n\t\ttry{\r\n\t\t\tInteger testValue = Integer.parseInt(m_MaxCatsTf.getText());\r\n\t\t\tif(testValue < 1)\r\n\t\t\t\tthrow new NumberFormatException();\r\n\t\t}catch (NumberFormatException e){\r\n\t\t\tallertMsg += \"Please enter a positive number for the maximum number of output categories.\" + System.getProperty(\"line.separator\");\r\n\t\t}\r\n\t\ttry{\r\n\t\t\tInteger testValue = Integer.parseInt(m_MinCatsTf.getText());\r\n\t\t\tif(testValue < 1)\r\n\t\t\t\tthrow new NumberFormatException();\r\n\t\t}catch (NumberFormatException e){\r\n\t\t\tallertMsg += \"Please enter a positive number for the minimum number of output categories.\" + System.getProperty(\"line.separator\");\r\n\t\t}\r\n\t\ttry{\r\n\t\t\tFloat testValue = Float.parseFloat(m_MinCatScoreTf.getText());\r\n\t\t\tif(testValue < 0.0f || testValue > 1.0f)\r\n\t\t\t\tthrow new NumberFormatException();\r\n\t\t}catch (NumberFormatException e){\r\n\t\t\tallertMsg += \"Please enter a positive number between 0 and 1 as minimum category score.\" + System.getProperty(\"line.separator\");\r\n\t\t}\r\n\t\tif(allertMsg.length() > 18){\r\n\t\t\tAlert alert = new Alert(AlertType.ERROR);\r\n\t\t\talert.setContentText(allertMsg);\r\n\t\t\talert.showAndWait();\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\treturn true;\r\n\t}", "private void validateType(Errors errors, MultiValueConstraints con, String answer) {\n validateMultiValueType(errors, con, answer);\n if (!con.getAllowOther() && !isEnumeratedValue(con, answer)) {\n rejectField(errors, \"constraints\", \"%s is not an enumerated value for this question\", answer);\n }\n }", "private static void validate(int type, int field, int match, String value) {\n if ((type != Type.SONG) && (field == Field.PLAY_COUNT || field == Field.SKIP_COUNT)) {\n throw new IllegalArgumentException(type + \" type does not have field \" + field);\n }\n // Only Songs have years\n if (type != Type.SONG && field == Field.YEAR) {\n throw new IllegalArgumentException(type + \" type does not have field \" + field);\n }\n // Only Songs have dates added\n if (type != Type.SONG && field == Field.DATE_ADDED) {\n throw new IllegalArgumentException(type + \" type does not have field \" + field);\n }\n\n if (field == Field.ID) {\n // IDs can only be compared by equals or !equals\n if (match == Match.CONTAINS || match == Match.NOT_CONTAINS\n || match == Match.LESS_THAN || match == Match.GREATER_THAN) {\n throw new IllegalArgumentException(\"ID cannot be compared by method \" + match);\n }\n // Make sure the value is actually a number\n try {\n //noinspection ResultOfMethodCallIgnored\n Long.parseLong(value);\n } catch (NumberFormatException e) {\n Crashlytics.logException(e);\n throw new IllegalArgumentException(\"ID cannot be compared to value \" + value);\n }\n } else if (field == Field.NAME) {\n // Names can't be compared by < or >... that doesn't even make sense...\n if (match == Match.GREATER_THAN || match == Match.LESS_THAN) {\n throw new IllegalArgumentException(\"Name cannot be compared by method \"\n + match);\n }\n } else if (field == Field.SKIP_COUNT || field == Field.PLAY_COUNT\n || field == Field.YEAR || field == Field.DATE_ADDED) {\n // Numeric values can't be compared by contains or !contains\n if (match == Match.CONTAINS || match == Match.NOT_CONTAINS) {\n throw new IllegalArgumentException(field + \" cannot be compared by method \"\n + match);\n }\n // Make sure the value is actually a number\n try {\n //noinspection ResultOfMethodCallIgnored\n Long.parseLong(value);\n } catch (NumberFormatException e) {\n Crashlytics.logException(e);\n throw new IllegalArgumentException(\"ID cannot be compared to value \" + value);\n }\n }\n }", "public boolean validateForm() {\r\n\t\tint validNum;\r\n\t\tdouble validDouble;\r\n\t\tString lengthVal = lengthInput.getText();\r\n\t\tString widthVal = widthInput.getText();\r\n\t\tString minDurationVal = minDurationInput.getText();\r\n\t\tString maxDurationVal = maxDurationInput.getText();\r\n\t\tString evPercentVal = evPercentInput.getText();\r\n\t\tString disabilityPercentVal = disabilityPercentInput.getText();\r\n\t\t\r\n\t\t/**\r\n\t\t * Step.1 - Ensure all inputs are numbers\r\n\t\t */\r\n\t\t\r\n\t\t// Try to parse length as int\r\n\t\ttry {\r\n\t\t\tvalidNum = Integer.parseInt(lengthVal);\r\n\t } catch (NumberFormatException e) {\r\n\t \tsetErrorMessage(\"Length must be an integer\");\r\n\t return false;\r\n\t }\r\n\t\t\r\n\t\t// Try to parse width as int\r\n\t\ttry {\r\n\t\t\tvalidNum = Integer.parseInt(widthVal);\r\n\t } catch (NumberFormatException e) {\r\n\t \tsetErrorMessage(\"Width must be an integer\");\r\n\t return false;\r\n\t }\r\n\t\t\r\n\t\t// Try to parse width as int\r\n\t\ttry {\r\n\t\t\tvalidNum = Integer.parseInt(minDurationVal);\r\n\t } catch (NumberFormatException e) {\r\n\t \tsetErrorMessage(\"Min Duration must be an integer\");\r\n\t return false;\r\n\t }\r\n\t\t\r\n\t\t// Try to parse width as int\r\n\t\ttry {\r\n\t\t\tvalidNum = Integer.parseInt(maxDurationVal);\r\n\t } catch (NumberFormatException e) {\r\n\t \tsetErrorMessage(\"Max Duration must be an integer\");\r\n\t return false;\r\n\t }\r\n\t\t\r\n\t\t// Try to parse width as int\r\n\t\ttry {\r\n\t\t\tvalidDouble = Double.parseDouble(evPercentVal);\r\n\t } catch (NumberFormatException e) {\r\n\t \tsetErrorMessage(\"EV % must be a number\");\r\n\t return false;\r\n\t }\r\n\t\t\r\n\t\t// Try to parse width as int\r\n\t\ttry {\r\n\t\t\tvalidDouble = Double.parseDouble(disabilityPercentVal);\r\n\t } catch (NumberFormatException e) {\r\n\t \tsetErrorMessage(\"Disability % must be a number\");\r\n\t return false;\r\n\t }\r\n\t\t\r\n\t\t/**\r\n\t\t * Step.2 - Ensure all needed inputs are non-zero\r\n\t\t */\r\n\t\t\r\n\t\tvalidNum = Integer.parseInt(lengthVal);\r\n\t\tif (validNum <= 0) {\r\n\t\t\tsetErrorMessage(\"Length must be greater than 0\");\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\t\r\n\t\tvalidNum = Integer.parseInt(widthVal);\r\n\t\tif (validNum <= 0) {\r\n\t\t\tsetErrorMessage(\"Width must be greater than 0\");\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\t\r\n\t\tvalidNum = Integer.parseInt(minDurationVal);\r\n\t\tif (validNum < 10) {\r\n\t\t\tsetErrorMessage(\"Min Duration must be at least 10\");\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\t\r\n\t\tvalidNum = Integer.parseInt(maxDurationVal);\r\n\t\tif (validNum < 10) {\r\n\t\t\tsetErrorMessage(\"Max Duration must be at least 10\");\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\t\r\n\t\tvalidDouble = Double.parseDouble(evPercentVal);\r\n\t\tif (validDouble < 0) {\r\n\t\t\tsetErrorMessage(\"EV % can't be less than 0\");\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\t\r\n\t\tvalidDouble = Double.parseDouble(disabilityPercentVal);\r\n\t\tif (validDouble < 0) {\r\n\t\t\tsetErrorMessage(\"Disability % can't be less than 0\");\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\t\r\n\t\t/**\r\n\t\t * Step.3 - Ensure Max Duration can't be smaller than Min Duration\r\n\t\t */\r\n\t\t\r\n\t\tif (Integer.parseInt(minDurationVal) > Integer.parseInt(maxDurationVal)) {\r\n\t\t\tsetErrorMessage(\"Max Duration can't be less than Min Duration\");\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\t\r\n\t\t/**\r\n\t\t * Step.4 - Ensure values aren't too large for the system to handle\r\n\t\t */\r\n\t\t\r\n\t\tif (Integer.parseInt(lengthVal) > 15) {\r\n\t\t\tsetErrorMessage(\"Carpark length can't be greater than 15 spaces\");\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\t\tif (Integer.parseInt(widthVal) > 25) {\r\n\t\t\tsetErrorMessage(\"Carpark width can't be greater than 25 spaces\");\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\tif (Integer.parseInt(minDurationVal) > 150) {\r\n\t\t\tsetErrorMessage(\"Min Duration can't be greater than 150\");\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\t\r\n\t\tif (Integer.parseInt(maxDurationVal) > 300) {\r\n\t\t\tsetErrorMessage(\"Max Duration can't be greater than 300\");\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\t\r\n\t\tif (Double.parseDouble(evPercentVal) > 100) {\r\n\t\t\tsetErrorMessage(\"EV % can't be greater than 100\");\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\t\r\n\t\tif (Double.parseDouble(disabilityPercentVal) > 100) {\r\n\t\t\tsetErrorMessage(\"Disability % can't be greater than 100\");\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\t\r\n\t\tif (Integer.parseInt(minDurationVal) > 150) {\r\n\t\t\tsetErrorMessage(\"Min Duration can't be greater than 150\");\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\t\r\n\t\treturn true;\r\n\t}", "public abstract void validate () throws ModelValidationException;", "@Override\n\tpublic void validaDatos() {\n\t\t\n\t}", "@Override\n\tpublic void validaDatos() {\n\t\t\n\t}", "@Override\n\tpublic void validaDatos() {\n\t\t\n\t}", "@Override\n\tpublic void validaDatos() {\n\t\t\n\t}" ]
[ "0.672772", "0.6723745", "0.6410755", "0.63309216", "0.61922693", "0.6131344", "0.60947853", "0.6075779", "0.6051643", "0.60417545", "0.60317916", "0.6028844", "0.60062784", "0.6002845", "0.5988008", "0.5985624", "0.598245", "0.5946471", "0.59409475", "0.59362763", "0.5924342", "0.5918105", "0.5918105", "0.588064", "0.588064", "0.588064", "0.5813437", "0.5813437", "0.5813437", "0.5812446", "0.5792008", "0.5790627", "0.5752836", "0.5752715", "0.5747164", "0.572808", "0.57151073", "0.5712892", "0.5709999", "0.57094526", "0.57081115", "0.5706759", "0.5704791", "0.5687593", "0.5683854", "0.5680594", "0.5679853", "0.56792134", "0.5678289", "0.5666303", "0.56568307", "0.5647083", "0.5641324", "0.56271994", "0.5614667", "0.5604159", "0.56040025", "0.5600191", "0.55950606", "0.5581438", "0.5569256", "0.556408", "0.5550286", "0.5548616", "0.55458546", "0.55378836", "0.5515329", "0.5512368", "0.55099523", "0.5504387", "0.55011696", "0.55008", "0.54929733", "0.5488259", "0.5479039", "0.5474114", "0.5462332", "0.5462004", "0.5456655", "0.545602", "0.545381", "0.5446012", "0.54433787", "0.5442382", "0.5435717", "0.54291236", "0.5421073", "0.54198366", "0.54160047", "0.54146177", "0.5411373", "0.54096305", "0.5403684", "0.5403601", "0.54025286", "0.53948575", "0.5387106", "0.5387106", "0.5387106", "0.5387106" ]
0.5471988
76
Builds the action method name. It is the method class name + method name split by CamelCase words For example: getDescription > MethodClassName get Description; getSMSCount > MethodClassName get S M S Count
public static String buildActionMethodName( Method actionMethod ) { String methodName = actionMethod.getName(); StringBuilder actionMethodName = new StringBuilder(); int charIndex; for (charIndex = 0; charIndex < methodName.length(); charIndex++) { char ch = methodName.charAt(charIndex); if (Character.isUpperCase(ch)) { actionMethodName.append(' '); } actionMethodName.append(ch); } return actionMethod.getDeclaringClass().getSimpleName() + " " + actionMethodName.toString().trim(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "java.lang.String getMethodName();", "java.lang.String getMethodName();", "java.lang.String getMethodName();", "java.lang.String getMethodName();", "String getMethodName();", "String getMethodName();", "public java.lang.String getActionClassName() {\n java.lang.Object ref = actionClassName_;\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 actionClassName_ = s;\n }\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "@Override\n protected String getMethodName() {\n return suitename() + \"-\" + super.getMethodName();\n }", "public java.lang.String getActionClassName() {\n java.lang.Object ref = actionClassName_;\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 actionClassName_ = s;\n }\n return s;\n }\n }", "private String parseMethod() {\n\t\tString[] splitted = command.split(\":\", 2);\n\t\tif (splitted.length == 1) {\n\t\t\treturn splitted[0];\n\t\t} else {\n\t\t\treturn splitted[1] + splitted[0].substring(0, 1).toUpperCase() + splitted[0].substring(1);\n\t\t}\n\t}", "@Override\n\t\tpublic String buildBasicMethod() {\n\t\t\treturn buildMethod();\n\t\t}", "public String getActionName() {\n\t\treturn this.function;\n\t}", "public com.google.protobuf.ByteString\n getActionClassNameBytes() {\n java.lang.Object ref = actionClassName_;\n if (ref instanceof String) {\n com.google.protobuf.ByteString b =\n com.google.protobuf.ByteString.copyFromUtf8(\n (java.lang.String) ref);\n actionClassName_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "public com.google.protobuf.ByteString\n getActionClassNameBytes() {\n java.lang.Object ref = actionClassName_;\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 actionClassName_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "private String getName() {\n return method.getName();\n }", "public String getMethodName() {\r\n return _methodName;\r\n }", "public String methodBase() {\n\t\tString tmp = name;\n\t\ttmp = tmp.replaceFirst(\"^get\", \"\");\n\t\ttmp = tmp.replaceFirst(\"^is\", \"\");\n\t\treturn tmp.substring(0,1).toLowerCase()+tmp.substring(1);\n\t}", "public String getMethodName(String name) {\n return methodResources.getString(name);\n }", "public String getMethodName() {\n return LOG_TAG + \":\" + this.getClass().getSimpleName() + \".\" + new Throwable().getStackTrace()[1].getMethodName();\n }", "private static String formatRouteName(Class<?> cls, String actionPath, int index) {\n\t\tString name = actionPath.replaceAll(\"/\", \"\\\\.\").replaceAll(\"\\\\{\", \"\").replaceAll(\"\\\\}\", \"\");\n\t\tif (\".\".equals(name)) {\n\t\t\tname = \".root\";\n\t\t}\n\t\tname = cls.getSimpleName() + name + \".\" + index;\n\t\treturn name.toLowerCase(Locale.US);\n\t}", "public static String getActionName(Action action) {\n\t\tString tempName = action.getName();\n\t\tint length = tempName.length();\n\t\tint nameLength = length;\n\t\tif (tempName.contains(StateEnum.INACTIVE.toString())) {\n\t\t\tnameLength = length - StateEnum.INACTIVE.toString().length() - 4;\n\t\t} else if (tempName.contains(StateEnum.ENABLE.toString())) {\n\t\t\tnameLength = length - StateEnum.ENABLE.toString().length() - 4;\n\t\t} else if (tempName.contains(StateEnum.RUNNING.toString())) {\n\t\t\tnameLength = length - StateEnum.RUNNING.toString().length() - 4;\n\t\t} else if (tempName.contains(StateEnum.COMPLETED.toString())) {\n\t\t\tnameLength = length - StateEnum.COMPLETED.toString().length() - 4;\n\t\t}\n\t\treturn tempName.substring(0, nameLength);\n\t}", "public String constant() {\n\t\tString tmp = methodBase().replaceAll(\"([a-z])([A-Z])\",\"$1_$2\");\n\t\treturn tmp.toUpperCase();\n\t}", "public java.lang.String getMethodName() {\r\n\t\t\t\tjava.lang.Object ref = methodName_;\r\n\t\t\t\tif (!(ref instanceof java.lang.String)) {\r\n\t\t\t\t\tjava.lang.String s = ((com.google.protobuf.ByteString) ref)\r\n\t\t\t\t\t\t\t.toStringUtf8();\r\n\t\t\t\t\tmethodName_ = s;\r\n\t\t\t\t\treturn s;\r\n\t\t\t\t} else {\r\n\t\t\t\t\treturn (java.lang.String) ref;\r\n\t\t\t\t}\r\n\t\t\t}", "private static String getFullMethodName(Method method) {\n return method.getDeclaringClass()\n .getName() + '.' + method.getName() + \"()\";\n }", "public String actionName(){\n\treturn \"ShowControllerBaseStationsList.do\";\n\t}", "public java.lang.String getMethodName() {\r\n\t\t\tjava.lang.Object ref = methodName_;\r\n\t\t\tif (ref instanceof java.lang.String) {\r\n\t\t\t\treturn (java.lang.String) ref;\r\n\t\t\t} else {\r\n\t\t\t\tcom.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;\r\n\t\t\t\tjava.lang.String s = bs.toStringUtf8();\r\n\t\t\t\tif (bs.isValidUtf8()) {\r\n\t\t\t\t\tmethodName_ = s;\r\n\t\t\t\t}\r\n\t\t\t\treturn s;\r\n\t\t\t}\r\n\t\t}", "public java.lang.String getMethodName() {\n java.lang.Object ref = methodName_;\n if (!(ref instanceof java.lang.String)) {\n java.lang.String s = ((com.google.protobuf.ByteString) ref)\n .toStringUtf8();\n methodName_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "public java.lang.String getMethodName() {\n java.lang.Object ref = methodName_;\n if (!(ref instanceof java.lang.String)) {\n java.lang.String s = ((com.google.protobuf.ByteString) ref)\n .toStringUtf8();\n methodName_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "public String getMethodName() {\n\t\treturn this.methodName;\n\t}", "public String getMethodName() {\n\t\treturn this.methodName;\n\t}", "private String getGetMethodName() {\n assert name != null;\n if (field != null && (field.getType() == Boolean.class\n || \"boolean\".equals(field.getType().getName()))) {\n return \"is\" + upperFirstChar(name);\n }\n return \"get\" + upperFirstChar(name);\n }", "public String getActionInfo() {\n\n String\taction\t= getAction();\n\n if (ACTION_AppsProcess.equals(action)) {\n return \"Process:AD_Process_ID=\" + getAD_Process_ID();\n } else if (ACTION_DocumentAction.equals(action)) {\n return \"DocumentAction=\" + getDocAction();\n } else if (ACTION_AppsReport.equals(action)) {\n return \"Report:AD_Process_ID=\" + getAD_Process_ID();\n } else if (ACTION_AppsTask.equals(action)) {\n return \"Task:AD_Task_ID=\" + getAD_Task_ID();\n } else if (ACTION_SetVariable.equals(action)) {\n return \"SetVariable:AD_Column_ID=\" + getAD_Column_ID();\n } else if (ACTION_SubWorkflow.equals(action)) {\n return \"Workflow:MPC_Order_Workflow_ID=\" + getMPC_Order_Workflow_ID();\n } else if (ACTION_UserChoice.equals(action)) {\n return \"UserChoice:AD_Column_ID=\" + getAD_Column_ID();\n } else if (ACTION_UserWorkbench.equals(action)) {\n return \"Workbench:?\";\n } else if (ACTION_UserForm.equals(action)) {\n return \"Form:AD_Form_ID=\" + getAD_Form_ID();\n } else if (ACTION_UserWindow.equals(action)) {\n return \"Window:AD_Window_ID=\" + getAD_Window_ID();\n }\n\n /*\n * else if (ACTION_WaitSleep.equals(action))\n * return \"Sleep:WaitTime=\" + getWaitTime();\n */\n return \"??\";\n\n }", "public String getName() {\n return nameRule.getMethodName();\n }", "String getClassName() {\n final StringBuilder builder = new StringBuilder();\n final String shortName = getShortName();\n boolean upperCaseNextChar = true;\n for (final char c : shortName.toCharArray()) {\n if (c == '_' || c == '-') {\n upperCaseNextChar = true;\n continue;\n }\n\n if (upperCaseNextChar) {\n builder.append(Character.toUpperCase(c));\n upperCaseNextChar = false;\n } else {\n builder.append(c);\n }\n }\n builder.append(\"Messages\");\n return builder.toString();\n }", "String getActionName(Closure action);", "public String toString()\n {\n // import Component.Application.Console.Coherence;\n \n return \"RefAction{Method=\" + getMethod().getName() + \", Target=\" + getTarget() +\n \", Args=\" + Coherence.toString(getArguments()) + '}';\n }", "public java.lang.String getMethodName() {\n java.lang.Object ref = methodName_;\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 methodName_ = s;\n }\n return s;\n }\n }", "public java.lang.String getMethodName() {\n java.lang.Object ref = methodName_;\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 methodName_ = s;\n }\n return s;\n }\n }", "public static String genMethodName(String name, String prefix, String suffix) {\n StringBuilder b = new StringBuilder();\n if (prefix != null)\n b.append(prefix);\n\n int l = name.length();\n int start = 0;\n while (true) {\n int index = name.indexOf('_', start);\n int end = index == -1 ? l : index;\n if (end > start) {\n if (b.length() > 0)\n b.append(Character.toUpperCase(name.charAt(start++)));\n if (end > start)\n b.append(name, start, end);\n }\n if (index == -1)\n break;\n else\n start = index + 1;\n }\n\n if (suffix != null)\n b.append(suffix);\n return b.toString();\n }", "com.google.protobuf.ByteString getMethodNameBytes();", "com.google.protobuf.ByteString getMethodNameBytes();", "protected static String _beanMethodName(String prefix, String fieldName)\n {\n StringBuffer sb = new StringBuffer(prefix);\n sb.append(fieldName.substring(0,1).toUpperCase());\n sb.append(fieldName.substring(1));\n return sb.toString();\n }", "public static String getName(String methodName) {\n\t\tString[] splitMethodName = methodName.split(\"(?<=.)(?=\\\\p{Lu})\");\n\t\tString strMethodName = Arrays.toString(splitMethodName);\n\t\tstrMethodName = strMethodName.substring(1, strMethodName.length() - 1);\n\t\tString covertMethodName = strMethodName.replace(\",\", \"\").replace(\"verify \", \"\");\n\t\treturn covertMethodName;\n\t}", "public String toString() {\n\t\treturn methodName;\n\t}", "@Nullable\n @Override\n public String getName() {\n return /*this.requestMethod + \" \" +*/ this.url;\n }", "String getMethod();", "String getMethod();", "public String toActionId() {\n\t\tfinal StringBuilder b = new StringBuilder();\n\t\tb.append(getActionName());\n\t\tfor (final String type : this.signature) {\n\t\t\tb.append(\"_\"); //$NON-NLS-1$\n\t\t\tfor (final char c : type.replaceAll(\"(\\\\[\\\\])|\\\\*\", \"Array\").toCharArray()) { //$NON-NLS-1$//$NON-NLS-2$\n\t\t\t\tif (Character.isJavaIdentifierPart(c)) {\n\t\t\t\t\tb.append(c);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn b.toString();\n\t}", "com.google.protobuf.ByteString\n getMethodNameBytes();", "com.google.protobuf.ByteString\n getMethodNameBytes();", "public String getMethodName() {\n return methodName;\n }", "public String getMethodName() {\n return methodName;\n }", "public String getAction() {\n Object ref = action_;\n if (!(ref instanceof String)) {\n com.google.protobuf.ByteString bs =\n (com.google.protobuf.ByteString) ref;\n String s = bs.toStringUtf8();\n action_ = s;\n return s;\n } else {\n return (String) ref;\n }\n }", "@Pure\n private static @Nonnull String createMethodCallWithMethodName(@Nonnull MethodInformation method, @Nonnull String methodName) {\n return methodName + FiniteIterable.of(method.getElement().getParameters()).map(parameter -> parameter.getSimpleName().toString()).join(Brackets.ROUND);\n }", "private String propertyToMethodName(final String property, final String modifier) {\n \n String charToUpper = property.substring(0,1);\n String methodName = property.replaceFirst(charToUpper, charToUpper.toUpperCase());\n methodName = modifier + methodName;\n return methodName;\n }", "public String getName() {\n return I18nUtil.getBundle().getString(\"CTL_I18nAction\");\n }", "public String getMethodName(Class<?> type, String methodName, Class<?>... params);", "public Builder setActionClassName(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n bitField0_ |= 0x00000001;\n actionClassName_ = value;\n onChanged();\n return this;\n }", "@Override\n\tpublic String getApiMethodName() {\n\t\treturn null;\n\t}", "String getActionName();", "@Override\n\tpublic String getAction() {\n\t\treturn action;\n\t}", "@Override\n public String getMethodName() {\n return null;\n }", "public abstract String getIntentActionString();", "private String convertAction(String action) {\n\t\treturn action.toLowerCase();\n\t}", "public com.google.protobuf.ByteString getMethodNameBytes() {\r\n\t\t\t\tjava.lang.Object ref = methodName_;\r\n\t\t\t\tif (ref instanceof String) {\r\n\t\t\t\t\tcom.google.protobuf.ByteString b = com.google.protobuf.ByteString\r\n\t\t\t\t\t\t\t.copyFromUtf8((java.lang.String) ref);\r\n\t\t\t\t\tmethodName_ = b;\r\n\t\t\t\t\treturn b;\r\n\t\t\t\t} else {\r\n\t\t\t\t\treturn (com.google.protobuf.ByteString) ref;\r\n\t\t\t\t}\r\n\t\t\t}", "public com.google.protobuf.ByteString\n getMethodNameBytes() {\n java.lang.Object ref = methodName_;\n if (ref instanceof String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (java.lang.String) ref);\n methodName_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "public com.google.protobuf.ByteString\n getMethodNameBytes() {\n java.lang.Object ref = methodName_;\n if (ref instanceof String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (java.lang.String) ref);\n methodName_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "public com.google.protobuf.ByteString getMethodNameBytes() {\r\n\t\t\tjava.lang.Object ref = methodName_;\r\n\t\t\tif (ref instanceof java.lang.String) {\r\n\t\t\t\tcom.google.protobuf.ByteString b = com.google.protobuf.ByteString\r\n\t\t\t\t\t\t.copyFromUtf8((java.lang.String) ref);\r\n\t\t\t\tmethodName_ = b;\r\n\t\t\t\treturn b;\r\n\t\t\t} else {\r\n\t\t\t\treturn (com.google.protobuf.ByteString) ref;\r\n\t\t\t}\r\n\t\t}", "public String getCurrentMethodName () {\n String currentMethod = getCurrentElement(ElementKind.METHOD);\n if (currentMethod == null) return \"\";\n else return currentMethod;\n }", "@Override\n public String getMethod() {\n return METHOD_NAME;\n }", "public String getMethod()\n {\n if (averageRating == null) {\n return \"\";\n } else {\n return averageRating.getMethod();\n }\n }", "protected abstract Action stringToAction(String stringAction);", "private String getActionName(String path) {\r\n\t\t// We're guaranteed that the path will start with a slash\r\n\t\tint slash = path.lastIndexOf('/');\r\n\t\treturn path.substring(slash + 1);\r\n\t}", "@Override\n\t@NotDbField\n\tpublic String getApiMethodName() {\n\t\treturn null;\n\t}", "public String getAction() {\n\t\treturn action.get();\n\t}", "public String getAction() {\n Object ref = action_;\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 action_ = s;\n return s;\n }\n }", "public String getFullName() {\n return getFullMethodName(method);\n }", "public String getGetMethodName() {\n return m_getMethodName;\n }", "public abstract String[] getMethodNames();", "public String getName() {\n return ACTION_DETAILS[id][NAME_DETAIL_INDEX];\n }", "public static String methodName(Description description) {\n return description.getMethodName().replaceAll(\"\\\\s?\\\\{.+\\\\}\", \"\");\n }", "Action(String desc){\n this.desc = desc;\n this.append = \"\";\n }", "@AutoEscape\n\tpublic String getActionInfo();", "private static String getActionFromMessageAttributes(MessageInfo msgInfo) {\n String action = null;\n if (msgInfo != null\n && msgInfo.getExtensionAttributes() != null) {\n String attr = getAction(msgInfo);\n if (attr != null) {\n action = attr;\n msgInfo.setProperty(ACTION, action);\n }\n }\n return action;\n }", "public String getMethodName() {\n\t\treturn methodName;\n\t}", "MethodName getMethod();", "public OpenAtMethodAction(String filename, String method)\n\t{\n\t\tsuper();\n\t\tsetFilename(filename);\n\t\tsetMethodName(method);\n\t}", "public Builder setMethodName(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n bitField0_ |= 0x00000004;\n methodName_ = value;\n onChanged();\n return this;\n }", "public Builder setMethodName(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n bitField0_ |= 0x00000004;\n methodName_ = value;\n onChanged();\n return this;\n }", "private String name() {\r\n return cls.getSimpleName() + '.' + mth;\r\n }", "public Builder setMethodName(java.lang.String value) {\r\n\t\t\t\tif (value == null) {\r\n\t\t\t\t\tthrow new NullPointerException();\r\n\t\t\t\t}\r\n\t\t\t\tbitField0_ |= 0x00000001;\r\n\t\t\t\tmethodName_ = value;\r\n\t\t\t\tonChanged();\r\n\t\t\t\treturn this;\r\n\t\t\t}", "public static String getCurrentMethodName(){\n\t\tString s2 = Thread.currentThread().getStackTrace()[2].getMethodName();\n// System.out.println(\"s0=\"+s0+\" s1=\"+s1+\" s2=\"+s2);\n\t\t//s0=getStackTrace s1=getCurrentMethodName s2=run\n\t\treturn s2;\n\t}", "public StrColumn getMethod() {\n return delegate.getColumn(\"method\", DelegatingStrColumn::new);\n }", "public String getName() {\n return \"GetIndividualsFullAction\";\n }", "static String invokingMethod(ContributionDef def)\n {\n return MESSAGES.format(\"invoking-method\", def);\n }", "private String getMethodName(String service) {\n\t\tif (GeneralConstants.DSS_AFIRMA_SIGN_REQUEST.equals(service)) {\n\t\t\treturn GeneralConstants.DSS_AFIRMA_SIGN_METHOD;\n\t\t} else if (GeneralConstants.DSS_AFIRMA_VERIFY_CERTIFICATE_REQUEST.equals(service)) {\n\t\t\treturn GeneralConstants.DSS_AFIRMA_VERIFY_METHOD;\n\t\t} else if (GeneralConstants.DSS_AFIRMA_VERIFY_REQUEST.equals(service)) {\n\t\t\treturn GeneralConstants.DSS_AFIRMA_VERIFY_METHOD;\n\t\t} else if (GeneralConstants.DSS_BATCH_VERIFY_SIGNATURE_REQUESTS.equals(service)) {\n\t\t\treturn GeneralConstants.DSS_AFIRMA_VERIFY_SIGNATURES_METHOD;\n\t\t} else if (GeneralConstants.DSS_BATCH_VERIFY_CERTIFICATE_REQUEST.equals(service)) {\n\t\t\treturn GeneralConstants.DSS_AFIRMA_VERIFY_CERTIFICATES_METHOD;\n\t\t} else if (GeneralConstants.DSS_ASYNC_REQUEST_STATUS.equals(service)) {\n\t\t\treturn GeneralConstants.DSS_ASYNC_REQUEST_STATUS_METHOD;\n\t\t} else {\n\t\t\treturn service;\n\t\t}\n\t}", "public String getMethodName() {\n\t\t\treturn methodName;\n\t\t}", "@Override\n public String toString() {\n String name = this.name().substring(0,1);\n if (this.name().length() > 1) {\n for (int i = 1; i < this.name().length(); i++) {\n String charAt = this.name().substring(i, i + 1);\n if (charAt.equals(\"_\"))\n charAt = \" \";\n name += charAt.toLowerCase();\n }\n }\n return name;\n }", "public com.google.protobuf.ByteString\n getMethodNameBytes() {\n java.lang.Object ref = methodName_;\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 methodName_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "public com.google.protobuf.ByteString\n getMethodNameBytes() {\n java.lang.Object ref = methodName_;\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 methodName_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }" ]
[ "0.6691555", "0.6691555", "0.6691555", "0.6691555", "0.64300567", "0.64300567", "0.6394566", "0.63356173", "0.62647194", "0.6245855", "0.6218421", "0.60947496", "0.6083569", "0.6041248", "0.60128117", "0.58875644", "0.5870587", "0.5829131", "0.58233553", "0.57770586", "0.576445", "0.57319194", "0.57251245", "0.57197696", "0.5686114", "0.5664623", "0.5655778", "0.5655778", "0.5647986", "0.5647986", "0.5647635", "0.5642156", "0.5622108", "0.5621608", "0.56165206", "0.56139296", "0.5597896", "0.5597896", "0.55652857", "0.5544694", "0.5544694", "0.5534017", "0.5533327", "0.55212957", "0.55085987", "0.55068064", "0.55068064", "0.550467", "0.55035037", "0.55035037", "0.5500091", "0.5500091", "0.54822373", "0.5479622", "0.54655766", "0.5456686", "0.5441987", "0.5434397", "0.5433147", "0.5431173", "0.542937", "0.54261094", "0.54152495", "0.54067844", "0.5398729", "0.53931105", "0.53931105", "0.5392344", "0.5378853", "0.5369374", "0.536509", "0.5364211", "0.53601116", "0.534417", "0.5339153", "0.53276527", "0.5321509", "0.5319062", "0.5315037", "0.53077275", "0.53052706", "0.5292761", "0.528881", "0.5284388", "0.5279702", "0.5274764", "0.52743465", "0.52707285", "0.52707285", "0.52639115", "0.52587867", "0.5251961", "0.5245138", "0.52403426", "0.5239645", "0.5237917", "0.5233759", "0.523199", "0.5222986", "0.5222986" ]
0.7859273
0
Inflate the layout for this fragment
@Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState){ view = inflater.inflate(R.layout.fragment_edit_profile, container, false); return view; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_main_allinfo, container, false);\n }", "@Override\r\n\tpublic View onCreateView(LayoutInflater inflater, ViewGroup container,\r\n\t\t\tBundle savedInstanceState) {\n\t\treturn inflater.inflate(R.layout.wallpager_layout, null);\r\n\t}", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_invit_friends, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View inflate = inflater.inflate(R.layout.fragment_zhuye, container, false);\n initView(inflate);\n initData();\n return inflate;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup parent, Bundle savedInstanceState) {\n // Defines the xml file for the fragment\n return inflater.inflate(R.layout.fragment_posts, parent, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n return inflater.inflate(R.layout.ilustration_fragment, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View v = inflater.inflate(R.layout.fragment_sow_drug_cost_per_week, container, false);\n\n db = new DataBaseAdapter(getActivity());\n hc = new HelperClass();\n pop = new FeedSowsFragment();\n\n infltr = (LayoutInflater) getActivity().getSystemService(Context.LAYOUT_INFLATER_SERVICE);\n parent = (LinearLayout) v.findViewById(R.id.layout_for_add);\n tvTotalCost = (TextView) v.findViewById(R.id.totalCost);\n\n getData();\n setData();\n\n return v;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_stream_list, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View v = inflater.inflate(R.layout.fragment_event, container, false);\n\n\n\n\n\n\n\n\n return v;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_feed, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.screen_select_list_student, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View rootView = inflater.inflate(R.layout.fragment_overall, container, false);\n mNamesLayout = (LinearLayout) rootView.findViewById(R.id.fragment_overall_names_layout);\n mOverallView = (OverallView) rootView.findViewById(R.id.fragment_overall_view);\n return rootView;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState)\n {\n\n\n view = inflater.inflate(R.layout.fragment_earning_fragmant, container, false);\n ini(view);\n return view;\n }", "@Nullable\n @Override\n public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {\n super.onCreateView(inflater, container, savedInstanceState);\n final View rootview = inflater.inflate(R.layout.activity_email_frag, container, false);\n ConfigInnerElements(rootview);\n return rootview;\n }", "@Override\r\n\tpublic View onCreateView(LayoutInflater inflater, ViewGroup container,\r\n\t\t\tBundle savedInstanceState) {\n\t\trootView = inflater.inflate(R.layout.fragment_attack_armor, container, false);\r\n\r\n\t\tfindInterfaceElements();\r\n\t\taddRangeSelector();\r\n\t\tupdateHeadings();\r\n\t\tsetListeners();\r\n\r\n\t\tsetFromData();\r\n\r\n\t\treturn rootView;\r\n\t}", "@SuppressLint(\"InflateParams\")\r\n\t@Override\r\n\tpublic View initLayout(LayoutInflater inflater) {\n\t\tView view = inflater.inflate(R.layout.frag_customer_all, null);\r\n\t\treturn view;\r\n\t}", "@Override\r\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\r\n Bundle savedInstanceState) {\n view = inflater.inflate(R.layout.fragment_fore_cast, container, false);\r\n initView();\r\n mainLayout.setVisibility(View.GONE);\r\n apiInterface = RestClinet.getClient().create(ApiInterface.class);\r\n loadData();\r\n return view;\r\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_friend, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n rootView = inflater.inflate(R.layout.fragment_detail, container, false);\n image = rootView.findViewById(R.id.fr_image);\n name = rootView.findViewById(R.id.fr_name);\n phoneNumber = rootView.findViewById(R.id.fr_phone_number);\n email = rootView.findViewById(R.id.fr_email);\n street = rootView.findViewById(R.id.fr_street);\n city = rootView.findViewById(R.id.fr_city);\n state = rootView.findViewById(R.id.fr_state);\n zipcode = rootView.findViewById(R.id.fr_zipcode);\n dBrith = rootView.findViewById(R.id.date_brith);\n return rootView;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_pm25, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_kkbox_playlist, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View rootView = inflater.inflate(R.layout.fragment_feed_pager, container, false);\n\n// loadData();\n\n findViews(rootView);\n\n setViews();\n\n return rootView;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n layout = (FrameLayout) inflater.inflate(R.layout.fragment_actualites, container, false);\n\n relLayout = (RelativeLayout) layout.findViewById(R.id.relLayoutActus);\n\n initListView();\n getXMLData();\n\n return layout;\n }", "@Nullable\n @Override\n public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {\n rootView = inflater.inflate(R.layout.frag_post_prayer_video, container, false);\n setCustomDesign();\n setCustomClickListeners();\n return rootView;\n }", "@Override\n\tpublic View onCreateView(LayoutInflater inflater, ViewGroup container,\n\t\t\tBundle savedInstanceState) {\n\t\treturn inflater.inflate(R.layout.lf_em4305_fragment, container, false);\n\t}", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_recordings, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view=inflater.inflate(R.layout.fragment_category, container, false);\n initView(view);\n bindRefreshListener();\n loadParams();\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_cm_box_details, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n view=inflater.inflate(R.layout.fragment_layout12, container, false);\n\n iniv();\n\n init();\n\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n view = inflater.inflate(R.layout.fragment_details, container, false);\n //return inflater.inflate(R.layout.fragment_details, container, false);\n getIntentValues();\n initViews();\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_mem_body_blood, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_qiugouxiaoxi, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View inflate = inflater.inflate(R.layout.fragment_coll_blank, container, false);\n initView(inflate);\n initData();\n return inflate;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_attendance_divide, container, false);\n\n initView(view);\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup parent, Bundle savedInstanceState) {\n // Defines the xml file for the fragment\n return inflater.inflate(R.layout.show_program_fragment, parent, false);\n }", "@Override\n public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container,\n @Nullable Bundle savedInstanceState) {\n return inflater.inflate(R.layout.visualization_fragment, container, false);\n\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n rootView = inflater.inflate(R.layout.fragment_category_details_page, container, false);\n initializeAll();\n\n return rootView;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n final View v = inflater.inflate(R.layout.fragemnt_reserve, container, false);\n\n\n\n\n return v;\n }", "protected int getLayoutResId() {\n return R.layout.activity_fragment;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_all_quizs, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n role = getArguments().getInt(\"role\");\n rootview = inflater.inflate(R.layout.fragment_application, container, false);\n layout = rootview.findViewById(R.id.patentDetails);\n progressBar = rootview.findViewById(R.id.progressBar);\n try {\n run();\n } catch (IOException e) {\n e.printStackTrace();\n }\n return rootview;\n }", "@Override\n\tpublic View onCreateView(LayoutInflater inflater, ViewGroup container,\n\t\t\tBundle savedInstanceState) {\n\t\tview = inflater.inflate(R.layout.fragment_zhu, null);\n\t\tinitView();\n\t\tinitData();\n\t\treturn view;\n\t}", "@Override\n\t\tpublic View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState)\n\t\t{\n\t\t\tView rootView = inflater.inflate(R.layout.maimfragment, container, false);\n\t\t\treturn rootView;\n\t\t}", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n // Inflate the layout for this fragment\n return inflater.inflate(R.layout.fragment__record__week, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_porishongkhan, container, false);\n\n\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_dashboard, container, false);\n resultsRv = view.findViewById(R.id.db_results_rv);\n resultText = view.findViewById(R.id.db_search_empty);\n progressBar = view.findViewById(R.id.db_progressbar);\n lastVisitText = view.findViewById(R.id.db_last_visit);\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(getLayoutId(), container, false);\n init(view);\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n view = inflater.inflate(R.layout.fragment_feedback, container, false);\n self = getActivity();\n initUI(view);\n initControlUI();\n initData();\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View v = inflater.inflate(R.layout.fragment_service_summery, container, false);\n tvVoiceMS = v.findViewById(R.id.tvVoiceValue);\n tvDataMS = v.findViewById(R.id.tvdataValue);\n tvSMSMS = v.findViewById(R.id.tvSMSValue);\n tvVoiceFL = v.findViewById(R.id.tvVoiceFLValue);\n tvDataBS = v.findViewById(R.id.tvDataBRValue);\n tvTotal = v.findViewById(R.id.tvTotalAccountvalue);\n return v;\n }", "@Override\r\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\r\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_clan_rank_details, container, false);\r\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_star_wars_list, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View inflate = inflater.inflate(R.layout.fragment_lei, container, false);\n\n initView(inflate);\n initData();\n return inflate;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_quotation, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_wode_ragment, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup parent, Bundle savedInstanceState) {\n\n\n\n\n\n return inflater.inflate(R.layout.fragment_appoint_list, parent, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n if (rootView == null) {\n rootView = inflater.inflate(R.layout.fragment_ip_info, container, false);\n initView();\n }\n return rootView;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_offer, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_rooms, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n\n View view = inflater.inflate(R.layout.fragment_img_eva, container, false);\n\n getSendData();\n\n initView(view);\n\n initData();\n\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_project_collection, container, false);\n ButterKnife.bind(this, view);\n fragment = this;\n initView();\n getCollectionType();\n // getCategoryList();\n initBroadcastReceiver();\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n view = inflater.inflate(R.layout.fragment_yzm, container, false);\n initView(view);\n return view;\n }", "@Override\r\n\tpublic View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n\t\tmainLayout = inflater.inflate(R.layout.fragment_play, container, false);\r\n\t\treturn mainLayout;\r\n\t}", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n view = inflater.inflate(R.layout.fragment_invite_request, container, false);\n initialiseVariables();\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n getLocationPermission();\n return inflater.inflate(R.layout.centrum_fragment, container, false);\n\n\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View rootView = inflater.inflate(R.layout.fragment_habit_type_details, container, false);\n\n habitTitle = rootView.findViewById(R.id.textViewTitle);\n habitReason = rootView.findViewById(R.id.textViewReason);\n habitStartDate = rootView.findViewById(R.id.textViewStartDate);\n habitWeeklyPlan = rootView.findViewById(R.id.textViewWeeklyPlan);\n\n return rootView;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View v = inflater.inflate(R.layout.fragment_information_friends4, container, false);\n\n if (getArguments() != null) {\n FriendsID = getArguments().getString(\"keyFriends\");\n }\n\n return v;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_post_details, container, false);\n\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_hotel, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n view=inflater.inflate(R.layout.fragment_bus_inquiry, container, false);\n initView();\n initData();\n initDialog();\n getDataFromNet();\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_weather, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_srgl, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n view = inflater.inflate(R.layout.fragment_ground_detail_frgment, container, false);\n init();\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_book_appointment, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n view = inflater.inflate(R.layout.fragment_wheretogo, container, false);\n ids();\n setup();\n click();\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n binding = DataBindingUtil\n .inflate(inflater, R.layout.fragment_learning_leaders, container, false);\n init();\n\n return rootView;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_end_game_tab, container, false);\n\n setupWidgets();\n setupTextFields(view);\n setupSpinners(view);\n\n // Inflate the layout for this fragment\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.memoir_fragment, container, false);\n\n getUserIdFromSharedPref();\n configureUI(view);\n configureSortSpinner();\n configureFilterSpinner();\n\n networkConnection = new NetworkConnection();\n new GetAllMemoirTask().execute();\n\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_jadwal, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n view = inflater.inflate(R.layout.fragment_delivery_detail, container, false);\n initialise();\n\n\n\n return view;\n }", "@Nullable\n @Override\n public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_4, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_all_product, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_group_details, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment06_7, container, false);\n initView(view);\n setLegend();\n setXAxis();\n setYAxis();\n setData();\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_downloadables, container, false);\n }", "@Override\n public View onCreateView(@NonNull LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.movie_list_fragment, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_like, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_hall, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_unit_main, container, false);\n TextView mTxvBusinessAassistant = (TextView) view.findViewById(R.id.txv_business_assistant);\n TextView mTxvCardINformation = (TextView) view.findViewById(R.id.txv_card_information);\n RelativeLayout mRelOfficialWebsite = (RelativeLayout) view.findViewById(R.id.rel_official_website);\n RelativeLayout mRelPictureAblum = (RelativeLayout) view.findViewById(R.id.rel_picture_album);\n TextView mTxvQrCodeCard = (TextView) view.findViewById(R.id.txv_qr_code_card);\n TextView mTxvShareCard = (TextView) view.findViewById(R.id.txv_share_card);\n mTxvBusinessAassistant.setOnClickListener(this.mOnClickListener);\n mTxvCardINformation.setOnClickListener(this.mOnClickListener);\n mRelOfficialWebsite.setOnClickListener(this.mOnClickListener);\n mRelPictureAblum.setOnClickListener(this.mOnClickListener);\n mTxvQrCodeCard.setOnClickListener(this.mOnClickListener);\n mTxvShareCard.setOnClickListener(this.mOnClickListener);\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_moviespage, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_s, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_overview, container, false);\n\n initOverviewComponents(view);\n registerListeners();\n initTagListener();\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_bahan_ajar, container, false);\n initView(view);\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n root = (ViewGroup) inflater.inflate(R.layout.money_main, container, false);\n context = getActivity();\n initHeaderView(root);\n initView(root);\n\n getDate();\n initEvetn();\n return root;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup parent, Bundle savedInstanceState) {\n // Defines the xml file for the fragment\n return inflater.inflate(R.layout.fragment_historical_event, parent, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_event_details, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_video, container, false);\n unbinder = ButterKnife.bind(this, view);\n initView();\n initData();\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n\n v= inflater.inflate(R.layout.fragment_post_contacts, container, false);\n this.mapping(v);\n return v;\n }", "@Nullable\n @Override\n public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_measures, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_feed, container, false);\n findViews(view);\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_surah_list, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_data_binded, container, false);\n }" ]
[ "0.6739604", "0.67235583", "0.6721706", "0.6698254", "0.6691869", "0.6687986", "0.66869223", "0.6684548", "0.66766286", "0.6674615", "0.66654444", "0.66654384", "0.6664403", "0.66596216", "0.6653321", "0.6647136", "0.66423255", "0.66388357", "0.6637491", "0.6634193", "0.6625158", "0.66195583", "0.66164845", "0.6608733", "0.6596594", "0.65928894", "0.6585293", "0.65842897", "0.65730995", "0.6571248", "0.6569152", "0.65689117", "0.656853", "0.6566686", "0.65652984", "0.6553419", "0.65525705", "0.65432084", "0.6542382", "0.65411425", "0.6538022", "0.65366334", "0.65355957", "0.6535043", "0.65329415", "0.65311074", "0.65310687", "0.6528645", "0.65277404", "0.6525902", "0.6524516", "0.6524048", "0.65232015", "0.65224624", "0.65185034", "0.65130377", "0.6512968", "0.65122765", "0.65116245", "0.65106046", "0.65103024", "0.6509013", "0.65088093", "0.6508651", "0.6508225", "0.6504662", "0.650149", "0.65011525", "0.6500686", "0.64974767", "0.64935696", "0.6492234", "0.6490034", "0.6487609", "0.6487216", "0.64872116", "0.6486594", "0.64861935", "0.6486018", "0.6484269", "0.648366", "0.6481476", "0.6481086", "0.6480985", "0.6480396", "0.64797544", "0.647696", "0.64758915", "0.6475649", "0.6474114", "0.6474004", "0.6470706", "0.6470275", "0.64702207", "0.6470039", "0.6467449", "0.646602", "0.6462256", "0.64617974", "0.6461681", "0.6461214" ]
0.0
-1
/ access modifiers changed from: protected
public void draw(GLState pGLState, Camera pCamera) { this.mTiledSpriteVertexBufferObject.draw(4, this.mCurrentTileIndex * 6, 6); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n protected void prot() {\n }", "private stendhal() {\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void anular() {\n\n\t}", "private Rekenhulp()\n\t{\n\t}", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "private abstract void privateabstract();", "@Override\n public void function()\n {\n }", "@Override\n public void function()\n {\n }", "@Override\n\tprotected void interr() {\n\t}", "@Override\r\n\tpublic void dormir() {\n\t\t\r\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 ligar() {\n\t\t\n\t}", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "public void smell() {\n\t\t\n\t}", "public abstract Object mo26777y();", "protected void h() {}", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "@Override\n public void func_104112_b() {\n \n }", "protected abstract Set method_1559();", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "public abstract void mo70713b();", "@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}", "protected Doodler() {\n\t}", "public abstract void mo27386d();", "@Override\n\tprotected void getExras() {\n\n\t}", "private PropertyAccess() {\n\t\tsuper();\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 gravarBd() {\n\t\t\n\t}", "public abstract void mo56925d();", "@Override\n\tprotected void getData() {\n\t\t\n\t}", "@Override\n\tpublic void einkaufen() {\n\t}", "@Override\n protected void init() {\n }", "@Override\n protected void getExras() {\n }", "@Override\n\tpublic void emprestimo() {\n\n\t}", "public abstract void mo27385c();", "@Override\r\n\t\t\tpublic void buscar() {\n\r\n\t\t\t}", "@Override\n public void memoria() {\n \n }", "@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}", "@Override\r\n\tprotected void func03() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void smthAbstr() {\n\t\t\r\n\t}", "@Override\r\n\t\t\tpublic void func02() {\n\t\t\t\t\r\n\t\t\t}", "@Override\n\tpublic void dosomething() {\n\t\t\n\t}", "protected boolean func_70814_o() { return true; }", "private void someUtilityMethod() {\n }", "private void someUtilityMethod() {\n }", "public abstract void mo30696a();", "abstract int pregnancy();", "@Override\n\t\t\t\tpublic void a() {\n\n\t\t\t\t}", "@Override\n\tpublic void debite() {\n\t\t\n\t}", "@Override\n public void init() {\n\n }", "@Override\n void init() {\n }", "private TMCourse() {\n\t}", "@Override\n\tpublic void leti() \n\t{\n\t}", "public abstract void mo35054b();", "@Override\n public void init() {\n }", "@Override\n\tpublic void buscar() {\n\t\t\n\t}", "private Infer() {\n\n }", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "@Override\n\tpublic void erstellen() {\n\t\t\n\t}", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "public final void mo51373a() {\n }", "protected void method_3848() {\r\n super.method_3848();\r\n }", "protected FanisamBato(){\n\t}", "public abstract Object mo1771a();", "public abstract void m15813a();", "public void gored() {\n\t\t\n\t}", "@Override\n public void get() {}", "@Override\n\tpublic void dibuja() {\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 }", "private Get() {}", "private Get() {}", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "public abstract void mo27464a();", "public abstract String mo41079d();", "@Override\n\tpublic void classroom() {\n\t\t\n\t}", "public void designBasement() {\n\t\t\r\n\t}", "@Override\n\tpublic void verkaufen() {\n\t}", "@Override\n\tprotected void logic() {\n\n\t}", "@Override\n public void inizializza() {\n\n super.inizializza();\n }", "public abstract void mo102899a();", "@SuppressWarnings(\"unused\")\n private void _read() {\n }", "public abstract void mo42329d();", "@Override\r\n\t\t\tpublic void test() {\n\t\t\t}", "@Override\r\n \tpublic void process() {\n \t\t\r\n \t}", "public void method_4270() {}", "public abstract void mo6549b();", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "@Override\n\tpublic void function() {\n\t\t\n\t}", "public abstract String mo118046b();" ]
[ "0.73744047", "0.7040692", "0.692117", "0.69076973", "0.6844561", "0.68277687", "0.68048066", "0.6581614", "0.653803", "0.6500888", "0.64905626", "0.64905626", "0.6471316", "0.64376974", "0.64308083", "0.64308083", "0.642771", "0.6424499", "0.6419003", "0.64083034", "0.64053965", "0.6399863", "0.6398998", "0.6397645", "0.6377549", "0.63728356", "0.63699985", "0.6366876", "0.6353238", "0.63333476", "0.63253313", "0.6324922", "0.6324922", "0.63058454", "0.62785864", "0.6270248", "0.62499714", "0.62234515", "0.6220762", "0.6211659", "0.620336", "0.61937845", "0.618126", "0.6174812", "0.6157212", "0.61370605", "0.6121414", "0.61183035", "0.61175376", "0.6100111", "0.6091379", "0.6091379", "0.60856384", "0.6083921", "0.60691255", "0.6068961", "0.60650575", "0.6054537", "0.60455734", "0.6045201", "0.6033711", "0.60293764", "0.6024115", "0.6017829", "0.60143995", "0.60133785", "0.60101455", "0.5994944", "0.59942245", "0.599371", "0.59915304", "0.59905994", "0.59837806", "0.5983637", "0.59662336", "0.59648055", "0.59648055", "0.59648055", "0.59648055", "0.59648055", "0.59648055", "0.596418", "0.596418", "0.59599984", "0.5955761", "0.5953097", "0.5947849", "0.5944442", "0.59390324", "0.5931905", "0.59317887", "0.59311014", "0.5930125", "0.5928699", "0.5925024", "0.59242857", "0.5923635", "0.59224457", "0.5920236", "0.5919085", "0.5918472" ]
0.0
-1
/ access modifiers changed from: protected
public void onUpdateColor() { getVertexBufferObject().onUpdateColor(this); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n protected void prot() {\n }", "private stendhal() {\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void anular() {\n\n\t}", "private Rekenhulp()\n\t{\n\t}", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "private abstract void privateabstract();", "@Override\n public void function()\n {\n }", "@Override\n public void function()\n {\n }", "@Override\n\tprotected void interr() {\n\t}", "@Override\r\n\tpublic void dormir() {\n\t\t\r\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 ligar() {\n\t\t\n\t}", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "public void smell() {\n\t\t\n\t}", "public abstract Object mo26777y();", "protected void h() {}", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "@Override\n public void func_104112_b() {\n \n }", "protected abstract Set method_1559();", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "public abstract void mo70713b();", "@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}", "protected Doodler() {\n\t}", "public abstract void mo27386d();", "@Override\n\tprotected void getExras() {\n\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}", "private PropertyAccess() {\n\t\tsuper();\n\t}", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "public abstract void mo56925d();", "@Override\n\tprotected void getData() {\n\t\t\n\t}", "@Override\n\tpublic void einkaufen() {\n\t}", "@Override\n protected void init() {\n }", "@Override\n protected void getExras() {\n }", "@Override\n\tpublic void emprestimo() {\n\n\t}", "public abstract void mo27385c();", "@Override\r\n\t\t\tpublic void buscar() {\n\r\n\t\t\t}", "@Override\n public void memoria() {\n \n }", "@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}", "@Override\r\n\tprotected void func03() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void smthAbstr() {\n\t\t\r\n\t}", "@Override\r\n\t\t\tpublic void func02() {\n\t\t\t\t\r\n\t\t\t}", "@Override\n\tpublic void dosomething() {\n\t\t\n\t}", "protected boolean func_70814_o() { return true; }", "private void someUtilityMethod() {\n }", "private void someUtilityMethod() {\n }", "public abstract void mo30696a();", "abstract int pregnancy();", "@Override\n\tpublic void debite() {\n\t\t\n\t}", "@Override\n\t\t\t\tpublic void a() {\n\n\t\t\t\t}", "@Override\n public void init() {\n\n }", "@Override\n void init() {\n }", "@Override\n\tpublic void leti() \n\t{\n\t}", "private TMCourse() {\n\t}", "public abstract void mo35054b();", "@Override\n public void init() {\n }", "@Override\n\tpublic void buscar() {\n\t\t\n\t}", "private Infer() {\n\n }", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "@Override\n\tpublic void erstellen() {\n\t\t\n\t}", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "public final void mo51373a() {\n }", "protected void method_3848() {\r\n super.method_3848();\r\n }", "protected FanisamBato(){\n\t}", "public abstract Object mo1771a();", "public abstract void m15813a();", "public void gored() {\n\t\t\n\t}", "@Override\n public void get() {}", "@Override\n\tpublic void dibuja() {\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 }", "private Get() {}", "private Get() {}", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "public abstract void mo27464a();", "public abstract String mo41079d();", "@Override\n\tpublic void classroom() {\n\t\t\n\t}", "public void designBasement() {\n\t\t\r\n\t}", "@Override\n\tpublic void verkaufen() {\n\t}", "@Override\n public void inizializza() {\n\n super.inizializza();\n }", "@Override\n\tprotected void logic() {\n\n\t}", "public abstract void mo102899a();", "@SuppressWarnings(\"unused\")\n private void _read() {\n }", "public abstract void mo42329d();", "@Override\r\n\t\t\tpublic void test() {\n\t\t\t}", "@Override\r\n \tpublic void process() {\n \t\t\r\n \t}", "public void method_4270() {}", "public abstract void mo6549b();", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "@Override\n\tpublic void function() {\n\t\t\n\t}", "protected void init() {\n // to override and use this method\n }" ]
[ "0.7375736", "0.7042321", "0.6922649", "0.6909494", "0.68470824", "0.6830288", "0.68062353", "0.6583185", "0.6539446", "0.65011257", "0.64917654", "0.64917654", "0.64733833", "0.6438831", "0.64330196", "0.64330196", "0.64295477", "0.6426414", "0.6420484", "0.64083177", "0.6406691", "0.6402136", "0.6400287", "0.63977665", "0.63784796", "0.6373787", "0.63716805", "0.63680965", "0.6353791", "0.63344383", "0.6327005", "0.6327005", "0.63259363", "0.63079315", "0.6279023", "0.6271251", "0.62518364", "0.62254924", "0.62218183", "0.6213994", "0.6204108", "0.6195944", "0.61826825", "0.617686", "0.6158371", "0.6138765", "0.61224854", "0.6119267", "0.6119013", "0.61006695", "0.60922325", "0.60922325", "0.6086324", "0.6083917", "0.607071", "0.6070383", "0.6067458", "0.60568124", "0.6047576", "0.6047091", "0.60342956", "0.6031699", "0.6026248", "0.6019563", "0.60169774", "0.6014913", "0.6011912", "0.59969044", "0.59951806", "0.5994921", "0.599172", "0.59913194", "0.5985337", "0.59844744", "0.59678656", "0.5966894", "0.5966894", "0.5966894", "0.5966894", "0.5966894", "0.5966894", "0.59647757", "0.59647757", "0.59616375", "0.5956373", "0.5952514", "0.59497356", "0.59454703", "0.5941018", "0.5934147", "0.5933801", "0.59318185", "0.5931161", "0.5929297", "0.5926942", "0.5925829", "0.5924853", "0.5923296", "0.5922199", "0.59202504", "0.5918595" ]
0.0
-1
/ access modifiers changed from: protected
public void onUpdateVertices() { getVertexBufferObject().onUpdateVertices(this); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n protected void prot() {\n }", "private stendhal() {\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void anular() {\n\n\t}", "private Rekenhulp()\n\t{\n\t}", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "private abstract void privateabstract();", "@Override\n public void function()\n {\n }", "@Override\n public void function()\n {\n }", "@Override\n\tprotected void interr() {\n\t}", "@Override\r\n\tpublic void dormir() {\n\t\t\r\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 ligar() {\n\t\t\n\t}", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "public void smell() {\n\t\t\n\t}", "public abstract Object mo26777y();", "protected void h() {}", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "@Override\n public void func_104112_b() {\n \n }", "protected abstract Set method_1559();", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "public abstract void mo70713b();", "@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}", "protected Doodler() {\n\t}", "public abstract void mo27386d();", "@Override\n\tprotected void getExras() {\n\n\t}", "private PropertyAccess() {\n\t\tsuper();\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 gravarBd() {\n\t\t\n\t}", "public abstract void mo56925d();", "@Override\n\tprotected void getData() {\n\t\t\n\t}", "@Override\n\tpublic void einkaufen() {\n\t}", "@Override\n protected void init() {\n }", "@Override\n protected void getExras() {\n }", "@Override\n\tpublic void emprestimo() {\n\n\t}", "public abstract void mo27385c();", "@Override\r\n\t\t\tpublic void buscar() {\n\r\n\t\t\t}", "@Override\n public void memoria() {\n \n }", "@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}", "@Override\r\n\tprotected void func03() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void smthAbstr() {\n\t\t\r\n\t}", "@Override\n\tpublic void dosomething() {\n\t\t\n\t}", "@Override\r\n\t\t\tpublic void func02() {\n\t\t\t\t\r\n\t\t\t}", "protected boolean func_70814_o() { return true; }", "private void someUtilityMethod() {\n }", "private void someUtilityMethod() {\n }", "public abstract void mo30696a();", "abstract int pregnancy();", "@Override\n\tpublic void debite() {\n\t\t\n\t}", "@Override\n\t\t\t\tpublic void a() {\n\n\t\t\t\t}", "@Override\n public void init() {\n\n }", "@Override\n void init() {\n }", "private TMCourse() {\n\t}", "@Override\n\tpublic void leti() \n\t{\n\t}", "public abstract void mo35054b();", "@Override\n public void init() {\n }", "@Override\n\tpublic void buscar() {\n\t\t\n\t}", "private Infer() {\n\n }", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "@Override\n\tpublic void erstellen() {\n\t\t\n\t}", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "public final void mo51373a() {\n }", "protected FanisamBato(){\n\t}", "protected void method_3848() {\r\n super.method_3848();\r\n }", "public abstract Object mo1771a();", "public abstract void m15813a();", "public void gored() {\n\t\t\n\t}", "@Override\n public void get() {}", "@Override\n\tpublic void dibuja() {\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 }", "private Get() {}", "private Get() {}", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "public abstract void mo27464a();", "public abstract String mo41079d();", "@Override\n\tpublic void classroom() {\n\t\t\n\t}", "public void designBasement() {\n\t\t\r\n\t}", "@Override\n\tpublic void verkaufen() {\n\t}", "@Override\n public void inizializza() {\n\n super.inizializza();\n }", "@Override\n\tprotected void logic() {\n\n\t}", "public abstract void mo102899a();", "@SuppressWarnings(\"unused\")\n private void _read() {\n }", "public abstract void mo42329d();", "@Override\r\n\t\t\tpublic void test() {\n\t\t\t}", "@Override\r\n \tpublic void process() {\n \t\t\r\n \t}", "public void method_4270() {}", "public abstract void mo6549b();", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "@Override\n\tpublic void function() {\n\t\t\n\t}", "public abstract String mo118046b();" ]
[ "0.7375753", "0.70422196", "0.69218373", "0.6907941", "0.6845266", "0.68283623", "0.6805162", "0.6583373", "0.653852", "0.6502129", "0.64900213", "0.64900213", "0.6471215", "0.64374804", "0.6431033", "0.6431033", "0.6428289", "0.642479", "0.6418873", "0.6408808", "0.64064246", "0.640091", "0.6398117", "0.6396769", "0.6377154", "0.6372881", "0.6369695", "0.6368137", "0.63534576", "0.6333043", "0.6326126", "0.6325513", "0.6325513", "0.63066554", "0.62787277", "0.6269985", "0.625052", "0.6224119", "0.62204254", "0.62121165", "0.62034416", "0.61941797", "0.6181475", "0.6174925", "0.61564684", "0.6138104", "0.6121731", "0.6117384", "0.6117199", "0.6099986", "0.6091472", "0.6091472", "0.6085913", "0.6083331", "0.60692644", "0.60691506", "0.6066105", "0.6055429", "0.6047306", "0.60462093", "0.603377", "0.6030286", "0.6024605", "0.6019224", "0.6015516", "0.601394", "0.6010502", "0.5995337", "0.5994722", "0.59936255", "0.5991915", "0.599084", "0.5983936", "0.59831923", "0.5966883", "0.596561", "0.596561", "0.596561", "0.596561", "0.596561", "0.596561", "0.59647095", "0.59647095", "0.5960105", "0.5956097", "0.59525925", "0.59490395", "0.5944818", "0.5939594", "0.5932698", "0.5931743", "0.59312844", "0.5930128", "0.59287107", "0.59255075", "0.5923454", "0.59233445", "0.59223646", "0.5920706", "0.59187156", "0.59181005" ]
0.0
-1
/ access modifiers changed from: protected
public void onUpdateTextureCoordinates() { getVertexBufferObject().onUpdateTextureCoordinates(this); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n protected void prot() {\n }", "private stendhal() {\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void anular() {\n\n\t}", "private Rekenhulp()\n\t{\n\t}", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "private abstract void privateabstract();", "@Override\n public void function()\n {\n }", "@Override\n public void function()\n {\n }", "@Override\n\tprotected void interr() {\n\t}", "@Override\r\n\tpublic void dormir() {\n\t\t\r\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 ligar() {\n\t\t\n\t}", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "public void smell() {\n\t\t\n\t}", "public abstract Object mo26777y();", "protected void h() {}", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "@Override\n public void func_104112_b() {\n \n }", "protected abstract Set method_1559();", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "public abstract void mo70713b();", "@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}", "protected Doodler() {\n\t}", "public abstract void mo27386d();", "@Override\n\tprotected void getExras() {\n\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}", "private PropertyAccess() {\n\t\tsuper();\n\t}", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "public abstract void mo56925d();", "@Override\n\tprotected void getData() {\n\t\t\n\t}", "@Override\n\tpublic void einkaufen() {\n\t}", "@Override\n protected void init() {\n }", "@Override\n protected void getExras() {\n }", "@Override\n\tpublic void emprestimo() {\n\n\t}", "public abstract void mo27385c();", "@Override\r\n\t\t\tpublic void buscar() {\n\r\n\t\t\t}", "@Override\n public void memoria() {\n \n }", "@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}", "@Override\r\n\tprotected void func03() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void smthAbstr() {\n\t\t\r\n\t}", "@Override\r\n\t\t\tpublic void func02() {\n\t\t\t\t\r\n\t\t\t}", "@Override\n\tpublic void dosomething() {\n\t\t\n\t}", "protected boolean func_70814_o() { return true; }", "private void someUtilityMethod() {\n }", "private void someUtilityMethod() {\n }", "public abstract void mo30696a();", "abstract int pregnancy();", "@Override\n\tpublic void debite() {\n\t\t\n\t}", "@Override\n\t\t\t\tpublic void a() {\n\n\t\t\t\t}", "@Override\n public void init() {\n\n }", "@Override\n void init() {\n }", "@Override\n\tpublic void leti() \n\t{\n\t}", "private TMCourse() {\n\t}", "public abstract void mo35054b();", "@Override\n public void init() {\n }", "@Override\n\tpublic void buscar() {\n\t\t\n\t}", "private Infer() {\n\n }", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "@Override\n\tpublic void erstellen() {\n\t\t\n\t}", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "public final void mo51373a() {\n }", "protected void method_3848() {\r\n super.method_3848();\r\n }", "protected FanisamBato(){\n\t}", "public abstract Object mo1771a();", "public abstract void m15813a();", "public void gored() {\n\t\t\n\t}", "@Override\n public void get() {}", "@Override\n\tpublic void dibuja() {\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 }", "private Get() {}", "private Get() {}", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "public abstract void mo27464a();", "public abstract String mo41079d();", "@Override\n\tpublic void classroom() {\n\t\t\n\t}", "public void designBasement() {\n\t\t\r\n\t}", "@Override\n\tpublic void verkaufen() {\n\t}", "@Override\n public void inizializza() {\n\n super.inizializza();\n }", "@Override\n\tprotected void logic() {\n\n\t}", "public abstract void mo102899a();", "@SuppressWarnings(\"unused\")\n private void _read() {\n }", "public abstract void mo42329d();", "@Override\r\n\t\t\tpublic void test() {\n\t\t\t}", "@Override\r\n \tpublic void process() {\n \t\t\r\n \t}", "public void method_4270() {}", "public abstract void mo6549b();", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "@Override\n\tpublic void function() {\n\t\t\n\t}", "protected void init() {\n // to override and use this method\n }" ]
[ "0.7375736", "0.7042321", "0.6922649", "0.6909494", "0.68470824", "0.6830288", "0.68062353", "0.6583185", "0.6539446", "0.65011257", "0.64917654", "0.64917654", "0.64733833", "0.6438831", "0.64330196", "0.64330196", "0.64295477", "0.6426414", "0.6420484", "0.64083177", "0.6406691", "0.6402136", "0.6400287", "0.63977665", "0.63784796", "0.6373787", "0.63716805", "0.63680965", "0.6353791", "0.63344383", "0.6327005", "0.6327005", "0.63259363", "0.63079315", "0.6279023", "0.6271251", "0.62518364", "0.62254924", "0.62218183", "0.6213994", "0.6204108", "0.6195944", "0.61826825", "0.617686", "0.6158371", "0.6138765", "0.61224854", "0.6119267", "0.6119013", "0.61006695", "0.60922325", "0.60922325", "0.6086324", "0.6083917", "0.607071", "0.6070383", "0.6067458", "0.60568124", "0.6047576", "0.6047091", "0.60342956", "0.6031699", "0.6026248", "0.6019563", "0.60169774", "0.6014913", "0.6011912", "0.59969044", "0.59951806", "0.5994921", "0.599172", "0.59913194", "0.5985337", "0.59844744", "0.59678656", "0.5966894", "0.5966894", "0.5966894", "0.5966894", "0.5966894", "0.5966894", "0.59647757", "0.59647757", "0.59616375", "0.5956373", "0.5952514", "0.59497356", "0.59454703", "0.5941018", "0.5934147", "0.5933801", "0.59318185", "0.5931161", "0.5929297", "0.5926942", "0.5925829", "0.5924853", "0.5923296", "0.5922199", "0.59202504", "0.5918595" ]
0.0
-1
Dismissing progress dialog calling method to parse json array
@Override public void onResponse(JSONArray response) { parseData(response); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\t\t\tprotected void onPostExecute(JSONObject result) {\n\t\t\t\tsuper.onPostExecute(result);\n\t\t\t\t\n\t\t\t\tmProgressDialog.dismiss();\n\t\t\t\t\n\t\t\t}", "@Override\n\t\t\tprotected void onPostExecute(JSONObject result) {\n\t\t\t\tsuper.onPostExecute(result);\n\t\t\t\tmProgressDialog.dismiss();\n\t\t\t}", "@Override\n public void onResponse(JSONObject jsonObject) {\n\n\n parseStoreDetails(jsonObject);\n\n mProgressBar.setVisibility(View.GONE);\n\n startActivity(mIntent);\n finish();\n\n }", "protected void onPostExecute() {\n // dismiss the dialog after getting all products\n\n }", "protected void onPostExecute(String args) {\n // dismiss the dialog after getting all products\n pDialog.dismiss();\n }", "@Override\n public void onResponse(JSONArray response) {\n listExams.clear();\n parseData(response);\n //Hiding the progressbar\n\n }", "@Override\n protected void onPostExecute(Void result) {\n // This is where we would process the results if needed.\n this.progressDialog.dismiss();\n }", "@Override\n protected void onPostExecute(String temp) {\n\n progressDialog.dismiss();\n }", "@Override\r\n protected void onPostExecute(Void result) {\n mProgressDialog.dismiss();\r\n }", "@Override\n\t\tprotected void onPostExecute(Object result) {\n\t\t\tsuper.onPostExecute(result);\t\t\n\t\t\tprogressDialog.dismiss();\n\t\t\tsetAllValues();\n\t\t}", "@Override\n\t\t\t\t protected void onPostExecute(Void result)\n\t\t\t\t {\n\t\t\t\t\t\t\t\t\t\tif (progressDialog != null)\n\t\t\t\t\t\t\t\t\t\t\tprogressDialog.dismiss();\n\t\t\t\t }", "@Override\n\t\t\t protected void onPostExecute(Void result)\n\t\t\t {\n\t\t\t\t\t\t\t\t\tif (progressDialog != null)\n\t\t\t\t\t\t\t\t\t\tprogressDialog.dismiss();\n\t\t\t }", "@Override\n public void onResponse(JSONObject jsonobj) {\n dialog.dismiss();\n try {\n JSONArray jArray=jsonobj.getJSONArray(\"rows\");\n JSONObject jData;\n list=new ArrayList<String>();\n listId=new ArrayList<String>();\n for (int i=0;i<jArray.length();i++){\n jData=jArray.getJSONObject(i);\n int Seq=jData.getInt(\"Seq\");\n if(Seq>0){\n list.add(jData.getString(\"LineName\"));\n listId.add(jData.getString(\"LineCode\"));\n }\n\n }\n\n if(listId.size()>0){\n initData(myDate,listId.get(index));\n initData02(listId.get(index));\n }\n\n niceSpinner.attachDataSource(list);\n\n //niceSpinner.attachDataSource(list);\n\n //loadPatrolTask(listId.get(0));\n } catch (JSONException e) {\n e.printStackTrace();\n }\n\n }", "void dismissProgressDialog();", "void dismissProgressDialog();", "void dismissProgressDialog();", "@Override\n protected void onPostExecute(String file_url) {\n dismissDialog(progress_bar_type);\n //pDialog.dismiss();\n }", "@Override\n public void onFailure(Call<ResponseBody> call, Throwable t) {\n dialog.dismiss();\n\n }", "@Override\n public void onResponse(JSONObject response) {\n String status= response.toString();\n txtJsonData.setText(status);\n pDialog.hide();\n }", "void dismissProgressLoading() {\n if (progressDialog != null) {\n progressDialog.dismiss();\n }\n }", "@Override\n \t\tprotected void onPostExecute(Void result) \n \t\t{\n\t\t\t//close the progress dialog\n\t\t\tprogressDialog.dismiss();\n\t\t\tprogressDialog = null;\n \t\t}", "protected void dismissLoading()\n {\n progressBar.dismiss();\n }", "@Override\n public void onPostLook(JSONObject response) {\n stopProgressBar();\n }", "@Override\r\n\tprotected void onPostExecute(String result)\r\n\t{\r\n\t\tprogress.dismiss();\r\n\t\tsuper.onPostExecute(result);\r\n\t}", "@Override\n\t\tprotected void onPostExecute(Void result) {\n\t\t\td.dismiss();\n\t\t}", "protected void onPostExecute(Double result){\n\n dialog.dismiss();\n super.onPostExecute(result);\n }", "@Override\n\tpublic void dataArrived() {\n\t\tnewSkillGetHandler.sendEmptyMessage(0);\n\t\tprogressDialog.dismiss();\n\t}", "@Override\n protected void onPreExecute() {\n Dialog.setMessage(\"Downloading Outlet Inventory..\");\n Dialog.setCancelable(false);\n Dialog.show();\n }", "@Override\n public void onResponse(JSONArray response) {\n loading.dismiss();\n\n json_array = response;\n\n handler.post(new Runnable() {\n @Override\n public void run() {\n\n\n //Displaying our grid\n showGrid(json_array,num);\n }\n });\n }", "@Override\n\t\t\tpublic void onSuccess(ResponseInfo<String> arg0) {\n\t\t\t\tif(progressDialog!=null)progressDialog.dismiss();\n\t\t\t}", "private void dismissDialog() {\n if (progressDialog != null) {\n progressDialog.dismiss();\n }\n }", "@Override\r\n public void run() {\n dialog.dismiss();\r\n }", "public void run() {\n progressDialog.dismiss();\n }", "public void run() {\n progressDialog.dismiss();\n }", "@Override\n protected void onPostExecute(Integer result) {\n\n dialog.dismiss();\n\n if (result == 1) {\n\n Toast.makeText(Filter_Dialog_Act.this, \"Data sent to cloud\", Toast.LENGTH_SHORT).show();\n finish();\n\n // recyclerView.setAdapter(adapter);\n } else {\n Toast.makeText(Filter_Dialog_Act.this, \"Failed to send data to cloud!\", Toast.LENGTH_SHORT).show();\n }\n }", "@Override\n\tprotected void onPostExecute(String result) {\n\t\tsuper.onPostExecute(result);\n\t\tmDialog.dismiss();\n\t}", "public void onClick(DialogInterface dialogBox, int id) {\n completebatch();\n //showMessage(\"\",response.toString());\n\n }", "@Override\n\t\t\tprotected void onPostExecute(String result) {\n\t\t\t\tsuper.onPostExecute(result);\n\t\t\t\tif (pDialog.isShowing())\n\t\t\t\t\tpDialog.dismiss();\n\t\t\t\t\n\t\t\t\tadapterGrid.notifyDataSetChanged();\n\t\t\t}", "public void dismissProgressDialog(){\n if(progressDialog != null)\n progressDialog.dismiss();\n }", "protected void onPostExecute(JSONObject jSONObject) {\n if (this.progressDialog.isShowing()) {\n this.progressDialog.dismiss();\n }\n if (jSONObject != null) {\n try {\n int n = jSONObject.getInt(\"success\");\n jSONObject.getString(\"message\");\n if (n != 1) return;\n }\n catch (JSONException jSONException) {\n jSONException.printStackTrace();\n return;\n }\n BikinFileActivity.this.tempColor = jSONObject.getString(\"color\");\n BikinFileActivity.this.tempColor = BikinFileActivity.this.tempColor.replace((CharSequence)\"#\", (CharSequence)\"\");\n BikinFileActivity.this.tempColor = BikinFileActivity.this.tempColor.toUpperCase();\n BikinFileActivity.this.warna = Integer.parseInt((String)BikinFileActivity.this.tempColor, (int)16);\n BikinFileActivity.this.selectedColor = \"#\" + Integer.toHexString((int)BikinFileActivity.this.warna);\n BikinFileActivity.this.pilihwarna.setBackgroundColor(Color.parseColor((String)BikinFileActivity.this.selectedColor));\n return;\n }\n Toast.makeText((Context)BikinFileActivity.this, (CharSequence)\"Gagal mendapatkan warna aplikasi\", (int)1).show();\n }", "public void dissMissDialog(){\r\n if (dialog != null && dialog.isShowing()\r\n && dialog.getContext() != null) {\r\n try {\r\n dialog.dismiss();\r\n\r\n if(mCallback != null){\r\n mCallback.onProgressDissmiss();\r\n }\r\n\r\n } catch (Exception e) {\r\n e.printStackTrace();\r\n }\r\n }\r\n }", "@Override\n\t\t\tprotected void onPostExecute(String result) {\n\t\t\t\tsuper.onPostExecute(result);\n\t\t\t\tif (pDialog.isShowing())\n\t\t\t\t\tpDialog.dismiss();\n\t\n\t\t\t\tadapterGrid.notifyDataSetChanged();\n\t\t\t}", "@Override\n public void onErrorResponse(VolleyError error) {\n error.printStackTrace();\n customProgressDialog.cancel();\n }", "private void progressStuff() {\n cd = new ConnectionDetector(getActivity());\n parser = new JSONParser();\n progress = new ProgressDialog(getActivity());\n progress.setMessage(getResources().getString(R.string.loading));\n progress.setIndeterminate(false);\n progress.setCancelable(true);\n // progress.show();\n }", "private void getJSON(){\n class GetJSON extends AsyncTask<Void,Void,String> {\n\n ProgressDialog loading;\n @Override\n protected void onPreExecute() {\n super.onPreExecute();\n loading = ProgressDialog.show(getActivity(),\"Fetching Data\",\"Wait...\",false,false);\n }\n\n @Override\n protected void onPostExecute(String s) {\n super.onPostExecute(s);\n loading.dismiss();\n JSON_STRING = s;\n showDashBoard();\n }\n\n @Override\n protected String doInBackground(Void... params) {\n RequestHandler rh = new RequestHandler();\n String s = rh.sendGetRequestParam(Config.URL_GET_DASHBOARD,listingId);\n return s;\n }\n }\n GetJSON gj = new GetJSON();\n gj.execute();\n }", "public void offProgressDialog(){\n if(dialogProgresIndeterminate != null && dialogProgresIndeterminate.isShowing()){\n dialogProgresIndeterminate.dismiss();\n }\n }", "@Override\n protected void onPostExecute(String result) {\n\n myTasksList.remove(this);\n if (myTasksList.size()==0){\n progressBar.setVisibility(View.INVISIBLE);\n }\n if (result==null){\n Toast.makeText(Login.this,\"Sorry Username or password doesnot match\",Toast.LENGTH_LONG).show();\n return;\n }\n\n //list of object from content\n //from json\n\n updateDisplay();\n }", "@Override\n\t\tprotected void onPostExecute(Void result) {\n\t\t\tsuper.onPostExecute(result);\n\t\t\tpDialog.dismiss();\n\t\t\tadapter = new CustomAdapter_Program(getActivity(), 0, objects);\n\t\t\tlv.setAdapter(adapter);\n\t\t}", "public void dismissDialog(){\n\t if(pd != null){\n\t\t pd_progress = pd.getProgress();\n\t\t pd.dismiss();\n\t }\n }", "protected void onPostExecute(String file_url) {\n pDialog.dismiss();\n\n // updating UI from Background Thread\n runOnUiThread(new Runnable() {\n public void run() {\n\n String temp = data.get(\"amount\").toString();\n Double tempint = Double.parseDouble(temp)/100;\n temp = tempint.toString();\n /*\n Updating parsed JSON data into ListView\n */\n if (success == 1) {\n // jsonarray found\n // Getting Array of jsonarray\n String s = temp;\n double d = Double.parseDouble(s);\n int i = (int) d;\n\n int bal = Integer.parseInt(prf.getString(TAG_USERBALANCE))+ i;\n prf.setString(TAG_USERBALANCE,Integer.toString(bal));\n\n Intent intent = new Intent(Integrationforkhalti.this, HomeActivity.class);\n intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_CLEAR_TASK);\n startActivity(intent);\n\n\n Toast.makeText(Integrationforkhalti.this,\"Payment done. Now join match\",Toast.LENGTH_LONG).show();\n\n } else {\n Toast.makeText(Integrationforkhalti.this,\"Something went wrong. Try again!\",Toast.LENGTH_LONG).show();\n\n }\n\n }\n });\n\n }", "@Override\n public void onFailure(int statusCode, Header[] headers, byte[] errorResponse, Throwable e) {\n progress.dismiss();\n }", "@Override\n\t\t\tprotected void onPostExecute(String result) {\n\t\t\t\tsuper.onPostExecute(result);\n\t\t\t\tif (pDialog.isShowing())\n\t\t\t\t\tpDialog.dismiss();\n\n\t\t\t\tadapterGrid.notifyDataSetChanged();\n\t\t\t}", "@Override\n\t\t\tprotected void onPostExecute(String result) {\n\t\t\t\tsuper.onPostExecute(result);\n\t\t\t\tif (pDialog.isShowing())\n\t\t\t\t\tpDialog.dismiss();\n\n\t\t\t\tadapterGrid.notifyDataSetChanged();\n\t\t\t}", "@Override\n\t\t\tprotected void onPostExecute(String result) {\n\t\t\t\tsuper.onPostExecute(result);\n\t\t\t\tif (pDialog.isShowing())\n\t\t\t\t\tpDialog.dismiss();\n\n\t\t\t\tadapterGrid.notifyDataSetChanged();\n\t\t\t}", "public void dismissProgress() {\n if (mProgressDialog != null) {\n mProgressDialog.dismiss();\n mProgressDialog = null;\n }\n }", "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 }", "private void dismissProgressDialog()\n {\n \tif (null != dialog && dialog.isShowing()) {\n \t\tdialog.dismiss();\n \t}\n }", "@Override\n public void onClick(DialogInterface dialog, int which) {\n task.cancel(true); //meng- cancel AsincTask\n pd.dismiss(); //menghilangkan progress dialog\n }", "@Override\n public void onFailure(Call<List<ReviewDTO>> call, Throwable t) {\n Toast.makeText(getActivity(), t.toString(), Toast.LENGTH_LONG).show();\n progressDialog.dismiss(); //dismiss progress dialog\n }", "@Override\n public void onClick(DialogInterface dialog, int which) {\n nextdata();\n }", "@Override\n protected void onPreExecute() {\n Dialog.setMessage(\"Downloading Stock Adjustment..\");\n Dialog.setCancelable(false);\n Dialog.show();\n }", "@Override\n\t\t\tpublic void done(List<ParseObject> result, ParseException e) {\n\t\t\t\tString[] data = new String[result.size()];\n\t\t\t\tfor (int i = 0; i < result.size(); i++) {\n\t\t\t\t\tdata[i] = result.get(i).getString(\"text\");\n\t\t\t\t}\n\t\t\t\tArrayAdapter<String> adapter = new ArrayAdapter<String>(\n\t\t\t\t\t\tMessageActivity.this,\n\t\t\t\t\t\tandroid.R.layout.simple_list_item_1, data);\n\t\t\t\tsetListAdapter(adapter);\n//\t\t\t\tprogress.dismiss();\n\t\t\t}", "@Override\n\n public void onResponse(JSONObject response) {\n ringProgressDialog.hide();\n ((OrderItem)getTargetFragment()).onOrderPlaced(true,orderJSON);\n }", "public void dismissProgressBar() {\n\t\tmProgressBarVisible = false;\n\t\tif (getView() != null) {\n\t\t\tLinearLayout progressLayout = (LinearLayout) getView()\n\t\t\t\t\t.findViewById(R.id.severity_list_progress_layout);\n\t\t\tif (progressLayout != null) {\n\t\t\t\tprogressLayout.setVisibility(View.GONE);\n\t\t\t}\n\t\t\tProgressBar listProgress = (ProgressBar) getView().findViewById(\n\t\t\t\t\tR.id.severity_list_progress);\n\t\t\tlistProgress.setProgress(0);\n\t\t}\n\t}", "@Override\n\t\t\tprotected void onPostExecute(String result) {\n\t\t\t\tsuper.onPostExecute(result);\n//\t\t\t\tif (pDialog.isShowing())\n//\t\t\t\t\tpDialog.dismiss();\n\n\t\t\t\tadapterGrid.notifyDataSetChanged();\n\t\t\t}", "@Override\n protected void callAfterDataBack(HemaNetTask netTask) {\n cancelProgressDialog();\n }", "@Override\n protected void onPostExecute(String result) {\n super.onPostExecute(result);\n\n spinner.setVisibility(View.VISIBLE);\n // dialog.dismiss();\n // Do things like hide the progress bar or change a TextView\n }", "@Override\n public void onButtonClick(View view) {\n successDialog.dismiss();\n }", "public void run() {\n dialog.dismiss();\n }", "public void run() {\n dialog.dismiss();\n }", "@Override\n\tprotected void onPostExecute(String result) {\n\t\tsuper.onPostExecute(result);\n\n\t\t\n\t\ttry{\n\t\t\t\n\t\t\tJSONObject Json = new JSONObject(response);\n\t\t\tprogress.dismiss();\n\t\t\tif (Json.has(\"success\")) {\n\n\t\t\t\tint value = Json.getInt(\"success\");\n\t\t\t\tif (value == 0) {\n\n\t\t\t\t\tthrow new JSONException(\"Failed to Update \");\n\t\t\t\t} else if (value == 1) {\n\t\t\t\t\talert.setTitle(R.string.refertitle)\n\t\t\t\t\t\t\t.setMessage(\n\t\t\t\t\t\t\t\t\tact.getResources().getString(R.string.refermessage)\n\t\t\t\t\t\t\t\t\t\t\t+ Json.getInt(\"count\")+\" \"\n\t\t\t\t\t\t\t\t\t\t\t+ act.getResources().getString(R.string.refermessagecontinue))\n\t\t\t\t\t\t\t.setNeutralButton(R.string.ok,\n\t\t\t\t\t\t\t\t\tnew DialogInterface.OnClickListener() {\n\n\t\t\t\t\t\t\t\t\t\t@Override\n\t\t\t\t\t\t\t\t\t\tpublic void onClick(\n\t\t\t\t\t\t\t\t\t\t\t\tDialogInterface dialog,\n\t\t\t\t\t\t\t\t\t\t\t\tint which) {\n\t\t\t\t\t\t\t\t\t\t\t// TODO Auto-generated method stub\n\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}).show();\n\t\t\t\t} else if (value == 2) {\n\n\t\t\t\t\talert.setTitle(R.string.refertitle)\n\t\t\t\t\t\t\t.setMessage(R.string.refersuccessmessage)\n\t\t\t\t\t\t\t.setNeutralButton(R.string.ok,\n\t\t\t\t\t\t\t\t\tnew DialogInterface.OnClickListener() {\n\n\t\t\t\t\t\t\t\t\t\t@Override\n\t\t\t\t\t\t\t\t\t\tpublic void onClick(\n\t\t\t\t\t\t\t\t\t\t\t\tDialogInterface dialog,\n\t\t\t\t\t\t\t\t\t\t\t\tint which) {\n\t\t\t\t\t\t\t\t\t\t\t// TODO Auto-generated method stub\n\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}).show();\n\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tthrow new JSONException(\n\t\t\t\t\t\t\"success keyword is missing in response\");\n\t\t\t}\n\t}\n\t\tcatch (JSONException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\tToast.makeText(\n\t\t\t\t\tcontext,\n\t\t\t\t\t\"Unexpected Response from Server!! Please Try after Some time\",\n\t\t\t\t\tToast.LENGTH_LONG).show();\n\t\t\te.printStackTrace();\n\t\t}\n}", "@Override\n public void onDismiss(DialogInterface dialog) {\n\n }", "@Override\n\t\tprotected void onPostExecute(Void result) {\n\t\t\tsuper.onPostExecute(result);\n\t\t\tprogressDialog.dismiss();\n\t\t\tif(flag)\n\t\t\t{\n\t\t\tToast.makeText(getApplicationContext(),arr[1], Toast.LENGTH_LONG).show();\n\t\t\tsetResult(RESULT_OK);\n\t\t\tManualShareActivity.this.finish();\n\t\t\t}else\n\t\t\t{\n\t\t\t\tToast.makeText(getApplicationContext(),err , Toast.LENGTH_LONG).show();\n\t\t\t}\n\t\t}", "public void dismissProgressDialog() {\r\n if (progressDialog.isShowing()) {\r\n progressDialog.dismiss();\r\n }\r\n }", "@Override\n public void onDismiss(DialogInterface dialog)\n {\n }", "@Override\n\t\tprotected void onPreExecute() {\n\t\t\tsuper.onPreExecute();\n\n\t\t\tpDialog = new Dialog_Progress();\n\t\t\tpDialog.show(getFragmentManager(), \"\");\n\n objects = new ArrayList<RowData_Program>();\n\t\t}", "private void dismissProgress() {\n \n \t\tnew Handler(getMainLooper()).post(new Runnable() {\n \n \t\t\t@Override\n \t\t\tpublic void run() {\n \t\t\t\tif (progressDialog == null)\n \t\t\t\t\tprogressDialog = (ProgressDialogFragment) getSupportFragmentManager()\n \t\t\t\t\t\t\t.findFragmentByTag(\n \t\t\t\t\t\t\t\t\tProgressDialogFragment.FRAGMENT_TAG);\n \n \t\t\t\tif (progressDialog != null && progressDialog.getShowsDialog()) {\n \t\t\t\t\tprogressDialog.dismiss();\n \n \t\t\t\t\tprogressDialog = null;\n \t\t\t\t}\n \t\t\t}\n \t\t});\n \t}", "@Override\n public void onDismiss(DialogInterface dialog) {\n }", "private void dismissProgressDialog() {\n if (mProgressDialog != null && mProgressDialog.isShowing()) {\n mProgressDialog.dismiss();\n }\n }", "@Override\n protected void onPreExecute() {\n\n dialog.setCancelable(true);\n dialog.setMessage(\"Fetching...\");\n\n dialog.show();\n\n }", "@Override\n\t\tpublic void onServiceComplete(Boolean success, String jsonObj) {\n\t\t\tUtil.closeProgressDialog();\n\t\t\tuserBasicDetailsParser(jsonObj);\n\t\t}", "@Override\n protected void onPostExecute(ArrayList<WorkoutDetails> result) {\n contactsOutput = result;\n this.progressDialog.dismiss();\n }", "@Override\n public void onDismiss(DialogInterface dialog) {\n\n }", "@Override\n public void onDismiss(DialogInterface dialog) {\n\n }", "@Override\n public void onCompleted(Exception e, JsonArray result) {\n Gson gson = new GsonBuilder().setDateFormat(\"yyyy-MM-dd HH:mm:ss\").create();\n Type typeOfT = new TypeToken<List<Patient>>() {}.getType();\n List<Patient> patients = gson.fromJson(result, typeOfT);\n // List<Hospitalisation>hospitalisations ;\n\n if (patients == null)\n Toast.makeText(getActivity(), \"error\" + e.getMessage(), Toast.LENGTH_SHORT).show();\n else {\n /* ConsultationFragment cons = new ConsultationFragment();\n if (cons.homme.isChecked()) {*/\n // Toast.makeText(getActivity(), patients.size()+\"/\", Toast.LENGTH_SHORT).show();\n /* int i = 0;\n while (i < patients.size()) {\n if(i>=patients.size())\n break;\n // else if (patients.get(i).getSexe()==WOMEN) {\n // if(hospitalisations.get(i).getHospType()==CONS ||hospitalisations.get(i).getHospType()==HJ ||hospitalisations.get(i).getHospType()==HAD)\n\n // patients.remove(i);\n\n i++;\n }*/\n lsthosp.setAdapter(new PatientHospAdapter(getActivity(),patients));\n\n progressDialog.dismiss();\n }\n\n }", "private void dismissProgressIndication() {\n if (mProgressDialog != null && mProgressDialog.isShowing()) {\n try{\n mProgressDialog.dismiss(); // safe even if already dismissed\n }catch(Exception e){\n Log.i(TAG, \"dismiss exception: \" + e);\t\n }\n mProgressDialog = null;\n }\n }", "@Override\r\n protected void onPostExecute(String message) {\n this.progressDialog.dismiss();\r\n Toast.makeText(getApplicationContext(),\r\n message, Toast.LENGTH_LONG).show();\r\n }", "@Override\n public void onDataFinish(Object object) {\n mExtraInfoProgressBar_II.setVisibility(View.GONE);\n updateStockAnnouncementViews((List<NewsFlashItem>) object);\n\n mbLoadedReportsView = true;\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 //obj.getString(\"message\") digunakan untuk mengambil pesan status dari response\n finish();\n\n\n //obj.getString(\"message\") digunakan untuk mengambil pesan message dari response\n Toast.makeText(AddKostActivity.this, obj.getString(\"message\"), Toast.LENGTH_SHORT).show();\n } catch (JSONException e) {\n e.printStackTrace();\n }\n }", "protected void onPostExecute(String file_url) {\n // dismiss the dialog after getting all products\n pDialog.dismiss();\n fetchallTrees();\n }", "@Override\n\t\t\tprotected void onPostExecute(String result) {\n\t\t\t\tsuper.onPostExecute(result);\n\t\t\t\tif (pDialog.isShowing())\n\t\t\t\t\tpDialog.dismiss();\n\t\n\t\t\t\tConstants.POID = \"\";\n\t\t\t\tadapterGrid.notifyDataSetChanged();\n\t\t\t}", "protected void onPreExecute() {\n\n this.dialog.setMessage(\"Refreshing data...\");\n this.dialog.show();\n }", "protected void onPreExecute() {\n\n this.dialog.setMessage(\"Refreshing data...\");\n this.dialog.show();\n }", "protected void onPreExecute() {\n\n this.dialog.setMessage(\"Refreshing data...\");\n this.dialog.show();\n }", "@Override\n protected void onPostExecute(String result) {\n super.onPostExecute(result);\n if (pd.isShowing()) {\n pd.dismiss();\n }\n }", "@Override\n\t\tprotected void onProgressUpdate(Integer... progress) {\n\t\t\tsuper.onProgressUpdate(progress);\n\n\t\t\tdialog.setProgress(progress[0]);\n\t\t}", "protected void onPostExecute(Void result) {\n if (dialog.isShowing()) {\n dialog.dismiss();\n }\n ReadWordDataBase();\n DisplayList();\n }", "@Override\n public void hideLoading() {\n if (progressDialog!=null && progressDialog.isShowing()){\n progressDialog.dismiss();\n }\n }", "@Override\n\t\tpublic void onCancel(DialogInterface dialog) {\n\t\t\n\t\t\tmProgressHUD.dismiss();\n\t\t\t\n\t\t}", "protected void onPreExecute() {\n this.dialog.setMessage(\"Refreshing data...\");\n this.dialog.show();\n }" ]
[ "0.66784036", "0.66025686", "0.64335394", "0.63809776", "0.63642037", "0.6257296", "0.6243591", "0.62402713", "0.62374765", "0.6178905", "0.6178266", "0.6143203", "0.60827297", "0.60555065", "0.60555065", "0.60555065", "0.59948844", "0.5988617", "0.5980526", "0.5961931", "0.596077", "0.5954919", "0.5910719", "0.5898733", "0.58795923", "0.58378756", "0.58163947", "0.58133256", "0.5796076", "0.5791187", "0.5749815", "0.57464826", "0.5724938", "0.5724938", "0.5690054", "0.56867814", "0.5684392", "0.56822205", "0.56770957", "0.5670145", "0.56660545", "0.56557137", "0.56520456", "0.5621627", "0.5616541", "0.561289", "0.5608818", "0.55961084", "0.5593543", "0.5587472", "0.5587046", "0.5586488", "0.5586488", "0.5586488", "0.5579357", "0.55750084", "0.55750084", "0.55660117", "0.55536926", "0.5547906", "0.5542662", "0.5541234", "0.5537568", "0.5534908", "0.55311966", "0.55288655", "0.5525931", "0.5518732", "0.55114025", "0.5510721", "0.5510721", "0.55089355", "0.5498775", "0.54972947", "0.5496566", "0.5491048", "0.5479135", "0.547007", "0.5467182", "0.5464927", "0.54639244", "0.54617715", "0.5459622", "0.5457553", "0.5457553", "0.5443188", "0.54429543", "0.5442556", "0.5442023", "0.543948", "0.5430177", "0.5429579", "0.54259884", "0.54259884", "0.54259884", "0.5423287", "0.5420767", "0.5420413", "0.5418565", "0.5416069", "0.54079413" ]
0.0
-1
Allow only directories, or files with ".txt" extension
@Override public boolean accept(File file) { return file.isDirectory() || file.getAbsolutePath().endsWith(".txt") || file.getAbsolutePath().endsWith(".avro") || file.getAbsolutePath().endsWith(".json") || file.getAbsolutePath().endsWith(".text") || file.getAbsolutePath().endsWith(".seqjson") || file.getAbsolutePath().endsWith(".seqfile"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\tpublic boolean accept(File file) {\n return file.isDirectory() || (file.isFile() && file.getName().toLowerCase().endsWith(\".txt\"));\n\t}", "@Override\r\n\tpublic boolean accept(File dir, String name) {\n\t\treturn name.toLowerCase().endsWith(\".txt\");\r\n\t}", "public boolean accept(File f) \n \t{\n if (f.isDirectory()) \t\t\t\t\t\t\t return true;\n\n String extension = getExtension(f);\n if (extension != null) \n \t{\n \tif (extension.equals(\"txt\")) return true;\n \telse\t\t\t\t\t\t\t return false;\n }\n\n return false;\n \t}", "@Override\n public boolean accept(File f) {\n return f.isDirectory() || f.getName().endsWith(\".\" + ext);\n }", "@SuppressLint(\"DefaultLocale\")\n\t\t@Override\n\t\tpublic boolean accept(File dir, String filename) {\n\t\t return filename.toLowerCase().endsWith(ext.toLowerCase());\n\t\t}", "public boolean accept(File pathname) {\n return pathname.getName().toLowerCase().endsWith(\".txt\");\n }", "public boolean accept(File file) {\n \tString FileName = file.getName().toLowerCase();\n String FileSuffix = FileName.substring(FileName.lastIndexOf(\".\")+1);\n \treturn Arrays.asList(ValidTails).contains(FileSuffix) || file.isDirectory();\n }", "@Override\n\tpublic boolean accept(File p1)\n\t{\n\t\treturn p1.isDirectory()&&!p1.getName().startsWith(\".\");\n\t}", "@Override\n\tpublic boolean accept(File dir, String filename) {\n\t\treturn filename.endsWith(\".html\");\n\t}", "public boolean accept(File directory, String filname) {\n return filname.endsWith(extension); \r\n }", "public boolean accept(File f) {\n if(f.isDirectory()){\n return true;\n }\n String extension = getExtension(f);\n if(extension.equals(\"ascii\") || extension.equals(\"txt\") || extension.equals(\"asc\")){\n return true;\n }\n return false;\n }", "private boolean isDir(String fileName) {\n return !fileName.contains(\".\");\n }", "@Override\n public boolean accept(File f) {\n return f.getName().endsWith(FILE_EXTENSION);\n }", "@Override\n\t\t\t\t\tpublic boolean accept(File f) {\n\t\t\t\t\t\tif (f.isDirectory()) {\n\t\t\t\t\t\t\treturn true;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tString filename = f.getName().toLowerCase();\n\t\t\t\t\t\t\treturn filename.endsWith(\".pr1\");\n\t\t\t\t\t\t}\n\t\t\t\t\t}", "@Override\n public boolean accept(File file) {\n return file.isDirectory() || file.getAbsolutePath().endsWith(\".xml\");\n }", "@Override\r\n public boolean accept(File dir, String name){\r\n if(name.toLowerCase().endsWith(\".jpg\")){\r\n return false;\r\n }\r\n return true;\r\n }", "public static boolean isTextFile(Path path) {\n\t\tString name = path.toString().toLowerCase();\n\t\treturn name.endsWith(\".txt\") || name.endsWith(\".text\");\n\t}", "private boolean isAcceptableFile(File f) {\n \tif( f.getName().length() < 7 ) {\n \t\treturn false;\n \t}\n \t\n \tString extension = f.getName().substring( f.getName().length()-7, f.getName().length() );\n \tif ( !extension.equals(\".tessit\") ) {\n \t\treturn false;\n \t}\n \t\n \treturn true;\n }", "@Override\n public boolean accept(File file) {\n return file.getName().toUpperCase().endsWith(extension.toUpperCase());\n }", "@Override\n\t\t\tpublic boolean accept(File f) {\n\t\t\t\tif (f.isDirectory()) {\n\t\t\t\t\treturn true;\n\t\t\t\t} else {\n\t\t\t\t\tString filename = f.getName().toLowerCase();\n\t\t\t\t\treturn filename.endsWith(\".pr1\");\n\t\t\t\t}\n\t\t\t}", "protected FileExtensionFilter()\n\t{\n\t}", "public boolean accept(File dir, String name);", "private void checkFileOrDirectory(Path pathroot) {\n if (Files.notExists(pathroot)) { // Checking path is valid path or the path is exist\n System.out.println(\"Not a valid Path \" + pathroot);\n } else if (Files.isDirectory(pathroot)) {// checking path contains file if contain file display message\n System.out.println(\"It is Directory\");\n } else {\n System.out.println(\"This is File\"); // printing the path is directory\n }\n }", "@Override\r\n\tpublic boolean isFile(String path) {\n\t\treturn false;\r\n\t}", "@Override\n public boolean isDir() { return true; }", "@Override\n public boolean accept(File f) //SELECTING/ACCEPTING THE PARTICULAR FILES\n {\n if(f.isDirectory()) //ACCEPTS ALL DIRECTORY(E.G. C DRIVE)\n return true;\n\n String extension=f.getName().substring(f.getName().lastIndexOf(\".\")+1);//GETTING THE EXTENSION OF IMAGE NAME\n String allowed[]={\"jpg\",\"png\",\"gif\",\"jpeg\",\"bmp\"};\n for(String a:allowed)//FOR EACH LOOP\n {\n if(a.equals(extension))//IF EXTENSION MATCHES,,RETURN TRUE\n {\n return true;\n }\n else\n {\n return false;\n }\n }\n return false;//IF ANYTHING ELSE RETURN FALSE\n }", "@Override\n public boolean accept(File file) {\n if (file.isDirectory()) {\n return true;\n }\n return false;\n }", "private static boolean isPackageDir(WebFile aFile)\n {\n if (!aFile.isDir())\n return false;\n if (aFile.getName().indexOf('.') > 0)\n return false;\n String path = aFile.getPath();\n if (isIgnorePath(path))\n return false;\n return true;\n }", "public boolean isFile() { return false; }", "@Override\r\n\tpublic boolean accept(File f) {\r\n\t\tif (f.isDirectory()) {\r\n\t\t\treturn true;\r\n\t\t}\r\n\r\n\t\tString extension = FileUtils.getExtension(f);\r\n\t\tif (extension == null) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\tif (extension.equals(TIFF) || extension.equals(TIF)\r\n\t\t\t\t|| extension.equals(GIF) || extension.equals(JPEG)\r\n\t\t\t\t|| extension.equals(JPG) || extension.equals(PNG)) {\r\n\t\t\treturn true;\r\n\t\t} else {\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}", "public boolean accept( File directory , String name )\n\t{\n\t\t\t\t\t\t\t\t//\tFirst check if file name\n\t\t\t\t\t\t\t\t//\tis a directory. Always accept it\n\t\t\t\t\t\t\t\t//\tif so.\n\n\t\tFile possibleDirectory\t= new File( directory , name );\n\n\t\tif\t(\t( possibleDirectory != null ) &&\n\t\t\t\t( possibleDirectory.isDirectory() ) ) return true;\n\n\t\t\t\t\t\t\t\t//\tNo a directory. Accept the file only\n\t\t\t\t\t\t\t\t//\tif its extension is on the list of\n\t\t\t\t\t\t\t\t//\textensions allowed by this filter.\n\n\t\tfor ( int i = 0 ; i < extensions.length ; i++ )\n\t\t{\n\t\t\tif ( name.endsWith( extensions[ i ] ) ) return true;\n\t\t}\n\n\t\treturn false;\n\t}", "public boolean isDir() { return false; }", "private boolean checkFile(String name) {\n return name.endsWith(extension);\n }", "@Override\n public boolean acceptFile(final FileStatus fileStatus) {\n return fileStatus.isDir() || this.fileFilter.accept(fileStatus);\n }", "@Override\r\n\tpublic boolean accept(File dir, String name) {\n\t\treturn(name.endsWith(\".mp3\"));\r\n\t}", "@Override\r\n public boolean accept(File file)\r\n {\n return FileUtil.getFileExtension(file.getPath(), true).toLowerCase().equals(EXT);\r\n }", "public WildcardFilenameFilter( String wildcard ) {\n\t\tpattern = Pattern.compile( wildcardAsRegex( wildcard ) );\n\t\tsetAcceptDirectories( true );\n\t}", "@Override\n\t\t\tpublic boolean accept(File file) {\n\t\t\t\tif (file.isDirectory()) {\n\t\t\t\t\treturn true;\n\t\t\t\t} else {\n\t\t\t\t\treturn file.getName().endsWith(\".dat\");\n\t\t\t\t}\n\t\t\t}", "boolean safeIsFile(FsPath path);", "public static boolean isTextFile(Path path) {\n\t\tif((path.toString().toLowerCase().endsWith(\".txt\")) ||path.toString().toLowerCase().endsWith(\".text\")) {\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}", "protected abstract String getFileExtension();", "public boolean isFile(String path);", "public boolean isFile() { return true; }", "boolean hasExtensionText();", "public boolean accept(File f)\r\n {\r\n // Accepter le fichier si c'est un repertoire\r\n if (f.isDirectory())\r\n return true;\r\n\r\n String extension = FileUtil.getExtension(f);\r\n if ((extensionFilters == null) || (extensionFilters.isEmpty()))\r\n {\r\n if (extension == null)\r\n return true;\r\n else\r\n return false;\r\n }\r\n\r\n if (extension == null)\r\n return false;\r\n else\r\n return extensionFilters.contains(extension);\r\n }", "public boolean accept(File f) {\r\n\t if (f.isDirectory()) {\r\n\t return true;\r\n\t }\r\n\t \r\n\t String extension = Utils.getExtension(f);\r\n\t if (extension != null) {\r\n\t if (extension.equals(Utils.tiff) ||\r\n\t extension.equals(Utils.tif) ||\r\n\t extension.equals(Utils.gif) ||\r\n\t extension.equals(Utils.jpeg) ||\r\n\t extension.equals(Utils.jpg)||\r\n\t extension.equals(Utils.png)) {\r\n\t return true;\r\n\t } else {\r\n\t return false;\r\n\t }\r\n\t }\r\n\t \r\n\t return false;\r\n\t }", "public boolean accept(File file) {\n\t\t\treturn file.isDirectory() || (file.isFile() && file.getName().endsWith(FILE_EXTENTION_JAVA));\n\t\t}", "public boolean accept(File f) {\n\t if(f != null) {\n\t if(f.isDirectory()) {\n\t\t return true;\n\t }\n\t String extension = getExtension(f);\n\t if(extension != null && filters.get(getExtension(f)) != null) {\n\t\t return true;\n\t }\n\t }\n\t return false;\n }", "@Override\r\n\tpublic boolean isDir(String path) {\n\t\treturn false;\r\n\t}", "@Test\n void getDirContentWithoutFile() {\n webTestClient\n .get()\n .uri(\"/dir\")\n .accept(MediaType.ALL)\n .exchange()\n .expectStatus().isOk()\n .expectBody(String.class)\n .value(content -> assertTrue(content.contains(\"Dir content.\")));\n }", "@Override\n\tpublic boolean accept(Path arg0) {\n\t\t\n\t\ttry {\n\t\t\t\n\t\t\tFileSystem fs = FileSystem.get(Conf);\n\t\t\tFileStatus stat = fs.getFileStatus(arg0);\n\t\t\tString filename=arg0.getName();\n\t\t\t\n\t\t\tif (stat.isDir())\n\t\t\t{\n\t\t\t\treturn true;\n\t\t\t}\n\n\n\t\t\tif (filename.equals(\"data\"))\n\t\t\t{\n\t\t\t\tif (stat.getLen()==0)\n\t\t\t\t{\n\t\t\t\t\tSystem.out.println(\"Ignoring file:\"+ arg0.getName());\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\t\n\t\t} catch (Exception e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t\treturn false;\n\t\t}\n\t}", "@Test\n public void testMatcherForGlobExpressionFalse() {\n\n PathMatcher result = FileUtil.matcherForGlobExpression(\"/temp\");\n Assertions.assertThat(FileUtil.matches(FOLDER, result)).isFalse();\n }", "@Override\n public boolean isDirectory(File directory) {\n\treturn false;\n }", "public void setUseFiles(boolean yesno);", "public boolean accept(File dir, String name) {\n/* 120 */ return this.pattern.matcher(name).matches();\n/* */ }", "public boolean accept(File f) {\r\n boolean accepted = false;\r\n if (f.getName().endsWith(\".xml\"))\r\n accepted = true;\r\n// if (f.getName().endsWith(\".mp7\"))\r\n// accepted = true;\r\n if (f.isDirectory())\r\n accepted = true;\r\n return accepted;\r\n }", "public ArrayList<String> getAvalaibleExtensions() {\n ArrayList<String> ext = new ArrayList<String>();\n ext.add(\"txt\");\n return ext;\n }", "boolean accept(String filename);", "String validateAllowedExtensions(File fileNamePath) {\n\t\tString fileName = fileNamePath.getName();\r\n\t\t\r\n\t\t//Get the index based on the extension into the string\r\n\t\tint lastIndex = fileName.lastIndexOf(\".\");\r\n\t\t\r\n\t\t//Get substring/extension from the string\r\n\t\tString extension = fileName.substring(lastIndex).toUpperCase();\r\n\t\t\r\n\t\tif (extension.equalsIgnoreCase(\"GIF\")) {\r\n\t\t\treturn extension;\r\n\t\t}\r\n\t\t\r\n\t\tif (extension.equalsIgnoreCase(\"JPG\")) {\r\n\t\t\treturn extension;\r\n\t\t}\r\n\t\t\r\n\t\tif (extension.equalsIgnoreCase(\"TXT\")) {\r\n\t\t\treturn extension;\r\n\t\t}\r\n\t\t\r\n\t\t// There is no extension for the file\r\n\t\tif (lastIndex == -1) {\r\n\t\t\treturn \"\";\r\n\t\t}\r\n\t\t\r\n\t\t// No valid extension\r\n\t\treturn \"\";\r\n\t\t\r\n\t}", "public boolean isDirectory();", "private boolean validateFile(String path) {\n return !path.equals(AppStrings.NO_FILE_PATH);\n }", "@Test\n public void testMatchesAny() {\n\n Set<PathMatcher> patterns = new HashSet<PathMatcher>() {\n {\n add(FileUtil.matcherForGlobExpression(\"/notADir1\"));\n add(FileUtil.matcherForGlobExpression(\"/notADir2\"));\n }\n };\n\n Assertions.assertThat(FileUtil.matchesAny(FOLDER, patterns)).isFalse();\n\n patterns.add(FileUtil.matcherForGlobExpression(FOLDER.toString()));\n\n Assertions.assertThat(FileUtil.matchesAny(FOLDER, patterns)).isTrue();\n }", "@Test\n\tpublic void validFileDirectoryTest() {\n\t\t// Test valid file directory\n\t\tFile f = new File(workingDir);\n\t\tassertTrue(Helper.isValidDirectory(f));\n\n\t\t// Test valid file directory 2\n\t\tworkDir = new File(workingDir);\n\t\texpected = workDir.getAbsolutePath();\n\t\tactual = Helper.isValidDirectory(workDir, \"misc\");\n\t\tassertEquals(expected, actual.getAbsolutePath());\n\n\t\t// Test valid file directory 3\n\t\tworkDir = new File(workingDir);\n\t\texpected = workDir.getAbsolutePath() + pathSep + dirName; // Bugs: OS\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// compatible \\\\\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// changed to /\n\t\tactual = Helper.isValidDirectory(workDir, dirName);\n\t\tassertEquals(expected, actual.getAbsolutePath());\n\t}", "public abstract String getFileExtension();", "public boolean accept(File pathname)\n {\n return pathname.isDirectory();\n }", "public boolean accept(File dir, String name) {\n return name.endsWith(\".rxt\");\n }", "private static boolean isValidFileName(String name) {\n\t\tif(name.indexOf('.') != -1 && name.length() != 0) return true;\n\t\telse System.out.println(\"\\nFilenames must include the file's extension.\"); return false;\n\t}", "boolean isPattern(String path);", "public abstract boolean isDirectory() throws AccessException;", "@Test\n public void testAnalyzeFileByExtension() {\n incorrectValues(null, \"test.txt\");\n incorrectValues(\"\", \"test.txt\");\n incorrectValues(\"lof\", null);\n incorrectValues(\"file\", \"\");\n incorrectValues(\"resources\", \".png\");\n }", "public boolean accept(File dir, String name) {\n return pattern.matcher(new File(name).getName()).matches();\n }", "public static void main(String[] args) {\n\n File dir = new File(\"D:/test.txt\");\n FileFilter fr = (File f) -> f.isDirectory();\n File[] fs = dir.listFiles(fr);\n }", "@Override\n public final boolean accept(File dir, String name) {\n return pattern.matcher(name).find();\n }", "public void testFilesDirectoryAccessible() {\n File file = new File(rootBlog.getRoot(), \"files\");\n assertEquals(file, new File(rootBlog.getFilesDirectory()));\n assertTrue(file.exists());\n }", "List<String> getAllowedExtensions();", "public boolean isAllowedExtension(String fileExtenstion) throws DataServiceException {\r\n\t\tboolean isAllowed = false;\r\n\t\tInteger count = (Integer)queryForObject(\"document.query_isvalid_extension\",fileExtenstion);\r\n\t\tif (count == 1) {\r\n\t\t\tisAllowed = true;\r\n\t\t}\r\n\t\treturn isAllowed;\r\n\t}", "@Override\n\tpublic boolean acceptDomainFiles(DomainFile[] data) {\n\t\treturn true;\n\t}", "public boolean accept(File f) \n \t{\n if (f.isDirectory()) \t\t\t\t\t\t\t return true;\n\n String extension = getExtension(f);\n if (extension != null) \n \t{\n \tif (extension.equals(\"png\")) return true;\n \telse\t\t\t\t\t\t\t return false;\n }\n\n return false;\n \t}", "boolean isFile(FsPath path);", "@Override\r\n\tpublic boolean accept(File fich) {\n\t\treturn extension(fich);\r\n\t}", "FileExtensions (String type, String ext) {\n this.filter = new ExtensionFilter(type, ext);\n }", "String getFileExtension();", "@Override\n\t\t\tpublic boolean accept(File dir, String filename) {\n\t\t\t\tif(filename.endsWith(\".wmm\"))\n\t\t\t\t{\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t\treturn false;\n\t\t\t}", "@Override\r\n\t\t\tpublic boolean accept(File dir, String name) {\n\t\t\t\treturn isJpg(name); \r\n\t\t\t}", "private boolean isIgnoredFile(String filename) {\n String[] splitClassName = filename.split(\"\\\\.\");\n return Arrays.asList(IGNORE_FILE).contains(splitClassName[splitClassName.length - 1]);\n }", "boolean isFile() throws IOException;", "public static void showListOfDirectory(String filePath, String ext) {\n File f1 = new File(filePath);\n if (f1.isDirectory()) {\n System.out.println(\"Directory: \" + filePath);\n FilenameFilter only = (dir, name) -> name.endsWith(ext);\n String[] arr = f1.list(only);\n for (int i = 0; i < arr.length; i++) {\n File f = new File(filePath + \"/\" + arr[i]);\n if (f.isDirectory()) {\n System.out.println(arr[i] + \" is a directory\");\n } else {\n System.out.println(arr[i] + \" is a file\");\n }\n }\n } else {\n System.out.println(\"It is not a directory\");\n }\n }", "public String getFileExtension();", "@Override\n public boolean accept(File f) {\n if (f.isDirectory()) {\n return true;\n } else {\n for (ExtensionFileFilter filter : filters) {\n if (filter.accept(f)) {\n return true;\n }\n }\n }\n return false;\n }", "@Override\n\tpublic void addForbiddenExtensions(String e, String path) throws Exception {\n\t\t\n\t}", "public boolean accept(File f) {\n if (f.isDirectory()) {\n return true;\n }\n String extension = FilenameUtils.getExtension(f.getName());\n for (String validImageExtension:IMAGE_FILE_EXTENSION) {\n if (validImageExtension.equalsIgnoreCase(extension)) {\n return true;\n }\n }\n return false;\n }", "private boolean isValidPath(String path) {\n File file = new File(path);\n return file.exists() && file.isDirectory();\n }", "public boolean getUseFiles();", "public void should_read_files_in_directory() throws IOException {\n File tempDir = Files.createTempDir();\n tempDir.deleteOnExit();\n // json file\n File file1 = File.createTempFile(\"file1\", \".json\", tempDir);\n String content1 = \"content1\";\n Files.write(content1.getBytes(), file1);\n // n1ql file\n File file2 = File.createTempFile(\"file2\", \".N1QL\", tempDir);\n String content2 = \"content2\";\n Files.write(content2.getBytes(), file2);\n // txt file\n Files.write(getRandomString().getBytes(), File.createTempFile(getRandomString(), \".txt\", tempDir));\n\n // When we read files in this directory with extension filter\n Map<String, String> result = FileUtils.readFilesInDirectory(tempDir.toPath(), \"json\", \"n1ql\");\n\n // Then we should have file content matching this extension\n Assert.assertEquals(2, result.size());\n Assert.assertEquals(content1, result.get(file1.getName()));\n Assert.assertEquals(content2, result.get(file2.getName()));\n}", "@Test\n public void testFileInDirectoryFileDoesNotExists() {\n\n assertFalse(parent.fileInDirectory(\"file1\"));\n }", "private boolean dirNameIsValid(String itemName) {\n return !(itemName.contains(\"resources\")\n || itemName.startsWith(\".\")\n || itemName.equalsIgnoreCase(\"tools\"));\n }", "@Override\r\n\t\tpublic boolean accept(Path path) {\n\t\t\tboolean flag = path.toString().matches(regex);\r\n\t\t\treturn !flag;\r\n\t\t}", "@Override\n public boolean accept(File file) {\n if (file.isDirectory()\n || file.getName().toLowerCase().endsWith(\".gpx\")) {\n return true;\n }\n return false;\n }", "private boolean isValidExtension(String url){\n for (String ext : IGNORED_EXTENSIONS) {\n if (url.contains(ext)) {\n return false;\n }\n }\n return true;\n }", "public void setAllowedByRobotsTXT(java.lang.Boolean value) {\n this.allowedByRobotsTXT = value;\n }" ]
[ "0.7211349", "0.6926739", "0.64961046", "0.64701694", "0.6134258", "0.60351694", "0.6031931", "0.59089327", "0.5896794", "0.5856178", "0.5848834", "0.57063794", "0.5702788", "0.5702695", "0.5695902", "0.56920266", "0.56878984", "0.56861365", "0.566064", "0.5593704", "0.5587987", "0.5581228", "0.5577914", "0.5542404", "0.55362195", "0.55316305", "0.55024314", "0.54994893", "0.54816103", "0.54779464", "0.5472879", "0.54645276", "0.5459392", "0.54567146", "0.5455246", "0.5444733", "0.5441236", "0.5435545", "0.54058963", "0.539905", "0.53824824", "0.5377736", "0.5363557", "0.5354748", "0.5341074", "0.5338992", "0.53218967", "0.5319522", "0.53075343", "0.53051037", "0.5304235", "0.52984416", "0.5292263", "0.52890384", "0.52848434", "0.5257952", "0.5254334", "0.52445835", "0.5239716", "0.521968", "0.5219177", "0.52180755", "0.5215227", "0.52084607", "0.5190606", "0.51836944", "0.5181984", "0.5162881", "0.51612926", "0.5158964", "0.5156362", "0.5154425", "0.5151524", "0.5145461", "0.5131717", "0.5117419", "0.5114309", "0.5114169", "0.5107122", "0.5106219", "0.5084512", "0.5068768", "0.50644463", "0.50493854", "0.50491965", "0.50462097", "0.5044913", "0.50343996", "0.5011516", "0.50113577", "0.5010837", "0.50089765", "0.5005129", "0.49885407", "0.49793878", "0.49754328", "0.49639776", "0.49532503", "0.49526027", "0.49349877" ]
0.6255032
4
This description will be displayed in the dialog, hardcoded = ugly, should be done via I18N
@Override public String getDescription() { return "(*.txt) (*.avro) (*.json) (*.text) (*.seqjson) (*.seqfile)"; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic String getDescription() {\n\t\treturn \"\";\r\n\t}", "@Override\n public String getDescription() {\n return descriptionText;\n }", "java.lang.String getDescription();", "java.lang.String getDescription();", "java.lang.String getDescription();", "java.lang.String getDescription();", "java.lang.String getDescription();", "java.lang.String getDescription();", "java.lang.String getDescription();", "java.lang.String getDescription();", "java.lang.String getDescription();", "@Override\n public String getDescription() {\n return description;\n }", "public String getPopUpDescription() {\n return \"Put InputString's brief description here\";\n }", "public String getDescription(){\n \n return\"\";\n }", "@Override\n protected String getDescription() {\n return DESCRIPTION;\n }", "@Override\r\n\tpublic String getDescription() {\n\t\treturn description;\r\n\t}", "@Override\n public String getDescription() {\n return description;\n }", "@Override\r\n\tpublic String getDescription() {\n\t\treturn null;\r\n\t}", "@Override\r\n\tpublic String getDescription() {\n\t\treturn null;\r\n\t}", "@Override\n public String getDescription() {\n return DESCRIPTION;\n }", "public String getDescription(){return description;}", "public String getDescription(){return description;}", "@AutoEscape\n\tpublic String getDescription();", "@AutoEscape\n\tpublic String getDescription();", "@AutoEscape\n\tpublic String getDescription();", "@AutoEscape\n\tpublic String getDescription();", "@Override\n protected String getDescription() {\n return null;\n }", "@Override\n\tpublic String getDescription() {\n\t\treturn description;\n\t}", "@Override\n public String getDescription()\n {\n return null;\n }", "public String getDescription() { return description; }", "@Override\n\tpublic String getDescription() {\n\t\treturn null;\n\t}", "@Override\n\tpublic String getDescription() {\n\t\treturn null;\n\t}", "@Override\n\tpublic String getDescription() {\n\t\treturn null;\n\t}", "@Override\n\tpublic String getDescription() {\n\t\treturn null;\n\t}", "@Override\n\tpublic String getDescription() {\n\t\treturn null;\n\t}", "@Override\n\tpublic String getDescription() {\n\t\treturn null;\n\t}", "@Override\n\tpublic String getDescription();", "public String getDescription(){\n return getString(KEY_DESCRIPTION);\n }", "public String getDescription();", "public String getDescription();", "public String getDescription();", "public String getDescription();", "public String getDescription();", "public String getDescription();", "public String getDescription();", "public String getDescription();", "public String getDescription();", "public String getDescription();", "public String getDescription();", "public String getDescription();", "public String getDescription();", "public String getDescription();", "public String getDescription();", "public String getDescription();", "public String getDescription();", "public String getDescription();", "public String getDescription();", "public String getDescription();", "public String getDescription();", "public String getDescription();", "public String getDescription();", "public String getDescription();", "public String getDescription(){ return description; }", "public String getDescription()\r\n {\r\n return \"unknow\";\r\n }", "@Override\n\tpublic String getDescription() {\n\t\treturn \"Transfereix vida a l'enemic\";\n\t}", "@Override\n public String getDescription()\n {\n return m_description;\n }", "@AutoEscape\n public String getDescription();", "@Override\n public void setDescription(String arg0)\n {\n \n }", "@Override\n public String getDescription() {\n return this.description;\n }", "@Override\r\n\tpublic String getDescription() {\n\t\treturn this.description;\r\n\t}", "public String getDescription() {\r\n return Description; \r\n }", "public void setDescription(String description){this.description=description;}", "public void setDescription (String Description);", "public void setDescription (String Description);", "public void setDescription (String Description);", "public void setDescription (String Description);", "public void setDescription (String Description);", "public void setDescription (String Description);", "public String getDescription()\n/* */ {\n/* 74 */ return this.description;\n/* */ }", "String getDisplay_description();", "String getDescription() {\n if (description == null) {\n return null;\n }\n if (basicControl) {\n return String.format(\"%s %s\", context.getString(description), context.getString(R.string.basicControl));\n }\n return context.getString(description);\n }", "public String getDescription() {\n return (desc);\n }", "public String getDescription()\r\n {\r\n\treturn desc;\r\n }", "public String getDescription(){\n\n //returns the value of the description field\n return this.description;\n }", "public String getDescription ();", "public String getDescription(){\n return description;\n }", "public String getDescription(){\n return description;\n }", "public String getDescription() {\n return description;\n }", "String getDescription();", "String getDescription();", "String getDescription();", "String getDescription();", "String getDescription();", "String getDescription();", "String getDescription();", "String getDescription();", "String getDescription();", "String getDescription();", "String getDescription();", "String getDescription();", "String getDescription();" ]
[ "0.757552", "0.75549227", "0.7545551", "0.7545551", "0.7545551", "0.7545551", "0.7545551", "0.7545551", "0.7545551", "0.7545551", "0.7545551", "0.7479445", "0.7427426", "0.7374041", "0.73515284", "0.73256624", "0.73099506", "0.7307715", "0.7307715", "0.7304971", "0.7302537", "0.7302537", "0.73011255", "0.73011255", "0.73011255", "0.73011255", "0.72640085", "0.722318", "0.7217127", "0.71984875", "0.7183637", "0.7183637", "0.7183637", "0.7183637", "0.7183637", "0.7183637", "0.7181905", "0.7179307", "0.71722114", "0.71722114", "0.71722114", "0.71722114", "0.71722114", "0.71722114", "0.71722114", "0.71722114", "0.71722114", "0.71722114", "0.71722114", "0.71722114", "0.71722114", "0.71722114", "0.71722114", "0.71722114", "0.71722114", "0.71722114", "0.71722114", "0.71722114", "0.71722114", "0.71722114", "0.71722114", "0.71722114", "0.71564436", "0.71533513", "0.7152053", "0.71453315", "0.71400744", "0.7132661", "0.7124408", "0.7107498", "0.71005595", "0.7097831", "0.70938253", "0.70938253", "0.70938253", "0.70938253", "0.70938253", "0.70938253", "0.70883", "0.7066311", "0.70602864", "0.7059629", "0.7037865", "0.703267", "0.7030887", "0.70232767", "0.70232767", "0.7020673", "0.70199907", "0.70199907", "0.70199907", "0.70199907", "0.70199907", "0.70199907", "0.70199907", "0.70199907", "0.70199907", "0.70199907", "0.70199907", "0.70199907", "0.70199907" ]
0.0
-1
Creates new form Demo2
public Demo2() { initComponents(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "FORM createFORM();", "public static Result newForm() {\n return ok(newForm.render(palletForm, setOfArticleForm));\n }", "public static Result startNewForm() {\r\n\t\tString formName = ChangeOrderForm.NAME;\r\n\t\tDecision firstDecision = CMSGuidedFormFill.startNewForm(formName,\r\n\t\t\t\tCMSSession.getEmployeeName(), CMSSession.getEmployeeId());\r\n\t\treturn ok(backdrop.render(firstDecision));\r\n\t}", "public void clickCreate() {\n\t\tbtnCreate.click();\n\t}", "public void onNew() {\t\t\n\t\tdesignWidget.addNewForm();\n\t}", "public form2() {\n initComponents();\n }", "public FormInserir() {\n initComponents();\n }", "@Override\n\tpublic void onFormCreate(AbstractForm arg0, DataMsgBus arg1) {\n\t}", "public void createActionPerformed(java.awt.event.ActionEvent evt) {\n\t\t\n\t}", "public Project_Create() {\n initComponents();\n }", "@GetMapping(\"/students/new\")\r\n\tpublic String createStudentForm(Model model) {\n\t\tStudent student =new Student();\r\n\t\tmodel.addAttribute(\"student\",student);\r\n\t\treturn \"create_student\";\r\n\t}", "public frmNewArtist() {\n initComponents();\n lblID.setText(Controller.Agent.ManageController.getNewArtistID());\n lblGreeting.setText(\"Dear \"+iMuzaMusic.getLoggedUser().getFirstName()+\", please use the form below to add an artist to your ranks.\");\n \n }", "public ProductCreate() {\n initComponents();\n }", "public String actionCreateNew() {\r\n \t\tsetBook(new Book());\r\n \t\treturn \"new\";\r\n \t}", "@Test\n public void newTeacher() {\n driver.get(\"http://localhost:3000/teacher\");\n log.info(() -> \"Successfully enter the localhost:3000/teacher for adding a new teacher. time: \" + LocalDateTime.now());\n\n //Button for opening teacher form\n WebElement buttonPlus = driver.findElement(By.xpath(\"/html/body/div/div/main/div[2]/button\"));\n buttonPlus.click();\n driver.manage().timeouts().implicitlyWait(10, TimeUnit.SECONDS);\n\n TeacherForm teacherForm = new TeacherForm(driver);\n Assertions.assertTrue(teacherForm.isInitialized());\n log.info(() -> \"Teacher form is initialized! time: \" + LocalDateTime.now());\n //I found save button with xpath\n teacherForm.setSaveButton(\"/html/body/div/div/main/div[2]/div[2]/form/div[4]/button[1]\");\n teacherForm.newTeacher(\"Mirko\",\"Vukovic\", \"[email protected]\");\n\n ReceiptPage newTeacherForm = teacherForm.submitSave();\n log.info(() -> \"Submit new teacher was successfully! time: \" + LocalDateTime.now());\n Assertions.assertTrue(newTeacherForm.isInitialized());\n }", "@Override\r\n protected void createDbContentCreateEdit() {\n DbContentCreateEdit dbContentCreateEdit = new DbContentCreateEdit();\r\n dbContentCreateEdit.init(null);\r\n form.getModelObject().setDbContentCreateEdit(dbContentCreateEdit);\r\n dbContentCreateEdit.setParent(form.getModelObject());\r\n ruServiceHelper.updateDbEntity(form.getModelObject()); \r\n }", "@RequestMapping(params = \"new\", method = RequestMethod.GET)\n\t@PreAuthorize(\"hasRole('ADMIN')\")\n\tpublic String createProductForm(Model model) { \t\n \t\n\t\t//Security information\n\t\tmodel.addAttribute(\"admin\",security.isAdmin()); \n\t\tmodel.addAttribute(\"loggedUser\", security.getLoggedInUser());\n\t\t\n\t model.addAttribute(\"product\", new Product());\n\t return \"products/newProduct\";\n\t}", "public static void createButtonSelection(ActionContext actionContext){\n Thing store = actionContext.getObject(\"store\");\n store.doAction(\"openCreateForm\", actionContext);\n }", "@RequestMapping(\"/new\")\n\tpublic String displayProjectForm(Model model) {\n\t\tProject aproject = new Project();\n\t//Iterable<Employee> employees = \tpro.getall();\n\t\n\t\tmodel.addAttribute(\"project\", aproject);\n\n\t\t//model.addAttribute(\"allEmployees\", employees);\n\t\t\n\t\t\n\t\treturn \"newproject\";\n\t\t\n\t}", "@RequestMapping(value={\"/projects/add\"}, method= RequestMethod.GET)\r\n\tpublic String createProjectForm(Model model) {\r\n\t\tUser loggedUser= sessionData.getLoggedUser();\r\n\t\tmodel.addAttribute(\"loggedUser\", loggedUser);\r\n\t\tmodel.addAttribute(\"projectForm\", new Project());\r\n\t\treturn \"addProject\";\r\n\t}", "public Managing_Staff_Main_Form() {\n initComponents();\n }", "@Override\n\tprotected Fragment createFragment() {\n\t\treturn new FormFragment();\n\t}", "public form() {\n initComponents();\n }", "public createNew(){\n\t\tsuper(\"Create\"); // title for the frame\n\t\t//layout as null\n\t\tgetContentPane().setLayout(null);\n\t\t//get the background image\n\t\ttry {\n\t\t\tbackground =\n\t\t\t\t\tnew ImageIcon (ImageIO.read(getClass().getResource(\"Wallpaper.jpg\")));\n\t\t}//Catch for file error\n\t\tcatch (IOException e1) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\tJOptionPane.showMessageDialog(null, \n\t\t\t\t\t\"ERROR: File(s) Not Found\\n Please Check Your File Format\\n\"\n\t\t\t\t\t\t\t+ \"and The File Name!\");\n\t\t}\n\t\t//Initialize all of the compenents \n\t\tlblBackground = new JLabel (background);\n\t\tlblTitle = new JLabel (\"Create Menu\");\n\t\tlblTitle.setFont(new Font(\"ARIAL\",Font.ITALIC, 30));\n\t\tlblName = new JLabel(\"Please Enter Your First Name.\");\n\t\tlblLastName= new JLabel (\"Please Enter Your Last Name.\");\n\t\tlblPhoneNumber = new JLabel (\"Please Enter Your Phone Number.\");\n\t\tlblAddress = new JLabel (\"Please Enter Your Address.\");\n\t\tlblMiddle = new JLabel (\"Please Enter Your Middle Name (Optional).\");\n\t\tbtnCreate = new JButton (\"Create\");\n\t\tbtnBack = new JButton (\"Back\");\n\t\t//set the font\n\t\tlblName.setFont(new Font(\"Times New Roman\",Font.BOLD, 18));\n\t\tlblLastName.setFont(new Font(\"Times New Roman\",Font.BOLD, 18));\n\t\tlblPhoneNumber.setFont(new Font(\"Times New Roman\",Font.BOLD, 18));\n\t\tlblAddress.setFont(new Font(\"Times New Roman\",Font.BOLD, 18));\n\t\tlblMiddle.setFont(new Font(\"Times New Roman\",Font.BOLD, 18));\n\n\t\t//add action listener\n\t\tbtnCreate.addActionListener(this);\n\t\tbtnBack.addActionListener(this);\n\t\t//set bounds for all the components\n\t\tbtnCreate.setBounds(393, 594, 220, 36);\n\t\ttxtMiddle.setBounds(333, 249, 342, 36);\n\t\ttxtName.setBounds(333, 158, 342, 36);\n\t\ttxtLastName.setBounds(333, 339, 342, 36);\n\t\ttxtPhoneNumber.setBounds(333, 429, 342, 36);\n\t\ttxtAddress.setBounds(333, 511, 342, 36);\n\t\tbtnBack.setBounds(6,716,64,36);\n\t\tlblTitle.setBounds(417, 0, 182, 50);\n\t\tlblMiddle.setBounds(333, 201, 342, 36);\n\t\tlblName.setBounds(387, 110, 239, 36);\n\t\tlblLastName.setBounds(387, 297, 239, 36);\n\t\tlblPhoneNumber.setBounds(369, 387, 269, 36);\n\t\tlblAddress.setBounds(393, 477, 215, 30);\n\t\tbtnBack.setBounds(6,716,64,36);\n\t\tlblTitle.setBounds(417, 0, 182, 50);\n\t\tlblBackground.setBounds(0, 0, 1000, 1000);\n\t\t//add components to frame\n\t\tgetContentPane().add(btnCreate);\n\t\tgetContentPane().add(txtMiddle);\n\t\tgetContentPane().add(txtLastName);\n\t\tgetContentPane().add(txtAddress);\n\t\tgetContentPane().add(txtPhoneNumber);\n\t\tgetContentPane().add(txtName);\n\t\tgetContentPane().add(lblMiddle);\n\t\tgetContentPane().add(lblLastName);\n\t\tgetContentPane().add(lblAddress);\n\t\tgetContentPane().add(lblPhoneNumber);\n\t\tgetContentPane().add(lblName);\n\t\tgetContentPane().add(btnBack);\n\t\tgetContentPane().add(lblTitle);\n\t\tgetContentPane().add(lblBackground);\n\t\t//set size, visible and action for close\n\t\tsetSize(1000,1000);\n\t\tsetVisible(true);\n\t\tsetDefaultCloseOperation(EXIT_ON_CLOSE);\n\n\t}", "public static void create(Formulario form){\n daoFormulario.create(form);\n }", "public Form(){ \n\t\tsuper(tag(Form.class)); \n\t}", "public static FormV1 createEntity() {\n FormV1 formV1 = new FormV1()\n .customerId(DEFAULT_CUSTOMER_ID)\n .formType(DEFAULT_FORM_TYPE);\n return formV1;\n }", "@GetMapping(value = \"/create\") // https://localhost:8080/etiquetasTipoDisenio/create\n\tpublic String create(Model model) {\n\t\tetiquetasTipoDisenio etiquetasTipoDisenio = new etiquetasTipoDisenio();\n\t\tmodel.addAttribute(\"title\", \"Registro de una nuev entrega\");\n\t\tmodel.addAttribute(\"etiquetasTipoDisenio\", etiquetasTipoDisenio); // similar al ViewBag\n\t\treturn \"etiquetasTipoDisenio/form\"; // la ubicacion de la vista\n\t}", "private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {\n\t \t\n\t \tboolean custCreated = createCustomer();\n\t \t\n\t \t\t\n\t \tif(custCreated){\n\t \t\tdispose();\n\t \t\thome home = new home(cust);\n\t \t\thome.setLocationRelativeTo(null);\n\t \t\thome.setVisible(true);\n\t \t}\n\t \t\n\t \t\n\t }", "public InvoiceCreate() {\n initComponents();\n }", "public abstract void addEditorForm();", "public String createQuiz() {\n quiz = quizEJB.createQuiz(quiz);\n quizList = quizEJB.listQuiz();\n FacesContext.getCurrentInstance().addMessage(\"successForm:successInput\", new FacesMessage(FacesMessage.SEVERITY_INFO, \"Success\", \"New record added successfully\"));\n return \"quiz-list.xhtml\";\n }", "private HStack createEditForm() {\r\n\t\teditFormHStack = new HStack();\r\n\t\t\r\n\t\tVStack editFormVStack = new VStack();\r\n\t\teditFormVStack.addMember(addStarRatings());\r\n\t\t\r\n\t\tboundSwagForm = new DynamicForm();\r\n\t\tboundSwagForm.setNumCols(2);\r\n//\t\tboundSwagForm.setLongTextEditorThreshold(40);\r\n\t\tboundSwagForm.setDataSource(SmartGWTRPCDataSource.getInstance());\r\n\t\tboundSwagForm.setAutoFocus(true);\r\n\r\n\t\tHiddenItem keyItem = new HiddenItem(\"key\");\r\n\t\tTextItem nameItem = new TextItem(\"name\");\r\n\t\tnameItem.setLength(50);\r\n\t\tnameItem.setSelectOnFocus(true);\r\n\t\tTextItem companyItem = new TextItem(\"company\");\r\n\t\tcompanyItem.setLength(20);\r\n\t\tTextItem descriptionItem = new TextItem(\"description\");\r\n\t\tdescriptionItem.setLength(100);\r\n\t\tTextItem tag1Item = new TextItem(\"tag1\");\r\n\t\ttag1Item.setLength(15);\r\n\t\tTextItem tag2Item = new TextItem(\"tag2\");\r\n\t\ttag2Item.setLength(15);\r\n\t\tTextItem tag3Item = new TextItem(\"tag3\");\r\n\t\ttag3Item.setLength(15);\r\n\t\tTextItem tag4Item = new TextItem(\"tag4\");\r\n\t\ttag4Item.setLength(15);\r\n\t\t\r\n\t\tStaticTextItem isFetchOnlyItem = new StaticTextItem(\"isFetchOnly\");\r\n\t\tisFetchOnlyItem.setVisible(false);\r\n\t\tStaticTextItem imageKeyItem = new StaticTextItem(\"imageKey\");\r\n\t\timageKeyItem.setVisible(false);\r\n\t\t\r\n\t\tTextItem newImageURLItem = new TextItem(\"newImageURL\");\r\n\r\n\t\tboundSwagForm.setFields(keyItem, nameItem, companyItem, descriptionItem, tag1Item,\r\n\t\t\t\ttag2Item, tag3Item, tag4Item, isFetchOnlyItem, imageKeyItem, newImageURLItem);\r\n\t\teditFormVStack.addMember(boundSwagForm);\r\n\t\t\r\n\t\tcurrentSwagImage = new Img(\"/images/no_photo.jpg\"); \r\n\t\tcurrentSwagImage.setImageType(ImageStyle.NORMAL); \r\n\t\teditFormVStack.addMember(currentSwagImage);\r\n\t\teditFormVStack.addMember(createImFeelingLuckyImageSearch());\r\n\t\t\r\n\t\tIButton saveButton = new IButton(\"Save\");\r\n\t\tsaveButton.setAutoFit(true);\r\n\t\tsaveButton.addClickHandler(new ClickHandler() {\r\n\t\t\tpublic void onClick(ClickEvent event) {\r\n\t\t\t\t//TODO\r\n\t\t\t\t//uploadForm.submitForm();\r\n\t\t\t\t//Turn off fetch only (could have been on from them rating the item\r\n\t\t\t\tboundSwagForm.getField(\"isFetchOnly\").setValue(false);\r\n\t\t\t\tboundSwagForm.saveData();\r\n\t\t\t\thandleSubmitComment(); //in case they commented while editing\r\n\t\t\t\t//re-sort\r\n\t\t\t\tdoSort();\r\n\t\t\t\tif (boundSwagForm.hasErrors()) {\r\n\t\t\t\t\tWindow.alert(\"\" + boundSwagForm.getErrors());\r\n\t\t\t\t} else {\r\n\t\t\t\t\tboundSwagForm.clearValues();\r\n\t\t\t\t\t\r\n\t\t\t\t\teditFormHStack.hide();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\t\tIButton cancelButton = new IButton(\"Cancel\");\r\n\t\tcancelButton.setAutoFit(true);\r\n\t\tcancelButton.addClickHandler(new ClickHandler() {\r\n\t\t\tpublic void onClick(ClickEvent event) {\r\n\t\t\t\tboundSwagForm.clearValues();\r\n\t\t\t\teditFormHStack.hide();\r\n\t\t\t}\r\n\t\t});\r\n\t\t\r\n\t\tIButton deleteButton = new IButton(\"Delete\");\r\n\t\tdeleteButton.setAutoFit(true);\r\n\t\tdeleteButton.addClickHandler(new ClickHandler() {\r\n\t\t\tpublic void onClick(ClickEvent event) {\r\n\t\t\t\tshowConfirmRemovePopup(itemsTileGrid.getSelectedRecord());\r\n\t\t\t\teditFormHStack.hide();\r\n\t\t\t}\r\n\t\t});\r\n\t\t\r\n\t\teditButtonsLayout = new HLayout();\r\n\t\teditButtonsLayout.setHeight(20);\r\n\t\teditButtonsLayout.addMember(saveButton);\r\n\t\teditButtonsLayout.addMember(cancelButton);\r\n\t\teditButtonsLayout.addMember(deleteButton);\r\n\t\t\r\n\t\teditFormVStack.addMember(editButtonsLayout);\r\n\t\t\r\n\t\ttabSet = new TabSet();\r\n\t\ttabSet.setDestroyPanes(false);\r\n tabSet.setTabBarPosition(Side.TOP);\r\n tabSet.setTabBarAlign(Side.LEFT);\r\n tabSet.setWidth(570);\r\n tabSet.setHeight(570);\r\n \r\n\r\n Tab viewEditTab = new Tab();\r\n viewEditTab.setPane(editFormVStack);\r\n\r\n commentsTab = new Tab(\"Comments\");\r\n commentsTab.setPane(createComments());\r\n \r\n tabSet.addTab(viewEditTab);\r\n tabSet.addTab(commentsTab);\r\n //put focus in commentsEditor when they click the Comments tab\r\n tabSet.addClickHandler(new ClickHandler() {\r\n\t\t\tpublic void onClick(ClickEvent event) {\r\n\t\t\t\tTab selectedTab = tabSet.getSelectedTab();\r\n\t\t\t\tif (commentsTab==selectedTab) {\r\n\t\t\t\t\trichTextCommentsEditor.focus();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n \r\n VStack tabsVStack = new VStack();\r\n itemEditTitleLabel = new Label(); \r\n itemEditTitleLabel.setHeight(30); \r\n itemEditTitleLabel.setAlign(Alignment.LEFT); \r\n itemEditTitleLabel.setValign(VerticalAlignment.TOP); \r\n itemEditTitleLabel.setWrap(false); \r\n tabsVStack.addMember(itemEditTitleLabel);\r\n //make sure this is drawn since we set the tab names early\r\n tabSet.draw();\r\n tabsVStack.addMember(tabSet);\r\n\t\teditFormHStack.addMember(tabsVStack);\r\n\t\teditFormHStack.hide();\r\n\t\treturn editFormHStack;\r\n\t}", "public FormEditorHTML(Form1 f) {\n initComponents();\n this.myForm=f;\n }", "@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tnew JFrameDemo2();\n\t\t\t}", "private void actionNewProject ()\r\n\t{\r\n\t\ttry\r\n\t\t{\r\n\t\t\tDataController.scenarioNewProject();\r\n\r\n\t\t\thelperDisplayProjectFiles();\r\n\r\n\t\t\t//---- Change button icon\r\n\t\t\tImageIcon iconButton = FormUtils.getIconResource(FormStyle.RESOURCE_PATH_ICO_VIEW_SAMPLES);\r\n\r\n\t\t\tmainFormLink.getComponentToolbar().getComponentButtonViewSamples().setIcon(iconButton);\r\n\t\t\tmainFormLink.getComponentToolbar().getComponentButtonViewSamples().setActionCommand(FormMainHandlerCommands.AC_VIEW_SAMPLES_ON);\r\n\t\t\tmainFormLink.getComponentToolbar().getComponentButtonViewSamples().setToolTipText(\"View detected samples\");\r\n\r\n\t\t\tmainFormLink.reset();\r\n\t\t}\r\n\t\tcatch (ExceptionMessage e)\r\n\t\t{\r\n\t\t\tExceptionHandler.processException(e);\r\n\t\t}\r\n\t}", "public Ventaform() {\n initComponents();\n }", "private void createBtnActionPerformed(java.awt.event.ActionEvent evt) {\n\n staff.setName(regName.getText());\n staff.setID(regID.getText());\n staff.setPassword(regPwd.getText());\n staff.setPosition(regPos.getSelectedItem().toString());\n staff.setGender(regGender.getSelectedItem().toString());\n staff.setEmail(regEmail.getText());\n staff.setPhoneNo(regPhone.getText());\n staff.addStaff();\n if (staff.getPosition().equals(\"Vet\")) {\n Vet vet = new Vet();\n vet.setExpertise(regExp.getSelectedItem().toString());\n vet.setExpertise_2(regExp2.getSelectedItem().toString());\n vet.addExpertise(staff.getID());\n }\n JOptionPane.showMessageDialog(null, \"User added to database\");\n updateJTable();\n }", "@RequestMapping(\"/book/new\")\n public String newBook(Model model){\n model.addAttribute(\"book\", new Book ());\n return \"bookform\";\n }", "public frm_tutor_subida_prueba() {\n }", "private void btnCreateHeroActionPerformed() {// GEN-FIRST:event_btnCreateHeroActionPerformed\r\n\t\tdispose();\r\n\t\tHero h = new Hero(txtCreateName.getText());\r\n\t\tnew MainForm().setVisible(true);\r\n\t\tMainForm.setHero(h);\r\n\t\tMainForm.makeOpponents();\r\n\t\th = null;\r\n\t}", "public form_for_bd() {\n initComponents();\n }", "public CreateAccount() {\n initComponents();\n selectionall();\n }", "private void fillCreateOrEditForm(String name, int branchId) {\n waitForElementVisibility(xpathFormHeading);\n String actual = assertAndGetAttributeValue(xpathFormHeading, \"innerText\");\n assertEquals(actual, FORM_HEADING,\n \"Actual heading '\" + actual + \"' should be same as expected heading '\" + FORM_HEADING\n + \"'.\");\n logger.info(\"# User is on '\" + actual + \"' form\");\n assertAndType(xpathNameTF, name);\n logger.info(\"# Entered staff name: \" + name);\n selectByValue(xpathSelectBranch, \"number:\" + branchId);\n logger.info(\"# Select branch id: \" + branchId);\n }", "@GetMapping(\"/directorForm\")\n public String addDirectors(Model model) {\n\n model.addAttribute(\"newDirector\", new Director());\n return \"directorForm\";\n }", "public PDMRelationshipForm() {\r\n initComponents();\r\n }", "private FrmMainForm() {\n }", "public FormMenuUser() {\n super(\"Form Menu User\");\n initComponents();\n }", "@GetMapping(\"/showNewEmpForm\")\n\tpublic String showNewEmpForm(Model model) {\n\t\tEmployees employee = new Employees();\n\t\tmodel.addAttribute(\"employee\", employee);\n\t\treturn \"new_employee\";\n\t}", "public String formCreated()\r\n {\r\n return formError(\"201 Created\",\"Object was created\");\r\n }", "public MechanicForm() {\n initComponents();\n }", "@GetMapping(\"/students/new\")\n\tpublic String createStudentForm(Model model) throws ParseException\n\t{\n\t\t\n\t\tStudent student=new Student(); //To hold form Data.\n\t\t\n\t\tmodel.addAttribute(\"student\",student);\n\t\t\n\t\t// go to create_student.html page\n\t\treturn \"create_student\";\n\t}", "@Token(save = true, validate = false)\n @Execute\n public HtmlResponse createpage(final SuggestBadWordEditForm form) {\n form.initialize();\n form.crudMode = CrudMode.CREATE;\n return asHtml(path_AdminSuggestbadword_EditJsp);\n }", "public void saveAndCreateNew() throws Exception {\n\t\topenPrimaryButtonDropdown();\n\t\tgetControl(\"saveAndCreateNewButton\").click();\n\t}", "public CRUD_form() {\n initComponents();\n DbCon.getConnection(\"jdbc:mysql://localhost:3306/test\", \"root\", \"rishi\");\n }", "public Add_E() {\n initComponents();\n this.setTitle(\"Add Engineer\");\n }", "private void createpanel2() {\r\n\t\tpanels[1].setLayout(new GridLayout(1, 2));\r\n\r\n\t\tdescription[0] = new JLabel(\"Accountname: \");\r\n\t\tdescription[0].setFont(smallfont);\r\n\t\tdescription[0].setHorizontalAlignment(JLabel.CENTER);\r\n\t\tuserinfo = new JTextField() {\r\n\t\t\tprivate static final long serialVersionUID = 1L;\r\n\r\n\t\t\t@Override\r\n\t\t\tpublic void paint(Graphics g) {\r\n\t\t\t\tg.drawImage(ImageLoader.getImage(\"black_0.4\"), 0, 0, null);\r\n\t\t\t\tsuper.paint(g);\r\n\t\t\t}\r\n\t\t};\r\n\t\tif (System.getProperty(\"os.name\").startsWith(\"Windows\")) {\r\n\t\t\tuserinfo.setForeground(Color.WHITE);\r\n\t\t} else {\r\n\t\t\tuserinfo.setForeground(Color.BLACK);\r\n\t\t}\r\n\t\tuserinfo.setOpaque(false);\r\n\t\tuserinfo.setFont(smallfont);\r\n\t\tpanels[1].add(description[0]);\r\n\t\tpanels[1].add(userinfo);\r\n\t\tpanels[1].setOpaque(false);\r\n\t\tallComponents.add(panels[1]);\r\n\t\tpanels[0].revalidate();\r\n\t}", "private void creatingElements() {\n\t\ttf1 = new JTextField(20);\n\t\ttf2 = new JTextField(20);\n\t\ttf3 = new JTextField(20);\n\t\tJButton btn = new JButton(\"Add\");\n\t\tbtn.addActionListener(control);\n\t\tbtn.setActionCommand(\"add\");\n\t\t\n\t\tJPanel panel = new JPanel();\n\t\tpanel.add(tf1);\n\t\tpanel.add(tf2);\n\t\tpanel.add(btn);\n\t\tpanel.add(tf3);\n\t\t\n\t\tthis.add(panel);\n\t\t\n\t\tthis.validate();\n\t\tthis.repaint();\t\t\n\t\t\n\t}", "@RequestMapping(\"showForm\")\n\tpublic String showForm( Model theModel) {\n\t\t\n\t\t//create a student\n\t\tStudent theStudent = new Student();\n\t\t\n\t\t//add student to the model\n\t\ttheModel.addAttribute(\"student\", theStudent);\n\t\t\n\t\treturn \"student-form\";\n\t}", "@Override\n public void Create() {\n\n initView();\n }", "public void onClick(ClickEvent event) {\n\t \t\r\n\t \tdynFormCT1.addChild(canvas2);\r\n\t \tSC.say(\"Clicou\");\r\n\t }", "public CadastroProdutoNew() {\n initComponents();\n }", "public void initContactCreation() {\n click(By.linkText(\"add new\"));\n //wd.findElement(By.linkText(\"add new\")).click();\n }", "@RequestMapping(value = \"/report.create\", method = RequestMethod.GET)\n @ResponseBody public ModelAndView newreportForm(HttpSession session) throws Exception {\n ModelAndView mav = new ModelAndView();\n mav.setViewName(\"/sysAdmin/reports/details\");\n\n //Create a new blank provider.\n reports report = new reports();\n \n mav.addObject(\"btnValue\", \"Create\");\n mav.addObject(\"reportdetails\", report);\n\n return mav;\n }", "public void CrearNew(ActionEvent e) {\n List<Pensum> R = ejbFacade.existePensumID(super.getSelected().getIdpensum());\n if(R.isEmpty()){\n super.saveNew(e);\n }else{\n new Auxiliares().setMsj(3,\"PENSUM ID YA EXISTE\");\n }\n }", "public CreateProfile() {\n initComponents();\n }", "@RequestMapping(method = RequestMethod.GET)\n \tpublic String createForm(Model model, ForgotLoginForm form) {\n \t\tmodel.addAttribute(\"form\", form);\n \t\treturn \"forgotlogin/index\";\n \t}", "private void fillCreateOrEditForm(String name, String branch) {\n waitForElementVisibility(xpathFormHeading);\n String actual = assertAndGetAttributeValue(xpathFormHeading, \"innerText\");\n assertEquals(actual, FORM_HEADING,\n \"Actual heading '\" + actual + \"' should be same as expected heading '\" + FORM_HEADING\n + \"'.\");\n logger.info(\"# User is on '\" + actual + \"' form\");\n assertAndType(xpathNameTF, name);\n logger.info(\"# Entered staff name: \" + name);\n selectByVisibleText(xpathSelectBranch, branch);\n logger.info(\"# Select branch name: \" + branch);\n }", "private void initFormCreateMode() {\n initSpinnerSelectionChamps();\n //TODO\n }", "public TorneoForm() {\n initComponents();\n }", "public Team create(TeamDTO teamForm);", "public CreateCustomer() {\n initComponents();\n }", "private void newProject()\n\t{\n\t\tnew FenetreCreationProjet();\n\t}", "@Command\n\tpublic void nuevoAnalista(){\n\t\tMap<String, Object> parametros = new HashMap<String, Object>();\n\n\t\t//parametros.put(\"recordMode\", \"NEW\");\n\t\tllamarFormulario(\"formularioAnalistas.zul\", null);\n\t}", "public myForm() {\n\t\t\tinitComponents();\n\t\t}", "public Form() {\n initComponents();\n }", "public S2SSubmissionDetailForm() {\r\n initComponents();\r\n }", "public CrearProductos() {\n initComponents();\n }", "private void newTodo() {\r\n String myTodoName = \"Unknown\";\r\n for (Component component : panelSelectFile.getComponents()) {\r\n if (component instanceof JTextField) {\r\n if (component.getName().equals(\"Name\")) {\r\n JTextField textFieldName = (JTextField) component;\r\n myTodoName = textFieldName.getText();\r\n }\r\n }\r\n }\r\n if (myTodoName == null || myTodoName.isEmpty()) {\r\n JOptionPane.showMessageDialog(null, \"New Todo List name not entered!\");\r\n return;\r\n }\r\n myTodo = new MyTodoList(myTodoName);\r\n int reply = JOptionPane.showConfirmDialog(null, \"Do you want to save this todoList?\",\r\n \"Save New Todolist\", JOptionPane.YES_NO_OPTION);\r\n if (reply == JOptionPane.YES_OPTION) {\r\n saveTodo();\r\n }\r\n fileName = null;\r\n todoListGui();\r\n }", "public Form getCreationForm() throws ProcessManagerException {\r\n try {\r\n Action creation = processModel.getCreateAction();\r\n return processModel.getPublicationForm(creation.getName(), currentRole,\r\n getLanguage());\r\n } catch (WorkflowException e) {\r\n throw new ProcessManagerException(\"SessionController\",\r\n \"processManager.ERR_NO_CREATION_FORM\", e);\r\n }\r\n }", "protected void doNew() {\n\t\tgetRegisterView().clearTableSelection();\n\t\tclear();\n\t\tenableForm(true);\n\t\tgetForm().getButton(EDIT).setEnabled(false);\n\t\tgetForm().getField(CHECK_NUMBER).requestFocus();\n\t}", "public void createPage2()\n {\n panel2 = new JPanel();\n PositionMassageList = new DefaultListModel<>();\n list2 = new JList(PositionMassageList);\n panel2.add(list2);\n\n }", "public SpeciesForm() {\n initComponents();\n setTitle(Application.TITLE_APP + \" Species\");\n processor = new SpeciesProcessor();\n loadData(); \n \n \n }", "public void buildAndShowMenuForm() {\n SimpleForm.Builder builder =\n SimpleForm.builder()\n .translator(MinecraftLocale::getLocaleString, session.locale())\n .title(\"gui.advancements\");\n\n List<String> rootAdvancementIds = new ArrayList<>();\n for (Map.Entry<String, GeyserAdvancement> advancement : storedAdvancements.entrySet()) {\n if (advancement.getValue().getParentId() == null) { // No parent means this is a root advancement\n builder.button(MessageTranslator.convertMessage(advancement.getValue().getDisplayData().getTitle(), session.locale()));\n rootAdvancementIds.add(advancement.getKey());\n }\n }\n\n if (rootAdvancementIds.isEmpty()) {\n builder.content(\"advancements.empty\");\n }\n\n builder.validResultHandler((response) -> {\n String id = rootAdvancementIds.get(response.clickedButtonId());\n if (!id.equals(\"\")) {\n if (id.equals(currentAdvancementCategoryId)) {\n // The server thinks we are already on this tab\n buildAndShowListForm();\n } else {\n // Send a packet indicating that we intend to open this particular advancement window\n ServerboundSeenAdvancementsPacket packet = new ServerboundSeenAdvancementsPacket(id);\n session.sendDownstreamPacket(packet);\n // Wait for a response there\n }\n }\n });\n\n session.sendForm(builder);\n }", "private void azzeraInsertForm() {\n\t\tviewInserimento.getCmbbxTipologia().setSelectedIndex(-1);\n\t\tviewInserimento.getTxtFieldDataI().setText(\"\");\n\t\tviewInserimento.getTxtFieldValore().setText(\"\");\n\t\tviewInserimento.getTxtFieldDataI().setBackground(Color.white);\n\t\tviewInserimento.getTxtFieldValore().setBackground(Color.white);\n\t}", "public Modul2() {\n initComponents();\n }", "@RequestMapping(\"/save\")\n\tpublic String createProjectForm(Project project, Model model) {\n\t\t\n\tproRep.save(project);\n\tList<Project> getall = (List<Project>) proRep.getAll();\n\tmodel.addAttribute(\"projects\", getall);\n\t\n\treturn \"listproject\";\n\t\t\n\t}", "public static Result newProduct() {\n Form<models.Product> productForm = form(models.Product.class).bindFromRequest();\n if(productForm.hasErrors()) {\n return badRequest(\"Tag name cannot be 'tag'.\");\n }\n models.Product product = productForm.get();\n product.save();\n return ok(product.toString());\n }", "public void createPersonalInfos(JFrame jFrame, ControllerAdmin controllerAdminPersonalInfos){\n JLabel jLabelAcount = new JLabel(\"Compte\");\n jLabelAcount.setBounds(20, 20, 100, 28);\n\n JLabel jLabelId = new JLabel(\"Identifiant :\");\n jLabelId.setBounds(40, 50, 300, 28);\n JTextField jTextFieldId = new JTextField(controllerAdminPersonalInfos.getUser().getId());\n jTextFieldId.setBounds(40, 80, 300, 28);\n\n JLabel jLabelLastName = new JLabel(\"Nom :\");\n jLabelLastName.setBounds(40, 110, 300, 28);\n JTextField jTextFieldLastName = new JTextField(controllerAdminPersonalInfos.getUser().getLastName());\n jTextFieldLastName.setBounds(40, 140, 300, 28);\n\n JLabel jLabelFirstName = new JLabel(\"Prenom :\");\n jLabelFirstName.setBounds(40, 170, 300, 28);\n JTextField jTextFieldFirstName = new JTextField(controllerAdminPersonalInfos.getUser().getFirstName());\n jTextFieldFirstName.setBounds(40, 200, 300, 28);\n\n JLabel jLabelEmail = new JLabel(\"Email :\");\n jLabelEmail.setBounds(40, 230, 300, 28);\n JTextField jTextFieldEmail = new JTextField(controllerAdminPersonalInfos.getUser().getEmail());\n jTextFieldEmail.setBounds(40, 260, 300, 28);\n\n JLabel jLabelPassword = new JLabel(\"Mot de passe :\");\n jLabelPassword.setBounds(40, 290, 300, 28);\n JPasswordField jPasswordFieldPassword = new JPasswordField(controllerAdminPersonalInfos.getUser().getPassword());\n jPasswordFieldPassword.setBounds(40, 320, 300, 28);\n\n JButton jButtonModifPassword = new JButton(\"Modifier le mot de passe\");\n jButtonModifPassword.setBounds(350, 320, 200, 28);\n\n //set editabilite\n jTextFieldId.setEditable(false);\n jTextFieldLastName.setEditable(false);\n jTextFieldFirstName.setEditable(false);\n jTextFieldEmail.setEditable(false);\n jPasswordFieldPassword.setEditable(false);\n\n // Ajout des element à la JFrame\n jFrame.add(jLabelAcount);\n jFrame.add(jLabelId);\n jFrame.add(jTextFieldId);\n jFrame.add(jLabelLastName);\n jFrame.add(jTextFieldLastName);\n jFrame.add(jLabelFirstName);\n jFrame.add(jTextFieldFirstName);\n jFrame.add(jLabelEmail);\n jFrame.add(jTextFieldEmail);\n jFrame.add(jLabelPassword);\n jFrame.add(jButtonModifPassword);\n jFrame.add(jPasswordFieldPassword);\n\n jButtonModifPassword.addActionListener(new ActionListener() {\n @Override\n public void actionPerformed(ActionEvent e) {\n createModifPassword(jFrame, controllerAdminPersonalInfos);\n jFrame.repaint();\n }\n });\n\n jFrame.setLayout(null);\n jFrame.setVisible(true);\n }", "public New_appointment() {\n initComponents();\n }", "public static AssessmentCreationForm openFillCreationForm(Assessment assm) {\n openCreationSearchForm(Roles.STAFF, WingsTopMenu.WingsStaffMenuItem.P_ASSESSMENTS, Popup.Create);\n\n Logger.getInstance().info(\"Fill out the required fields with valid data\");\n AssessmentCreationForm creationForm = new AssessmentCreationForm();\n creationForm.fillAssessmentInformation(new User(Roles.STAFF), assm);\n\n return new AssessmentCreationForm();\n }", "public CrearPedidos() {\n initComponents();\n }", "protected void do_mntmStartNewForm_actionPerformed(ActionEvent arg0) {\n\t\tthis.dispose();\n\t\tmain(null);\n\t}", "public Formulario() {\n initComponents();\n }", "@RequestMapping(value = \"/newrecipe\", method = RequestMethod.GET)\n\tpublic String newRecipeForm(Model model) {\n\t\tmodel.addAttribute(\"recipe\", new Recipe()); //empty recipe object\n\t\tmodel.addAttribute(\"categories\", CatRepo.findAll());\n\t\treturn \"newrecipe\";\n\t}", "public MainForm() {\n initComponents();\n \n }", "public creacionempresa() {\n initComponents();\n mostrardatos();\n }", "@Override\n\tpublic void createForm(ERForm form) {\n\t\t\tString sql = \"insert into project1.reimbursementInfo (userName, fullName, thedate, eventstartdate, thelocation, description, thecost, gradingformat, passingpercentage, eventtype, filename,status,reason) values (?,?,?,?,?,?,?,?,?,?,?,?,?);\";\n\t\t\ttry {PreparedStatement stmt = conn.prepareCall(sql);\n\t\t\t//RID should auto increment, so this isnt necessary\n\t\t\t\n\t\t\tstmt.setString(1, form.getUserName());\n\t\t\tstmt.setString(2, form.getFullName());\n\t\t\tstmt.setDate(3, Date.valueOf(form.getTheDate()));\n\t\t\tstmt.setDate(4, Date.valueOf(form.getEventStartDate()));\n\t\t\tstmt.setString(5, form.getTheLocation());\n\t\t\tstmt.setString(6, form.getDescription());\n\t\t\tstmt.setDouble(7, form.getTheCost());\n\t\t\tstmt.setString(8, form.getGradingFormat());\n\t\t\tstmt.setString(9, form.getPassingPercentage());\n\t\t\tstmt.setString(10, form.getEventType());\n\t\t\tstmt.setString(11, form.getFileName());\n\t\t\tstmt.setString(12, \"pending\");\n\t\t\tstmt.setString(13, \"\");\n\t\t\tstmt.executeUpdate();\n\t\t\t\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}", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n Title = new javax.swing.JLabel();\n NAME = new javax.swing.JLabel();\n txt_name = new javax.swing.JTextField();\n PROVIDER = new javax.swing.JLabel();\n ComboBox_provider = new javax.swing.JComboBox<>();\n CATEGORY = new javax.swing.JLabel();\n ComboBox_category = new javax.swing.JComboBox<>();\n Trademark = new javax.swing.JLabel();\n ComboBox_trademark = new javax.swing.JComboBox<>();\n COLOR = new javax.swing.JLabel();\n ComboBox_color = new javax.swing.JComboBox<>();\n SIZE = new javax.swing.JLabel();\n ComboBox_size = new javax.swing.JComboBox<>();\n MATERIAL = new javax.swing.JLabel();\n ComboBox_material = new javax.swing.JComboBox<>();\n PRICE = new javax.swing.JLabel();\n txt_price = new javax.swing.JTextField();\n SAVE = new javax.swing.JButton();\n CANCEL = new javax.swing.JButton();\n Background = new javax.swing.JLabel();\n\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n getContentPane().setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout());\n\n Title.setFont(new java.awt.Font(\"Dialog\", 1, 24)); // NOI18N\n Title.setForeground(new java.awt.Color(255, 255, 255));\n Title.setText(\"NEW PRODUCT\");\n getContentPane().add(Title, new org.netbeans.lib.awtextra.AbsoluteConstraints(200, 33, -1, -1));\n\n NAME.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n NAME.setForeground(new java.awt.Color(255, 255, 255));\n NAME.setText(\"Name\");\n getContentPane().add(NAME, new org.netbeans.lib.awtextra.AbsoluteConstraints(40, 150, 70, 30));\n\n txt_name.setBackground(new java.awt.Color(51, 51, 51));\n txt_name.setForeground(new java.awt.Color(255, 255, 255));\n getContentPane().add(txt_name, new org.netbeans.lib.awtextra.AbsoluteConstraints(120, 150, 100, 30));\n\n PROVIDER.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n PROVIDER.setForeground(new java.awt.Color(255, 255, 255));\n PROVIDER.setText(\"Provider\");\n getContentPane().add(PROVIDER, new org.netbeans.lib.awtextra.AbsoluteConstraints(30, 200, 70, 30));\n\n ComboBox_provider.setBackground(new java.awt.Color(51, 51, 51));\n ComboBox_provider.setForeground(new java.awt.Color(255, 255, 255));\n ComboBox_provider.setModel(new javax.swing.DefaultComboBoxModel<>(new String[] { \"Item 1\", \"Item 2\", \"Item 3\", \"Item 4\" }));\n getContentPane().add(ComboBox_provider, new org.netbeans.lib.awtextra.AbsoluteConstraints(120, 200, 100, 30));\n\n CATEGORY.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n CATEGORY.setForeground(new java.awt.Color(255, 255, 255));\n CATEGORY.setText(\"Category\");\n getContentPane().add(CATEGORY, new org.netbeans.lib.awtextra.AbsoluteConstraints(30, 250, 70, 30));\n\n ComboBox_category.setBackground(new java.awt.Color(51, 51, 51));\n ComboBox_category.setForeground(new java.awt.Color(255, 255, 255));\n ComboBox_category.setModel(new javax.swing.DefaultComboBoxModel<>(new String[] { \"Item 1\", \"Item 2\", \"Item 3\", \"Item 4\" }));\n getContentPane().add(ComboBox_category, new org.netbeans.lib.awtextra.AbsoluteConstraints(120, 250, 100, 30));\n\n Trademark.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n Trademark.setForeground(new java.awt.Color(255, 255, 255));\n Trademark.setText(\"Trademark\");\n getContentPane().add(Trademark, new org.netbeans.lib.awtextra.AbsoluteConstraints(30, 300, 70, 30));\n\n ComboBox_trademark.setBackground(new java.awt.Color(51, 51, 51));\n ComboBox_trademark.setForeground(new java.awt.Color(255, 255, 255));\n ComboBox_trademark.setModel(new javax.swing.DefaultComboBoxModel<>(new String[] { \"Item 1\", \"Item 2\", \"Item 3\", \"Item 4\" }));\n ComboBox_trademark.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n ComboBox_trademarkActionPerformed(evt);\n }\n });\n getContentPane().add(ComboBox_trademark, new org.netbeans.lib.awtextra.AbsoluteConstraints(120, 300, 100, 30));\n\n COLOR.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n COLOR.setForeground(new java.awt.Color(255, 255, 255));\n COLOR.setText(\"Color\");\n getContentPane().add(COLOR, new org.netbeans.lib.awtextra.AbsoluteConstraints(300, 150, 70, 30));\n\n ComboBox_color.setBackground(new java.awt.Color(51, 51, 51));\n ComboBox_color.setForeground(new java.awt.Color(255, 255, 255));\n ComboBox_color.setModel(new javax.swing.DefaultComboBoxModel<>(new String[] { \"Item 1\", \"Item 2\", \"Item 3\", \"Item 4\" }));\n getContentPane().add(ComboBox_color, new org.netbeans.lib.awtextra.AbsoluteConstraints(400, 150, 100, 30));\n\n SIZE.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n SIZE.setForeground(new java.awt.Color(255, 255, 255));\n SIZE.setText(\"Size\");\n getContentPane().add(SIZE, new org.netbeans.lib.awtextra.AbsoluteConstraints(300, 200, 70, 30));\n\n ComboBox_size.setBackground(new java.awt.Color(51, 51, 51));\n ComboBox_size.setForeground(new java.awt.Color(255, 255, 255));\n ComboBox_size.setModel(new javax.swing.DefaultComboBoxModel<>(new String[] { \"Item 1\", \"Item 2\", \"Item 3\", \"Item 4\" }));\n getContentPane().add(ComboBox_size, new org.netbeans.lib.awtextra.AbsoluteConstraints(400, 200, 100, 30));\n\n MATERIAL.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n MATERIAL.setForeground(new java.awt.Color(255, 255, 255));\n MATERIAL.setText(\"Material\");\n getContentPane().add(MATERIAL, new org.netbeans.lib.awtextra.AbsoluteConstraints(300, 250, 70, 30));\n\n ComboBox_material.setBackground(new java.awt.Color(51, 51, 51));\n ComboBox_material.setForeground(new java.awt.Color(255, 255, 255));\n ComboBox_material.setModel(new javax.swing.DefaultComboBoxModel<>(new String[] { \"Item 1\", \"Item 2\", \"Item 3\", \"Item 4\" }));\n getContentPane().add(ComboBox_material, new org.netbeans.lib.awtextra.AbsoluteConstraints(400, 250, 100, 30));\n\n PRICE.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n PRICE.setForeground(new java.awt.Color(255, 255, 255));\n PRICE.setText(\"Price\");\n getContentPane().add(PRICE, new org.netbeans.lib.awtextra.AbsoluteConstraints(300, 300, 70, 30));\n\n txt_price.setBackground(new java.awt.Color(51, 51, 51));\n txt_price.setForeground(new java.awt.Color(255, 255, 255));\n txt_price.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n txt_priceActionPerformed(evt);\n }\n });\n getContentPane().add(txt_price, new org.netbeans.lib.awtextra.AbsoluteConstraints(400, 300, 100, 30));\n\n SAVE.setBackground(new java.awt.Color(25, 25, 25));\n SAVE.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/img/icono_guardar-A.png\"))); // NOI18N\n SAVE.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR));\n SAVE.setPressedIcon(new javax.swing.ImageIcon(getClass().getResource(\"/img/icono_guardar-B.png\"))); // NOI18N\n SAVE.setRolloverIcon(new javax.swing.ImageIcon(getClass().getResource(\"/img/icono_guardar.png\"))); // NOI18N\n SAVE.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n SAVEActionPerformed(evt);\n }\n });\n getContentPane().add(SAVE, new org.netbeans.lib.awtextra.AbsoluteConstraints(210, 480, 50, 50));\n\n CANCEL.setBackground(new java.awt.Color(25, 25, 25));\n CANCEL.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/img/icono_no-A.png\"))); // NOI18N\n CANCEL.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR));\n CANCEL.setPressedIcon(new javax.swing.ImageIcon(getClass().getResource(\"/img/icono_no-B.png\"))); // NOI18N\n CANCEL.setRolloverIcon(new javax.swing.ImageIcon(getClass().getResource(\"/img/icono_no.png\"))); // NOI18N\n CANCEL.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n CANCELActionPerformed(evt);\n }\n });\n getContentPane().add(CANCEL, new org.netbeans.lib.awtextra.AbsoluteConstraints(280, 480, 50, 50));\n\n Background.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/img/fondo_windows2.jpg\"))); // NOI18N\n getContentPane().add(Background, new org.netbeans.lib.awtextra.AbsoluteConstraints(0, 0, -1, -1));\n\n pack();\n }", "public String create() {\n\n if (log.isDebugEnabled()) {\n log.debug(\"create()\");\n }\n FacesContext context = FacesContext.getCurrentInstance();\n StringBuffer sb = registration(context);\n sb.append(\"?action=Create\");\n forward(context, sb.toString());\n return (null);\n\n }" ]
[ "0.72373736", "0.6666591", "0.6511039", "0.6467132", "0.63879573", "0.63692504", "0.63409036", "0.61433876", "0.6091715", "0.6042294", "0.600454", "0.5997471", "0.59945655", "0.59620094", "0.5933287", "0.593313", "0.5880605", "0.5873497", "0.58643216", "0.58602726", "0.5857346", "0.5856197", "0.5854065", "0.58497334", "0.58486", "0.58336526", "0.5821167", "0.58151335", "0.5813425", "0.57906306", "0.57743347", "0.57667357", "0.5762022", "0.57442033", "0.5733793", "0.573272", "0.5725707", "0.5722848", "0.57182956", "0.57159907", "0.57108164", "0.5708371", "0.57037103", "0.5700548", "0.5699366", "0.5697436", "0.569354", "0.5678696", "0.5677829", "0.5673286", "0.5673074", "0.5672381", "0.566606", "0.56602323", "0.5652308", "0.5649234", "0.5648741", "0.56479305", "0.56462324", "0.5638445", "0.5636959", "0.5636036", "0.56197435", "0.56129664", "0.56117135", "0.56086886", "0.56027746", "0.5591609", "0.55889004", "0.5584883", "0.55836916", "0.5581129", "0.5574901", "0.55622584", "0.5560204", "0.55588776", "0.55572313", "0.5556131", "0.55541134", "0.5553155", "0.5548622", "0.55472785", "0.554674", "0.5546655", "0.554606", "0.554119", "0.55405074", "0.55374557", "0.5535582", "0.55282533", "0.5525603", "0.55247486", "0.55228215", "0.5518936", "0.5516787", "0.5512958", "0.5512712", "0.5510194", "0.55089533", "0.55070055" ]
0.5994901
12
This method is called from within the constructor to initialize the form. WARNING: Do NOT modify this code. The content of this method is always regenerated by the Form Editor.
@SuppressWarnings("unchecked") // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents private void initComponents() { fileChooser = new javax.swing.JFileChooser(); DBChooser = new javax.swing.JDialog(); DBInfo = new javax.swing.JPanel(); UserName = new javax.swing.JLabel(); Password = new javax.swing.JLabel(); url = new javax.swing.JLabel(); DBName = new javax.swing.JLabel(); jTextFieldUsername = new javax.swing.JTextField(); jTextFieldPassword = new javax.swing.JTextField(); jTextFieldurl = new javax.swing.JTextField(); jTextFieldDBName = new javax.swing.JTextField(); Add = new javax.swing.JButton(); Cancel = new javax.swing.JButton(); jScrollPane4 = new javax.swing.JScrollPane(); ConnectionStatus = new javax.swing.JTextArea(); buttonGroup2 = new javax.swing.ButtonGroup(); jInternalFrame1 = new javax.swing.JInternalFrame(); jTabbedPaneMainTree = new javax.swing.JTabbedPane(); jScrollPane3 = new javax.swing.JScrollPane(); jTreeAction = new javax.swing.JTree(); jScrollPane2 = new javax.swing.JScrollPane(); textarea = new javax.swing.JTextArea(); jTabbedPane1 = new javax.swing.JTabbedPane(); jTextField1 = new javax.swing.JTextField(); jButton2 = new javax.swing.JButton(); jInternalFrame3 = new javax.swing.JInternalFrame(); jLayeredPane3 = new javax.swing.JLayeredPane(); jLabelDuke = new javax.swing.JLabel(); canvas2 = new java.awt.Canvas(); jLabel1 = new javax.swing.JLabel(); jScrollPane1 = new javax.swing.JScrollPane(); jTextArea1 = new javax.swing.JTextArea(); jPanel1 = new javax.swing.JPanel(); jButtonSave = new javax.swing.JButton(); jButtonSaveAs = new javax.swing.JButton(); jButton1 = new javax.swing.JButton(); jProgressBar1 = new javax.swing.JProgressBar(); jMenuBar1 = new javax.swing.JMenuBar(); File = new javax.swing.JMenu(); OpenLocalFile = new javax.swing.JMenuItem(); OpenDB = new javax.swing.JMenuItem(); OpenHDFS = new javax.swing.JMenuItem(); Exit = new javax.swing.JMenuItem(); jMenuEdit = new javax.swing.JMenu(); jMenuItemUndo = new javax.swing.JMenuItem(); jMenuItemRedo = new javax.swing.JMenuItem(); jMenuItemCut = new javax.swing.JMenuItem(); jMenuItemCopy = new javax.swing.JMenuItem(); jMenuItemPaste = new javax.swing.JMenuItem(); jMenuItemDelete = new javax.swing.JMenuItem(); jMenuItemSelectAll = new javax.swing.JMenuItem(); jMenuView = new javax.swing.JMenu(); jMenuItemEnlarge = new javax.swing.JMenuItem(); jMenuItemShrink = new javax.swing.JMenuItem(); jMenuItemFullScreen = new javax.swing.JMenuItem(); jMenuRun = new javax.swing.JMenu(); jMenuItemRun = new javax.swing.JMenuItem(); jMenuItemPreview = new javax.swing.JMenuItem(); jMenuItemDebug = new javax.swing.JMenuItem(); jMenuItemReplay = new javax.swing.JMenuItem(); jMenuItemCheck = new javax.swing.JMenuItem(); jMenuTools = new javax.swing.JMenu(); jMenuItem5 = new javax.swing.JMenuItem(); jMenuHelp = new javax.swing.JMenu(); fileChooser.setDialogTitle("Please choose your local input file"); fileChooser.setFileFilter(new MyCustomFilter()); DBInfo.setBorder(javax.swing.BorderFactory.createTitledBorder("Please choose your DB File here!")); UserName.setText("UserName"); Password.setText("Password"); url.setText("url"); DBName.setText("DBName"); jTextFieldUsername.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jTextFieldUsernameActionPerformed(evt); } }); javax.swing.GroupLayout DBInfoLayout = new javax.swing.GroupLayout(DBInfo); DBInfo.setLayout(DBInfoLayout); DBInfoLayout.setHorizontalGroup( DBInfoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(DBInfoLayout.createSequentialGroup() .addContainerGap() .addGroup(DBInfoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(DBInfoLayout.createSequentialGroup() .addComponent(DBName) .addGap(13, 13, 13) .addComponent(jTextFieldDBName, javax.swing.GroupLayout.DEFAULT_SIZE, 84, Short.MAX_VALUE)) .addGroup(DBInfoLayout.createSequentialGroup() .addComponent(url) .addGap(41, 41, 41) .addComponent(jTextFieldurl)) .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, DBInfoLayout.createSequentialGroup() .addGroup(DBInfoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(Password) .addComponent(UserName)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup(DBInfoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jTextFieldUsername) .addComponent(jTextFieldPassword)))) .addGap(35, 35, 35)) ); DBInfoLayout.setVerticalGroup( DBInfoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(DBInfoLayout.createSequentialGroup() .addContainerGap() .addGroup(DBInfoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(UserName) .addComponent(jTextFieldUsername, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGap(18, 18, 18) .addGroup(DBInfoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(Password) .addComponent(jTextFieldPassword, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGap(18, 18, 18) .addGroup(DBInfoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(url) .addComponent(jTextFieldurl, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGap(18, 18, 18) .addGroup(DBInfoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(DBName) .addComponent(jTextFieldDBName, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addContainerGap(43, Short.MAX_VALUE)) ); Add.setText("Add"); Add.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { AddActionPerformed(evt); } }); Cancel.setText("Cancel"); jScrollPane4.setBorder(javax.swing.BorderFactory.createTitledBorder("Connection Status")); ConnectionStatus.setColumns(20); ConnectionStatus.setRows(5); jScrollPane4.setViewportView(ConnectionStatus); javax.swing.GroupLayout DBChooserLayout = new javax.swing.GroupLayout(DBChooser.getContentPane()); DBChooser.getContentPane().setLayout(DBChooserLayout); DBChooserLayout.setHorizontalGroup( DBChooserLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, DBChooserLayout.createSequentialGroup() .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(Add) .addGap(95, 95, 95) .addComponent(Cancel) .addGap(101, 101, 101)) .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, DBChooserLayout.createSequentialGroup() .addContainerGap() .addComponent(DBInfo, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(jScrollPane4, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(23, 23, 23)) ); DBChooserLayout.setVerticalGroup( DBChooserLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(DBChooserLayout.createSequentialGroup() .addContainerGap() .addGroup(DBChooserLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(DBInfo, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(jScrollPane4, javax.swing.GroupLayout.PREFERRED_SIZE, 214, javax.swing.GroupLayout.PREFERRED_SIZE)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 41, Short.MAX_VALUE) .addGroup(DBChooserLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(Cancel) .addComponent(Add)) .addContainerGap()) ); setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE); jInternalFrame1.setVisible(true); javax.swing.tree.DefaultMutableTreeNode treeNode1 = new javax.swing.tree.DefaultMutableTreeNode("JTree"); javax.swing.tree.DefaultMutableTreeNode treeNode2 = new javax.swing.tree.DefaultMutableTreeNode("Inputs"); javax.swing.tree.DefaultMutableTreeNode treeNode3 = new javax.swing.tree.DefaultMutableTreeNode("Connection"); treeNode2.add(treeNode3); treeNode3 = new javax.swing.tree.DefaultMutableTreeNode("DBInput"); treeNode2.add(treeNode3); treeNode3 = new javax.swing.tree.DefaultMutableTreeNode("LocalFileInput"); treeNode2.add(treeNode3); treeNode3 = new javax.swing.tree.DefaultMutableTreeNode("HDFSInput"); treeNode2.add(treeNode3); treeNode1.add(treeNode2); treeNode2 = new javax.swing.tree.DefaultMutableTreeNode("Actions"); treeNode3 = new javax.swing.tree.DefaultMutableTreeNode("Hop"); treeNode2.add(treeNode3); treeNode3 = new javax.swing.tree.DefaultMutableTreeNode("DBClean"); treeNode2.add(treeNode3); treeNode3 = new javax.swing.tree.DefaultMutableTreeNode("Extract"); treeNode2.add(treeNode3); treeNode3 = new javax.swing.tree.DefaultMutableTreeNode("Union"); treeNode2.add(treeNode3); treeNode3 = new javax.swing.tree.DefaultMutableTreeNode("Join"); treeNode2.add(treeNode3); treeNode3 = new javax.swing.tree.DefaultMutableTreeNode("Clean"); treeNode2.add(treeNode3); treeNode3 = new javax.swing.tree.DefaultMutableTreeNode("Sort"); treeNode2.add(treeNode3); treeNode1.add(treeNode2); treeNode2 = new javax.swing.tree.DefaultMutableTreeNode("Outputs"); treeNode3 = new javax.swing.tree.DefaultMutableTreeNode("TextOutputs"); treeNode2.add(treeNode3); treeNode3 = new javax.swing.tree.DefaultMutableTreeNode("AvroOutputs"); treeNode2.add(treeNode3); treeNode1.add(treeNode2); jTreeAction.setModel(new javax.swing.tree.DefaultTreeModel(treeNode1)); jTreeAction.setDragEnabled(true); jTreeAction.addTreeExpansionListener(new javax.swing.event.TreeExpansionListener() { public void treeCollapsed(javax.swing.event.TreeExpansionEvent evt) { } public void treeExpanded(javax.swing.event.TreeExpansionEvent evt) { jTreeActionTreeExpanded(evt); } }); jTreeAction.addMouseListener(new java.awt.event.MouseAdapter() { public void mouseEntered(java.awt.event.MouseEvent evt) { jTreeActionMouseEntered(evt); } }); jScrollPane3.setViewportView(jTreeAction); jTabbedPaneMainTree.addTab("Palette", jScrollPane3); textarea.setColumns(20); textarea.setRows(5); jScrollPane2.setViewportView(textarea); jTabbedPaneMainTree.addTab("Previews", jScrollPane2); jTabbedPaneMainTree.addTab("MainTree", jTabbedPane1); jButton2.setText("Search"); javax.swing.GroupLayout jInternalFrame1Layout = new javax.swing.GroupLayout(jInternalFrame1.getContentPane()); jInternalFrame1.getContentPane().setLayout(jInternalFrame1Layout); jInternalFrame1Layout.setHorizontalGroup( jInternalFrame1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jInternalFrame1Layout.createSequentialGroup() .addContainerGap() .addGroup(jInternalFrame1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jTabbedPaneMainTree) .addGroup(jInternalFrame1Layout.createSequentialGroup() .addComponent(jTextField1, javax.swing.GroupLayout.PREFERRED_SIZE, 98, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(jButton2, javax.swing.GroupLayout.DEFAULT_SIZE, 73, Short.MAX_VALUE))) .addContainerGap()) ); jInternalFrame1Layout.setVerticalGroup( jInternalFrame1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jInternalFrame1Layout.createSequentialGroup() .addGap(22, 22, 22) .addGroup(jInternalFrame1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(jTextField1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(jButton2)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(jTabbedPaneMainTree, javax.swing.GroupLayout.PREFERRED_SIZE, 0, Short.MAX_VALUE) .addContainerGap()) ); jInternalFrame3.setVisible(true); jLayeredPane3.addMouseMotionListener(new java.awt.event.MouseMotionAdapter() { public void mouseDragged(java.awt.event.MouseEvent evt) { jLayeredPane3MouseDragged(evt); } public void mouseMoved(java.awt.event.MouseEvent evt) { jLayeredPane3MouseMoved(evt); } }); jLayeredPane3.setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout()); jLabelDuke.setIcon(new javax.swing.ImageIcon(getClass().getResource("/learn/std2.jpg"))); // NOI18N jLabelDuke.setToolTipText(""); jLayeredPane3.setLayer(jLabelDuke, javax.swing.JLayeredPane.DRAG_LAYER); jLayeredPane3.add(jLabelDuke, new org.netbeans.lib.awtextra.AbsoluteConstraints(250, 160, 50, 60)); canvas2.addFocusListener(new java.awt.event.FocusAdapter() { public void focusGained(java.awt.event.FocusEvent evt) { canvas2FocusGained(evt); } }); jLayeredPane3.setLayer(canvas2, javax.swing.JLayeredPane.PALETTE_LAYER); jLayeredPane3.add(canvas2, new org.netbeans.lib.awtextra.AbsoluteConstraints(20, 10, 260, 180)); jLabel1.setText("jLabel1"); jLayeredPane3.add(jLabel1, new org.netbeans.lib.awtextra.AbsoluteConstraints(0, 0, 190, 220)); jTextArea1.setColumns(20); jTextArea1.setRows(5); jScrollPane1.setViewportView(jTextArea1); jLayeredPane3.add(jScrollPane1, new org.netbeans.lib.awtextra.AbsoluteConstraints(20, 220, -1, -1)); javax.swing.GroupLayout jInternalFrame3Layout = new javax.swing.GroupLayout(jInternalFrame3.getContentPane()); jInternalFrame3.getContentPane().setLayout(jInternalFrame3Layout); jInternalFrame3Layout.setHorizontalGroup( jInternalFrame3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jInternalFrame3Layout.createSequentialGroup() .addContainerGap() .addComponent(jLayeredPane3, javax.swing.GroupLayout.DEFAULT_SIZE, 327, Short.MAX_VALUE) .addContainerGap()) ); jInternalFrame3Layout.setVerticalGroup( jInternalFrame3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jInternalFrame3Layout.createSequentialGroup() .addContainerGap() .addComponent(jLayeredPane3, javax.swing.GroupLayout.PREFERRED_SIZE, 309, javax.swing.GroupLayout.PREFERRED_SIZE) .addContainerGap(71, Short.MAX_VALUE)) ); jPanel1.setBorder(javax.swing.BorderFactory.createTitledBorder("My Transformation")); jButtonSave.setText("Save"); jButtonSaveAs.setText("Save As"); jButton1.setText("Run"); javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1); jPanel1.setLayout(jPanel1Layout); jPanel1Layout.setHorizontalGroup( jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel1Layout.createSequentialGroup() .addContainerGap() .addComponent(jButtonSave) .addGap(18, 18, 18) .addComponent(jButtonSaveAs) .addGap(18, 18, 18) .addComponent(jButton1) .addGap(18, 18, 18) .addComponent(jProgressBar1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addContainerGap()) ); jPanel1Layout.setVerticalGroup( jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING) .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(jButtonSave) .addComponent(jButtonSaveAs) .addComponent(jButton1)) .addComponent(jProgressBar1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) ); File.setText("File"); OpenLocalFile.setText("OpenLocalFile"); OpenLocalFile.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { OpenLocalFileActionPerformed(evt); } }); File.add(OpenLocalFile); OpenDB.setText("OpenDB"); OpenDB.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { OpenDBActionPerformed(evt); } }); File.add(OpenDB); OpenHDFS.setText("OpenHDFS"); OpenHDFS.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { OpenHDFSActionPerformed(evt); } }); File.add(OpenHDFS); Exit.setText("Exit"); Exit.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { ExitActionPerformed(evt); } }); File.add(Exit); jMenuBar1.add(File); jMenuEdit.setText("Edit"); jMenuItemUndo.setText("Undo"); jMenuEdit.add(jMenuItemUndo); jMenuItemRedo.setText("Redo"); jMenuEdit.add(jMenuItemRedo); jMenuItemCut.setText("Cut"); jMenuEdit.add(jMenuItemCut); jMenuItemCopy.setText("Copy"); jMenuEdit.add(jMenuItemCopy); jMenuItemPaste.setText("Paste"); jMenuEdit.add(jMenuItemPaste); jMenuItemDelete.setText("Detele"); jMenuEdit.add(jMenuItemDelete); jMenuItemSelectAll.setText("Select all"); jMenuEdit.add(jMenuItemSelectAll); jMenuBar1.add(jMenuEdit); jMenuView.setText("View"); jMenuItemEnlarge.setText("放大"); jMenuView.add(jMenuItemEnlarge); jMenuItemShrink.setText("缩小"); jMenuView.add(jMenuItemShrink); jMenuItemFullScreen.setText("全屏"); jMenuView.add(jMenuItemFullScreen); jMenuBar1.add(jMenuView); jMenuRun.setText("Run"); jMenuItemRun.setText("运行"); jMenuItemRun.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jMenuItemRunActionPerformed(evt); } }); jMenuRun.add(jMenuItemRun); jMenuItemPreview.setText("预览"); jMenuRun.add(jMenuItemPreview); jMenuItemDebug.setText("调试"); jMenuRun.add(jMenuItemDebug); jMenuItemReplay.setText("重放"); jMenuRun.add(jMenuItemReplay); jMenuItemCheck.setText("校验"); jMenuRun.add(jMenuItemCheck); jMenuBar1.add(jMenuRun); jMenuTools.setText("Tools"); jMenuItem5.setText("jMenuItem5"); jMenuTools.add(jMenuItem5); jMenuBar1.add(jMenuTools); jMenuHelp.setText("Help"); jMenuBar1.add(jMenuHelp); setJMenuBar(jMenuBar1); javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane()); getContentPane().setLayout(layout); layout.setHorizontalGroup( layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup() .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false) .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addGroup(layout.createSequentialGroup() .addComponent(jInternalFrame1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(18, 18, 18) .addComponent(jInternalFrame3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))) .addGap(69, 69, 69)) ); layout.setVerticalGroup( layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup() .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(18, 18, 18) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false) .addComponent(jInternalFrame3) .addComponent(jInternalFrame1)) .addGap(12, 12, 12)) ); pack(); }
{ "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 BloodDonationGUI() {\n initComponents();\n }", "public quotaGUI() {\n initComponents();\n }", "public PatientUI() {\n initComponents();\n }", "public Customer_Form() {\n initComponents();\n setSize(890,740);\n \n \n }", "public Oddeven() {\n initComponents();\n }", "public myForm() {\n\t\t\tinitComponents();\n\t\t}", "public Magasin() {\n initComponents();\n }", "public intrebarea() {\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}", "public kunde() {\n initComponents();\n }", "public LixeiraForm() {\n initComponents();\n setLocationRelativeTo(null);\n }", "public MusteriEkle() {\n initComponents();\n }", "@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 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 vpemesanan1() {\n initComponents();\n }", "public EnterDetailsGUI() {\n initComponents();\n }", "public Kost() {\n initComponents();\n }", "public frmacceso() {\n initComponents();\n }", "public UploadForm() {\n initComponents();\n }", "public FormHorarioSSE() {\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 IssueBookForm() {\n initComponents();\n }", "public MiFrame2() {\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 ViewPrescriptionForm() {\n initComponents();\n }", "public Ventaform() {\n initComponents();\n }", "public Kuis2() {\n initComponents();\n }", "public CreateAccount_GUI() {\n initComponents();\n }", "public POS1() {\n initComponents();\n }", "public Carrera() {\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.7321342", "0.7292121", "0.7292121", "0.7292121", "0.72863305", "0.7249828", "0.7213628", "0.7209084", "0.7197292", "0.71912086", "0.7185135", "0.7159969", "0.7148876", "0.70944786", "0.70817256", "0.7057678", "0.69884527", "0.69786763", "0.69555986", "0.69548863", "0.69453996", "0.69434965", "0.69369817", "0.6933186", "0.6929363", "0.69259083", "0.69255763", "0.69123995", "0.6911665", "0.6894565", "0.6894252", "0.68922615", "0.6891513", "0.68894076", "0.6884006", "0.68833494", "0.6882281", "0.6879356", "0.68761575", "0.68752", "0.6872568", "0.68604666", "0.68577915", "0.6856901", "0.68561065", "0.6854837", "0.68547136", "0.6853745", "0.6853745", "0.68442935", "0.6838013", "0.6837", "0.6830046", "0.68297213", "0.68273175", "0.682496", "0.6822801", "0.6818054", "0.68177056", "0.6812038", "0.68098444", "0.68094784", "0.6809155", "0.680804", "0.68033874", "0.6795021", "0.67937285", "0.6793539", "0.6791893", "0.6790516", "0.6789873", "0.67883795", "0.67833847", "0.6766774", "0.6766581", "0.67658913", "0.67575616", "0.67566", "0.6754101", "0.6751978", "0.6741716", "0.6740939", "0.6738424", "0.6737342", "0.6734709", "0.672855", "0.6728138", "0.6721558", "0.6716595", "0.6716134", "0.6715878", "0.67096144", "0.67083293", "0.6703436", "0.6703149", "0.6701421", "0.67001027", "0.66999036", "0.66951054", "0.66923416", "0.6690235" ]
0.0
-1
TODO Autogenerated method stub
private void addListenerOnButton() { radioSex = (RadioGroup) findViewById(R.id.radioSex); btnDisplay = (Button) findViewById(R.id.btnDisplay); btnDisplay.setOnClickListener(new OnClickListener() { public void onClick(View arg0) { // TODO Auto-generated method stub int seledtedId = radioSex.getCheckedRadioButtonId(); RadioButton radioMale = (RadioButton) findViewById(seledtedId); Toast.makeText(ExampleRadio.this, radioMale.getText(), Toast.LENGTH_LONG).show(); } }); }
{ "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
public void onClick(View arg0) { int seledtedId = radioSex.getCheckedRadioButtonId(); RadioButton radioMale = (RadioButton) findViewById(seledtedId); Toast.makeText(ExampleRadio.this, radioMale.getText(), Toast.LENGTH_LONG).show(); }
{ "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
BaseHandler baseHandler = new BaseHandler();
public static void main(String[] args) { AbsHandler absHandler = new AbsHandler(); AnotherAbsHandler anotherAbsHandler = new AnotherAbsHandler(); InterfaceHandler interfaceHandler = new InterfaceHandler(); System.out.println(interfaceHandler.sayHello()); System.out.println(absHandler.sayHello()); System.out.println(anotherAbsHandler.sayHello()); System.out.println(absHandler.sayHi()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public GenericHandler() {\n\n }", "CreateHandler()\n {\n }", "public ContentHandler getContentHandler()\n {\n return (contentHandler == base) ? null : contentHandler;\n }", "ByteHandler getInstance();", "private PersonHandler() {\n }", "public Handler getHandler();", "public ModuliHandler() {\n\t}", "default Handler asHandler() {\n return new HandlerBuffer(this);\n }", "public InternalNameServiceHandler() {\n }", "public DictionaryHandler() {\n\t}", "private HandlerBuilder() {\n }", "public Hello(Handler handler){\n this.handler = handler;\n }", "public MessageHandler() {\n }", "public ExLoggingHandler() {\n super();\n }", "public Handler getHandler() {\r\n return handler;\r\n }", "public Handler getHandler() {\r\n return handler;\r\n }", "void init(HandlerContext context);", "public Class<?> getHandler();", "HandlerHelper getHandlerHelper() {\n return handlerHelper;\n }", "public PacketHandler() {}", "public void setContentHandler(ContentHandler handler)\n {\n if (handler == null)\n {\n handler = base;\n }\n contentHandler = handler;\n }", "public interface DummyDbHandler extends DbHandler {\n\n\n}", "public static synchronized INSURLHandler getINSURLHandler() {\n/* 50 */ if (insURLHandler == null) {\n/* 51 */ insURLHandler = new INSURLHandler();\n/* */ }\n/* 53 */ return insURLHandler;\n/* */ }", "public ConfigParserHandler() {\n\t}", "private AuctionFileHandler()\n {\n }", "public void registerHandler(Object handler)\n {\n\n }", "public StringHttpResponseHandler() {\n\t\tsuper();\n\t}", "protected FedoraContentModelHandler() {\r\n }", "public Handler getHandler() {\n return mHandler;\n }", "private void startHandler() {\n mHandler = new MessageHandler();\n }", "public ErrorHandler getErrorHandler()\n {\n return (errorHandler == base) ? null : errorHandler;\n }", "public BaseNetHandler(String name)\n\t{\n\t\tthis.name = name;\n\t\tthis.packets = new ArrayList<>();\n\t}", "protected Proxy(InvocationHandler h) { }", "@Override\n public void onCreate() {\n super.onCreate();\n mHandler = new Handler();\n }", "@Override\n\tpublic Handler getHandler() {\n\t\treturn mHandler;\n\t}", "public\n /* Constructor */\n AVRProgrammer(Handler _handler) {\n handler = _handler;\n }", "PaymentHandler createPaymentHandler();", "protected abstract void runHandler();", "public CallbackHandler() {\r\n // TODO Auto-generated constructor stub\r\n }", "public Handler getHandler() {\n return null;\n }", "public interface Handler {\n void handleRequest(String s);\n}", "public interface ApiHandler {\n // Empty\n}", "ByteHandler getByteHandler();", "public RESTWorkItemHandler() {\n\t}", "@Override\n protected Handler createHandler(Looper looper) {\n return new CatchingWorkerHandler(looper);\n }", "public Handler(Class<?> implementation) {\r\n this.implementation = implementation;\r\n }", "public void setCommunicationHandler(){\n this.comHandler = new CommunicationHandler(this);\n }", "public StartupHandler(){\r\n\t\tloadGameFiles();\r\n\t\tnew Engine();\r\n\t}", "@Override\n public void onCreate() {\n super.onCreate();\n// han = new Handler();\n }", "public static DatabaseHandler getInstance(){\n if(handler == null){\n handler = new DatabaseHandler();\n }\n return handler;\n }", "@Override\n\tpublic Handler getHandler() {\n\t\t// TODO Auto-generated method stub\n\t\treturn mHandler;\n\t}", "ResponseHandler getInstance() {\n \t\treturn this;\n \t}", "public void setHandler(ContentHandler handler) { }", "public StreetBrawlerState(PocketHandler handler){\n\t\tsuper(handler);\n\n\t}", "public BaseLogic()\n {\n this(new EventBus());\n }", "public TrackClientPacketHandler() \n {\n super(Constants.DEVICE_CODE);\n }", "public static HandlerBuilder newHandlerBuilder() {\n return new HandlerBuilder();\n }", "public String getHandler() {\n return handler;\n }", "private DatabaseHandler(){\n createConnection();\n }", "private Handler getHandler(Request request) {\n return resolver.get(request.getClass().getCanonicalName()).create();\n }", "@Override\n public void onCreate() {\n super.onCreate();\n handler = new Handler();\n BusProvider.register(this);\n }", "private synchronized Handler getCustomHandler( ) {\n if( (customHandler != null ) \n ||(customHandlerError) ) \n {\n return customHandler;\n }\n LogService logService = getLogService( );\n if( logService == null ) {\n return null;\n }\n String customHandlerClassName = null;\n try {\n customHandlerClassName = logService.getLogHandler( );\n\n customHandler = (Handler) getInstance( customHandlerClassName );\n // We will plug in our UniformLogFormatter to the custom handler\n // to provide consistent results\n if( customHandler != null ) {\n customHandler.setFormatter( new UniformLogFormatter(componentManager.getComponent(Agent.class)) );\n }\n } catch( Exception e ) {\n customHandlerError = true; \n new ErrorManager().error( \"Error In Initializing Custom Handler \" +\n customHandlerClassName, e, ErrorManager.GENERIC_FAILURE );\n }\n return customHandler;\n }", "void createHandler(final String handlerClassName);", "public RequestUrlHandler() {\n // requestService = SpringContextHolder.getBean(ScfRequestService.class);\n }", "public CategoryTransferHandler() {\n }", "public Handler getHandler() {\n return this.mHandler;\n }", "public interface IHttpRequestHandler extends INamedObject\r\n{\t\r\n public HandlerResponse handleRequest( HttpRequestData httpRequest ) throws IOException;\r\n}", "public genericHandler(String fileName) \r\n {\r\n this.fileName = fileName;\r\n }", "public InternalConnectionHandler() {\r\n\t\tthis.setPacketProcessor(InternalPacketProcessor.getInstance());\r\n\t}", "public int getHandler() {\n\t\treturn 1;\n\t}", "protected CommunicationsHandler(){}", "public EVT_HANDLE(Pointer p) {\n/* 1701 */ super(p);\n/* */ }", "public AsyncHttpCallback() {\n\t\tif(Looper.myLooper() != null) mHandler = new Handler(this);\n\t}", "public void setHandler(Handler handler) {\r\n this.handler = handler;\r\n }", "public void setHandler(Handler handler) {\r\n this.handler = handler;\r\n }", "public ContentItemServiceHandlerTest(String name) {\r\n\t}", "public RunePouchHandler getInstance() {\n return instance == null ? instance = new RunePouchHandler(this.superClass) : instance;\n }", "abstract public TelnetServerHandler createHandler(TelnetSocket s);", "private BroadcastReceiverHandler() {\n\n }", "@Override\n\tpublic void initiateHandling() {\n\t}", "@Override\n\tpublic void initiateHandling() {\n\t}", "@Override\n\tpublic void initiateHandling() {\n\t}", "DispatchingProperties() {\r\n\t\tsuper();\r\n\t\t// if (handler != null) {\r\n\t\t// throw new\r\n\t\t// RuntimeException(\"ServicePropertiesHandler: class already instantiated!\");\r\n\t\t// }\r\n\t\t// handler = this;\r\n\t}", "public EnchantHandler(){\n loadEnchants();\n }", "@Override\n public HandlerList getHandlers() {\n return handlers;\n }", "@Override\n public HandlerList getHandlers() {\n return handlers;\n }", "Handle newHandle();", "public ConsoleHandler createConsoleHandler () {\r\n\t\t\t\r\n\t\tConsoleHandler consoleHandler = null;\r\n\t\t\t\r\n\t\ttry {\r\n\t\t \t\r\n\t\t\tconsoleHandler = new ConsoleHandler();\r\n\t\t\t\t\r\n\t\t} catch (SecurityException e) {\r\n\t\t\t\t\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\t \r\n\t\t return consoleHandler;\r\n\t}", "@Override\n public final HandlerList getHandlers(){\n return handlers;\n }", "public void setHandler(String handler) {\n this.Handler = handler;\n }", "ResponseHandler createResponseHandler();", "@Override\n public void addHandlerListener(IHandlerListener handlerListener) {\n\n }", "@Override\n\tpublic void setHandler(String defaultHandler, String handlerName) {\n\n\t}", "public interface INetworkHandlerManager {\n public void registerHandler (String handlerName, INetworkHandler handler);\n public INetworkHandler getHandler (INetworkMessage message);\n}", "public Registration() {\r\n initComponents();\r\n handler = new ClientSocketHandler();\r\n }", "public EventHandlerRegistry() {\n }", "protected BlobByteArrayTypeHandler(LobHandler lobHandler) {\r\n super(lobHandler);\r\n logger.debug(\"BlobByteArrayTypeHandler created,LobHander is [{}]\", lobHandler);\r\n }", "Map<String, Handler> handlers();", "public static IProtocolHandler createHandler(String type) {\n if (type==null) {\n return new RestHandler(); //use REST by default\n } else if (type.equalsIgnoreCase(\"rest\")) {\n return new RestHandler();\n } else if (type.equalsIgnoreCase(\"soap\")) {\n //for future use\n return null;\n } else {\n throw new IllegalArgumentException(\"Unknown protocol type: \" + type);\n }\n }", "public _CodeBaseStub ()\n {\n super ();\n }", "public PSProviderCatalogHandler()\n {\n super();\n }" ]
[ "0.7859275", "0.7787462", "0.6883897", "0.66643876", "0.6664272", "0.6591575", "0.6580743", "0.65483403", "0.65360534", "0.638366", "0.6311826", "0.6310814", "0.6304096", "0.6289577", "0.62646836", "0.62646836", "0.6244364", "0.62431777", "0.6218549", "0.61918354", "0.6184711", "0.6184271", "0.6182108", "0.61328435", "0.6098102", "0.6093341", "0.6078556", "0.60770863", "0.60511535", "0.6038035", "0.60307425", "0.60243285", "0.60204065", "0.5995083", "0.5980933", "0.5972328", "0.5971857", "0.5969862", "0.5967531", "0.5965792", "0.5954348", "0.59534", "0.59493804", "0.5932908", "0.5925649", "0.5920027", "0.591059", "0.5910482", "0.5899792", "0.5893614", "0.5893021", "0.5887689", "0.5884014", "0.5865907", "0.585436", "0.5852013", "0.58310795", "0.58282286", "0.5820638", "0.58123463", "0.5811922", "0.5808489", "0.57994694", "0.57923836", "0.5791352", "0.5783", "0.5770793", "0.576017", "0.57432204", "0.5738648", "0.5729054", "0.5714478", "0.5695368", "0.5694933", "0.5694933", "0.56935364", "0.5689943", "0.56823087", "0.5670843", "0.5666258", "0.5666258", "0.5666258", "0.56606483", "0.56603736", "0.56439894", "0.56439894", "0.56429285", "0.5635428", "0.5631894", "0.5631892", "0.56033444", "0.5603293", "0.5598932", "0.5598111", "0.5596213", "0.55902827", "0.55899614", "0.55866563", "0.55798095", "0.55783206", "0.5574883" ]
0.0
-1
Copy the directories into the target ...
@Override protected RepositorySource setUpSource() throws Exception { File sourceRepo = new File(REPO_SOURCE_PATH); scratchDirectory = new File(REPO_PATH); scratchDirectory.mkdirs(); FileUtil.delete(scratchDirectory); FileUtil.copy(sourceRepo, scratchDirectory); // Set the connection properties to be use the content of "./src/test/resources/repositories" as a repository ... String[] predefinedWorkspaceNames = new String[] {"test", "otherWorkspace", "airplanes", "cars"}; source = new FileSystemSource(); source.setName("Test Repository"); source.setWorkspaceRootPath(REPO_PATH); source.setPredefinedWorkspaceNames(predefinedWorkspaceNames); source.setDefaultWorkspaceName(predefinedWorkspaceNames[0]); source.setCreatingWorkspacesAllowed(true); source.setUpdatesAllowed(true); source.setExclusionPattern("\\.svn"); source.setInclusionPattern(".+"); testWorkspaceRoot = new File(REPO_PATH, "test"); testWorkspaceRoot.mkdir(); otherWorkspaceRoot = new File(REPO_PATH, "otherWorkspace"); otherWorkspaceRoot.mkdir(); newWorkspaceRoot = new File(REPO_PATH, "newWorkspace"); newWorkspaceRoot.mkdir(); return source; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void copyDirectory(String from, String to, IProgressMonitor monitor) {\n \t\ttry {\n \t\t\tFile fromDir = new File(from);\n \t\t\tFile toDir = new File(to);\n \t\n \t\t\tFile[] files = fromDir.listFiles();\n \t\n \t\t\ttoDir.mkdir();\n \t\n \t\t\t// cycle through files\n \t\t\tint size = files.length;\n \t\t\tmonitor = ProgressUtil.getMonitorFor(monitor);\n \t\t\tmonitor.beginTask(NLS.bind(Messages.copyingTask, new String[] {from, to}), size * 50);\n \t\n \t\t\tfor (int i = 0; i < size; i++) {\n \t\t\t\tFile current = files[i];\n \t\t\t\tString fromFile = current.getAbsolutePath();\n \t\t\t\tString toFile = to;\n \t\t\t\tif (!toFile.endsWith(File.separator))\n \t\t\t\t\ttoFile += File.separator;\n \t\t\t\ttoFile += current.getName();\n \t\t\t\tif (current.isFile()) {\n \t\t\t\t\tcopyFile(fromFile, toFile);\n \t\t\t\t\tmonitor.worked(50);\n \t\t\t\t} else if (current.isDirectory()) {\n \t\t\t\t\tmonitor.subTask(NLS.bind(Messages.copyingTask, new String[] {fromFile, toFile}));\n \t\t\t\t\tcopyDirectory(fromFile, toFile, ProgressUtil.getSubMonitorFor(monitor, 50));\n \t\t\t\t}\n \t\t\t\tif (monitor.isCanceled())\n \t\t\t\t\treturn;\n \t\t\t}\n \t\t\tmonitor.done();\n \t\t} catch (Exception e) {\n \t\t\tTrace.trace(Trace.SEVERE, \"Error copying directory\", e);\n \t\t}\n \t}", "public static void copyFolder(final String sourcePath, final String targetPath)\n\t{\n\t\tFile tfile = new File(targetPath);\n\t\ttfile.mkdirs();\n\t\tFile sfile = new File(sourcePath);\n\t\tfinal FilenameFilter ffilter = new FilenameFilter()\n\t\t{\n\t\t\t\n\t\t\t@Override\n\t\t\tpublic boolean accept(File dir, String name)\n\t\t\t{\n\t\t\t\tif( name.startsWith(\".svn\"))\n\t\t\t\t{\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t\treturn true;\n\t\t\t}\n\t\t};\n\t\tFile[] files = sfile.listFiles(ffilter);\n\t\t\n\t\tArrayList <File> cpFile = new ArrayList<File>();\n\t\tfor( int i=0;i<files.length;i++)\n\t\t{\n\t\t\tfinal File souFile = files[i];\n\t\t\tif( souFile.isDirectory())\n\t\t\t{\n\t\t\t\tfinal String souPath = souFile.getAbsolutePath();\n\t\t\t\tfinal String tarpath = targetPath + File.separator + souFile.getName();\n\t\t\t\ttraverseDir(souPath, ffilter, new IOnGetFileHandler()\n\t\t\t\t{\n\t\t\t\t\t\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic void handle(File file)\n\t\t\t\t\t{\n//\t\t\t\t\t\tcopyFile(file.getAbsolutePath(), tarpath +File.separator + file.getName());\n\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t}, new IOnGetFileHandler()\n\t\t\t\t{\n\t\t\t\t\t\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic void handle(File file)\n\t\t\t\t\t{\n\t\t\t\t\t\tcopyFolder(file.getAbsolutePath(), tarpath);\n\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t}, null);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tcpFile.add(souFile);\n\t\t\t}\n\t\t\t\n\t\t}\n\t\t\n\t\tcopyFiles(targetPath, cpFile);\n\t\t\n\t\t\n\t}", "private static boolean copyDirectory(File from, File to)\n {\n return copyDirectory(from, to, (byte[])null);\n }", "public static void smartCopyDirectory(String from, String to, IProgressMonitor monitor) {\n \t\ttry {\n \t\t\tFile fromDir = new File(from);\n \t\t\tFile toDir = new File(to);\n \t\n \t\t\tFile[] fromFiles = fromDir.listFiles();\n \t\t\tint fromSize = fromFiles.length;\n \t\n \t\t\tmonitor = ProgressUtil.getMonitorFor(monitor);\n \t\t\tmonitor.beginTask(NLS.bind(Messages.copyingTask, new String[] {from, to}), 550);\n \t\n \t\t\tFile[] toFiles = null;\n \t\n \t\t\t// delete old files and directories from this directory\n \t\t\tif (toDir.exists() && toDir.isDirectory()) {\n \t\t\t\ttoFiles = toDir.listFiles();\n \t\t\t\tint toSize = toFiles.length;\n \t\n \t\t\t\t// check if this exact file exists in the new directory\n \t\t\t\tfor (int i = 0; i < toSize; i++) {\n \t\t\t\t\tString name = toFiles[i].getName();\n \t\t\t\t\tboolean isDir = toFiles[i].isDirectory();\n \t\t\t\t\tboolean found = false;\n \t\t\t\t\tfor (int j = 0; j < fromSize; j++) {\n \t\t\t\t\t\tif (name.equals(fromFiles[j].getName()) && isDir == fromFiles[j].isDirectory())\n \t\t\t\t\t\t\tfound = true;\n \t\t\t\t\t}\n \t\n \t\t\t\t\t// delete file if it can't be found or isn't the correct type\n \t\t\t\t\tif (!found) {\n \t\t\t\t\t\tif (isDir)\n \t\t\t\t\t\t\tPublishUtil.deleteDirectory(toFiles[i], null);\n \t\t\t\t\t\telse\n \t\t\t\t\t\t\ttoFiles[i].delete();\n \t\t\t\t\t}\n \t\t\t\t\tif (monitor.isCanceled())\n \t\t\t\t\t\treturn;\n \t\t\t\t}\n \t\t\t} else {\n \t\t\t\tif (toDir.isFile())\n \t\t\t\t\ttoDir.delete();\n \t\t\t\ttoDir.mkdir();\n \t\t\t}\n \t\t\tmonitor.worked(50);\n \t\n \t\t\t// cycle through files and only copy when it doesn't exist\n \t\t\t// or is newer\n \t\t\ttoFiles = toDir.listFiles();\n \t\t\tint toSize = toFiles.length;\n \t\t\tint dw = 0;\n \t\t\tif (toSize > 0)\n \t\t\t\tdw = 500 / toSize;\n \t\n \t\t\tfor (int i = 0; i < fromSize; i++) {\n \t\t\t\tFile current = fromFiles[i];\n \t\n \t\t\t\t// check if this is a new or newer file\n \t\t\t\tboolean copy = true;\n \t\t\t\tif (!current.isDirectory()) {\n \t\t\t\t\tString name = current.getName();\n \t\t\t\t\tlong mod = current.lastModified();\n \t\t\t\t\tfor (int j = 0; j < toSize; j++) {\n \t\t\t\t\t\tif (name.equals(toFiles[j].getName()) && mod <= toFiles[j].lastModified())\n \t\t\t\t\t\t\tcopy = false;\n \t\t\t\t\t}\n \t\t\t\t}\n \t\n \t\t\t\tif (copy) {\n \t\t\t\t\tString fromFile = current.getAbsolutePath();\n \t\t\t\t\tString toFile = to;\n \t\t\t\t\tif (!toFile.endsWith(File.separator))\n \t\t\t\t\t\ttoFile += File.separator;\n \t\t\t\t\ttoFile += current.getName();\n \t\t\t\t\tif (current.isFile()) {\n \t\t\t\t\t\tcopyFile(fromFile, toFile);\n \t\t\t\t\t\tmonitor.worked(dw);\n \t\t\t\t\t} else if (current.isDirectory()) {\n \t\t\t\t\t\tmonitor.subTask(NLS.bind(Messages.copyingTask, new String[] {fromFile, toFile}));\n \t\t\t\t\t\tsmartCopyDirectory(fromFile, toFile, ProgressUtil.getSubMonitorFor(monitor, dw));\n \t\t\t\t\t}\n \t\t\t\t}\n \t\t\t\tif (monitor.isCanceled())\n \t\t\t\t\treturn;\n \t\t\t}\n \t\t\tmonitor.worked(500 - dw * toSize);\n \t\t\tmonitor.done();\n \t\t} catch (Exception e) {\n \t\t\tTrace.trace(Trace.SEVERE, \"Error smart copying directory \" + from + \" - \" + to, e);\n \t\t}\n \t}", "public static void copyDirectory(File destDir, File sourceDir, boolean mkdirs) throws Exception {\r\n\t\tif (!destDir.exists() && !destDir.isDirectory()) {\r\n\t\t\tif (mkdirs) destDir.mkdirs();\r\n\t\t\telse return;\r\n\t\t}\r\n\t\tFile[] containedFiles = sourceDir.listFiles();\r\n\t\tfor (int i = 0; i < containedFiles.length; i++) {\r\n\t\t\tFile aFile = containedFiles[i];\r\n\t\t\tif (aFile.isFile()) copy(destDir, aFile);\r\n\t\t\telse {\r\n\t\t\t\tString dirName = aFile.getName();\r\n\t\t\t\tFile newDir = new File(destDir.getAbsolutePath() + File.separatorChar + dirName);\r\n\t\t\t\tcopyDirectory(newDir, aFile, mkdirs);\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public static void copyAll(File root, File dest) throws IOException {\n if(root.isDirectory()){\n for(File child : root.listFiles()){\n File childDest = new File(dest, child.getName());\n if(child.isDirectory()){\n if(!childDest.exists() && !childDest.mkdirs())\n throw new IOException(\"Failed to create dir \"+childDest.getPath());\n copyAll(child, childDest);\n }else{\n Files.copy(child.toPath(), childDest.toPath(), StandardCopyOption.COPY_ATTRIBUTES);\n }\n }\n }else{\n File childDest = new File(dest, root.getName());\n if(!dest.exists() && !dest.mkdirs())\n throw new IOException(\"Failed to create dir \"+dest.getPath());\n Files.copy(root.toPath(), childDest.toPath(), StandardCopyOption.COPY_ATTRIBUTES);\n }\n }", "public static void copyDirectory(File sourceDir, File targetDir) throws IOException {\n File[] srcFiles = sourceDir.listFiles();\n if (srcFiles != null) {\n for (int i = 0; i < srcFiles.length; i++) {\n File dest = new File(targetDir, srcFiles[i].getName());\n if (srcFiles[i].isDirectory() && FileUtils.safeIsRealDirectory(srcFiles[i])) {\n if (!dest.exists()) {\n dest.mkdirs();\n }\n copyDirectory(srcFiles[i], dest);\n } else {\n if (!dest.exists()) {\n dest.createNewFile();\n }\n copyFile(srcFiles[i].getAbsolutePath(), new File(targetDir,\n srcFiles[i].getName()).getAbsolutePath());\n }\n }\n }\n }", "public void copyAll(String src_path, String dest_path) {\n String sub_directory = null;\n for (String device : this.execAdbDevices()) {\n sub_directory = this.deviceid_hostname_map.get(device);\n this.copy(device, src_path, dest_path + File.separator + sub_directory);\n }\n }", "public static void copyPath(Path source, Path target) {\n try {\n Files.copy(source, target);\n if (Files.isDirectory(source)) {\n try (Stream<Path> files = Files.list(source)) {\n files.forEach(p -> copyPath(p, target.resolve(p.getFileName())));\n }\n }\n } catch (IOException e) { e.printStackTrace(); }\n }", "void copyFolder(OrionCMContext ctx, Long sourceId, Long targetFolderId, List<SolutionParam> solutions) throws PhoenixDataAccessException, IOException;", "public static void copyDirectories (File d1, File d2){\n //checks for the console\n System.out.println(\"->Executing copyDirectories\");\n \n if(!d1.isDirectory()){\n //We will search the files and then move them recursive\n copyFyles(d1, d2);\n }//end if directory\n else{\n //Copy d1 to d2, as they are files\n \n //Creating the directory d2 if it does not exist yet.\n if(!d2.exists()){\n d2.mkdir();\n System.out.println(\"Creating directory: \"+d2);\n }//end if creating directori\n \n /* 1. Obtein the list of the existing files in the directory\n 2. Call recursivily this method to copy each of the files \n */\n System.out.println(\"Searching in the directory: \"+d1);\n String files[] = d1.list();\n for(int i=0; i<files.length; i++)\n copyDirectories(new File(d1,files[i]), new File(d2,files[i]));\n System.out.println(\"We copied the files sucesfully\");\n }//end else files\n }", "private void copyFiles() {\n if( !USE_EXTERNAL_FILES_DIR ) return;\n boolean ret = mFileUtil.copyFilesAssetToExternalFilesDir( FILE_EXT );\n if(ret) {\n showList();\n showToast(\"copy successful\");\n } else {\n showToast(\"copy faild\");\n }\n}", "private static void copyFiles(File source, File dest) throws IOException {\n\t\tif(!source.equals(dest))\n\t\t\tFileUtils.copyFile(source, dest);\n\t}", "private void copyFolder(File sourceFolder, File destinationFolder) throws IOException {\n //Check if sourceFolder is a directory or file\n //If sourceFolder is file; then copy the file directly to new location\n if (sourceFolder.isDirectory()) {\n //Verify if destinationFolder is already present; If not then create it\n if (!destinationFolder.exists()) {\n destinationFolder.mkdir();\n logAppend(\"Directory created :: \" + destinationFolder);\n nothingDone=false;\n }\n\n //Get all files from source directory\n String files[] = sourceFolder.list();\n\n //Iterate over all files and copy them to destinationFolder one by one\n for (String file : files) {\n\n File srcFile = new File(sourceFolder, file);\n File destFile = new File(destinationFolder, file);\n\n //Recursive function call\n copyFolder(srcFile, destFile);\n }\n } else {\n\n long dateSrc = sourceFolder.lastModified();\n long dateDest = destinationFolder.lastModified();\n\n if (dateSrc > dateDest) {\n //Copy the file content from one place to another\n Files.copy(sourceFolder.toPath(), destinationFolder.toPath(), StandardCopyOption.REPLACE_EXISTING);\n logAppend(\"File copied :: \" + destinationFolder);\n nothingDone=false;\n }\n\n }\n }", "public static void copyDirectory(String destDirStr, String sourceDirStr, boolean mkdirs) throws Exception {\r\n\t\tFile destDir = new File(destDirStr);\r\n\t\tFile sourceDir = new File(sourceDirStr);\r\n\t\tcopyDirectory(destDir, sourceDir, mkdirs);\r\n\t}", "public static void copyFolder(File src, File dest) throws IOException {\n\n\t\tif (src.isDirectory()) {\n\n\t\t\t// if directory not exists, create it\n\t\t\tif (!dest.exists()) {\n\t\t\t\tdest.mkdir();\n\t\t\t\t// System.out.println(\"Directory copied from \" + src + \" to \" +\n\t\t\t\t// dest);\n\t\t\t}\n\n\t\t\t// list all the directory contents\n\t\t\tString files[] = src.list();\n\n\t\t\tfor (String file : files) {\n\t\t\t\t// construct the src and dest file structure\n\t\t\t\tFile srcFile = new File(src, file);\n\t\t\t\tFile destFile = new File(dest, file);\n\t\t\t\t// recursive copy\n\t\t\t\tcopyFolder(srcFile, destFile);\n\t\t\t}\n\n\t\t} else {\n\t\t\t// if file, then copy it\n\t\t\t// Use bytes stream to support all file types\n\t\t\tInputStream in = new FileInputStream(src);\n\t\t\tOutputStream out = new FileOutputStream(dest);\n\n\t\t\tbyte[] buffer = new byte[1024];\n\n\t\t\tint length;\n\t\t\t// copy the file content in bytes\n\t\t\twhile ((length = in.read(buffer)) > 0) {\n\t\t\t\tout.write(buffer, 0, length);\n\t\t\t}\n\n\t\t\tin.close();\n\t\t\tout.close();\n\t\t\t// System.out.println(\"File copied from \" + src + \" to \" + dest);\n\t\t}\n\t}", "private void executeCopyFiles( final File folderResources, final File folderJava, final File targetJavaAppStub,\n final File jarWithDependsSource )\n throws MojoExecutionException\n {\n this.logger.info( \"Copying files ...\" );\n\n final File jarWithDependsTarget = new File( folderJava, jarWithDependsSource.getName() );\n\n if ( JAVA_APP_STUB.exists() == false )\n {\n throw new MojoExecutionException( \"Could not find Java Application stub at: \"\n + JAVA_APP_STUB.getAbsolutePath() );\n }\n\n copyFile( JAVA_APP_STUB, targetJavaAppStub );\n copyFile( jarWithDependsSource, jarWithDependsTarget );\n\n if ( this.data.getAppIcon() != null )\n {\n copyFile( this.data.getAppIcon(), new File( folderResources, this.data.getAppIcon().getName() ) );\n }\n\n if ( this.data.getAdditionalResources() != null )\n {\n for ( int i = 0, n = this.data.getAdditionalResources().size(); i < n; i++ )\n {\n final String rsrc = (String) this.data.getAdditionalResources().get( i );\n\n final File source = new File( this.data.getBaseDirectory(), rsrc );\n final File target = new File( folderResources, source.getName() );\n\n copyFile( source, target );\n }\n }\n }", "public static void copyPaths (Path path1, Path path2){\n // Creating files\n File d1 = path1.toFile();\n File d2 = path2.toFile();\n \n //checks for the console\n System.out.println(\"->Executing copyDirectories\");\n \n if(!d1.isDirectory()){\n //We will search the files and then move them recursive\n copyFyles(d1, d2);\n }//end if directory\n else{\n //Copy d1 to d2, as they are files\n \n //Creating the directory d2 if it does not exist yet.\n if(!d2.exists()){\n d2.mkdir();\n System.out.println(\"Creating directory: \"+d2);\n }//end if creating directori\n \n /* 1. Obtein the list of the existing files in the directory\n 2. Call recursivily this method to copy each of the files \n */\n System.out.println(\"Searching in the directory: \"+d1);\n String files[] = d1.list();\n for(int i=0; i<files.length; i++)\n copyDirectories(new File(d1,files[i]), new File(d2,files[i]));\n System.out.println(\"We copied the files sucesfully\");\n }//end else files\n }", "public static void copyFiles(File src, File dest) throws IOException {\n if (!src.exists()) {\n throw new IOException(\"copyFiles: Can not find source: \" + src.getAbsolutePath() + \".\");\n } else if (!src.canRead()) { //check to ensure we have rights to the source...\n throw new IOException(\"copyFiles: No right to source: \" + src.getAbsolutePath() + \".\");\n }\n //is this a directory copy?\n if (src.isDirectory()) {\n if (!dest.exists()) { //does the destination already exist?\n //if not we need to make it exist if possible (note this is mkdirs not mkdir)\n if (!dest.mkdirs()) {\n throw new IOException(\"copyFiles: Could not create direcotry: \" + dest.getAbsolutePath() + \".\");\n }\n }\n //get a listing of files...\n String list[] = src.list();\n //copy all the files in the list.\n for (int i = 0; i < list.length; i++) {\n File dest1 = new File(dest, list[i]);\n File src1 = new File(src, list[i]);\n copyFiles(src1, dest1);\n }\n } else {\n //This was not a directory, so lets just copy the file\n try {\n copy(new FileInputStream(src), new FileOutputStream(dest));\n } catch (IOException e) { //Error copying file...\n IOException wrapper = new IOException(\"copyFiles: Unable to copy file: \"\n + src.getAbsolutePath() + \"to\" + dest.getAbsolutePath() + \".\");\n wrapper.initCause(e);\n wrapper.setStackTrace(e.getStackTrace());\n throw wrapper;\n }\n }\n }", "public static void copyTree(File from, File to, FileFilter filter) throws IOException {\r\n File[] children;\r\n \r\n \tif (!from.exists()) {\r\n \t\tthrow new IOException (\"Source of copy \\'\" + from.getName() + \"\\' doesn't exist\");\r\n \t}\r\n \t\r\n \tif (to.getCanonicalPath().equals(from.getCanonicalPath())) {\r\n \t\tthrow new IOException (\"\\'\" + from.getName() + \"\\' cannot copy to itself\");\r\n \t}\r\n\r\n if (from.isDirectory()) {\r\n children = from.listFiles(filter);\r\n // just like cp command, if target exist, make a new folder into\r\n // the target, copy content into the target folder\r\n if (to.exists()) {\r\n \tif (to.isFile()) {\r\n \t\tthrow new IOException(\"Cannot overwrite non-directory \\'\" + to.getName() + \"\\' with directory \" + from.getName());\r\n \t}\r\n \t// copy into new directory name grafted after the existing one\r\n \tto = new File(to, from.getName());\r\n \tcopyTree(from, to, filter);\r\n \treturn;\r\n } else {\r\n \t// copy into new directory name\r\n \tto.mkdir(); \t\r\n for (int i = 0; i < children.length; i++) {\r\n File curto = new File(to, children[i].getName());\r\n \r\n copyTree(children[i], curto, filter);\r\n }\r\n return;\r\n }\r\n }\r\n else {\r\n \tif (to.isDirectory()) {\r\n \t\tto = new File (to, from.getName());\r\n \t}\r\n copyFile(from, to);\r\n return;\r\n }\r\n \r\n }", "public void copyDirectory(String srcDirName, String dstDirName)\n\t\t\tthrows IOException {\n\t\tFile srcDir = new File(srcDirName);\n\t\tFile dstDir = new File(dstDirName);\n\t\tcopyDirectory(srcDir, dstDir);\n\t}", "private void copyRootDirectory(WorkUnit workUnit) throws IOException, InterruptedException {\n\n MigrationHistory history = historyMgr.startStep(workUnit.migration, StepEnum.SVN_COPY_ROOT_FOLDER,\n (workUnit.commandManager.isFirstAttemptMigration() ? \"\" : Constants.REEXECUTION_SKIPPING) +\n \"Copying Root Folder\");\n\n if (workUnit.commandManager.isFirstAttemptMigration()) {\n\n String gitCommand = \"\";\n if (isWindows) {\n // /J Copy using unbuffered I/O. Recommended for very large files.\n gitCommand = format(\"Xcopy /E /I /H /Q %s %s_copy\", workUnit.root, workUnit.root);\n } else {\n // cp -a /source/. /dest/ (\"-a\" is recursive \".\" means files and folders including hidden)\n // root has no trailling / e.g. folder_12345\n gitCommand = format(\"cp -a %s %s_copy\", workUnit.root, workUnit.root);\n }\n execCommand(workUnit.commandManager, Shell.formatDirectory(applicationProperties.work.directory), gitCommand);\n\n }\n\n historyMgr.endStep(history, StatusEnum.DONE, null);\n }", "public void copyDirectory(File sourceLocation, File targetLocation)\r\n\t\t\tthrows IOException {\r\n\r\n\t\tif (sourceLocation.isDirectory()) {\r\n\t\t\tif (!targetLocation.exists()) {\r\n\t\t\t\ttargetLocation.mkdir();\r\n\t\t\t}\r\n\r\n\t\t\tString[] children = sourceLocation.list();\r\n\t\t\tfor (int i = 0; i < children.length; i++) {\r\n\t\t\t\tcopyDirectory(new File(sourceLocation, children[i]), new File(\r\n\t\t\t\t\t\ttargetLocation, children[i]));\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\tInputStream in = new FileInputStream(sourceLocation);\r\n\t\t\tOutputStream out = new FileOutputStream(targetLocation);\r\n\t\t\t// Copy the bits from instream to outstream\r\n\t\t\tbyte[] buf = new byte[1024];\r\n\t\t\tint len;\r\n\t\t\twhile ((len = in.read(buf)) > 0) {\r\n\t\t\t\tout.write(buf, 0, len);\r\n\t\t\t}\r\n\t\t\tin.close();\r\n\t\t\tout.close();\r\n\t\t}\r\n\t}", "public static void copy(String owner, Path src, Path target) throws CWLException {\r\n final Path finalSrc = toFinalSrcPath(src);\r\n if (src.toFile().exists() && Files.isReadable(src)) {\r\n CopyOption[] options = new CopyOption[] {\r\n StandardCopyOption.COPY_ATTRIBUTES,\r\n StandardCopyOption.REPLACE_EXISTING\r\n };\r\n final Path finalTarget = toFinalTargetPath(src, target);\r\n if (!finalTarget.getParent().toFile().exists()) {\r\n logger.debug(\"mkdir \\\"{}\\\"\", finalTarget.getParent());\r\n mkdirs(owner, finalTarget.getParent());\r\n }\r\n logger.debug(\"copy \\\"{}\\\" to \\\"{}\\\"\", finalSrc, finalTarget);\r\n try {\r\n if (finalSrc.toFile().isDirectory()) {\r\n Files.walkFileTree(finalSrc, new FileVisitor<Path>() {\r\n @Override\r\n public FileVisitResult preVisitDirectory(Path dir,\r\n BasicFileAttributes attrs) throws IOException {\r\n Files.copy(dir, finalTarget.resolve(finalSrc.relativize(dir)),\r\n StandardCopyOption.COPY_ATTRIBUTES);\r\n return FileVisitResult.CONTINUE;\r\n }\r\n\r\n @Override\r\n public FileVisitResult visitFile(Path file, BasicFileAttributes attrs) throws IOException {\r\n Files.copy(file, finalTarget.resolve(finalSrc.relativize(file)),\r\n StandardCopyOption.COPY_ATTRIBUTES);\r\n return FileVisitResult.CONTINUE;\r\n }\r\n\r\n @Override\r\n public FileVisitResult postVisitDirectory(Path dir, IOException exc) throws IOException {\r\n return FileVisitResult.CONTINUE;\r\n }\r\n\r\n @Override\r\n public FileVisitResult visitFileFailed(Path file, IOException exc) throws IOException {\r\n throw exc;\r\n }\r\n });\r\n } else {\r\n Files.copy(finalSrc, finalTarget, options);\r\n }\r\n } catch (IOException e) {\r\n throw new CWLException(\r\n ResourceLoader.getMessage(\"cwl.io.copy.failed\",\r\n finalSrc.toString(),\r\n finalTarget.toString(),\r\n e.getMessage()),\r\n 255);\r\n }\r\n } else {\r\n throw new CWLException(ResourceLoader.getMessage(\"cwl.io.file.unaccessed\", finalSrc.toString()),\r\n 255);\r\n }\r\n }", "public static void copyDirectory(File srcDir, File dstDir) throws IOException {\n if (srcDir.isDirectory()) {\n if (!dstDir.exists()) dstDir.mkdir();\n String[] children = srcDir.list();\n for (int i = 0; i < children.length; i++) copyDirectory(new File(srcDir, children[i]), new File(dstDir, children[i]));\n } else {\n copyFile(srcDir, dstDir);\n }\n }", "private List<String> copyResources(File targetDirectory, List<FileSet> fileSets) throws MojoExecutionException {\n ArrayList<String> addedFiles = new ArrayList<String>();\n for (FileSet fileSet : fileSets) {\n // Get the absolute base directory for the FileSet\n File sourceDirectory = new File(fileSet.getDirectory());\n\n if (!sourceDirectory.isAbsolute()) {\n sourceDirectory = new File(project.getBasedir(), sourceDirectory.getPath());\n }\n\n if (!sourceDirectory.exists()) {\n // If the requested directory does not exist, log it and carry on\n getLog().warn(\"Specified source directory \" + sourceDirectory.getPath() + \" does not exist.\");\n continue;\n }\n\n List<String> includedFiles = scanFileSet(sourceDirectory, fileSet);\n addedFiles.addAll(includedFiles);\n\n getLog().info(\"Copying \" + includedFiles.size() + \" additional resource\" + (includedFiles.size() > 1 ? \"s\" : \"\"));\n\n for (String destination : includedFiles) {\n File source = new File(sourceDirectory, destination);\n File destinationFile = new File(targetDirectory, destination);\n\n // Make sure that the directory we are copying into exists\n destinationFile.getParentFile().mkdirs();\n\n try {\n FileUtils.copyFile(source, destinationFile);\n destinationFile.setExecutable(fileSet.isExecutable(),false);\n\n } catch (IOException e) {\n throw new MojoExecutionException(\"Error copying additional resource \" + source, e);\n }\n }\n }\n return addedFiles;\n }", "abstract void addNewSourceDirectory(final File targetDirectory);", "@Override\n public void finish() {\n storeProperties();\n // retrieve the full list of files according to the selected mode\n List<org.jajuk.base.File> files = getFiles();\n if (files == null) {\n return;\n }\n // define the target directory\n final Date curDate = new Date();\n // Do not use ':' character in destination directory, it's\n // forbidden under Windows\n final SimpleDateFormat stamp = new SimpleDateFormat(\"yyyyMMdd-HHmm\", Locale.getDefault());\n final String dirName = \"Party-\" + stamp.format(curDate);\n final java.io.File destDir = new java.io.File(((String) data.get(Variable.DEST_PATH)), dirName);\n if (!destDir.mkdir()) {\n Log.warn(\"Could not create destination directory \" + destDir);\n }\n Log.debug(\"Going to copy \" + files.size() + \" files to directory {{\"\n + destDir.getAbsolutePath() + \"}}\");\n // perform the actual copying\n UtilPrepareParty.copyFiles(files, destDir, isTrue(Variable.NORMALIZE_FILENAME),\n isTrue(Variable.ONE_MEDIA_ENABLED) && isTrue(Variable.CONVERT_MEDIA),\n (String) data.get(Variable.ONE_MEDIA), (String) data.get(Variable.CONVERT_COMMAND));\n }", "private void copyExampleWorkouts() {\n\t\ttry {\n\t\t\tString[] exampleWorkouts = mContext.getAssets().list(\n\t\t\t\t\tIDataProvider.EXAMPLE_WORKOUT_FOLDER);\n\t\t\tfor (String file : exampleWorkouts) {\n\t\t\t\tInputStream in = null;\n\t\t\t\tOutputStream out = null;\n\t\t\t\ttry {\n\t\t\t\t\tin = mContext.getAssets().open(IDataProvider.EXAMPLE_WORKOUT_FOLDER + \"/\" + file);\n\t\t\t\t\tout = new FileOutputStream(mContext.getFilesDir().toString() + \"/\" + file);\n\n\t\t\t\t\t// copy file\n\t\t\t\t\tbyte[] buffer = new byte[1024];\n\t\t\t\t\tint read;\n\t\t\t\t\twhile ((read = in.read(buffer)) != -1) {\n\t\t\t\t\t\tout.write(buffer, 0, read);\n\t\t\t\t\t}\n\n\t\t\t\t\tin.close();\n\t\t\t\t\tin = null;\n\t\t\t\t\tout.flush();\n\t\t\t\t\tout.close();\n\t\t\t\t\tout = null;\n\t\t\t\t} catch (IOException e) {\n\t\t\t\t\tLog.e(\"tag\", \"Failed to copy asset file: \" + file, e);\n\t\t\t\t}\n\t\t\t}\n\n\t\t} catch (IOException e) {\n\t\t\tLog.e(TAG, \"Copying example workouts failed\", e);\n\t\t}\n\t}", "public void execute() throws MojoExecutionException, MojoFailureException {\n\n File target = new File(getDistfolder());\n\n // only create the target directoty when it doesn't exist\n // no deletion\n if (!target.exists()) {\n target.mkdir();\n } else {\n getLog().warn(\"Using existing target directory \" + target.getAbsolutePath());\n }\n\n getLog().info(\"Target is \" + target);\n\n String excludes2 = getExcludes();\n\n if (excludes2 == null) {\n excludes2 = \"**/.svn/,**/.cvs/\";\n\n getLog().info(\"Configuration for excludes not set. Defaulting to: \\\"\" + excludes2\n + \"\\\". Excludes are ant-fileset-style.\");\n } else {\n if (excludes2.contains(\"__acl\") || excludes2.contains(\"__properties\")) {\n getLog().warn(\"Your excludes \\\"\" + excludes2\n + \"\\\" contains __acl or __properties. You do not want these to be excluded in order to have permissoins and properties work.\");\n }\n }\n\n try {\n String targetLibPath = getTargetLibPath();\n\n if ((null != targetLibPath) && !\"\".equals(targetLibPath)) {\n File targetLibDir = new File(target, targetLibPath);\n\n if (!targetLibDir.exists()) {\n targetLibDir.mkdirs();\n }\n\n if (!targetLibDir.isDirectory()) {\n throw new MojoExecutionException(\"Could not create targetLibdir: \" + targetLibDir.toString());\n }\n\n File jar = new File(jarFile);\n FileUtils.copyFileToDirectory(jar, targetLibDir);\n }\n\n for (Resource resource : srcResources) {\n File source = new File(resource.getDirectory());\n File currentTarget = null;\n\n if (resource.getTargetPath() != null) {\n currentTarget = new File(target, resource.getTargetPath());\n } else {\n currentTarget = target;\n }\n\n String normalized = source.getAbsolutePath();\n int offsetLength = normalized.length();\n\n getLog().debug(\"Normalzed sourcefolder is \" + normalized + \" (Offset is: \" + offsetLength + \")\");\n\n List<String> results = FileUtils.getFileAndDirectoryNames(source, null, excludes2, true, true, true,\n true);\n\n for (String fileName : results) {\n File file = new File(fileName);\n\n String normalizedParent = new File(file.getParent()).getAbsolutePath();\n\n if (offsetLength > normalizedParent.length()) {\n getLog().info(\"Skipping file (its the sourcefolder or a parent of it): \"\n + file.getAbsolutePath());\n getLog().debug(\"Parent: \" + normalizedParent + \" with length \" + normalizedParent.length());\n\n continue;\n }\n\n String relative = file.getParent();\n relative = relative.substring(offsetLength); // cut the target-dir away\n\n getLog().debug(\"Copy \" + file + \" to \" + currentTarget.getPath() + File.separator + relative);\n\n if (file.isFile()) {\n File parent = new File(currentTarget.getPath() + File.separator + relative);\n\n if (!parent.exists()) {\n // create dir if it does not exist\n parent.mkdirs();\n }\n\n FileUtils.copyFileToDirectory(file, parent);\n } else if (file.isDirectory()) {\n // take care about directories (so that empty dirs get created)\n\n File tocreate = new File(currentTarget.getPath() + File.separator + relative + File.separator\n + file.getName());\n getLog().debug(\"Creating dir\" + tocreate.toString());\n tocreate.mkdirs();\n }\n }\n }\n } catch (IOException ex) {\n throw new MojoExecutionException(\"Could copy file(s) to directory\", ex);\n }\n }", "private void copyResourcesFromDirectory(ContentCollection directory,\r\n\t String toSite_ref, Map<String, String> documentSecurityMap){\r\n \ttry {\r\n \tList<ContentEntity> members = directory.getMemberResources();\r\n \t for (Iterator<ContentEntity> iMbrs = members.iterator(); iMbrs\r\n \t\t .hasNext();) {\r\n \t\tContentEntity next = (ContentEntity) iMbrs.next();\r\n\r\n \t\tString thisEntityRef = next.getId();\r\n\r\n\r\n \t\t//if this is a directory\r\n \t\tif (\"org.sakaiproject.content.types.folder\".equals(next.getResourceType())){\r\n \t\tContentCollection subdirectory =(ContentCollection) next;\r\n\r\n \t\t\t//we get the new destination directory\r\n \t\tString toSubSite_ref = toSite_ref +\r\n \t\t\tthisEntityRef.substring(directory.getId().lastIndexOf(\"/\") + 1);\r\n\r\n \t\t//we call recursively the same function\r\n \t\tcopyResourcesFromDirectory(subdirectory,\r\n \t\t\ttoSubSite_ref, documentSecurityMap);\r\n \t\t}\r\n \t\telse{\r\n \t\tString permission = documentSecurityMap.get(thisEntityRef);\r\n\r\n \t\t// we copy if doc exists in CO or if it is doc references\r\n \t\tif (permission != null || \"org.sakaiproject.citation.impl.CitationList\".equals(next.getResourceType())) {\r\n \t\t contentHostingService.copyIntoFolder(thisEntityRef,\r\n \t\t\t toSite_ref);\r\n \t\t}\r\n \t\t}\r\n \t }\r\n \t} catch (Exception e) {\r\n \t log.error(\"Unable to copy the resources from directory\", e);\r\n \t}\r\n }", "public static void copyFolder(File sourceFolder, File destinationFolder) throws IOException {\n System.out.println(sourceFolder.toString());\n System.out.println(destinationFolder.toString());\n if (sourceFolder.isDirectory()) {\n //Verify if destinationFolder is already present; If not then create it\n if (!destinationFolder.exists()) {\n destinationFolder.mkdir();\n //System.out.println(\"Directory created :: \" + destinationFolder); // debug\n }\n\n //Get all files from source directory\n String files[] = sourceFolder.list();\n\n //Iterate over all files and copy them to destinationFolder one by one\n for (String file : files) {\n File srcFile = new File(sourceFolder, file);\n File destFile = new File(destinationFolder, file);\n\n //Recursive function call\n copyFolder(srcFile, destFile);\n }\n } else {\n Files.copy(\n sourceFolder.toPath(), destinationFolder.toPath(), StandardCopyOption.REPLACE_EXISTING);\n //System.out.println(\"File copied :: \" + destinationFolder); // debug\n }\n }", "public void copyDirectory(File srcDir, File dstDir) throws IOException {\n\t\tif (srcDir.isDirectory()) {\n\t\t\tif (srcDir.getName().startsWith(\".\")) {// Si es un directorio oculto\n\t\t\t\t\t\t\t\t\t\t\t\t\t// no lo copiamos\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// Si el directorio no existe\n\t\t\tif (!dstDir.exists()) {\n\t\t\t\tif(logger.isDebugEnabled())\n\t\t\t\t\tlogger.debug(\"El directorio no existe lo creamos. \" + dstDir);\n\t\t\t\tdstDir.mkdirs();\n\t\t\t}\n\n\t\t\tString[] children = srcDir.list();\n\t\t\tfor (int i = 0; i < children.length; i++) {\n\n\t\t\t\tcopyDirectory(new File(srcDir, children[i]), new File(dstDir,\n\t\t\t\t\t\tchildren[i]));\n\n\t\t\t}\n\t\t} else {\n\t\t\t// This method is implemented in e1071 Copying a File\n\t\t\tcopyFile(srcDir, dstDir);\n\t\t}\n\t}", "public void copyUserLibFiles(File srcDir, File trgDir) {\n //- get the appropriate list of lib files to exclude\n String osName = System.getProperty(\"os.name\");\n String pkgName = this.getClass().getPackage().getName();\n String excludeFile = pkgName + \".unixV2LibExcludeList\";\n if (osName.indexOf(\"Windows\") != -1) {\n excludeFile = pkgName + \".winV2LibExcludeList\";\n } else if (osName.indexOf(\"Mac\") != -1) {\n excludeFile = pkgName + \".macV2LibExcludeList\";\n }\n String verEd = CommonInfoModel.getInstance().getSource().getVersionEdition();\n if (verEd.startsWith(UpgradeConstants.VERSION_3_0)) {\n excludeFile = excludeFile.replaceFirst(\"V2\", \"V3\");\n }\n\n try {\n String excludeF = excludeFile.replace('.', '/') + \".properties\";\n UpgradeFileFilter fs = new UpgradeFileFilter(excludeF);\n File[] l = srcDir.listFiles(fs);\n\n for (File tmpF : l) {\n if (tmpF.isDirectory()) {\n try {\n File tmpDir = new File(trgDir, tmpF.getName());\n tmpDir.mkdir();\n copyDirectory(tmpF, tmpDir);\n logger.log(Level.INFO,\n stringManager.getString(\"upgrade.common.copied_dir\", tmpDir.getName()));\n } catch (IOException ioe) {\n logger.log(Level.SEVERE,\n stringManager.getString(\"upgrade.common.lib_copy_error\", ioe));\n }\n } else {\n try {\n File tmpFile = new File(trgDir, tmpF.getName());\n copyFile(tmpF.getCanonicalPath(), tmpFile.getCanonicalPath());\n logger.log(Level.INFO,\n stringManager.getString(\"upgrade.common.copied_file\", tmpFile.getName()));\n } catch (IOException ioe) {\n logger.log(Level.SEVERE,\n stringManager.getString(\"upgrade.common.lib_copy_error\", ioe));\n }\n }\n }\n } catch (FileNotFoundException e) {\n logger.log(Level.SEVERE,\n stringManager.getString(\"upgrade.common.lib_exclude_error\", e));\n } catch (IOException io) {\n logger.log(Level.SEVERE,\n stringManager.getString(\"upgrade.common.lib_exclude_error\", io));\n } catch (NullPointerException ne) {\n logger.log(Level.SEVERE,\n stringManager.getString(\"upgrade.common.lib_exclude_error\", ne.toString()));\n }\n }", "public static synchronized void initializeArchiveFiles() {\n System.out.println(Thread.currentThread().getName() + \"********************************************************* TestHelper.initializeArchiveFiles\");\n File sourceFile = new File(System.getProperty(USER_DIR) + File.separator + \"QVCSEnterpriseServer.kbwb\");\n String firstDestinationDirName = System.getProperty(USER_DIR)\n + File.separator\n + QVCSConstants.QVCS_PROJECTS_DIRECTORY\n + File.separator\n + getTestProjectName();\n File firstDestinationDirectory = new File(firstDestinationDirName);\n firstDestinationDirectory.mkdirs();\n File firstDestinationFile = new File(firstDestinationDirName + File.separator + \"QVCSEnterpriseServer.kbwb\");\n\n String secondDestinationDirName = firstDestinationDirName + File.separator + SUBPROJECT_DIR_NAME;\n File secondDestinationDirectory = new File(secondDestinationDirName);\n secondDestinationDirectory.mkdirs();\n File secondDestinationFile = new File(secondDestinationDirName + File.separator + \"QVCSEnterpriseServer.kbwb\");\n\n String thirdDestinationDirName = secondDestinationDirName + File.separator + SUBPROJECT2_DIR_NAME;\n File thirdDestinationDirectory = new File(thirdDestinationDirName);\n thirdDestinationDirectory.mkdirs();\n File thirdDestinationFile = new File(thirdDestinationDirName + File.separator + \"ThirdDirectoryFile.kbwb\");\n\n File fourthDestinationFile = new File(firstDestinationDirName + File.separator + \"Server.kbwb\");\n File fifthDestinationFile = new File(firstDestinationDirName + File.separator + \"AnotherServer.kbwb\");\n File sixthDestinationFile = new File(firstDestinationDirName + File.separator + \"ServerB.kbwb\");\n File seventhDestinationFile = new File(firstDestinationDirName + File.separator + \"ServerC.kbwb\");\n try {\n ServerUtility.copyFile(sourceFile, firstDestinationFile);\n ServerUtility.copyFile(sourceFile, secondDestinationFile);\n ServerUtility.copyFile(sourceFile, thirdDestinationFile);\n ServerUtility.copyFile(sourceFile, fourthDestinationFile);\n ServerUtility.copyFile(sourceFile, fifthDestinationFile);\n ServerUtility.copyFile(sourceFile, sixthDestinationFile);\n ServerUtility.copyFile(sourceFile, seventhDestinationFile);\n } catch (IOException ex) {\n Logger.getLogger(TestHelper.class.getName()).log(Level.SEVERE, null, ex);\n }\n }", "public static void copy(String suffix) {\r\n boolean success = false;\r\n boolean doVideo = true;\r\n String imgSrcDir = zipDir0 + \"/R\";\r\n String videoSrcDir = zipDir0 + \"/Video\";\r\n String imgDstDir = rImagesDir0 + \"/Images\" + suffix;\r\n String videoDstDir = rVideoDir0 + \"/Video\" + suffix;\r\n File imgSrcDirFile = new File(imgSrcDir);\r\n File videoSrcDirFile = new File(videoSrcDir);\r\n File imgDstDirFile = new File(imgDstDir);\r\n File videoDstDirFile = new File(videoDstDir);\r\n\r\n // Check and create directories\r\n if(!imgSrcDirFile.isDirectory()) {\r\n System.err.println(\"Not a directory: \" + imgSrcDirFile.getPath());\r\n System.exit(1);\r\n }\r\n if(!videoSrcDirFile.isDirectory()) {\r\n doVideo = false;\r\n }\r\n if(!imgDstDirFile.isDirectory()) {\r\n success = imgDstDirFile.mkdir();\r\n if(!success) {\r\n System.err.println(\"Cannot create: \" + imgDstDirFile.getPath());\r\n System.exit(1);\r\n }\r\n }\r\n if(doVideo && !videoDstDirFile.isDirectory()) {\r\n success = videoDstDirFile.mkdir();\r\n if(!success) {\r\n System.err.println(\"Cannot create: \" + videoDstDirFile.getPath());\r\n System.exit(1);\r\n }\r\n }\r\n\r\n // Images\r\n System.out.println(\"\\nCopying images:\");\r\n System.out.println(\"From: \" + imgSrcDirFile.getPath());\r\n System.out.println(\"To: \" + imgDstDirFile.getPath());\r\n success = CopyUtils.copyDirectory(imgSrcDirFile, imgDstDirFile, saveSuffix);\r\n if(!success) {\r\n System.err.println(\"Copy failed:\\n From: \" + imgSrcDirFile.getPath()\r\n + \"\\n To: \" + imgDstDirFile.getPath() + \"\\n\");\r\n }\r\n\r\n // Video\r\n System.out.println(\"\\nCopying video:\");\r\n if(!doVideo) {\r\n System.out.println(\"No video found\");\r\n return;\r\n }\r\n System.out.println(\"From: \" + videoSrcDirFile.getPath());\r\n System.out.println(\"To: \" + videoDstDirFile.getPath());\r\n success = CopyUtils.copyDirectory(videoSrcDirFile, videoDstDirFile,\r\n saveSuffix);\r\n if(!success) {\r\n System.err.println(\"Copy failed:\\n From: \" + videoSrcDirFile.getPath()\r\n + \"\\n To: \" + videoDstDirFile.getPath() + \"\\n\");\r\n }\r\n }", "public boolean copy(File fileToLoadOrig, boolean withDuplicate, List<String> passedFiles) {\n //Let us get the current Date\n Date date = new Date();\n LocalDate localDate = date.toInstant().atZone(ZoneId.systemDefault()).toLocalDate();\n int year = localDate.getYear();\n int month = localDate.getMonthValue();\n int day = localDate.getDayOfMonth();\n\n String destDirectoryPath = year + \"-\" + month + \"-\" + day;\n\n //check if directory is created\n\n File destDirecoty = new File(\"./testing/dest/\" + destDirectoryPath);\n System.out.println(\"the file path:\" + destDirecoty.getAbsolutePath());\n\n if (!destDirecoty.exists()) {\n System.out.println(\"creating a new directory with path:\" + destDirecoty.getAbsolutePath());\n boolean created = destDirecoty.mkdirs();\n System.out.println(\"is file created:\" + created);\n }\n System.out.println(\"Directory is created\");\n //Great, now let us check if the file already in the dirctory\n\n\n boolean duplicateFound = false;\n\n\n File[] sourceFiles = fileToLoadOrig.listFiles();\n\n for (File sourceFile : sourceFiles) {\n //let us get the file extension\n String sourceFileType = \"\";\n int location = sourceFile.getName().lastIndexOf('.');\n if (location > 0) {\n sourceFileType = sourceFile.getName().substring(location + 1);\n }\n //cool, let us go on\n String nestedDirectory;\n switch (sourceFileType) {\n case \"txt\":\n nestedDirectory = \"txt\";\n break;\n case \"pdf\":\n nestedDirectory = \"pdf\";\n break;\n case \"xls\":\n nestedDirectory = \"xls\";\n default:\n nestedDirectory = \"others\";\n }\n\n //check if the type directory is created or not\n File nestedDirecotyFile = new File(destDirecoty.getAbsolutePath()+\"/\" + nestedDirectory);\n System.out.println(\"the file path:\" + nestedDirecotyFile.getAbsolutePath());\n\n if (!nestedDirecotyFile.exists()) {\n System.out.println(\"creating a new directory with path:\" + nestedDirecotyFile.getAbsolutePath());\n boolean created = nestedDirecotyFile.mkdirs();\n System.out.println(\"is file created:\" + created);\n }\n\n\n\n File[] destinationFiles = nestedDirecotyFile.listFiles();\n\n for (File destinationFile : destinationFiles) {\n if (destinationFile.getName().equals(sourceFile.getName())) {\n if (withDuplicate) {\n int maxSeqNum = 0;\n //Let us find the last sequence of the destinationFile\n for (File fileForDuplicate : destinationFiles) {\n String[] fileParts = fileForDuplicate.getName().split(\"_\");\n if (fileParts.length == 2) {\n //got a split\n if (fileParts[0].equals(destinationFile.getName())) {\n maxSeqNum = Math.max(maxSeqNum, Integer.parseInt(fileParts[1]));\n }\n }else{\n new RuntimeException(\"Files were found with multiple _\");\n }\n }\n String newFilePath = sourceFile.getName() + \"_\" + (maxSeqNum + 1);\n try {\n FileUtils.copyFile(sourceFile, new File(nestedDirecotyFile.getAbsoluteFile() + \"/\" + newFilePath));\n passedFiles.add(sourceFile.getAbsolutePath());\n } catch (IOException e) {\n e.printStackTrace();\n return false;\n }\n } else {\n // let us delete the destinationFile and replace it\n destinationFile.delete();\n try {\n FileUtils.copyFile(sourceFile, new File(nestedDirecotyFile.getAbsoluteFile() + \"/\" + sourceFile.getName()));\n passedFiles.add(sourceFile.getAbsolutePath());\n } catch (IOException e) {\n e.printStackTrace();\n return false;\n }\n }\n break;\n } else {\n try {\n FileUtils.copyFile(sourceFile, new File(nestedDirecotyFile.getAbsoluteFile() + \"/\" + sourceFile.getName()));\n passedFiles.add(sourceFile.getAbsolutePath());\n } catch (IOException e) {\n e.printStackTrace();\n return false;\n }\n }\n }\n\n try {\n FileUtils.copyFile(sourceFile, new File(nestedDirecotyFile.getAbsoluteFile() + \"/\" + sourceFile.getName()));\n passedFiles.add(sourceFile.getAbsolutePath());\n } catch (IOException e) {\n e.printStackTrace();\n return false;\n }\n\n }\n return true;\n }", "public static void copyPath(int[] target, int[] destination) {\n\t\tfor (int i = 0; i < target.length; i++) {\n\t\t\tdestination[i] = target[i];\n\t\t}\n\t}", "public void copyAssets(String dist) {\n copyFile(dist, \"pointer.png\");\n copyFile(dist, \"WebElementRecorder.js\");\n }", "private void migrate (String name)\t{\n\t\ttry{\n\t\t\tFile f1 = new File( sourceDir + name);\n\t\t\t\n\t\t\tif (!f1.exists())\t{\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tFile f2 = new File(targetDir +name);\n\t\t\t\n\t\t InputStream in = new FileInputStream(f1);\n\t\t \n\t\t OutputStream out = new FileOutputStream(f2);\n\n\t\t byte[] buf = new byte[1024];\n\t\t int len;\n\t\t while ((len = in.read(buf)) > 0){\n\t\t out.write(buf, 0, len);\n\t\t }\n\t\t in.close();\n\t\t out.close();\n\t\t System.out.println(\"File copied.\");\n\t\t }\n\t\t catch(FileNotFoundException ex){\n\t\t System.out.println(ex.getMessage() + \" in the specified directory.\");\n\t\t System.exit(0);\n\t\t }\n\t\t catch(IOException e){\n\t\t System.out.println(e.getMessage()); \n\t\t }\n\t}", "public void moveDirectory(String source, String target) throws IOException{\n Path sourceFilePath = Paths.get(PWD.getPath()+\"/\"+source);\n Path targetFilePath = Paths.get(PWD.getPath()+\"/\"+target);\n //using builtin move function which uses Paths\n Files.move(sourceFilePath,targetFilePath);\n }", "private void initRootDirectoryFromCopy(WorkUnit workUnit) throws IOException, InterruptedException {\n\n\n if (!workUnit.commandManager.isFirstAttemptMigration()) {\n\n MigrationHistory history = historyMgr.startStep(workUnit.migration, StepEnum.SVN_COPY_ROOT_FOLDER,\n (workUnit.commandManager.isFirstAttemptMigration() ? \"\" : Constants.REEXECUTION_SKIPPING) +\n \"Initialising Root Directory from Copy in context of migration reexecution.\");\n\n // The clean copy folder is used to reinitialise the workUnit.root Folder\n String gitCommand = \"\";\n if (isWindows) {\n // /J Copy using unbuffered I/O. Recommended for very large files.\n gitCommand = format(\"Xcopy /E /I /H /Q %s_copy %s\", workUnit.root, workUnit.root);\n } else {\n // cp -a /source/. /dest/ (\"-a\" is recursive \".\" means files and folders including hidden)\n // root has no trailling / e.g. folder_12345\n gitCommand = format(\"cp -a %s_copy %s\", workUnit.root, workUnit.root);\n }\n execCommand(workUnit.commandManager, Shell.formatDirectory(applicationProperties.work.directory), gitCommand);\n\n // git reset incase a deployment has changed permissions\n // deployment of application seems to change files from 644 to 755 which is not desired.\n gitCommand = \"git reset --hard HEAD\";\n execCommand(workUnit.commandManager, workUnit.directory, gitCommand);\n\n historyMgr.endStep(history, StatusEnum.DONE, null);\n }\n\n }", "public boolean copy(File target) {\n\t\tboolean result = false;\n\n\t\ttry{\n\t\t\tif (this.exists()) {\n\t\t\t\tif (this.isDirectory()) {\n\t\t\t\t\tthis.copyFile(target);\n\t\t\t\t\ttarget = new File(target.getAbsolutePath().replace(\"\\\\\", \"/\") + \"/\" + this.getName());\n\t\t\t\t\tif (this.listFiles() != null) {\n\t\t\t\t\t\tfor (java.io.File file : this.listFiles()) {\n\t\t\t\t\t\t\tif (file.isDirectory()) ((File) file).copy(target);\n\t\t\t\t\t\t\telse if (file.isFile()) ((File) file).copyFile(target);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t} else if (this.isFile()) {\n\t\t\t\t\tthis.copyFile(target);\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tresult = true;\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\n\t\treturn result;\n\t}", "public static void copyFile(String from, String to) throws IOException{\r\n Path src = Paths.get(from); // set path of source directory from parent function\r\n Path dest = Paths.get(to); // set path of destination directory from parent function\r\n Files.copy(src, dest); //inbuilt function to copy files\r\n \r\n }", "public void copyDirectories(File sourceFolder, File destinationFolder, Transformer<String> targetFileNameTransformer, boolean overwriteExistingFiles, String... fileNamesToIgnore)\n throws IOException {\n if (sourceFolder == null) {\n throw new IllegalArgumentException(\"src may not be null!\");\n }\n if (!sourceFolder.exists()) {\n throw new FileNotFoundException(\"source folder does not exist:\" + sourceFolder);\n }\n if (destinationFolder == null) {\n throw new IllegalArgumentException(\"dest may not be null!\");\n }\n Set<String> fileNamesToIgnoreSet = new HashSet<>();\n if (fileNamesToIgnore != null) {\n for (String fileNameToIgnore : fileNamesToIgnore) {\n if (fileNamesToIgnore == null) {\n continue;\n }\n fileNamesToIgnoreSet.add(fileNameToIgnore);\n }\n }\n copyRecursive(sourceFolder, destinationFolder, targetFileNameTransformer, overwriteExistingFiles, fileNamesToIgnoreSet);\n }", "private void copyComponents(IProgressMonitor monitor, File tmpWarDir, final File targetLibDir) throws ExportException\n\t{\n\t\ttry\n\t\t{\n\t\t\tComponentResourcesExporter.copyDefaultComponentsAndServices(tmpWarDir, exportModel.getExcludedComponentPackages(),\n\t\t\t\texportModel.getExcludedServicePackages());\n\n\t\t\tStringBuilder componentLocations = new StringBuilder();\n\t\t\tcomponentLocations.append(ComponentResourcesExporter.getComponentDirectoryNames(exportModel.getExcludedComponentPackages()));\n\t\t\tcomponentLocations.append(copyUserDefinedComponents(tmpWarDir, exportModel.getExcludedComponentPackages(), monitor));\n\t\t\tcreateSpecLocationsPropertiesFile(new File(tmpWarDir, \"WEB-INF/components.properties\"), componentLocations.toString());\n\n\t\t\tStringBuilder servicesLocations = new StringBuilder();\n\t\t\tservicesLocations.append(ComponentResourcesExporter.getServicesDirectoryNames(exportModel.getExcludedServicePackages()));\n\t\t\tservicesLocations.append(copyUserDefinedServices(tmpWarDir, exportModel.getExcludedServicePackages(), monitor));\n\t\t\tcreateSpecLocationsPropertiesFile(new File(tmpWarDir, \"WEB-INF/services.properties\"), servicesLocations.toString());\n\t\t\tcopyNGLibs(targetLibDir);\n\t\t}\n\t\tcatch (IOException e)\n\t\t{\n\t\t\tthrow new ExportException(\"Could not copy the components\", e);\n\t\t}\n\t}", "private static void addDirectory(ZipOutputStream zout, File fileSource, File sourceDir) {\n\n\t\t// get sub-folder/files list\n\t\tFile[] files = fileSource.listFiles();\n\n\t\tfor (int i = 0; i < files.length; i++) {\n\t\t\ttry {\n\t\t\t\tString name = files[i].getAbsolutePath();\n\t\t\t\tname = name.substring((int) sourceDir.getAbsolutePath().length());\n\t\t\t\t// if the file is directory, call the function recursively\n\t\t\t\tif (files[i].isDirectory()) {\n\t\t\t\t\taddDirectory(zout, files[i], sourceDir);\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\t/*\n\t\t\t\t * we are here means, its file and not directory, so\n\t\t\t\t * add it to the zip file\n\t\t\t\t */\n\n\n\t\t\t\t// create object of FileInputStream\n\t\t\t\tFileInputStream fin = new FileInputStream(files[i]);\n\n\t\t\t\tzout.putNextEntry(new ZipEntry(name));\n\n\t\t\t\tIOUtils.copy(fin, zout);\n\t\t\t\t\n\t\t\t\tzout.closeEntry();\n\n\t\t\t\t// close the InputStream\n\t\t\t\tfin.close();\n\n\t\t\t} catch (IOException ioe) {\n\t\t\t\tioe.printStackTrace();\n\t\t\t}\n\t\t}\n\n\t}", "private void copyHadoopTmpDir() {\n final String tmpDirProperty =\n PluginMiniHBaseClusterSingleton.INSTANCE.getClusterConfiguration().get(\"hadoop.tmp.dir\");\n final File hadoopTmp = new File(tmpDirProperty);\n final File hadoopTmpCopy = new File(new File(_projectBuildDir), \"hadoop-tmp\");\n getLog().info(\"Copying \" + hadoopTmp.toString() + \" to \" + hadoopTmpCopy.toString());\n try {\n FileUtils.copyDirectory(hadoopTmp, hadoopTmpCopy);\n getLog().info(\"Successfully copied hadoop tmp dir.\");\n }\n catch (final IOException e) {\n getLog().warn(\"The Hadoop tmp dir could not be copied to the project's build directory.\", e);\n }\n }", "@Test\n public void testCopyFileUsingJavaFiles() throws Exception {\n long start = System.nanoTime();\n CopyFile.copyFileUsingJavaFiles(sourceFile, filesDestFile);\n System.out.println(\"Time taken by files using:\" + (System.nanoTime() - start) / 1000);\n }", "private Step copyRemoteFiles() {\n return stepBuilderFactory.get(STEP_COPY_REMOTE_FILES)\n .tasklet(copyRemoteFilesTask)\n .build();\n }", "public static void copyFiles(OverthereConnection srcHost, OverthereConnection dstHost, List<String> copySpec) {\n if (copySpec.isEmpty()) {\n return;\n }\n\n if (copySpec.size() % 2 == 0) {\n Iterator<String> toCopy = copySpec.iterator();\n while (toCopy.hasNext()) {\n OverthereFile src = srcHost.getFile(toCopy.next());\n OverthereFile dst = dstHost.getFile(toCopy.next());\n src.copyTo(dst);\n }\n } else {\n List<String> srcFiles = copySpec.subList(0, copySpec.size() - 1);\n OverthereFile dst = dstHost.getFile(copySpec.get(copySpec.size() - 1));\n\n for (String srcFile : srcFiles) {\n OverthereFile src = srcHost.getFile(srcFile);\n src.copyTo(dst);\n }\n }\n }", "public void copyAssets(View view) {\n log(\"copy assets to fon\");\n try {\n String [] list = getApplicationContext().getAssets().list(\"\");\n if (list.length > 0) {\n for (String file : list) {\n copyAssetFile(file, getApplicationContext());\n }\n }\n } catch (IOException e) {\n e.printStackTrace();\n }\n log(\"copy finished\");\n log(\"deploy assets start\");\n executeCommand(\"deploy.sh\");\n log(\"deploy assets finished\");\n }", "public static long copyFile(File source, File dest) throws IOException {\n\n\t\tif (source.isDirectory() || dest.isDirectory())\n\t\t\tthrow new IOException(\"wont copy directories\");\n\t\tInputStream i = null;\n\t\ttry {\n\t\t\ti = getInputStreamFromFile(source);\n\n\t\t\t// create parent directories\n\t\t\tif (dest.getParentFile().mkdirs()) {\n\t\t\t\t// all good\n\t\t\t} else\n\t\t\t\tthrow new IOException(\"\\\"\" + dest + \"\\\" cannot be created\");\n\t\t\treturn writeStreamToFile(i, dest);\n\n\t\t} finally {\n\t\t\tif (i != null)\n\t\t\t\ti.close();\n\t\t}\n\t}", "abstract void copy(Set<Source> sources, Target target);", "private static void copyResources(\n final List<String> resources, final String dir, final BlockingStorage bsto\n ) throws IOException {\n for (final String res : resources) {\n final Path tmp = Files.createTempFile(\n Path.of(res).getFileName().toString(), \".tmp\"\n );\n new JavaResource(String.format(\"example/%s/%s\", dir, res)).copy(tmp);\n bsto.save(new Key.From(res), Files.readAllBytes(tmp));\n Files.delete(tmp);\n }\n }", "private void moveFilesToDiffDirectory(Path sourcePath, Path destinationPath) {\n try {\n Files.move(sourcePath, destinationPath,\n StandardCopyOption.REPLACE_EXISTING);\n } catch (IOException e) {\n //moving file failed.\n e.printStackTrace();\n }\n }", "private List<String> copyAdditionalBundledClasspathResources(File javaDirectory, String targetDirectoryName, List<FileSet> additionalBundledClasspathResources) throws MojoExecutionException {\n // Create the destination directory\n File destinationDirectory = new File(javaDirectory, targetDirectoryName);\n destinationDirectory.mkdirs();\n\n List<String> addedFilenames = this.copyResources(destinationDirectory, additionalBundledClasspathResources);\n\n return addPath(addedFilenames, targetDirectoryName);\n }", "private void copyPaste(VMResource copiedRes, long targetId, TreeNode treeNode) {\n\n // copy and paste for Folder\n if (copiedRes instanceof VMDirectory) {\n String name = copiedRes.getName();\n if (treeNode != null && isSameNameExist(treeNode, name, true, \"\")) {\n name += \" - Copy\";\n if (copyNumber != 0) {\n name += \" (\" + copyNumber + \")\";\n }\n }\n VMDirectory newDir = new VMDirectory();\n newDir.setName(name);\n ZGCreateDirCommand createDirCommand = new ZGCreateDirCommand(editResourceService, viewHandler, targetId, newDir);\n createDirCommand.addCommandListener(new CommandListener() {\n\n @Override\n public void undoEvent() {\n treeGrid.deselectAllRecords();\n fileTreeNodeFactory.removeVMResource(createDirCommand.getFileId());\n fileTreeNodeFactory.refresh(editorTabSet, tree, tabRegs);\n treeGrid.sort();\n treeGrid.redraw();\n }\n\n @Override\n public void redoEvent() {\n createCallbackFile(fileTreeNodeFactory.findTreeNode(tree, createDirCommand.getParentId()), createDirCommand.getDirectory(), createDirCommand.getFileId(),\n false);\n getCopiedResources().get(copiedRes).forEach(res -> {\n copyPaste(res, createDirCommand.getDirectory().getId(), null);\n });\n }\n\n @Override\n public void executeEvent() {\n createCallbackFile(fileTreeNodeFactory.findTreeNode(tree, createDirCommand.getParentId()), createDirCommand.getDirectory(), createDirCommand.getFileId(),\n false);\n // copy and paste for child resources\n getCopiedResources().get(copiedRes).forEach(res -> {\n copyPaste(res, createDirCommand.getDirectory().getId(), null);\n });\n }\n\n @Override\n public void bindEvent() {\n viewHandler.clear();\n registerRightClickEvent();\n }\n\n });\n\n CompoundCommand c = new CompoundCommand();\n c.append(createDirCommand);\n manager.execute(c.unwrap());\n\n } else if (copiedRes instanceof VMFile) { // copy and paste for file\n VMFile oldFile = (VMFile) copiedRes;\n editResourceService.getFileContent(oldFile.getId(), new AsyncCallback<byte[]>() {\n\n @Override\n public void onFailure(Throwable caught) {\n SC.warn(caught.getMessage());\n }\n\n @Override\n public void onSuccess(byte[] result) {\n String fileExtension = oldFile.getExtensionStr();\n VMFile newFile = new VMFile();\n // create new file name\n String fileName = oldFile.getName();\n if (treeNode != null && isSameNameExist(treeNode, fileName, false, fileExtension)) {\n fileName += \" - Copy\";\n if (copyNumber != 0) {\n fileName += \" (\" + copyNumber + \")\";\n }\n }\n newFile.setName(fileName);\n // get data from old file\n byte[] datas = new byte[result.length];\n for (int i = 0; i < result.length; i++) {\n datas[i] = (byte) (result[i] & 0xFF);\n }\n // Set file extension\n newFile.setExtensionStr(fileExtension);\n\n // create new file command\n ZGCreateFileCommand createFileCommand = new ZGCreateFileCommand(editResourceService, viewHandler, targetId, newFile, null);\n createFileCommand.addCommandListener(new CommandListener() {\n\n @Override\n public void undoEvent() {\n treeGrid.deselectAllRecords();\n fileTreeNodeFactory.removeVMResource(createFileCommand.getFileId());\n fileTreeNodeFactory.refresh(editorTabSet, tree, tabRegs);\n treeGrid.sort();\n treeGrid.redraw();\n }\n\n @Override\n public void redoEvent() {\n createCallbackFile(fileTreeNodeFactory.findTreeNode(tree, createFileCommand.getParentId()), createFileCommand.getFile(), createFileCommand.getFileId(),\n false);\n editResourceService.saveFile(createFileCommand.getFileId(), datas, new AsyncCallback<Void>() {\n\n @Override\n public void onFailure(Throwable caught) {\n GWT.log(caught.getMessage());\n }\n\n @Override\n public void onSuccess(Void result) {\n fileTreeNodeFactory.getFileTreeNode(tree, createFileCommand.getParentId(), createFileCommand.getFile());\n if (treeGrid.anySelected())\n treeGrid.deselectAllRecords();\n fileTreeNodeFactory.refresh(editorTabSet, tree, tabRegs);\n treeGrid.sort();\n treeGrid.redraw();\n treeGrid.deselectAllRecords();\n treeGrid.selectRecord(fileTreeNodeFactory.findTreeNode(tree, createFileCommand.getFileId()));\n }\n });\n }\n\n @Override\n public void executeEvent() {\n // save old file data\n editResourceService.saveFile(createFileCommand.getFileId(), datas, new AsyncCallback<Void>() {\n\n @Override\n public void onFailure(Throwable caught) {\n GWT.log(caught.getMessage());\n }\n\n @Override\n public void onSuccess(Void result) {\n fileTreeNodeFactory.getFileTreeNode(tree, createFileCommand.getParentId(), createFileCommand.getFile());\n if (treeGrid.anySelected())\n treeGrid.deselectAllRecords();\n fileTreeNodeFactory.refresh(editorTabSet, tree, tabRegs);\n treeGrid.sort();\n treeGrid.redraw();\n treeGrid.deselectAllRecords();\n treeGrid.selectRecord(fileTreeNodeFactory.findTreeNode(tree, createFileCommand.getFileId()));\n }\n });\n createCallbackFile(fileTreeNodeFactory.findTreeNode(tree, createFileCommand.getParentId()), createFileCommand.getFile(), createFileCommand.getFileId(),\n false);\n }\n\n @Override\n public void bindEvent() {\n viewHandler.clear();\n registerRightClickEvent();\n }\n });\n CompoundCommand c = new CompoundCommand();\n c.append(createFileCommand);\n manager.execute(c.unwrap());\n }\n\n });\n }\n }", "public static void copyAll(File source, File dest, boolean replaceExisting) throws IOException {\n\n Files.walkFileTree(source.toPath(), new FileTreeWalker(FileTreeWalker.Action.COPY,\n source.toPath(), dest.toPath(), replaceExisting));\n\n }", "private static void moveFiles(String src, String dest, int Num) // \n\t{\n\t File directoryPath = new File(src);\n\t \n\t // Creating filter for directories files, to select files only\n\t FileFilter fileFilter = new FileFilter(){\n\t public boolean accept(File dir) \n\t { \n\t if (dir.isFile()) \n\t {\n\t return true;\n\t } \n\t else \n\t {\n\t return false;\n\t }\n\t }\n\t }; \n\t \n\t // Get list of files in the source folder\n\t File[] list = directoryPath.listFiles(fileFilter);\n\t \n\t int i = 0;\n\t \n\t // Move Num file to destination folder\n\t while ((i < Num) && (i < list.length))\n\t {\n\t \tString srcFileName = src + \"/\" + list[i].getName();\n\t \tString destFileName = dest + \"/\" + list[i].getName();\n\t \tmoveFile(srcFileName, destFileName);\n\t \ti++;\t \t\n\t } \n\t}", "public static void copyFileToDir(File src, File dst) throws IOException {\n String dstAbsPath = dst.getAbsolutePath();\n String dstDir = dstAbsPath.substring(0, dstAbsPath.lastIndexOf(File.separator));\n File dir = new File(dstDir);\n if (!dir.exists() && !dir.mkdirs()) {\n throw new IOException(\"Fail to create the directory: \" + dir.getAbsolutePath());\n }\n\n File file = new File(dstAbsPath + File.separator + src.getName());\n copyFile(src, file);\n }", "private void copyOrMove(Action action, Path dir) throws IOException {\n\n try {\n if (action == Action.COPY) {\n Path newdir = target.resolve(source.relativize(dir));\n Files.copy(dir, newdir, copyMoveOptions);\n } else if (action == Action.MOVE) {\n Path newdir = target.resolve(source.relativize(dir));\n Files.move(dir, newdir, copyMoveOptions);\n }\n } catch (AtomicMoveNotSupportedException e) {\n // Remove the atomic move from the list and try again\n List<CopyOption> optionsTemp = Arrays.asList(copyMoveOptions);\n optionsTemp.remove(StandardCopyOption.ATOMIC_MOVE);\n copyMoveOptions = optionsTemp.toArray(new CopyOption[optionsTemp.size()]);\n\n copyOrMove(action, dir);\n }\n\n }", "protected abstract boolean copyCheckedFiles();", "private void copyNGLibs(File targetLibDir) throws ExportException, IOException\n\t{\n\t\tList<String> pluginLocations = exportModel.getPluginLocations();\n\t\tFile parent = null;\n\t\tif (System.getProperty(\"eclipse.home.location\") != null)\n\t\t\tparent = new File(URI.create(System.getProperty(\"eclipse.home.location\").replaceAll(\" \", \"%20\")));\n\t\telse parent = new File(System.getProperty(\"user.dir\"));\n\t\tfor (String libName : NG_LIBS)\n\t\t{\n\t\t\tint i = 0;\n\t\t\tboolean found = false;\n\t\t\twhile (!found && i < pluginLocations.size())\n\t\t\t{\n\t\t\t\tFile pluginLocation = new File(pluginLocations.get(i));\n\t\t\t\tif (!pluginLocation.isAbsolute())\n\t\t\t\t{\n\t\t\t\t\tpluginLocation = new File(parent, pluginLocations.get(i));\n\t\t\t\t}\n\t\t\t\tFileFilter filter = new WildcardFileFilter(libName);\n\t\t\t\ttry\n\t\t\t\t{\n\t\t\t\t\tFile[] libs = pluginLocation.listFiles(filter);\n\n\t\t\t\t\tif (libs == null)\n\t\t\t\t\t{\n\t\t\t\t\t\tSystem.err.println(pluginLocation.toString() + \" is directory \" + pluginLocation.isDirectory());\n\t\t\t\t\t\tSystem.err.println(\"missing lib name: \" + libName);\n\t\t\t\t\t\tSystem.err.println(\"missing filter: \" + filter.toString());\n\t\t\t\t\t\tSystem.out.println(pluginLocation.listFiles());\n\t\t\t\t\t}\n\n\t\t\t\t\tif (libs != null && libs.length > 0)\n\t\t\t\t\t{\n\t\t\t\t\t\tFile file = libs[0];\n\t\t\t\t\t\tif (libName.contains(\"servoy_ngclient\"))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tcopyNGClientJar(file, targetLibDir);\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tcopyFile(file, new File(targetLibDir, file.getName()));\n\t\t\t\t\t\t}\n\t\t\t\t\t\tfound = true;\n\t\t\t\t\t}\n\t\t\t\t\ti++;\n\t\t\t\t}\n\t\t\t\tcatch (IOException e)\n\t\t\t\t{\n\t\t\t\t\tDebug.error(e);\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (!found) throw new ExportException(libName + \" was not found. Please specify location\");\n\t\t}\n\t}", "private void createDirectories()\r\n\t{\r\n\t\t// TODO: Do some checks here\r\n\t\tFile toCreate = new File(Lunar.OUT_DIR + Lunar.PIXEL_DIR\r\n\t\t\t\t\t\t\t\t\t+ Lunar.PROCESSED_DIR);\r\n\t\ttoCreate.mkdirs();\r\n\t\ttoCreate = null;\r\n\t\ttoCreate = new File(Lunar.OUT_DIR + Lunar.ROW_DIR + Lunar.PROCESSED_DIR);\r\n\t\ttoCreate.mkdirs();\r\n\t\ttoCreate = null;\r\n\t}", "void updateDirectory(File targetdir, File sourcedir, File backupdir) throws Exception{\n\t\tArrayList<File> sourcesubs = new ArrayList<File>();\n\t\tFile[] sourcefiles = sourcedir.listFiles();\n\t\tFile targetfile = null;\n\t\tString sourceinfo = null;\n\t\tString targetinfo = null;\n\t\tString promptMessage = \"\";\n\t\tObject[] promptOptions = {\n\t\t\t\"Yes\",\n\t\t\t\"Yes to All\",\n\t\t\t\"Cancel\"\n\t\t};\n\n\t\t//If targetdir starts with one of folder in 'excludedFolderArray', then ignore it (don't update this folder).\n\t\tfor(File excludedFolder:excludedFolderList){\n\t\t\tif(targetdir.toPath().startsWith(excludedFolder.toPath())){\n\t\t\t\tprogressor.setProgressInfo(progress, \"Ignoring target directory '\"+targetdir.getCanonicalPath()+\"', which will NOT be updated.\");\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\n\t\tSimpleDateFormat date = new SimpleDateFormat(\"MM/dd/yyyy hh:mm a\");\n\t\ttry{\n\t\t\tfor(File file:sourcefiles){\n\t\t\t\tif(file.isDirectory()){\n\t\t\t\t\tif(recurse) sourcesubs.add(file);\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\tif (allfilecopy){\n\t\t\t\t\tif (! allFileIncluded(file)) continue;\n\t\t\t\t} else {\n\t\t\t\t\tif(! fileIncluded(file)) continue;\n\t\t\t\t}\n\n\t\t\t\ttargetfile = new File(targetdir, file.getName());\n\t\t\t\tif(targetfile.exists()){\n\t\t\t\t\tif(targetfile.lastModified() >= file.lastModified()) continue;\n\t\t\t\t}\n\t\t\t\tif(!force && !quiet){\n\t\t\t\t\tsourceinfo = \"Source: \"+ file.getAbsolutePath()+ \"\\n\"\n\t\t\t\t\t\t\t + \"TimeStamp: \"+ date.format(new Date(file.lastModified()));\n\t\t\t\t\tif (file.lastModified() > targetfile.lastModified())\n\t\t\t\t\t\tsourceinfo += \" (newer)\";\n\t\t\t\t\tsourceinfo += \"\\nSize: \"+ file.length();\n\t\t\t\t\tif( file.length() > targetfile.length())\n\t\t\t\t\t\tsourceinfo += \" (larger)\";\n\n\t\t\t\t\ttargetinfo = \"Target: \"+ targetfile.getAbsolutePath()+ \"\\n\"\n\t\t\t\t\t\t\t + \"TimeStamp: \"+ date.format(new Date(targetfile.lastModified()));\n\t\t\t\t\tif (targetfile.lastModified() > file.lastModified())\n\t\t\t\t\t\ttargetinfo += \" (newer)\";\n\t\t\t\t\ttargetinfo += \"\\nSize: \"+ targetfile.length();\n\t\t\t\t\tif( targetfile.length() > file.length())\n\t\t\t\t\t\ttargetinfo += \" (larger)\";\n\n\t\t\t\t\tpromptMessage = \"\\n Preparing to \";\n\t\t\t\t\tif(targetfile.exists() && dobackup)\n\t\t\t\t\t\tpromptMessage += \"Backup and \";\n\t\t\t\t\tpromptMessage += \"Copy/Replace:\\n\\n\"\n\t\t\t\t\t\t\t + sourceinfo\n\t\t\t\t\t\t\t + \"\\n\\n\"\n\t\t\t\t\t\t\t + targetinfo\n\t\t\t\t\t\t\t + \"\\nDo you wish to proceed?\\n\\n\";\n\n\t\t\t\t\tint selected = JOptionPane.showOptionDialog(null,\n\t\t\t\t\t\t\tpromptMessage,\n\t\t\t\t\t\t\tprompt,\n\t\t\t\t\t\t\tJOptionPane.YES_NO_CANCEL_OPTION,\n\t\t\t\t\t\t\tJOptionPane.QUESTION_MESSAGE,\n\t\t\t\t\t\t\tnull,\n\t\t\t\t\t\t\tpromptOptions,\n\t\t\t\t\t\t\tpromptOptions[0]);\n\t\t\t\t\tif(selected == JOptionPane.CLOSED_OPTION || selected == 2){\n\t\t\t\t\t\tcanceled = true;\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t\tif(selected == 1) force = true;\n\t\t\t\t}\n\t\t\t\tif( targetfile.exists() && dobackup) backupFile(targetfile, backupdir);\n\t\t\t\tcopyFile(file, targetfile);\n\t\t\t\tmodifiedFiles++;\n\t\t\t}\n\t\t\tif (recurse){\n\t\t\t\tIterator<File> it = sourcesubs.iterator();\n\t\t\t\twhile(it.hasNext()){\n\t\t\t\t\tFile newsourcedir = it.next();\n\t\t\t\t\tFile newtargetdir = new File(targetdir, newsourcedir.getName());\n\t\t\t\t\tif(!newtargetdir.isDirectory()) newtargetdir.mkdir();\n\t\t\t\t\tFile newbackupdir = null;\n\t\t\t\t\tif(dobackup) {\n\t\t\t\t\t\tnewbackupdir = new File(backupdir, newsourcedir.getName());\n\t\t\t\t\t\tif(!newbackupdir.isDirectory()) newbackupdir.mkdir();\n\t\t\t\t\t}\n\t\t\t\t\tupdateDirectory(newtargetdir, newsourcedir, newbackupdir);\n\t\t\t\t}\n\t\t\t}\n\t\t}catch(Exception x){\n\t\t\t// restore any backups, if we can!\n\t\t\terrors.println(\"Failed to update directory \"+ targetdir.getAbsolutePath());\n\t\t\terrors.println(\" due to \"+ x.getClass().getSimpleName()+\": \"+x.getMessage());\n\t\t\tif(backups.size() > 0) {\n\t\t\t\terrors.println(\"Attempting to restore from backups at \"+ backupdir.getAbsolutePath());\n\t\t\t}\n\t\t\tSet<File> keys = backups.keySet();\n\t\t\tFile target = null;\n\t\t\tFile backup = null;\n\t\t\tfor(File key: keys){\n\t\t\t\ttry{\n\t\t\t\t\ttarget = key;\n\t\t\t\t\tbackup = backups.get(key);\n\t\t\t\t\tcopyFile(backup, target);\n\t\t\t\t}catch(IOException y){\n\t\t\t\t\terrors.println(\"Unable to restore backup file \"+ backup.getAbsolutePath()+\" to \"+ target.getAbsolutePath());\n\t\t\t\t}\n\t\t\t}\n\t\t\tthrow x;\n\t\t}\n\t}", "public void copy(){\n\t\tFileInputStream is = null;\n\t\tFileOutputStream os = null;\n\t\ttry {\n\t\t\tis = new FileInputStream(source);\n\t\t\tos = new FileOutputStream(dest);\n\t\t\tif(dest.exists())\n\t\t\t\tdest.delete();\n\t\t\tint i = -1;\n\t\t\twhile((i = is.read()) != -1)\n\t\t\t\tos.write(i);\n\t\t\tsource.deleteOnExit();\n\t\t} catch (IOException e) {\n\t\t\tJOptionPane.showMessageDialog(null, e);\n\t\t} finally {\n\t\t\tif(is != null)\n\t\t\t\ttry {\n\t\t\t\t\tis.close();\n\t\t\t\t} catch (IOException ignored) {}\n\t\t\tif(os != null)\n\t\t\t\ttry {\n\t\t\t\t\tos.close();\n\t\t\t\t} catch (IOException e) {\n\t\t\t\t\tJOptionPane.showMessageDialog(null, e);\n\t\t\t\t}\n\t\t}\n\t}", "void exportToDirectory(File targetDirectory) throws IOException;", "private File copyFiles(String filename, String directoryName) throws IOException { //after\n boolean success = false;\n String finalPath = this.rootLocation + \"/\" + directoryName +\"/\"+ filename;\n String tmpPath = this.tmpLocation + \"/\"+ filename;\n File finalFile = new File(finalPath);\n File directory = new File(this.rootLocation + \"/\" +directoryName);\n if (!directory.exists()) {\n directory.mkdir();\n }\n File tmpFile = new File(tmpPath);\n if(tmpFile.exists() && !tmpFile.isDirectory() && directory.exists() && directory.isDirectory()){\n if(finalFile.exists() && !finalFile.isDirectory()){\n finalFile = getNewName(finalPath);\n log.debug(\"compareToFiles -> rename to \"+ finalFile.getName());\n }\n success = copyFileUsingStream(tmpFile, finalFile);\n }\n\n log.debug(\"success copy...\"+success);\n return finalFile;\n }", "void copyToBranch(ID sourceBranchId, ID targetBranchId);", "public void copyDirectories(File sourceFolder, File destinationFolder, boolean overwriteExistingFiles, String... fileNamesToIgnore) throws IOException {\n copyDirectories(sourceFolder, destinationFolder, null, overwriteExistingFiles, fileNamesToIgnore);\n }", "void move(Path repoRoot, Path source, Path target);", "public static void copyTreeNoParent(File from, File to, FileFilter filter) throws IOException {\r\n File[] files;\r\n \r\n Check.checkArg(from.isDirectory());\r\n \r\n files = from.listFiles(filter);\r\n to.mkdirs();\r\n \r\n for (int i = 0; i < files.length; i++) {\r\n if (files[i].isDirectory()) {\r\n //File curto = new File(to, files[i].getName());\r\n //curto.mkdirs();\r\n copyTree(files[i], to, filter);\r\n }\r\n else {\r\n File curto = new File(to, files[i].getName());\r\n copyFile(files[i], curto);\r\n }\r\n }\r\n \r\n }", "@Override\n public boolean doWork() {\n\n logger.debug(\"CopyCommand->doWork()\");\n\n // Parameter ermitteln\n strSrcFile = getValueForKey(CONST_PARAM_SCRFILE);\n strDestFile = getValueForKey(CONST_PARAM_DESTFILE);\n bIsDirectory = Boolean.parseBoolean(getValueForKey(CONST_PARAM_ISDIRECTORY));\n\n // TODO: richtigen Replaces einfuegen\n VarReplace objVarRepl = new VarReplace();\n strSrcFile = objVarRepl.replacePlaceholder(strSrcFile);\n strDestFile = objVarRepl.replacePlaceholder(strDestFile);\n\n if ((strSrcFile == null) || (strDestFile == null)) {\n return false;\n }\n else if (new File(strSrcFile).isDirectory()) {\n try {\n FileUtils.copyDirectory(new File(strSrcFile), new File(strDestFile));\n }\n catch (IOException ioe) {\n logger.error(\" unable to copy file: \" + ioe.getMessage());\n }\n return true;\n\n }\n else {\n try {\n if (new File(strDestFile).getName().startsWith(\"v\")\n || new File(strDestFile).getName().startsWith(\"z\")) {\n strDestFile = new File(strDestFile).getParent() + File.separator\n + new File(strDestFile).getName().toUpperCase();\n }\n logger.debug(\"srcFile: \" + strSrcFile + \", destFile: \" + strDestFile);\n\n if (!new File(strSrcFile).getParentFile().exists()) {\n logger.debug(\"srcFile parent folder existiert nicht: \" + new File(strSrcFile).getParent());\n }\n\n if (!new File(strSrcFile).exists()) {\n logger.debug(\"srcFile existiert nicht: \" + new File(strSrcFile).getAbsolutePath());\n }\n\n if (!new File(strDestFile).getParentFile().exists()) {\n logger.debug(\"destFile parent folder existstiert nicht: \"\n + new File(strDestFile).getParentFile().getAbsolutePath());\n new File(strDestFile).getParentFile().mkdirs();\n }\n\n FileUtils.copyFile(new File(strSrcFile), new File(strDestFile));\n }\n catch (IOException ioe) {\n\n logger.error(\" unable to copy file: \" + ioe.getMessage());\n\n ioe.printStackTrace();\n\n while (iCounter < 20) {\n\n logger.debug(\"IOException loop: \" + iCounter);\n\n try {\n logger.debug(\"wait 20 seconds\");\n Thread.sleep(TimeUnit.SECONDS.toMillis(20));\n }\n catch (InterruptedException e) {\n e.printStackTrace();\n }\n\n try {\n FileUtils.copyFile(new File(strSrcFile), new File(strDestFile));\n logger.debug(\"break loop\");\n break;\n }\n catch (IOException e) {\n\n logger.debug(\"again an exception: \" + e.getMessage());\n }\n\n iCounter++ ;\n\n logger.debug(\"try it ounce again\");\n\n }\n\n }\n return true;\n }\n\n }", "public static boolean copyFolderContents(String src, String dst, boolean recursive) {\n File srcDirectory = new File(src);\n File dstDirectory = new File(dst);\n if (srcDirectory.exists() && srcDirectory.isDirectory()) {\n if (!dstDirectory.exists()) {\n MessageGenerator.briefError(\"ERROR: Could find destination directory \" + dstDirectory.getAbsolutePath());\n }\n for (File file : srcDirectory.listFiles()) {\n if (!file.isDirectory()) {\n if (!copyFile(file.getAbsolutePath(), dstDirectory.getAbsolutePath())) {\n return false;\n }\n } else if (file.isDirectory() && recursive) {\n if (!copyFolder(file.getAbsolutePath(), dst, true)) {\n MessageGenerator.briefError(\"ERROR: While copying folder \" + file.getAbsolutePath() +\n \" to \" + dst + File.separator + file.getName());\n return false;\n }\n }\n }\n return true;\n }\n MessageGenerator.briefError(\"ERROR: copyFolderContents() - Cannot find directory: \" + src);\n return false;\n }", "private void copyFile( final File source, final File target )\n throws MojoExecutionException\n {\n if ( source.exists() == false )\n {\n throw new MojoExecutionException( \"Source file '\" + source.getAbsolutePath() + \"' does not exist!\" );\n }\n if ( target.exists() == true )\n {\n throw new MojoExecutionException( \"Target file '\" + source.getAbsolutePath() + \"' already existing!\" );\n }\n\n try\n {\n this.logger.debug( \"Copying file from '\" + source.getAbsolutePath() + \"' to \" + \"'\"\n + target.getAbsolutePath() + \"'.\" );\n PtFileUtil.copyFile( source, target );\n }\n catch ( PtException e )\n {\n throw new MojoExecutionException( \"Could not copy file from '\" + source.getAbsolutePath() + \"' to \" + \"'\"\n + target.getAbsolutePath() + \"'!\", e );\n }\n }", "void copyFile(String sourceFile, String destinationFile) throws IOException;", "public void copy(String name, String oldPath, String newPath);", "void copyFile(String sourceFile, String destinationFile, boolean overwrite) throws IOException;", "public static void main(String[] args) throws IOException {\n\t \n\t copyInputFilesToOutputDirectory();\n\t \n\t System.out.println(\"done\"); \n\t \n\t \n\t \n\t}", "@Override\n\tpublic FileVisitResult preVisitDirectory(Path dir, BasicFileAttributes attrs) {\n\t\tSystem.out.println(dir.toAbsolutePath());\n\t\tPath RelativizedPath = SourceRoot.relativize(dir);\n\t\tSystem.out.println(RelativizedPath.toAbsolutePath());\n\t\tPath ResolvedPath = TargetRoot.resolve(RelativizedPath);\n\t\tSystem.out.println(ResolvedPath.toAbsolutePath());\n\t\t\n\t\ttry {\n\t\t\tFiles.copy(dir,ResolvedPath,StandardCopyOption.REPLACE_EXISTING);\n\t\t} catch (IOException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\treturn FileVisitResult.SKIP_SUBTREE;\n\t\t}\n\t\t\n\t\t\n\t\t\ttry {\n\t\t\t\tFiles.deleteIfExists(dir);\n\t\t\t} catch (IOException e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t\n\t\t\n\t\treturn FileVisitResult.CONTINUE;\n\t}", "public static final void copy(String source, String destination) {\n File sourceFile = new File(source);\n File destFile = new File(destination);\n\n if (destFile.exists()) {\n // Information error all ready exist the file\n }\n\n if (!sourceFile.exists()) {\n // General Server Error\n }\n\n if (sourceFile.isDirectory()) {\n copyDirectory(source, destination);\n } else {\n copyFile(source, destination);\n }\n\n //delete source folder after copy-paste\n }", "@PostMapping(\"/copyfolder\")\n public String copyFolder(@RequestParam String currentPath, @RequestParam(name = \"copiedFolders\") List<String> folders, @RequestParam(name = \"ft_2_active\") String destination, RedirectAttributes redirectAttributes) {\n if(null != folders && folders.size() > 0) {\n ArrayList<String> successMessages = new ArrayList<>();\n ArrayList<String> errorMessages = new ArrayList<>();\n logger.log(Level.INFO, \"Copying folder(s)...\");\n for (String folder : folders) {\n if (uiCommandService.copyFile(folder, destination)){\n successMessages.add(\"Successfully copied \" + new File(folder).getName() + \" to \" + destination + \"!\");\n } else {\n errorMessages.add(\"Could not copy \" + new File(folder).getName() + \" to \" + destination + \"!\");\n }\n }\n logger.log(Level.INFO, \"Finished copying folder(s)!\");\n redirectAttributes.addFlashAttribute(\"success_messages\",successMessages);\n redirectAttributes.addFlashAttribute(\"error_messages\",errorMessages);\n }\n return \"redirect:/imageview?location=\" + currentPath.replace(\"\\\\\", \"/\");\n }", "private void copy(File src, File dst) throws IOException \r\n {\r\n InputStream in = new FileInputStream(src);\r\n OutputStream out = new FileOutputStream(dst);\r\n \r\n // Transfer bytes from in to out\r\n byte[] buf = new byte[1024];\r\n int len;\r\n while ((len = in.read(buf)) > 0) \r\n {\r\n out.write(buf, 0, len);\r\n }\r\n in.close();\r\n out.close();\r\n }", "public static boolean moveCopyRoot(String old, String newDir) {\n try {\n if (!readReadWriteFile())\n RootTools.remount(newDir, \"rw\");\n\n execute(\"cp -fr \" + getCommandLineString(old) + \" \"\n + getCommandLineString(newDir));\n return true;\n } catch (Exception e) {\n e.printStackTrace();\n }\n return false;\n }", "void copyTo(DirEntry target)\r\n {\r\n target.dimension = dimension;\r\n target.son = son;\r\n target.son_ptr = son_ptr;\r\n target.son_level = son_level;\r\n target.son_is_data = son_is_data;\r\n target.num_of_data = num_of_data;\r\n System.arraycopy(bounces, 0, target.bounces, 0, 2*dimension);\r\n }", "public static void copyFileOrDirectory(String source, String destination) throws KubernetesPluginException {\n File src = new File(source);\n File dst = new File(destination);\n try {\n // if source is file\n if (Files.isRegularFile(Paths.get(source))) {\n if (Files.isDirectory(dst.toPath())) {\n // if destination is directory\n FileUtils.copyFileToDirectory(src, dst);\n } else {\n // if destination is file\n FileUtils.copyFile(src, dst);\n }\n } else if (Files.isDirectory(Paths.get(source))) {\n FileUtils.copyDirectory(src, dst);\n }\n } catch (IOException e) {\n throw new KubernetesPluginException(\"Error while copying file\", e);\n }\n }", "private File copyResources(String srcFileName, File sourceDir, File destinationDir) throws MojoExecutionException {\n File srcFile = new File(sourceDir.getAbsolutePath()+File.separator+srcFileName);\n if (srcFile.exists()) {\n getLog().info(\"Copying \"+srcFile.getName()+\"...\");\n try {\n File destFile = new File(destinationDir.getAbsolutePath()+File.separator+srcFile.getName());\n if (srcFile.isDirectory()) {\n FileUtils.copyDirectory(srcFile, destFile, false);\n } else {\n FileUtils.copyFile(srcFile, destFile, false);\n }\n return destFile;\n } catch (IOException ex) {\n throw new MojoExecutionException(\"Error copying resource '\"+srcFile.getName()+\"'\", ex);\n }\n } else {\n getLog().warn(\"No source file '\"+srcFile.getName()+\"' to copy\");\n return null;\n }\n }", "File getTargetDirectory();", "abstract File getTargetDirectory();", "public void copyConfig()\n {\n if (srcParts == null || dstParts == null)\n {\n logger.error(\"VObjectTreeCopier.copyConfig: null source or destination\");\n return;\n }\n if (hasRootTranslation)\n {\n srcParts[rootTranslationIdx].getTranslation(buf);\n dstParts[rootTranslationIdx].setTranslation(buf);\n }\n if (hasTranslation)\n {\n for (int i = 0; i < srcParts.length; i++)\n {\n srcParts[i].getTranslation(buf);\n dstParts[i].setTranslation(buf);\n }\n }\n if (hasRotation)\n {\n for (int i = 0; i < srcParts.length; i++)\n {\n srcParts[i].getRotation(buf);\n dstParts[i].setRotation(buf);\n }\n }\n if (hasScale)\n {\n for (int i = 0; i < srcParts.length; i++)\n {\n srcParts[i].getScale(buf);\n dstParts[i].setScale(buf);\n }\n }\n if (hasVelocity)\n {\n for (int i = 0; i < srcParts.length; i++)\n {\n srcParts[i].getVelocity(buf);\n dstParts[i].setVelocity(buf);\n }\n }\n if (hasAngularVelocity)\n {\n for (int i = 0; i < srcParts.length; i++)\n {\n srcParts[i].getAngularVelocity(buf);\n dstParts[i].setAngularVelocity(buf);\n }\n }\n\n }", "public static void copy(URL src, File dst) throws IOException {\n\n try (InputStream in = src.openStream()) {\n try (OutputStream out = new FileOutputStream(dst)) {\n dst.mkdirs();\n copy(in, out);\n }\n }\n }", "private static void moveFilesToFolder(List<File> files, String strFolderPath) throws IOException {\n File folderPath = Paths.get(strFolderPath).toFile();\n folderPath.mkdir();\n\n for (File file : files) {\n Path dst = Paths.get(folderPath.getAbsolutePath(), file.getName());\n Path src = file.toPath();\n if (dst.toFile().exists() && !src.equals(dst)) {\n String dstStr = dst.toString();\n String fileExt = FilenameUtils.getExtension(dstStr);\n String newPath = FilenameUtils.removeExtension(dstStr) + \" (Copy).\" + fileExt;\n Files.move(src, new File(newPath).toPath(), StandardCopyOption.ATOMIC_MOVE);\n } else {\n Files.move(src, dst, StandardCopyOption.ATOMIC_MOVE);\n }\n }\n }", "final public VFile copyTo(VDir parentDir) throws VlException\n {\n //return (VFile)doCopyMoveTo(parentDir,null,false /*,options*/);\n return (VFile)this.getTransferManager().doCopyMove(this,parentDir,null,false); \n }", "public static boolean copyFolder(String srcDirectoryPath, String dstDirectoryPath, boolean recursive) {\n File srcDirectory = new File(srcDirectoryPath);\n File dstDirectory = new File(dstDirectoryPath + File.separator + srcDirectory.getName());\n if (srcDirectory.exists() && srcDirectory.isDirectory()) {\n if (!dstDirectory.exists()) {\n dstDirectory.mkdirs();\n }\n for (File file : srcDirectory.listFiles()) {\n if (!file.isDirectory()) {\n if (!copyFile(file.getAbsolutePath(), dstDirectory.getAbsolutePath() + File.separator + file.getName())) {\n return false;\n }\n } else if (file.isDirectory() && recursive) {\n if (!copyFolder(file.getAbsolutePath(), dstDirectory.getAbsolutePath(), true)) {\n return false;\n }\n }\n\n }\n return true;\n }\n MessageGenerator.briefError(\"ERROR: copyFolder() - Cannot find directory: \" + srcDirectoryPath);\n return false;\n }", "public static File copyToBagDirectoryInTarget(File bag) throws Exception {\n File dirInTarget = null;\n if (bag.isDirectory()) {\n dirInTarget = new File(\"target\", bag.getName());\n FileUtils.deleteQuietly(dirInTarget);\n FileUtils.copyDirectory(bag, dirInTarget);\n } else {\n ZipFile zf = new ZipFile(bag);\n if (!zf.isValidZipFile()) {\n System.err.println(\"ERROR: The submitted bag is not a valid directory or Zipfile\");\n System.exit(1);\n } else {\n File zipInTarget = new File(\"target\", bag.getName());\n FileUtils.deleteQuietly(zipInTarget);\n dirInTarget = new File(\"target\", ZipUtil.getBaseDirName(bag.toString()));\n FileUtils.deleteQuietly(dirInTarget);\n zf.extractAll(\"target\");\n }\n }\n return dirInTarget;\n }", "@Override\n public FileVisitResult preVisitDirectory(Path dir, BasicFileAttributes attrs) throws IOException {\n if (!this.sourceDirectory.equals(dir)) {\n // Create this directory in the target and make it our current target.\n Path newDirectory = this.currentTargetDirectory.resolve(dir.getFileName());\n boolean didCreate = newDirectory.toFile().mkdir();\n Assert.assertTrue(didCreate);\n logger.output(\"Created directory: \" + newDirectory);\n this.currentTargetDirectory = newDirectory;\n }\n return FileVisitResult.CONTINUE;\n }", "Content copyContent(Content sourceContent, Association target, AssociationCategory category, boolean copyChildren) throws NotAuthorizedException;", "public static void extractResources(File jar, String subdir, File dest) throws IOException {\n if (jar.isDirectory()) {\n if (subdir.startsWith(\"/\")) {\n subdir = subdir.substring(1);\n }\n FileUtility.copyDirectory(new File(jar, subdir), dest);\n } else {\n if (!subdir.startsWith(\"/\")) {\n subdir = \"/\" + subdir;\n }\n tryExtractFolder(jar, subdir, dest);\n }\n }", "private static void copyFile(String from, String to)\n\t{\n\t\tFile inputFile;\n\t File outputFile;\n\t\tint fIndex = from.indexOf(\"file:\");\n\t\tint tIndex = to.indexOf(\"file:\");\n\t\tif(fIndex < 0)\n\t\t\tinputFile = new File(from);\n\t\telse\n\t\t\tinputFile = new File(from.substring(fIndex + 5, from.length()));\n\t\tif(tIndex < 0)\n\t\t\toutputFile = new File(to);\n\t\telse\n\t\t\toutputFile = new File(to.substring(tIndex + 5, to.length())); \n\t\tcopyFile(inputFile, outputFile);\t\t\n\t}", "void copyValidMusics(String outDir, List<T> items);" ]
[ "0.66364884", "0.66039735", "0.6587539", "0.65822923", "0.6524656", "0.6505356", "0.64569914", "0.6425295", "0.6354383", "0.6336055", "0.62958306", "0.6225143", "0.61746556", "0.6171725", "0.61639005", "0.61469257", "0.61407197", "0.6127812", "0.60901487", "0.6085007", "0.6006538", "0.6001718", "0.5992774", "0.59431994", "0.5919494", "0.5914699", "0.5910662", "0.5870088", "0.5806985", "0.57944995", "0.5739193", "0.5702817", "0.5688208", "0.5616843", "0.56085515", "0.5572449", "0.55629003", "0.5561352", "0.55505824", "0.55452156", "0.55065954", "0.54756886", "0.5475354", "0.5428691", "0.54122335", "0.5396137", "0.53917295", "0.5381992", "0.5368437", "0.5336774", "0.533525", "0.5334532", "0.53295994", "0.5326978", "0.5311429", "0.530418", "0.5299719", "0.52927715", "0.52724934", "0.5271308", "0.5270093", "0.52626634", "0.525268", "0.5233917", "0.5222975", "0.52186745", "0.5213291", "0.5199301", "0.5181862", "0.51708317", "0.51705194", "0.51700985", "0.5152042", "0.5144615", "0.51320165", "0.51310945", "0.5125342", "0.5121607", "0.5118033", "0.51055014", "0.5094577", "0.5092338", "0.5090971", "0.5084583", "0.5075726", "0.50675535", "0.5065166", "0.5054363", "0.5014789", "0.5014138", "0.5001843", "0.499208", "0.49809802", "0.4950977", "0.49500754", "0.4948918", "0.4944567", "0.49160197", "0.4906948", "0.4898676", "0.48985752" ]
0.0
-1
Since the FS connector does not support UUIDs (under the root node), all clones are just copies (clone for nonreferenceable nodes is a copy to the corresponding path).
@Test public void shouldBeAbleToCloneFolder() { graph.useWorkspace("otherWorkspace"); graph.create("/testFolder").orReplace().and(); graph.create("/testFolder/testFile").with(JcrLexicon.PRIMARY_TYPE, JcrNtLexicon.FILE).orReplace().and(); graph.create("/testFolder/testFile/jcr:content") .with(JcrLexicon.PRIMARY_TYPE, JcrNtLexicon.RESOURCE) .and(JcrLexicon.DATA, TEST_CONTENT.getBytes()) .orReplace() .and(); File newFile = new File(otherWorkspaceRoot, "testFolder/testFile"); assertContents(newFile, TEST_CONTENT); graph.useWorkspace("test"); graph.clone("/testFolder").fromWorkspace("otherWorkspace").as("clonedFolder").into("/").failingIfAnyUuidsMatch(); File copiedFolder = new File(testWorkspaceRoot, "clonedFolder"); assertTrue(copiedFolder.exists()); assertTrue(copiedFolder.isDirectory()); File copiedFile = new File(testWorkspaceRoot, "clonedFolder/testFile"); assertContents(copiedFile, TEST_CONTENT); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test\n public void shouldBeAbleToCloneFile() {\n graph.useWorkspace(\"otherWorkspace\");\n graph.create(\"/testFile\").with(JcrLexicon.PRIMARY_TYPE, JcrNtLexicon.FILE).orReplace().and();\n graph.create(\"/testFile/jcr:content\")\n .with(JcrLexicon.PRIMARY_TYPE, JcrNtLexicon.RESOURCE)\n .and(JcrLexicon.DATA, TEST_CONTENT.getBytes())\n .orReplace()\n .and();\n\n File newFile = new File(otherWorkspaceRoot, \"testFile\");\n assertContents(newFile, TEST_CONTENT);\n\n graph.useWorkspace(\"test\");\n graph.clone(\"/testFile\").fromWorkspace(\"otherWorkspace\").as(\"clonedFile\").into(\"/\").failingIfAnyUuidsMatch();\n File copiedFile = new File(testWorkspaceRoot, \"clonedFile\");\n assertContents(copiedFile, TEST_CONTENT);\n }", "public abstract Node copy();", "public abstract TreeNode copy();", "public Object clone() {\n\t\treturn(new FileSystem(_device, _mount, _type));\n\t}", "@Mapper(collectionMappingStrategy = CollectionMappingStrategy.TARGET_IMMUTABLE)\n public interface HaFlowPathCloner {\n HaFlowPathCloner INSTANCE = Mappers.getMapper(HaFlowPathCloner.class);\n\n @Mapping(target = \"haSubFlows\", ignore = true)\n void copyWithoutHaSubFlows(HaFlowPathData source, @MappingTarget HaFlowPathData target);\n\n @Mapping(target = \"sharedSwitch\", ignore = true)\n @Mapping(target = \"subPaths\", ignore = true)\n @Mapping(target = \"haSubFlows\", ignore = true)\n void copyWithoutSwitchesAndSubPaths(HaFlowPathData source, @MappingTarget HaFlowPathData target);\n\n /**\n * Performs deep copy of entity data.\n *\n * @param source the path data to copy from.\n * @param targetHaFlow the HA-flow to be referred ({@code HaFlowPathData.getHaFlow()}) by the new path data.\n */\n default HaFlowPathData deepCopy(HaFlowPathData source, HaFlow targetHaFlow) {\n HaFlowPathDataImpl result = new HaFlowPathDataImpl();\n result.haFlow = targetHaFlow;\n\n copyWithoutSwitchesAndSubPaths(source, result);\n result.setSharedSwitch(new Switch(source.getSharedSwitch()));\n\n Map<String, HaSubFlow> subFlowMap;\n if (targetHaFlow == null || targetHaFlow.getHaSubFlows() == null) {\n subFlowMap = new HashMap<>();\n } else {\n subFlowMap = targetHaFlow.getHaSubFlows().stream()\n .collect(Collectors.toMap(HaSubFlow::getHaSubFlowId, Function.identity()));\n }\n List<FlowPath> subPaths = new ArrayList<>();\n for (FlowPath subPath : source.getSubPaths()) {\n HaSubFlow targetHaSubFlow = subFlowMap.get(subPath.getHaSubFlowId());\n if (targetHaSubFlow == null) {\n throw new IllegalArgumentException(format(\"Couldn't copy HaFlowPath %s because target ha-flow has \"\n + \"no ha-subflow %s\", source, subPath.getHaSubFlowId()));\n }\n subPaths.add(new FlowPath(subPath, null, targetHaSubFlow));\n }\n result.setSubPaths(subPaths);\n\n List<HaSubFlow> subFlows = new ArrayList<>();\n for (HaSubFlow subFlow : source.getHaSubFlows()) {\n subFlows.add(new HaSubFlow(subFlow, targetHaFlow));\n }\n result.setHaSubFlows(subFlows);\n return result;\n }\n }", "public static void main(String args[]) throws CloneNotSupportedException\n\t{\n\t\tSystem.out.println(getRandomNumber(2, 2));\n\t\t//Node n1 = org.apache.commons.lang3.SerializationUtils.clone(n);\n\t\t//n.getNextNodes().get(\"1\").getNextNodes().put(\"1\", null);\n\t\t//System.out.println(n1.getNextNodes().get(\"1\").getNextNodes().get(\"1\"));\n\t}", "Component deepClone();", "public Node cloneNode () {\n return new VcsGroupFileNode(shadowObject, originalNode);\n }", "public Function clone();", "private void copy(Node node){\n parent_ = node.parent_;\n size_ = node.size_;\n for(int i = 0; i < size_; i++)\n children_[i] = node.children_[i];\n }", "Object clone();", "Object clone();", "public abstract Object clone() ;", "protected abstract VerifiableSensorOperation doClone();", "void cloneTo(NamedStorage storage);", "public abstract Object clone();", "abstract public Vertex cloneFamily();", "private Node clone(Node node, Node parent, String overrideName) {\n Node clone = null;\n try {\n clone = parent.addNode(overrideName, node.getPrimaryNodeType().getName());\n\n\n // copy properties\n PropertyIterator properties = node.getProperties();\n\n while (properties.hasNext()) {\n Property property = properties.nextProperty();\n if (!property.getName().startsWith(\"jcr:\") && !property.getName().startsWith(\"mgnl:\")) {\n PropertyUtil.setProperty(clone, property.getName(), property.getValue());\n }\n }\n\n // copy subnodes\n NodeIterator children = node.getNodes();\n\n while (children.hasNext()) {\n Node child = children.nextNode();\n clone(child, clone, child.getName());\n }\n\n return clone;\n\n } catch (RepositoryException e) {\n //todo exception\n throw new RuntimeException(e);\n }\n }", "public abstract Type treeCopy();", "@Override\n public Object clone()\n {\n try\n {\n DefaultConfigurationNode copy = (DefaultConfigurationNode) super\n .clone();\n copy.initSubNodes();\n return copy;\n }\n catch (CloneNotSupportedException cex)\n {\n // should not happen\n throw new ConfigurationRuntimeException(\"Cannot clone \" + getClass());\n }\n }", "public Node clone() {\n Node n = new Node((float) this.getSimPos().getX(), (float) this.getSimPos().getY(), radius*2, isStationary, this.renderColor);\n n.node_uuid = this.node_uuid;\n return n;\n }", "public RMShape cloneDeep() { return clone(); }", "@Override\n public MetaprogramTargetNode deepCopy(BsjNodeFactory factory);", "@Override\n @Deprecated\n public Object clone(\n ) { \n return new Path(this);\n }", "@Override\n public MovePath clone() {\n final MovePath copy = new MovePath(getGame(), getEntity());\n copy.steps = new Vector<MoveStep>(steps);\n copy.careful = careful;\n return copy;\n }", "abstract public Vertex cloneMe();", "public Object clone() {\n FileTransfer ft = new FileTransfer();\n ft.mLogicalFile = new String(this.mLogicalFile);\n ft.mFlags = (BitSet) this.mFlags.clone();\n ft.mTransferFlag = this.mTransferFlag;\n ft.mSize = this.mSize;\n ft.mType = this.mType;\n ft.mJob = new String(this.mJob);\n ft.mPriority = this.mPriority;\n ft.mURLForRegistrationOnDestination = this.mURLForRegistrationOnDestination;\n ft.mMetadata = (Metadata) this.mMetadata.clone();\n ft.mVerifySymlinkSource = this.mVerifySymlinkSource;\n // the maps are not cloned underneath\n\n return ft;\n }", "public abstract INodo copy();", "default C cloneFlat() {\n\t\treturn clone(FieldGraph.of(getFields()));\n\t}", "public Object clone();", "public Object clone();", "public Object clone();", "public Object clone();", "@Override\r\n\t\tpublic Node cloneNode(boolean deep)\r\n\t\t\t{\n\t\t\t\treturn null;\r\n\t\t\t}", "public void copy() {\n\n\t}", "Prototype makeCopy();", "public SyncDevice deepcopy() {\n SyncDevice copy = new SyncDevice(this.id);\n copy.displayName = this.displayName;\n copy.syncTimestamp = this.syncTimestamp;\n copy.lastIP = this.lastIP;\n copy.deletedSecrets = new HashMap<String, DeletedSecret>();\n for (Entry<String, DeletedSecret> deletedSecret : this.deletedSecrets.entrySet()) {\n copy.deletedSecrets.put(deletedSecret.getKey(), \n new DeletedSecret(deletedSecret.getValue().getDescription(), \n deletedSecret.getValue().getTimestamp()));\n }\n return copy;\n }", "@Override\r\n\tpublic BinaryNodeInterface<E> copy() {\n\t\treturn null;\r\n\t}", "public abstract OtTreeNodeWidget copy();", "@Override\n\tpublic MapNode clone()\n\t{\n\t\t// Create copy of this map node\n\t\tMapNode copy = (MapNode)super.clone();\n\n\t\t// Copy KV pairs\n\t\tcopy.pairs = new LinkedHashMap<>();\n\t\tfor (Map.Entry<String, AbstractNode> pair : pairs.entrySet())\n\t\t{\n\t\t\tAbstractNode value = pair.getValue().clone();\n\t\t\tcopy.pairs.put(pair.getKey(), value);\n\t\t\tvalue.setParent(copy);\n\t\t}\n\n\t\t// Return copy\n\t\treturn copy;\n\t}", "public void cloningFactor() {\n\t\t\t\n\t\t\tsort();\n\t\t\tdouble factorNum = 0.0; \n\t\t\t\n\t\t\tfor(Solution sol : population) {\n\t\t\t\tfactorNum = averagePath / (double) sol.getPath();\n\t\t\t\tsol.setCloningFactor(factorNum);\n\t\t\t}\n\t\t}", "public Object clone() {\n\tZPathLayoutManager newObject;\n\ttry {\n\t newObject = (ZPathLayoutManager)super.clone();\n\t} catch (CloneNotSupportedException e) {\n\t throw new RuntimeException(\"Object.clone() failed: \" + e);\n\t}\n\n\tif (path != null) {\n\t newObject.path = (ArrayList)path.clone();\n\t}\n\n\tif (shape != null) {\n\t // JM - not done yet: The shape interface doesn't include a clone() method,\n\t // so to clone a shape we either must cast it to a specific shape class\n\t // and call clone() on that, or use reflection to invoke the clone()\n\t // method. For now, we just continue referencing the old shape.\t\n\t}\n\n\treturn newObject;\n }", "Long clone(Long id);", "protected static void TEST_CHANGE_UUID() {\r\n\t\tUUID = System.getProperty(\"java.io.tmpdir\") + \"/titan_test_\" + UuidUtils.get().getRandomUuid();\r\n\t}", "public QueryNode cloneTree() throws CloneNotSupportedException;", "public abstract Type treeCopyNoTransform();", "public Node clone02(Node head) {\n Node originNode = head, tmp = null;\n\n while (originNode != null) {\n tmp = originNode.next;\n originNode.next = new Node(originNode.data);\n originNode.next.next = tmp;\n originNode = tmp;\n }\n\n originNode = head;\n while (originNode != null) {\n originNode.next.random = originNode.random.next;\n originNode = originNode.next != null ? originNode.next.next : originNode.next;\n }\n\n originNode = head;\n tmp = head.next;\n Node cloneNode = tmp;\n\n while (originNode != null) {\n originNode.next = originNode.next != null ? originNode.next.next : originNode.next;\n originNode = originNode.next;\n\n tmp.next = tmp.next != null ? tmp.next.next : tmp.next;\n tmp = tmp.next;\n }\n\n return cloneNode;\n }", "public abstract Piece clone();", "public abstract Piece clone();", "abstract public Vertex getClone();", "public CloneNodeCommand() {\n// validator.configureTemplate().add(new StringToken(Commands.CLONE.getValue()))\n// .add(new StringToken()).add(new StringToken(\"from\"))\n// .add(new StringToken());\n validator.configureTemplate().add(new StringToken(Commands.CLONE.getValue()))\n .add(new MapListToken());\n }", "@Test\n public void checkUuidIndexUpdatedOnMove() throws Exception {\n // create the node to move\n Node parent = adminSession.getNode(temp1Path);\n String childName = \"child\" + System.currentTimeMillis();\n Node child = parent.addNode(childName, \"sling:Folder\");\n child.addMixin(\"mix:referenceable\");\n adminSession.save();\n \n // verify the id and lookup by id and query works \n String id = child.getIdentifier();\n assertThat(adminSession.getNodeByIdentifier(id), notNullValue());\n verifyLookupByIdentifier(id);\n\n // move it\n adminSession.move(child.getPath(), temp2Path + childName);\n adminSession.save();\n \n // verify the id and lookup by id and query works \n verifyLookupByIdentifier(id);\n }", "public abstract Shape clone() throws CloneNotSupportedException;", "static void setCopying(){isCopying=true;}", "public T cloneDeep();", "public MmeDiameterPeer cloneShallow() {\n MmeDiameterPeer copy;\n try {\n copy = new MmeDiameterPeer(getHostIdentityValue().toString());\n } catch (JNCException e) {\n copy = null;\n }\n return (MmeDiameterPeer)cloneShallowContent(copy);\n }", "@FixFor( \"MODE-788\" )\n @Test\n public void shouldCreateSubgraphAndDeletePartOfThatSubgraphInSameOperation() {\n graph.batch()\n .create(\"/a\")\n .with(JcrLexicon.PRIMARY_TYPE, JcrNtLexicon.FOLDER)\n .orReplace()\n .and()\n .create(\"/a/b\")\n .with(JcrLexicon.PRIMARY_TYPE, JcrNtLexicon.FOLDER)\n .orReplace()\n .and()\n .create(\"/a/b/c\")\n .with(JcrLexicon.PRIMARY_TYPE, JcrNtLexicon.FOLDER)\n .orReplace()\n .and()\n .delete(\"/a/b\")\n .and()\n .execute();\n\n // Now look up node A ...\n File newFile = new File(testWorkspaceRoot, \"a\");\n assertTrue(newFile.exists());\n assertTrue(newFile.isDirectory());\n assertTrue(newFile.list().length == 0);\n assertFalse(new File(newFile, \"b\").exists());\n }", "@Override\n public Object clone() {\n return super.clone();\n }", "@Override\n public ExpressionNode deepCopy(BsjNodeFactory factory);", "public interface DeepClonerSPI {\n <T> T clone(T objectToClone);\n}", "@Test\n public void newFilesInheritPinness() throws Exception {\n TachyonFile root = mTfs.open(new TachyonURI(\"/\"));\n mTfs.setPin(root, true);\n\n // Child file should be pinned\n TachyonFile file0 = createEmptyFile(new TachyonURI(\"/file0\"));\n Assert.assertTrue(mTfs.getInfo(file0).isPinned);\n Assert.assertEquals(Sets.newHashSet(mFSMasterClient.getPinList()),\n Sets.newHashSet(file0.getFileId()));\n\n // Child folder should be pinned\n mTfs.mkdirs(new TachyonURI(\"/folder\"));\n TachyonFile folder = mTfs.open(new TachyonURI(\"/folder\"));\n Assert.assertTrue(mTfs.getInfo(folder).isPinned);\n\n // Grandchild file also pinned\n TachyonFile file1 = createEmptyFile(new TachyonURI(\"/folder/file1\"));\n Assert.assertTrue(mTfs.getInfo(file1).isPinned);\n Assert.assertEquals(Sets.newHashSet(mFSMasterClient.getPinList()),\n Sets.newHashSet(file0.getFileId(), file1.getFileId()));\n\n // Unpinning child folder should cause its children to be unpinned as well\n mTfs.setPin(folder, false);\n Assert.assertFalse(mTfs.getInfo(folder).isPinned);\n Assert.assertFalse(mTfs.getInfo(file1).isPinned);\n Assert.assertEquals(Sets.newHashSet(mFSMasterClient.getPinList()),\n Sets.newHashSet(file0.getFileId()));\n\n // And new grandchildren should be unpinned too.\n TachyonFile file2 = createEmptyFile(new TachyonURI(\"/folder/file2\"));\n Assert.assertFalse(mTfs.getInfo(file2).isPinned);\n Assert.assertEquals(Sets.newHashSet(mFSMasterClient.getPinList()),\n Sets.newHashSet(file0.getFileId()));\n\n // But toplevel children still should be pinned!\n TachyonFile file3 = createEmptyFile(new TachyonURI(\"/file3\"));\n Assert.assertTrue(mTfs.getInfo(file3).isPinned);\n Assert.assertEquals(Sets.newHashSet(mFSMasterClient.getPinList()),\n Sets.newHashSet(file0.getFileId(), file3.getFileId()));\n }", "public DescriptiveFramework clone();", "public Object cloner() {\n return cloner((Sommet)origine.cloner(), (Sommet)destination.cloner());\n }", "@Override\n public Node clone() {\n Node node = null;\n try {\n node = (Node) super.clone();\n } catch (Exception e) {\n System.err.println(\"Unable to clone!\");\n e.printStackTrace();\n }\n return node;\n }", "public Object clone()\n/* */ {\n/* 835 */ return super.clone();\n/* */ }", "public Clone() {}", "@SuppressWarnings(\"resource\")\n @Test\n public void testClone() {\n try {\n SubtenantApiKey subtenantapikey1 = new SubtenantApiKey(\"4f267f967f7d1f5e3fa0d6abaccdb4bf\",\n new Date(1574704667174L), 118, null,\n \"4f267f967f7d1f5e3fa0d6abaccdb4bf\",\n \"d3327aef-1da3-4499-bcf3-8e63b04cb6f5\", -125,\n \"66affdfa-784e-4c17-bd15-ae9dd9843c00\",\n \"4f267f967f7d1f5e3fa0d6abaccdb4bf\",\n SubtenantApiKeyStatus.getDefault(),\n new Date(1574704661082L));\n SubtenantApiKey subtenantapikey2 = subtenantapikey1.clone();\n assertNotNull(subtenantapikey1);\n assertNotNull(subtenantapikey2);\n assertNotSame(subtenantapikey2, subtenantapikey1);\n assertEquals(subtenantapikey2, subtenantapikey1);\n } catch (Exception exception) {\n fail(exception.getMessage());\n }\n }", "private void clone(Node<T> sourceNode, Node<T> cloneNode) {\n Node<T> tmp;\n Collection<Node<T>> collection = sourceNode.getChildren();\n for (Node<T> child : collection) {\n tmp = child.clone();\n if (sourceNode.getParent() != null) tmp.setParent(cloneNode);\n cloneNode.addChildren(tmp);\n clone(child, tmp);\n }\n }", "public SoPickedPoint \ncopy() \n//\n////////////////////////////////////////////////////////////////////////\n{\n SoPickedPoint newCopy = new SoPickedPoint(this);\n return newCopy;\n}", "private void updateOriginalNodesInMirror() {\n for (Node node : originalGraph.nodes()) {\n if (!mirrorGraph.has(node)) {\n mirrorGraph.add(node);\n }\n originalAttributesToMirror(node);\n }\n }", "public Chord duplicate ()\r\n {\r\n // Beams are not copied\r\n Chord clone = new Chord(getMeasure(), slot);\r\n clone.stem = stem;\r\n stem.addTranslation(clone);\r\n\r\n // Notes (we make a deep copy of each note)\r\n List<TreeNode> notesCopy = new ArrayList<>();\r\n notesCopy.addAll(getNotes());\r\n\r\n for (TreeNode node : notesCopy) {\r\n Note note = (Note) node;\r\n new Note(clone, note);\r\n }\r\n\r\n clone.tupletFactor = tupletFactor;\r\n\r\n clone.dotsNumber = dotsNumber;\r\n clone.flagsNumber = flagsNumber; // Not sure TODO\r\n\r\n // Insure correct ordering of chords within their container\r\n ///Collections.sort(getParent().getChildren(), chordComparator);\r\n\r\n return clone;\r\n }", "@Test\r\n public void testCopyEdits() throws Exception {\r\n MiniDFSCluster cluster = null;\r\n JournalService service = null;\r\n JournalHttpServer jhs1 = null, jhs2 = null;\r\n\r\n try {\r\n cluster = new MiniDFSCluster.Builder(conf).numDataNodes(0).build();\r\n\r\n // restart namenode, so it will have finalized edit segments\r\n cluster.restartNameNode();\r\n\r\n conf.set(DFSConfigKeys.DFS_JOURNAL_EDITS_DIR_KEY, path1.getPath());\r\n InetSocketAddress nnAddr = cluster.getNameNode(0).getNameNodeAddress();\r\n InetSocketAddress serverAddr = new InetSocketAddress(50900);\r\n JournalListener listener = Mockito.mock(JournalListener.class);\r\n service = new JournalService(conf, nnAddr, serverAddr, listener);\r\n service.start();\r\n \r\n // get namenode clusterID/layoutVersion/namespaceID\r\n StorageInfo si = service.getJournal().getStorage();\r\n JournalInfo journalInfo = new JournalInfo(si.layoutVersion, si.clusterID,\r\n si.namespaceID);\r\n\r\n // start jns1 with path1\r\n jhs1 = new JournalHttpServer(conf, service.getJournal(),\r\n NetUtils.createSocketAddr(\"localhost:50200\"));\r\n jhs1.start();\r\n\r\n // get all edit segments\r\n InetSocketAddress srcRpcAddr = NameNode.getServiceAddress(conf, true);\r\n NamenodeProtocol namenode = NameNodeProxies.createNonHAProxy(conf,\r\n srcRpcAddr, NamenodeProtocol.class,\r\n UserGroupInformation.getCurrentUser(), true).getProxy();\r\n\r\n RemoteEditLogManifest manifest = namenode.getEditLogManifest(1); \r\n jhs1.downloadEditFiles(\r\n conf.get(DFSConfigKeys.DFS_NAMENODE_HTTP_ADDRESS_KEY), manifest);\r\n\r\n // start jns2 with path2\r\n conf.set(DFSConfigKeys.DFS_JOURNAL_EDITS_DIR_KEY, path2.getPath());\r\n Journal journal2 = new Journal(conf);\r\n journal2.format(si.namespaceID, si.clusterID); \r\n jhs2 = new JournalHttpServer(conf, journal2,\r\n NetUtils.createSocketAddr(\"localhost:50300\"));\r\n jhs2.start();\r\n\r\n // transfer edit logs from j1 to j2\r\n JournalSyncProtocol journalp = JournalService.createProxyWithJournalSyncProtocol(\r\n NetUtils.createSocketAddr(\"localhost:50900\"), conf,\r\n UserGroupInformation.getCurrentUser());\r\n RemoteEditLogManifest manifest1 = journalp.getEditLogManifest(journalInfo, 1); \r\n jhs2.downloadEditFiles(\"localhost:50200\", manifest1);\r\n\r\n } catch (IOException e) {\r\n LOG.error(\"Error in TestCopyEdits:\", e);\r\n assertTrue(e.getLocalizedMessage(), false);\r\n } finally {\r\n if (jhs1 != null)\r\n jhs1.stop();\r\n if (jhs2 != null)\r\n jhs2.stop();\r\n if (cluster != null)\r\n cluster.shutdown();\r\n if (service != null)\r\n service.stop();\r\n }\r\n }", "private Path(Path other){\n\t\t\n\t\tthis.source = other.source;\n\t\tthis.destination = other.destination;\n\t\tthis.cities = other.cities;\n\t\t\n\t\tthis.cost = other.cost;\n\t\tthis.destination = other.destination;\n\t\t\n\t\tthis.connections = new LinkedList<Connection>();\n\t\t\n\t\tfor (Connection c : other.connections){\n\t\t\tthis.connections.add((Connection) c.clone());\n\t\t}\n\t\t\n\t}", "@Override\n\tpublic graph copy() {\n\t\tgraph copy = new DGraph();\n\t\tCollection<node_data> nColl = this.GA.getV();\n\t\tfor (node_data node : nColl) {\n\t\t\tnode_data temp = new Node((Node) node );\n\t\t\tcopy.addNode(node);\n\t\t}\n\t\tCollection<node_data> nColl2 = this.GA.getV();\n\t\tfor (node_data node1 : nColl2) {\n\t\t\tCollection<edge_data> eColl = this.GA.getE(node1.getKey());\n\t\t\tif (eColl!=null) {\n\t\t\t\tfor (edge_data edge : eColl) {\n\t\t\t\t\tcopy.connect(edge.getSrc(), edge.getDest(), edge.getWeight());\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn copy;\n\t}", "public AccessPath copy() {\n HashMap m = new HashMap();\n IdentityHashCodeWrapper ap = IdentityHashCodeWrapper.create(this);\n AccessPath p = new AccessPath(this._field, this._n, this._last);\n m.put(ap, p);\n this.copy(m, p);\n return p;\n }", "@Override\n\tpublic Object clone() {\n\t\treturn null;\n\t}", "@Override\n public void resetStateOfSUT() {\n\n try {\n //FIXME: this fails due to locks on Neo4j. need way to reset it\n //deleteDir(new File(tmpFolder));\n if(!Files.exists(Path.of(tmpFolder))) {\n Files.createDirectories(Path.of(tmpFolder));\n }\n Files.copy(getClass().getClassLoader().getResourceAsStream(\"users.json\"), Path.of(tmpFolder,\"users.json\"), StandardCopyOption.REPLACE_EXISTING);\n Files.copy(getClass().getClassLoader().getResourceAsStream(\"logins.json\"), Path.of(tmpFolder,\"logins.json\"), StandardCopyOption.REPLACE_EXISTING);\n }catch (Exception e){\n throw new RuntimeException(e);\n }\n }", "public Object clone()\n\t{\n\t\treturn new Tree();\n\t}", "public Node clone01(Node head) {\n Map<Node, Node> map = new HashMap<>();\n\n Node originNode = head, cloneNode = null;\n\n while (originNode != null) {\n cloneNode = new Node(originNode.data);\n\n map.put(originNode, cloneNode);\n originNode = originNode.next;\n }\n\n originNode = head;\n while (originNode != null) {\n cloneNode = map.get(originNode);\n cloneNode.next = map.get(originNode.next);\n cloneNode.random = map.get(originNode.random);\n\n originNode = originNode.next;\n }\n\n return map.get(head);\n }", "@Override\n public Object clone() throws CloneNotSupportedException {\n throw new CloneNotSupportedException();\n }", "public abstract HostToGroupMapping clone(Configuration configuration);", "@Override\r\n\tprotected Object clone() throws CloneNotSupportedException {\n\t\tthrow new CloneNotSupportedException();\r\n\t}", "public JsonFactory copy()\n/* */ {\n/* 324 */ _checkInvalidCopy(JsonFactory.class);\n/* */ \n/* 326 */ return new JsonFactory(this, null);\n/* */ }", "@BeforeClass\n public static void createOriginalFSImage() throws IOException {\n MiniDFSCluster cluster = null;\n try {\n Configuration conf = new Configuration();\n conf.setBoolean(DFSConfigKeys.DFS_NAMENODE_ACLS_ENABLED_KEY, true);\n conf.setBoolean(DFSConfigKeys.DFS_STORAGE_POLICY_ENABLED_KEY, true);\n\n File[] nnDirs = MiniDFSCluster.getNameNodeDirectory(\n MiniDFSCluster.getBaseDirectory(), 0, 0);\n tempDir = nnDirs[0];\n\n cluster = new MiniDFSCluster.Builder(conf).build();\n cluster.waitActive();\n DistributedFileSystem hdfs = cluster.getFileSystem();\n\n Path dir = new Path(\"/dir_wo_sp\");\n hdfs.mkdirs(dir);\n\n dir = new Path(\"/dir_wo_sp/sub_dir_wo_sp\");\n hdfs.mkdirs(dir);\n\n dir = new Path(\"/dir_wo_sp/sub_dir_w_sp_allssd\");\n hdfs.mkdirs(dir);\n hdfs.setStoragePolicy(dir, ALLSSD_STORAGE_POLICY_NAME);\n\n Path file = new Path(\"/dir_wo_sp/file_wo_sp\");\n try (FSDataOutputStream o = hdfs.create(file)) {\n o.write(123);\n o.close();\n }\n\n file = new Path(\"/dir_wo_sp/file_w_sp_allssd\");\n try (FSDataOutputStream o = hdfs.create(file)) {\n o.write(123);\n o.close();\n hdfs.setStoragePolicy(file, HdfsConstants.ALLSSD_STORAGE_POLICY_NAME);\n }\n\n dir = new Path(\"/dir_w_sp_allssd\");\n hdfs.mkdirs(dir);\n hdfs.setStoragePolicy(dir, HdfsConstants.ALLSSD_STORAGE_POLICY_NAME);\n\n dir = new Path(\"/dir_w_sp_allssd/sub_dir_wo_sp\");\n hdfs.mkdirs(dir);\n\n file = new Path(\"/dir_w_sp_allssd/file_wo_sp\");\n try (FSDataOutputStream o = hdfs.create(file)) {\n o.write(123);\n o.close();\n }\n\n dir = new Path(\"/dir_w_sp_allssd/sub_dir_w_sp_hot\");\n hdfs.mkdirs(dir);\n hdfs.setStoragePolicy(dir, HdfsConstants.HOT_STORAGE_POLICY_NAME);\n\n // Write results to the fsimage file\n hdfs.setSafeMode(SafeModeAction.ENTER, false);\n hdfs.saveNamespace();\n\n // Determine the location of the fsimage file\n originalFsimage = FSImageTestUtil.findLatestImageFile(FSImageTestUtil\n .getFSImage(cluster.getNameNode()).getStorage().getStorageDir(0));\n if (originalFsimage == null) {\n throw new RuntimeException(\"Didn't generate or can't find fsimage\");\n }\n LOG.debug(\"original FS image file is \" + originalFsimage);\n } finally {\n if (cluster != null) {\n cluster.shutdown();\n }\n }\n }", "@Override\n public VariableListNode deepCopy(BsjNodeFactory factory);", "@Override\n public Object clone() {\n try {\n return super.clone();\n } catch (CloneNotSupportedException e) {\n throw new AssertionError(e);\n }\n }", "private void populateNewChildDirectory(DirectoryEntry newEntry) {\n try (ClusterStream stream = new ClusterStream(fileSystem,\n FileAccess.Write,\n newEntry.getFirstCluster(),\n 0xffffffff)) {\n // First is the self-referencing entry...\n DirectoryEntry selfEntry = new DirectoryEntry(newEntry);\n selfEntry.setName(FileName.SelfEntryName);\n selfEntry.writeTo(stream);\n // Second is a clone of our self entry (i.e. parent) - though dates\n // are odd...\n DirectoryEntry parentEntry = new DirectoryEntry(getSelfEntry());\n parentEntry.setName(FileName.ParentEntryName);\n parentEntry.setCreationTime(newEntry.getCreationTime());\n parentEntry.setLastWriteTime(newEntry.getLastWriteTime());\n parentEntry.writeTo(stream);\n } catch (IOException e) {\n throw new dotnet4j.io.IOException(e);\n }\n }", "@SuppressWarnings(\"unchecked\")\n @Override\n public <T extends JsonNode> T deepCopy() { return (T) this; }", "public Scm clone()\n {\n try\n {\n Scm copy = (Scm) super.clone();\n\n if ( copy.locations != null )\n {\n copy.locations = new java.util.LinkedHashMap( copy.locations );\n }\n\n return copy;\n }\n catch ( java.lang.Exception ex )\n {\n throw (java.lang.RuntimeException) new java.lang.UnsupportedOperationException( getClass().getName()\n + \" does not support clone()\" ).initCause( ex );\n }\n }", "public static void main(String[] args) throws CloneNotSupportedException {\n\n CloneSingleton instance = CloneSingleton.getSingleton();\n CloneSingleton instance1 = (CloneSingleton) instance.clone();\n System.out.println(instance.hashCode());\n System.out.println(instance1.hashCode());\n }", "public FirmReference clone() {\r\n try {\r\n\t\t\treturn (FirmReference) super.clone();\r\n\t\t} catch (CloneNotSupportedException e) {\r\n\t\t\t\r\n\t\t\te.printStackTrace();\r\n\t\t\treturn null;\r\n\t\t}\r\n\t\t\r\n \r\n\t}", "public java.util.ArrayList getClones();", "@Override\r\n\tprotected Object clone() throws CloneNotSupportedException { // semi-copy\r\n\t\tthrow new CloneNotSupportedException();\r\n\t}", "private void TCM__Object_clone__default() {\n final String attributeName = \"test\";\n final String attributeValue = \"value\";\n\n final Attribute attribute = new Attribute(attributeName, attributeValue);\n final Attribute clonedAttribute = attribute.clone();\n\n assertTrue(\"incorrect name in clone\", clonedAttribute.getName().equals(attributeName));\n assertTrue(\"incorrect value in clone\", clonedAttribute.getValue().equals(attributeValue));\n assertEquals(\"incoorect attribute type in clone\", clonedAttribute.getAttributeType(), Attribute.UNDECLARED_TYPE);\n }", "public BinaryContent createClone(BinaryContent t)\r\n\t{\n\t\treturn null;\r\n\t}", "@Override\n\t\tpublic ImmutableSequentialGraph copy() {\n\t\t\treturn new ComposedGraph( g0, g1.copy() );\n\t\t}", "private void checkCopy(IAstNode node, IAstNode copy) {\n \t\tassertEquals(node.getClass(), copy.getClass());\n \t\tassertFalse(node.toString(), node == copy);\n \t\tif (node.getParent() != null)\n \t\t\tassertFalse(node.toString(), node.getParent() == copy.getParent());\n \t\tIAstNode[] kids = node.getChildren();\n \t\tIAstNode[] copyKids = copy.getChildren();\n \t\tassertEquals(node.toString() + \": children count differ\", kids.length, copyKids.length);\n \t\tif (node instanceof IAstTypedNode)\n \t\t\tassertEquals(node.toString() + \": types differ\", ((IAstTypedNode) node).getType(), ((IAstTypedNode) copy).getType());\n \t\t\n \t\tif (node instanceof IAstScope) {\n \t\t\tIScope scope = ((IAstScope) node).getScope();\n \t\t\tIScope copyScope = ((IAstScope) copy).getScope();\n \t\t\tassertFalse(node.toString(), scope == copyScope);\n \t\t\tassertEquals(node.toString() + \": scope count\", scope.getSymbols().length, copyScope.getSymbols().length);\n \t\t\t\n \t\t\tfor (ISymbol symbol : scope) {\n \t\t\t\tISymbol copySym = copyScope.get(symbol.getUniqueName());\n \t\t\t\tassertSame(copyScope, copySym.getScope());\n \t\t\t\tassertEquals(symbol+\"\", symbol, copySym);\n \t\t\t\t// a symbol may refer to dead code\n \t\t\t\tif (symbol.getDefinition() == null || symbol.getDefinition().getParent() != null)\n \t\t\t\t\tassertEquals(symbol+\"\", symbol.getDefinition(), copySym.getDefinition());\n \t\t\t\tassertFalse(symbol+\"\", symbol == copySym);\n \t\t\t\tassertFalse(symbol+\"\", symbol.getDefinition() != null && symbol.getDefinition() == copySym.getDefinition());\n \t\t\t\tif (symbol.getDefinition() != null) {\n \t\t\t\t\tassertFalse(symbol+\"\", symbol.getDefinition() == copySym.getDefinition());\n \t\t\t\t}\n \t\t\t}\n \t\t\t\n \t\t\tassertEquals(node.toString() + \": scopes differ\", scope, copyScope);\n \t\t}\n \t\t\n \t\tfor (int i = 0; i < kids.length; i++) {\n \t\t\tassertSame(copy+\"\", copy, copyKids[i].getParent());\n \t\t\t// look out for dead definitions\n \t\t\tif (kids[i].getParent() == copy)\n \t\t\t\tcheckCopy(kids[i], copyKids[i]);\n \t\t}\n \t\t\n \t\t// now that a rough scan worked, check harder\n \t\tassertEquals(node.toString() + \": #equals()\", node, copy);\n \t\t\n \t\tassertEquals(node.toString() + \": #hashCode()\", node.hashCode(), copy.hashCode());\n \t}", "public Instance cloneShallow() {\n Instance copy;\n try {\n copy = new Instance(getNameValue().toString());\n } catch (JNCException e) {\n copy = null;\n }\n return (Instance)cloneShallowContent(copy);\n }", "@Override\n public Object clone() {\n try {\n return super.clone();\n } catch (CloneNotSupportedException e) {\n throw new AssertionError(e);\n }\n }", "@Override\n protected Object clone() throws CloneNotSupportedException {\n\n return super.clone();\n }" ]
[ "0.63469356", "0.6329597", "0.63011366", "0.6032061", "0.5956035", "0.5949423", "0.5815972", "0.57356584", "0.57290506", "0.5718554", "0.5694486", "0.5694486", "0.56633407", "0.56414723", "0.56208456", "0.5618407", "0.56150395", "0.5554634", "0.5544848", "0.55372715", "0.5534096", "0.55201006", "0.5483846", "0.5473473", "0.54685724", "0.54634446", "0.5456653", "0.54551053", "0.5436103", "0.5430522", "0.5430522", "0.5430522", "0.5430522", "0.5410406", "0.54039496", "0.5401535", "0.53508437", "0.53478044", "0.5339087", "0.5334149", "0.5331077", "0.53256917", "0.5318099", "0.53166413", "0.53097063", "0.52922004", "0.528411", "0.5263893", "0.5263893", "0.52575773", "0.5257191", "0.5250253", "0.52453375", "0.5239511", "0.52393013", "0.5215661", "0.5207777", "0.52034324", "0.5202628", "0.51996326", "0.5176908", "0.5165108", "0.5156131", "0.5155261", "0.5149761", "0.5144355", "0.5136879", "0.5135692", "0.5132318", "0.513138", "0.5129024", "0.51244855", "0.5116953", "0.51059645", "0.5105116", "0.50971836", "0.5093632", "0.5085065", "0.508472", "0.5083161", "0.5080424", "0.50802094", "0.50717306", "0.5070101", "0.5066435", "0.50617814", "0.5050719", "0.50504756", "0.5040723", "0.50400007", "0.5035139", "0.50297344", "0.5023396", "0.5021874", "0.5020571", "0.5010833", "0.5009207", "0.5008311", "0.5002153", "0.49998805" ]
0.6175727
3
Since the FS connector does not support UUIDs (under the root node), all clones are just copies (clone for nonreferenceable nodes is a copy to the corresponding path).
@Test public void shouldBeAbleToCloneFile() { graph.useWorkspace("otherWorkspace"); graph.create("/testFile").with(JcrLexicon.PRIMARY_TYPE, JcrNtLexicon.FILE).orReplace().and(); graph.create("/testFile/jcr:content") .with(JcrLexicon.PRIMARY_TYPE, JcrNtLexicon.RESOURCE) .and(JcrLexicon.DATA, TEST_CONTENT.getBytes()) .orReplace() .and(); File newFile = new File(otherWorkspaceRoot, "testFile"); assertContents(newFile, TEST_CONTENT); graph.useWorkspace("test"); graph.clone("/testFile").fromWorkspace("otherWorkspace").as("clonedFile").into("/").failingIfAnyUuidsMatch(); File copiedFile = new File(testWorkspaceRoot, "clonedFile"); assertContents(copiedFile, TEST_CONTENT); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public abstract Node copy();", "public abstract TreeNode copy();", "@Test\n public void shouldBeAbleToCloneFolder() {\n graph.useWorkspace(\"otherWorkspace\");\n graph.create(\"/testFolder\").orReplace().and();\n graph.create(\"/testFolder/testFile\").with(JcrLexicon.PRIMARY_TYPE, JcrNtLexicon.FILE).orReplace().and();\n graph.create(\"/testFolder/testFile/jcr:content\")\n .with(JcrLexicon.PRIMARY_TYPE, JcrNtLexicon.RESOURCE)\n .and(JcrLexicon.DATA, TEST_CONTENT.getBytes())\n .orReplace()\n .and();\n\n File newFile = new File(otherWorkspaceRoot, \"testFolder/testFile\");\n assertContents(newFile, TEST_CONTENT);\n\n graph.useWorkspace(\"test\");\n graph.clone(\"/testFolder\").fromWorkspace(\"otherWorkspace\").as(\"clonedFolder\").into(\"/\").failingIfAnyUuidsMatch();\n File copiedFolder = new File(testWorkspaceRoot, \"clonedFolder\");\n assertTrue(copiedFolder.exists());\n assertTrue(copiedFolder.isDirectory());\n\n File copiedFile = new File(testWorkspaceRoot, \"clonedFolder/testFile\");\n assertContents(copiedFile, TEST_CONTENT);\n }", "public Object clone() {\n\t\treturn(new FileSystem(_device, _mount, _type));\n\t}", "@Mapper(collectionMappingStrategy = CollectionMappingStrategy.TARGET_IMMUTABLE)\n public interface HaFlowPathCloner {\n HaFlowPathCloner INSTANCE = Mappers.getMapper(HaFlowPathCloner.class);\n\n @Mapping(target = \"haSubFlows\", ignore = true)\n void copyWithoutHaSubFlows(HaFlowPathData source, @MappingTarget HaFlowPathData target);\n\n @Mapping(target = \"sharedSwitch\", ignore = true)\n @Mapping(target = \"subPaths\", ignore = true)\n @Mapping(target = \"haSubFlows\", ignore = true)\n void copyWithoutSwitchesAndSubPaths(HaFlowPathData source, @MappingTarget HaFlowPathData target);\n\n /**\n * Performs deep copy of entity data.\n *\n * @param source the path data to copy from.\n * @param targetHaFlow the HA-flow to be referred ({@code HaFlowPathData.getHaFlow()}) by the new path data.\n */\n default HaFlowPathData deepCopy(HaFlowPathData source, HaFlow targetHaFlow) {\n HaFlowPathDataImpl result = new HaFlowPathDataImpl();\n result.haFlow = targetHaFlow;\n\n copyWithoutSwitchesAndSubPaths(source, result);\n result.setSharedSwitch(new Switch(source.getSharedSwitch()));\n\n Map<String, HaSubFlow> subFlowMap;\n if (targetHaFlow == null || targetHaFlow.getHaSubFlows() == null) {\n subFlowMap = new HashMap<>();\n } else {\n subFlowMap = targetHaFlow.getHaSubFlows().stream()\n .collect(Collectors.toMap(HaSubFlow::getHaSubFlowId, Function.identity()));\n }\n List<FlowPath> subPaths = new ArrayList<>();\n for (FlowPath subPath : source.getSubPaths()) {\n HaSubFlow targetHaSubFlow = subFlowMap.get(subPath.getHaSubFlowId());\n if (targetHaSubFlow == null) {\n throw new IllegalArgumentException(format(\"Couldn't copy HaFlowPath %s because target ha-flow has \"\n + \"no ha-subflow %s\", source, subPath.getHaSubFlowId()));\n }\n subPaths.add(new FlowPath(subPath, null, targetHaSubFlow));\n }\n result.setSubPaths(subPaths);\n\n List<HaSubFlow> subFlows = new ArrayList<>();\n for (HaSubFlow subFlow : source.getHaSubFlows()) {\n subFlows.add(new HaSubFlow(subFlow, targetHaFlow));\n }\n result.setHaSubFlows(subFlows);\n return result;\n }\n }", "public static void main(String args[]) throws CloneNotSupportedException\n\t{\n\t\tSystem.out.println(getRandomNumber(2, 2));\n\t\t//Node n1 = org.apache.commons.lang3.SerializationUtils.clone(n);\n\t\t//n.getNextNodes().get(\"1\").getNextNodes().put(\"1\", null);\n\t\t//System.out.println(n1.getNextNodes().get(\"1\").getNextNodes().get(\"1\"));\n\t}", "Component deepClone();", "public Node cloneNode () {\n return new VcsGroupFileNode(shadowObject, originalNode);\n }", "public Function clone();", "private void copy(Node node){\n parent_ = node.parent_;\n size_ = node.size_;\n for(int i = 0; i < size_; i++)\n children_[i] = node.children_[i];\n }", "Object clone();", "Object clone();", "public abstract Object clone() ;", "protected abstract VerifiableSensorOperation doClone();", "void cloneTo(NamedStorage storage);", "public abstract Object clone();", "abstract public Vertex cloneFamily();", "private Node clone(Node node, Node parent, String overrideName) {\n Node clone = null;\n try {\n clone = parent.addNode(overrideName, node.getPrimaryNodeType().getName());\n\n\n // copy properties\n PropertyIterator properties = node.getProperties();\n\n while (properties.hasNext()) {\n Property property = properties.nextProperty();\n if (!property.getName().startsWith(\"jcr:\") && !property.getName().startsWith(\"mgnl:\")) {\n PropertyUtil.setProperty(clone, property.getName(), property.getValue());\n }\n }\n\n // copy subnodes\n NodeIterator children = node.getNodes();\n\n while (children.hasNext()) {\n Node child = children.nextNode();\n clone(child, clone, child.getName());\n }\n\n return clone;\n\n } catch (RepositoryException e) {\n //todo exception\n throw new RuntimeException(e);\n }\n }", "public abstract Type treeCopy();", "@Override\n public Object clone()\n {\n try\n {\n DefaultConfigurationNode copy = (DefaultConfigurationNode) super\n .clone();\n copy.initSubNodes();\n return copy;\n }\n catch (CloneNotSupportedException cex)\n {\n // should not happen\n throw new ConfigurationRuntimeException(\"Cannot clone \" + getClass());\n }\n }", "public Node clone() {\n Node n = new Node((float) this.getSimPos().getX(), (float) this.getSimPos().getY(), radius*2, isStationary, this.renderColor);\n n.node_uuid = this.node_uuid;\n return n;\n }", "public RMShape cloneDeep() { return clone(); }", "@Override\n public MetaprogramTargetNode deepCopy(BsjNodeFactory factory);", "@Override\n @Deprecated\n public Object clone(\n ) { \n return new Path(this);\n }", "@Override\n public MovePath clone() {\n final MovePath copy = new MovePath(getGame(), getEntity());\n copy.steps = new Vector<MoveStep>(steps);\n copy.careful = careful;\n return copy;\n }", "abstract public Vertex cloneMe();", "public Object clone() {\n FileTransfer ft = new FileTransfer();\n ft.mLogicalFile = new String(this.mLogicalFile);\n ft.mFlags = (BitSet) this.mFlags.clone();\n ft.mTransferFlag = this.mTransferFlag;\n ft.mSize = this.mSize;\n ft.mType = this.mType;\n ft.mJob = new String(this.mJob);\n ft.mPriority = this.mPriority;\n ft.mURLForRegistrationOnDestination = this.mURLForRegistrationOnDestination;\n ft.mMetadata = (Metadata) this.mMetadata.clone();\n ft.mVerifySymlinkSource = this.mVerifySymlinkSource;\n // the maps are not cloned underneath\n\n return ft;\n }", "public abstract INodo copy();", "default C cloneFlat() {\n\t\treturn clone(FieldGraph.of(getFields()));\n\t}", "public Object clone();", "public Object clone();", "public Object clone();", "public Object clone();", "@Override\r\n\t\tpublic Node cloneNode(boolean deep)\r\n\t\t\t{\n\t\t\t\treturn null;\r\n\t\t\t}", "public void copy() {\n\n\t}", "Prototype makeCopy();", "public SyncDevice deepcopy() {\n SyncDevice copy = new SyncDevice(this.id);\n copy.displayName = this.displayName;\n copy.syncTimestamp = this.syncTimestamp;\n copy.lastIP = this.lastIP;\n copy.deletedSecrets = new HashMap<String, DeletedSecret>();\n for (Entry<String, DeletedSecret> deletedSecret : this.deletedSecrets.entrySet()) {\n copy.deletedSecrets.put(deletedSecret.getKey(), \n new DeletedSecret(deletedSecret.getValue().getDescription(), \n deletedSecret.getValue().getTimestamp()));\n }\n return copy;\n }", "@Override\r\n\tpublic BinaryNodeInterface<E> copy() {\n\t\treturn null;\r\n\t}", "public abstract OtTreeNodeWidget copy();", "@Override\n\tpublic MapNode clone()\n\t{\n\t\t// Create copy of this map node\n\t\tMapNode copy = (MapNode)super.clone();\n\n\t\t// Copy KV pairs\n\t\tcopy.pairs = new LinkedHashMap<>();\n\t\tfor (Map.Entry<String, AbstractNode> pair : pairs.entrySet())\n\t\t{\n\t\t\tAbstractNode value = pair.getValue().clone();\n\t\t\tcopy.pairs.put(pair.getKey(), value);\n\t\t\tvalue.setParent(copy);\n\t\t}\n\n\t\t// Return copy\n\t\treturn copy;\n\t}", "public void cloningFactor() {\n\t\t\t\n\t\t\tsort();\n\t\t\tdouble factorNum = 0.0; \n\t\t\t\n\t\t\tfor(Solution sol : population) {\n\t\t\t\tfactorNum = averagePath / (double) sol.getPath();\n\t\t\t\tsol.setCloningFactor(factorNum);\n\t\t\t}\n\t\t}", "public Object clone() {\n\tZPathLayoutManager newObject;\n\ttry {\n\t newObject = (ZPathLayoutManager)super.clone();\n\t} catch (CloneNotSupportedException e) {\n\t throw new RuntimeException(\"Object.clone() failed: \" + e);\n\t}\n\n\tif (path != null) {\n\t newObject.path = (ArrayList)path.clone();\n\t}\n\n\tif (shape != null) {\n\t // JM - not done yet: The shape interface doesn't include a clone() method,\n\t // so to clone a shape we either must cast it to a specific shape class\n\t // and call clone() on that, or use reflection to invoke the clone()\n\t // method. For now, we just continue referencing the old shape.\t\n\t}\n\n\treturn newObject;\n }", "Long clone(Long id);", "protected static void TEST_CHANGE_UUID() {\r\n\t\tUUID = System.getProperty(\"java.io.tmpdir\") + \"/titan_test_\" + UuidUtils.get().getRandomUuid();\r\n\t}", "public QueryNode cloneTree() throws CloneNotSupportedException;", "public abstract Type treeCopyNoTransform();", "public Node clone02(Node head) {\n Node originNode = head, tmp = null;\n\n while (originNode != null) {\n tmp = originNode.next;\n originNode.next = new Node(originNode.data);\n originNode.next.next = tmp;\n originNode = tmp;\n }\n\n originNode = head;\n while (originNode != null) {\n originNode.next.random = originNode.random.next;\n originNode = originNode.next != null ? originNode.next.next : originNode.next;\n }\n\n originNode = head;\n tmp = head.next;\n Node cloneNode = tmp;\n\n while (originNode != null) {\n originNode.next = originNode.next != null ? originNode.next.next : originNode.next;\n originNode = originNode.next;\n\n tmp.next = tmp.next != null ? tmp.next.next : tmp.next;\n tmp = tmp.next;\n }\n\n return cloneNode;\n }", "public abstract Piece clone();", "public abstract Piece clone();", "abstract public Vertex getClone();", "public CloneNodeCommand() {\n// validator.configureTemplate().add(new StringToken(Commands.CLONE.getValue()))\n// .add(new StringToken()).add(new StringToken(\"from\"))\n// .add(new StringToken());\n validator.configureTemplate().add(new StringToken(Commands.CLONE.getValue()))\n .add(new MapListToken());\n }", "@Test\n public void checkUuidIndexUpdatedOnMove() throws Exception {\n // create the node to move\n Node parent = adminSession.getNode(temp1Path);\n String childName = \"child\" + System.currentTimeMillis();\n Node child = parent.addNode(childName, \"sling:Folder\");\n child.addMixin(\"mix:referenceable\");\n adminSession.save();\n \n // verify the id and lookup by id and query works \n String id = child.getIdentifier();\n assertThat(adminSession.getNodeByIdentifier(id), notNullValue());\n verifyLookupByIdentifier(id);\n\n // move it\n adminSession.move(child.getPath(), temp2Path + childName);\n adminSession.save();\n \n // verify the id and lookup by id and query works \n verifyLookupByIdentifier(id);\n }", "public abstract Shape clone() throws CloneNotSupportedException;", "static void setCopying(){isCopying=true;}", "public T cloneDeep();", "public MmeDiameterPeer cloneShallow() {\n MmeDiameterPeer copy;\n try {\n copy = new MmeDiameterPeer(getHostIdentityValue().toString());\n } catch (JNCException e) {\n copy = null;\n }\n return (MmeDiameterPeer)cloneShallowContent(copy);\n }", "@FixFor( \"MODE-788\" )\n @Test\n public void shouldCreateSubgraphAndDeletePartOfThatSubgraphInSameOperation() {\n graph.batch()\n .create(\"/a\")\n .with(JcrLexicon.PRIMARY_TYPE, JcrNtLexicon.FOLDER)\n .orReplace()\n .and()\n .create(\"/a/b\")\n .with(JcrLexicon.PRIMARY_TYPE, JcrNtLexicon.FOLDER)\n .orReplace()\n .and()\n .create(\"/a/b/c\")\n .with(JcrLexicon.PRIMARY_TYPE, JcrNtLexicon.FOLDER)\n .orReplace()\n .and()\n .delete(\"/a/b\")\n .and()\n .execute();\n\n // Now look up node A ...\n File newFile = new File(testWorkspaceRoot, \"a\");\n assertTrue(newFile.exists());\n assertTrue(newFile.isDirectory());\n assertTrue(newFile.list().length == 0);\n assertFalse(new File(newFile, \"b\").exists());\n }", "@Override\n public Object clone() {\n return super.clone();\n }", "@Override\n public ExpressionNode deepCopy(BsjNodeFactory factory);", "public interface DeepClonerSPI {\n <T> T clone(T objectToClone);\n}", "@Test\n public void newFilesInheritPinness() throws Exception {\n TachyonFile root = mTfs.open(new TachyonURI(\"/\"));\n mTfs.setPin(root, true);\n\n // Child file should be pinned\n TachyonFile file0 = createEmptyFile(new TachyonURI(\"/file0\"));\n Assert.assertTrue(mTfs.getInfo(file0).isPinned);\n Assert.assertEquals(Sets.newHashSet(mFSMasterClient.getPinList()),\n Sets.newHashSet(file0.getFileId()));\n\n // Child folder should be pinned\n mTfs.mkdirs(new TachyonURI(\"/folder\"));\n TachyonFile folder = mTfs.open(new TachyonURI(\"/folder\"));\n Assert.assertTrue(mTfs.getInfo(folder).isPinned);\n\n // Grandchild file also pinned\n TachyonFile file1 = createEmptyFile(new TachyonURI(\"/folder/file1\"));\n Assert.assertTrue(mTfs.getInfo(file1).isPinned);\n Assert.assertEquals(Sets.newHashSet(mFSMasterClient.getPinList()),\n Sets.newHashSet(file0.getFileId(), file1.getFileId()));\n\n // Unpinning child folder should cause its children to be unpinned as well\n mTfs.setPin(folder, false);\n Assert.assertFalse(mTfs.getInfo(folder).isPinned);\n Assert.assertFalse(mTfs.getInfo(file1).isPinned);\n Assert.assertEquals(Sets.newHashSet(mFSMasterClient.getPinList()),\n Sets.newHashSet(file0.getFileId()));\n\n // And new grandchildren should be unpinned too.\n TachyonFile file2 = createEmptyFile(new TachyonURI(\"/folder/file2\"));\n Assert.assertFalse(mTfs.getInfo(file2).isPinned);\n Assert.assertEquals(Sets.newHashSet(mFSMasterClient.getPinList()),\n Sets.newHashSet(file0.getFileId()));\n\n // But toplevel children still should be pinned!\n TachyonFile file3 = createEmptyFile(new TachyonURI(\"/file3\"));\n Assert.assertTrue(mTfs.getInfo(file3).isPinned);\n Assert.assertEquals(Sets.newHashSet(mFSMasterClient.getPinList()),\n Sets.newHashSet(file0.getFileId(), file3.getFileId()));\n }", "public DescriptiveFramework clone();", "public Object cloner() {\n return cloner((Sommet)origine.cloner(), (Sommet)destination.cloner());\n }", "@Override\n public Node clone() {\n Node node = null;\n try {\n node = (Node) super.clone();\n } catch (Exception e) {\n System.err.println(\"Unable to clone!\");\n e.printStackTrace();\n }\n return node;\n }", "public Object clone()\n/* */ {\n/* 835 */ return super.clone();\n/* */ }", "public Clone() {}", "private void clone(Node<T> sourceNode, Node<T> cloneNode) {\n Node<T> tmp;\n Collection<Node<T>> collection = sourceNode.getChildren();\n for (Node<T> child : collection) {\n tmp = child.clone();\n if (sourceNode.getParent() != null) tmp.setParent(cloneNode);\n cloneNode.addChildren(tmp);\n clone(child, tmp);\n }\n }", "@SuppressWarnings(\"resource\")\n @Test\n public void testClone() {\n try {\n SubtenantApiKey subtenantapikey1 = new SubtenantApiKey(\"4f267f967f7d1f5e3fa0d6abaccdb4bf\",\n new Date(1574704667174L), 118, null,\n \"4f267f967f7d1f5e3fa0d6abaccdb4bf\",\n \"d3327aef-1da3-4499-bcf3-8e63b04cb6f5\", -125,\n \"66affdfa-784e-4c17-bd15-ae9dd9843c00\",\n \"4f267f967f7d1f5e3fa0d6abaccdb4bf\",\n SubtenantApiKeyStatus.getDefault(),\n new Date(1574704661082L));\n SubtenantApiKey subtenantapikey2 = subtenantapikey1.clone();\n assertNotNull(subtenantapikey1);\n assertNotNull(subtenantapikey2);\n assertNotSame(subtenantapikey2, subtenantapikey1);\n assertEquals(subtenantapikey2, subtenantapikey1);\n } catch (Exception exception) {\n fail(exception.getMessage());\n }\n }", "private void updateOriginalNodesInMirror() {\n for (Node node : originalGraph.nodes()) {\n if (!mirrorGraph.has(node)) {\n mirrorGraph.add(node);\n }\n originalAttributesToMirror(node);\n }\n }", "public SoPickedPoint \ncopy() \n//\n////////////////////////////////////////////////////////////////////////\n{\n SoPickedPoint newCopy = new SoPickedPoint(this);\n return newCopy;\n}", "public Chord duplicate ()\r\n {\r\n // Beams are not copied\r\n Chord clone = new Chord(getMeasure(), slot);\r\n clone.stem = stem;\r\n stem.addTranslation(clone);\r\n\r\n // Notes (we make a deep copy of each note)\r\n List<TreeNode> notesCopy = new ArrayList<>();\r\n notesCopy.addAll(getNotes());\r\n\r\n for (TreeNode node : notesCopy) {\r\n Note note = (Note) node;\r\n new Note(clone, note);\r\n }\r\n\r\n clone.tupletFactor = tupletFactor;\r\n\r\n clone.dotsNumber = dotsNumber;\r\n clone.flagsNumber = flagsNumber; // Not sure TODO\r\n\r\n // Insure correct ordering of chords within their container\r\n ///Collections.sort(getParent().getChildren(), chordComparator);\r\n\r\n return clone;\r\n }", "@Test\r\n public void testCopyEdits() throws Exception {\r\n MiniDFSCluster cluster = null;\r\n JournalService service = null;\r\n JournalHttpServer jhs1 = null, jhs2 = null;\r\n\r\n try {\r\n cluster = new MiniDFSCluster.Builder(conf).numDataNodes(0).build();\r\n\r\n // restart namenode, so it will have finalized edit segments\r\n cluster.restartNameNode();\r\n\r\n conf.set(DFSConfigKeys.DFS_JOURNAL_EDITS_DIR_KEY, path1.getPath());\r\n InetSocketAddress nnAddr = cluster.getNameNode(0).getNameNodeAddress();\r\n InetSocketAddress serverAddr = new InetSocketAddress(50900);\r\n JournalListener listener = Mockito.mock(JournalListener.class);\r\n service = new JournalService(conf, nnAddr, serverAddr, listener);\r\n service.start();\r\n \r\n // get namenode clusterID/layoutVersion/namespaceID\r\n StorageInfo si = service.getJournal().getStorage();\r\n JournalInfo journalInfo = new JournalInfo(si.layoutVersion, si.clusterID,\r\n si.namespaceID);\r\n\r\n // start jns1 with path1\r\n jhs1 = new JournalHttpServer(conf, service.getJournal(),\r\n NetUtils.createSocketAddr(\"localhost:50200\"));\r\n jhs1.start();\r\n\r\n // get all edit segments\r\n InetSocketAddress srcRpcAddr = NameNode.getServiceAddress(conf, true);\r\n NamenodeProtocol namenode = NameNodeProxies.createNonHAProxy(conf,\r\n srcRpcAddr, NamenodeProtocol.class,\r\n UserGroupInformation.getCurrentUser(), true).getProxy();\r\n\r\n RemoteEditLogManifest manifest = namenode.getEditLogManifest(1); \r\n jhs1.downloadEditFiles(\r\n conf.get(DFSConfigKeys.DFS_NAMENODE_HTTP_ADDRESS_KEY), manifest);\r\n\r\n // start jns2 with path2\r\n conf.set(DFSConfigKeys.DFS_JOURNAL_EDITS_DIR_KEY, path2.getPath());\r\n Journal journal2 = new Journal(conf);\r\n journal2.format(si.namespaceID, si.clusterID); \r\n jhs2 = new JournalHttpServer(conf, journal2,\r\n NetUtils.createSocketAddr(\"localhost:50300\"));\r\n jhs2.start();\r\n\r\n // transfer edit logs from j1 to j2\r\n JournalSyncProtocol journalp = JournalService.createProxyWithJournalSyncProtocol(\r\n NetUtils.createSocketAddr(\"localhost:50900\"), conf,\r\n UserGroupInformation.getCurrentUser());\r\n RemoteEditLogManifest manifest1 = journalp.getEditLogManifest(journalInfo, 1); \r\n jhs2.downloadEditFiles(\"localhost:50200\", manifest1);\r\n\r\n } catch (IOException e) {\r\n LOG.error(\"Error in TestCopyEdits:\", e);\r\n assertTrue(e.getLocalizedMessage(), false);\r\n } finally {\r\n if (jhs1 != null)\r\n jhs1.stop();\r\n if (jhs2 != null)\r\n jhs2.stop();\r\n if (cluster != null)\r\n cluster.shutdown();\r\n if (service != null)\r\n service.stop();\r\n }\r\n }", "private Path(Path other){\n\t\t\n\t\tthis.source = other.source;\n\t\tthis.destination = other.destination;\n\t\tthis.cities = other.cities;\n\t\t\n\t\tthis.cost = other.cost;\n\t\tthis.destination = other.destination;\n\t\t\n\t\tthis.connections = new LinkedList<Connection>();\n\t\t\n\t\tfor (Connection c : other.connections){\n\t\t\tthis.connections.add((Connection) c.clone());\n\t\t}\n\t\t\n\t}", "@Override\n\tpublic graph copy() {\n\t\tgraph copy = new DGraph();\n\t\tCollection<node_data> nColl = this.GA.getV();\n\t\tfor (node_data node : nColl) {\n\t\t\tnode_data temp = new Node((Node) node );\n\t\t\tcopy.addNode(node);\n\t\t}\n\t\tCollection<node_data> nColl2 = this.GA.getV();\n\t\tfor (node_data node1 : nColl2) {\n\t\t\tCollection<edge_data> eColl = this.GA.getE(node1.getKey());\n\t\t\tif (eColl!=null) {\n\t\t\t\tfor (edge_data edge : eColl) {\n\t\t\t\t\tcopy.connect(edge.getSrc(), edge.getDest(), edge.getWeight());\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn copy;\n\t}", "public AccessPath copy() {\n HashMap m = new HashMap();\n IdentityHashCodeWrapper ap = IdentityHashCodeWrapper.create(this);\n AccessPath p = new AccessPath(this._field, this._n, this._last);\n m.put(ap, p);\n this.copy(m, p);\n return p;\n }", "@Override\n\tpublic Object clone() {\n\t\treturn null;\n\t}", "@Override\n public void resetStateOfSUT() {\n\n try {\n //FIXME: this fails due to locks on Neo4j. need way to reset it\n //deleteDir(new File(tmpFolder));\n if(!Files.exists(Path.of(tmpFolder))) {\n Files.createDirectories(Path.of(tmpFolder));\n }\n Files.copy(getClass().getClassLoader().getResourceAsStream(\"users.json\"), Path.of(tmpFolder,\"users.json\"), StandardCopyOption.REPLACE_EXISTING);\n Files.copy(getClass().getClassLoader().getResourceAsStream(\"logins.json\"), Path.of(tmpFolder,\"logins.json\"), StandardCopyOption.REPLACE_EXISTING);\n }catch (Exception e){\n throw new RuntimeException(e);\n }\n }", "public Object clone()\n\t{\n\t\treturn new Tree();\n\t}", "public Node clone01(Node head) {\n Map<Node, Node> map = new HashMap<>();\n\n Node originNode = head, cloneNode = null;\n\n while (originNode != null) {\n cloneNode = new Node(originNode.data);\n\n map.put(originNode, cloneNode);\n originNode = originNode.next;\n }\n\n originNode = head;\n while (originNode != null) {\n cloneNode = map.get(originNode);\n cloneNode.next = map.get(originNode.next);\n cloneNode.random = map.get(originNode.random);\n\n originNode = originNode.next;\n }\n\n return map.get(head);\n }", "@Override\n public Object clone() throws CloneNotSupportedException {\n throw new CloneNotSupportedException();\n }", "public abstract HostToGroupMapping clone(Configuration configuration);", "@Override\r\n\tprotected Object clone() throws CloneNotSupportedException {\n\t\tthrow new CloneNotSupportedException();\r\n\t}", "public JsonFactory copy()\n/* */ {\n/* 324 */ _checkInvalidCopy(JsonFactory.class);\n/* */ \n/* 326 */ return new JsonFactory(this, null);\n/* */ }", "@BeforeClass\n public static void createOriginalFSImage() throws IOException {\n MiniDFSCluster cluster = null;\n try {\n Configuration conf = new Configuration();\n conf.setBoolean(DFSConfigKeys.DFS_NAMENODE_ACLS_ENABLED_KEY, true);\n conf.setBoolean(DFSConfigKeys.DFS_STORAGE_POLICY_ENABLED_KEY, true);\n\n File[] nnDirs = MiniDFSCluster.getNameNodeDirectory(\n MiniDFSCluster.getBaseDirectory(), 0, 0);\n tempDir = nnDirs[0];\n\n cluster = new MiniDFSCluster.Builder(conf).build();\n cluster.waitActive();\n DistributedFileSystem hdfs = cluster.getFileSystem();\n\n Path dir = new Path(\"/dir_wo_sp\");\n hdfs.mkdirs(dir);\n\n dir = new Path(\"/dir_wo_sp/sub_dir_wo_sp\");\n hdfs.mkdirs(dir);\n\n dir = new Path(\"/dir_wo_sp/sub_dir_w_sp_allssd\");\n hdfs.mkdirs(dir);\n hdfs.setStoragePolicy(dir, ALLSSD_STORAGE_POLICY_NAME);\n\n Path file = new Path(\"/dir_wo_sp/file_wo_sp\");\n try (FSDataOutputStream o = hdfs.create(file)) {\n o.write(123);\n o.close();\n }\n\n file = new Path(\"/dir_wo_sp/file_w_sp_allssd\");\n try (FSDataOutputStream o = hdfs.create(file)) {\n o.write(123);\n o.close();\n hdfs.setStoragePolicy(file, HdfsConstants.ALLSSD_STORAGE_POLICY_NAME);\n }\n\n dir = new Path(\"/dir_w_sp_allssd\");\n hdfs.mkdirs(dir);\n hdfs.setStoragePolicy(dir, HdfsConstants.ALLSSD_STORAGE_POLICY_NAME);\n\n dir = new Path(\"/dir_w_sp_allssd/sub_dir_wo_sp\");\n hdfs.mkdirs(dir);\n\n file = new Path(\"/dir_w_sp_allssd/file_wo_sp\");\n try (FSDataOutputStream o = hdfs.create(file)) {\n o.write(123);\n o.close();\n }\n\n dir = new Path(\"/dir_w_sp_allssd/sub_dir_w_sp_hot\");\n hdfs.mkdirs(dir);\n hdfs.setStoragePolicy(dir, HdfsConstants.HOT_STORAGE_POLICY_NAME);\n\n // Write results to the fsimage file\n hdfs.setSafeMode(SafeModeAction.ENTER, false);\n hdfs.saveNamespace();\n\n // Determine the location of the fsimage file\n originalFsimage = FSImageTestUtil.findLatestImageFile(FSImageTestUtil\n .getFSImage(cluster.getNameNode()).getStorage().getStorageDir(0));\n if (originalFsimage == null) {\n throw new RuntimeException(\"Didn't generate or can't find fsimage\");\n }\n LOG.debug(\"original FS image file is \" + originalFsimage);\n } finally {\n if (cluster != null) {\n cluster.shutdown();\n }\n }\n }", "@Override\n public VariableListNode deepCopy(BsjNodeFactory factory);", "@Override\n public Object clone() {\n try {\n return super.clone();\n } catch (CloneNotSupportedException e) {\n throw new AssertionError(e);\n }\n }", "@SuppressWarnings(\"unchecked\")\n @Override\n public <T extends JsonNode> T deepCopy() { return (T) this; }", "private void populateNewChildDirectory(DirectoryEntry newEntry) {\n try (ClusterStream stream = new ClusterStream(fileSystem,\n FileAccess.Write,\n newEntry.getFirstCluster(),\n 0xffffffff)) {\n // First is the self-referencing entry...\n DirectoryEntry selfEntry = new DirectoryEntry(newEntry);\n selfEntry.setName(FileName.SelfEntryName);\n selfEntry.writeTo(stream);\n // Second is a clone of our self entry (i.e. parent) - though dates\n // are odd...\n DirectoryEntry parentEntry = new DirectoryEntry(getSelfEntry());\n parentEntry.setName(FileName.ParentEntryName);\n parentEntry.setCreationTime(newEntry.getCreationTime());\n parentEntry.setLastWriteTime(newEntry.getLastWriteTime());\n parentEntry.writeTo(stream);\n } catch (IOException e) {\n throw new dotnet4j.io.IOException(e);\n }\n }", "public Scm clone()\n {\n try\n {\n Scm copy = (Scm) super.clone();\n\n if ( copy.locations != null )\n {\n copy.locations = new java.util.LinkedHashMap( copy.locations );\n }\n\n return copy;\n }\n catch ( java.lang.Exception ex )\n {\n throw (java.lang.RuntimeException) new java.lang.UnsupportedOperationException( getClass().getName()\n + \" does not support clone()\" ).initCause( ex );\n }\n }", "public static void main(String[] args) throws CloneNotSupportedException {\n\n CloneSingleton instance = CloneSingleton.getSingleton();\n CloneSingleton instance1 = (CloneSingleton) instance.clone();\n System.out.println(instance.hashCode());\n System.out.println(instance1.hashCode());\n }", "public FirmReference clone() {\r\n try {\r\n\t\t\treturn (FirmReference) super.clone();\r\n\t\t} catch (CloneNotSupportedException e) {\r\n\t\t\t\r\n\t\t\te.printStackTrace();\r\n\t\t\treturn null;\r\n\t\t}\r\n\t\t\r\n \r\n\t}", "public java.util.ArrayList getClones();", "@Override\r\n\tprotected Object clone() throws CloneNotSupportedException { // semi-copy\r\n\t\tthrow new CloneNotSupportedException();\r\n\t}", "private void TCM__Object_clone__default() {\n final String attributeName = \"test\";\n final String attributeValue = \"value\";\n\n final Attribute attribute = new Attribute(attributeName, attributeValue);\n final Attribute clonedAttribute = attribute.clone();\n\n assertTrue(\"incorrect name in clone\", clonedAttribute.getName().equals(attributeName));\n assertTrue(\"incorrect value in clone\", clonedAttribute.getValue().equals(attributeValue));\n assertEquals(\"incoorect attribute type in clone\", clonedAttribute.getAttributeType(), Attribute.UNDECLARED_TYPE);\n }", "public BinaryContent createClone(BinaryContent t)\r\n\t{\n\t\treturn null;\r\n\t}", "@Override\n\t\tpublic ImmutableSequentialGraph copy() {\n\t\t\treturn new ComposedGraph( g0, g1.copy() );\n\t\t}", "private void checkCopy(IAstNode node, IAstNode copy) {\n \t\tassertEquals(node.getClass(), copy.getClass());\n \t\tassertFalse(node.toString(), node == copy);\n \t\tif (node.getParent() != null)\n \t\t\tassertFalse(node.toString(), node.getParent() == copy.getParent());\n \t\tIAstNode[] kids = node.getChildren();\n \t\tIAstNode[] copyKids = copy.getChildren();\n \t\tassertEquals(node.toString() + \": children count differ\", kids.length, copyKids.length);\n \t\tif (node instanceof IAstTypedNode)\n \t\t\tassertEquals(node.toString() + \": types differ\", ((IAstTypedNode) node).getType(), ((IAstTypedNode) copy).getType());\n \t\t\n \t\tif (node instanceof IAstScope) {\n \t\t\tIScope scope = ((IAstScope) node).getScope();\n \t\t\tIScope copyScope = ((IAstScope) copy).getScope();\n \t\t\tassertFalse(node.toString(), scope == copyScope);\n \t\t\tassertEquals(node.toString() + \": scope count\", scope.getSymbols().length, copyScope.getSymbols().length);\n \t\t\t\n \t\t\tfor (ISymbol symbol : scope) {\n \t\t\t\tISymbol copySym = copyScope.get(symbol.getUniqueName());\n \t\t\t\tassertSame(copyScope, copySym.getScope());\n \t\t\t\tassertEquals(symbol+\"\", symbol, copySym);\n \t\t\t\t// a symbol may refer to dead code\n \t\t\t\tif (symbol.getDefinition() == null || symbol.getDefinition().getParent() != null)\n \t\t\t\t\tassertEquals(symbol+\"\", symbol.getDefinition(), copySym.getDefinition());\n \t\t\t\tassertFalse(symbol+\"\", symbol == copySym);\n \t\t\t\tassertFalse(symbol+\"\", symbol.getDefinition() != null && symbol.getDefinition() == copySym.getDefinition());\n \t\t\t\tif (symbol.getDefinition() != null) {\n \t\t\t\t\tassertFalse(symbol+\"\", symbol.getDefinition() == copySym.getDefinition());\n \t\t\t\t}\n \t\t\t}\n \t\t\t\n \t\t\tassertEquals(node.toString() + \": scopes differ\", scope, copyScope);\n \t\t}\n \t\t\n \t\tfor (int i = 0; i < kids.length; i++) {\n \t\t\tassertSame(copy+\"\", copy, copyKids[i].getParent());\n \t\t\t// look out for dead definitions\n \t\t\tif (kids[i].getParent() == copy)\n \t\t\t\tcheckCopy(kids[i], copyKids[i]);\n \t\t}\n \t\t\n \t\t// now that a rough scan worked, check harder\n \t\tassertEquals(node.toString() + \": #equals()\", node, copy);\n \t\t\n \t\tassertEquals(node.toString() + \": #hashCode()\", node.hashCode(), copy.hashCode());\n \t}", "public Instance cloneShallow() {\n Instance copy;\n try {\n copy = new Instance(getNameValue().toString());\n } catch (JNCException e) {\n copy = null;\n }\n return (Instance)cloneShallowContent(copy);\n }", "@Override\n public Object clone() {\n try {\n return super.clone();\n } catch (CloneNotSupportedException e) {\n throw new AssertionError(e);\n }\n }", "@Override\n protected Object clone() throws CloneNotSupportedException {\n\n return super.clone();\n }" ]
[ "0.6330461", "0.6302595", "0.6176355", "0.6032009", "0.5955845", "0.5949129", "0.5815095", "0.57358307", "0.5728423", "0.57209986", "0.5694154", "0.5694154", "0.5663088", "0.56407887", "0.5620366", "0.5618125", "0.56146604", "0.5554333", "0.55458754", "0.5536847", "0.55347264", "0.5520228", "0.5483603", "0.5473196", "0.54691654", "0.5463572", "0.5456186", "0.54552144", "0.5435121", "0.5430254", "0.5430254", "0.5430254", "0.5430254", "0.54100776", "0.5404636", "0.5401778", "0.5350293", "0.5347867", "0.53396887", "0.5334936", "0.53320056", "0.53260344", "0.5317484", "0.53161645", "0.5310434", "0.5292815", "0.52830803", "0.52633065", "0.52633065", "0.5257679", "0.5257111", "0.5250866", "0.5245382", "0.5239684", "0.5239114", "0.52156895", "0.5208649", "0.5202908", "0.52027076", "0.5198996", "0.51773113", "0.5164027", "0.51557493", "0.5155254", "0.51492167", "0.51444304", "0.5136979", "0.51366216", "0.513229", "0.5131696", "0.5129145", "0.5125002", "0.5117241", "0.51066315", "0.5105607", "0.509633", "0.50946164", "0.5085961", "0.5084765", "0.5082709", "0.50797486", "0.5079647", "0.50705516", "0.5070196", "0.50664634", "0.5061248", "0.50510633", "0.5050973", "0.5040069", "0.50394267", "0.5033846", "0.50298023", "0.5022459", "0.50213385", "0.5020354", "0.5010604", "0.50105876", "0.50080395", "0.50016135", "0.49991003" ]
0.6347025
0
This method attempts to create a small subgraph and then delete some of the nodes in that subgraph, all within the same batch operation.
@FixFor( "MODE-788" ) @Test public void shouldCreateSubgraphAndDeletePartOfThatSubgraphInSameOperation() { graph.batch() .create("/a") .with(JcrLexicon.PRIMARY_TYPE, JcrNtLexicon.FOLDER) .orReplace() .and() .create("/a/b") .with(JcrLexicon.PRIMARY_TYPE, JcrNtLexicon.FOLDER) .orReplace() .and() .create("/a/b/c") .with(JcrLexicon.PRIMARY_TYPE, JcrNtLexicon.FOLDER) .orReplace() .and() .delete("/a/b") .and() .execute(); // Now look up node A ... File newFile = new File(testWorkspaceRoot, "a"); assertTrue(newFile.exists()); assertTrue(newFile.isDirectory()); assertTrue(newFile.list().length == 0); assertFalse(new File(newFile, "b").exists()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@FixFor( \"MODE-788\" )\n @Test\n public void shouldCreateSubgraphAndDeleteSubgraphInSameOperation() {\n graph.batch()\n .create(\"/a\")\n .with(JcrLexicon.PRIMARY_TYPE, JcrNtLexicon.FOLDER)\n .orReplace()\n .and()\n .create(\"/a/b\")\n .with(JcrLexicon.PRIMARY_TYPE, JcrNtLexicon.FOLDER)\n .orReplace()\n .and()\n .create(\"/a/b/c\")\n .with(JcrLexicon.PRIMARY_TYPE, JcrNtLexicon.FOLDER)\n .orReplace()\n .and()\n .delete(\"/a\")\n .and()\n .execute();\n\n // Now look up node A ...\n assertTrue(testWorkspaceRoot.list().length == 0);\n assertFalse(new File(testWorkspaceRoot, \"a\").exists());\n }", "@Override\n \t\t\t\tpublic void deleteGraph() throws TransformedGraphException {\n \n \t\t\t\t}", "private void clean() {\n // TODO: Your code here.\n for (Long id : vertices()) {\n if (adj.get(id).size() == 1) {\n adj.remove(id);\n }\n }\n }", "private void Clean(){\n \t NodeIterable nodeit = graphModel.getGraph().getNodes();\n \t\n \t for (Node node : nodeit) {\n\t\t\t\n \t\t \n \t\t \n\t\t}\n \t\n }", "@Test\r\n void insert_multiple_vertexes_and_edges_remove_vertex() {\r\n graph.addEdge(\"A\", \"B\");\r\n graph.addEdge(\"B\", \"C\");\r\n graph.addEdge(\"A\", \"C\");\r\n graph.addEdge(\"B\", \"D\");\r\n \r\n List<String> adjacent;\r\n vertices = graph.getAllVertices(); \r\n int numberOfEdges = graph.size();\r\n int numberOfVertices = graph.order();\r\n if(numberOfEdges != 4) {\r\n fail();\r\n }\r\n if(numberOfVertices != 4) {\r\n fail();\r\n }\r\n \r\n // Check that graph has all added vertexes\r\n if(!vertices.contains(\"A\")| !vertices.contains(\"B\")|\r\n !vertices.contains(\"C\")|!vertices.contains(\"D\")) {\r\n fail();\r\n }\r\n \r\n // Check that A's outgoing edges are correct\r\n adjacent = graph.getAdjacentVerticesOf(\"A\");\r\n if (!adjacent.contains(\"B\") || !adjacent.contains(\"C\"))\r\n fail();\r\n // Check that B's outgoing edges are correct\r\n adjacent = graph.getAdjacentVerticesOf(\"B\");\r\n if (!adjacent.contains(\"C\") | !adjacent.contains(\"D\"))\r\n fail(); \r\n // C and D have no out going edges \r\n adjacent = graph.getAdjacentVerticesOf(\"C\");\r\n if (!adjacent.isEmpty())\r\n fail(); \r\n adjacent = graph.getAdjacentVerticesOf(\"D\");\r\n if (!adjacent.isEmpty())\r\n fail(); \r\n // Remove B from the graph \r\n graph.removeVertex(\"B\");\r\n // Check that A's outgoing edges are correct\r\n // An edge to B should no exist any more \r\n adjacent = graph.getAdjacentVerticesOf(\"A\");\r\n if (adjacent.contains(\"B\") || !adjacent.contains(\"C\"))\r\n fail();\r\n // There should be no elements in the list of successors\r\n // of B since its deleted form the graph\r\n adjacent = graph.getAdjacentVerticesOf(\"B\");\r\n if (!adjacent.isEmpty())\r\n fail(); \r\n // Check that graph has still has all vertexes not removed\r\n if(!vertices.contains(\"A\")| !vertices.contains(\"C\")|\r\n !vertices.contains(\"D\")) {\r\n fail();\r\n }\r\n //Check that vertex B was removed from graph \r\n if(vertices.contains(\"B\")) {\r\n fail();\r\n }\r\n numberOfEdges = graph.size();\r\n numberOfVertices = graph.order();\r\n if(numberOfEdges != 1) {\r\n fail();\r\n }\r\n if(numberOfVertices != 3) {\r\n fail();\r\n }\r\n }", "public void delContextNodes();", "private PGraph testSubgraphBuilder(ILayoutProcessor subgraphBuilder, PGraph testGraph,\n int removeEdgeCount) {\n subgraphBuilder.process(testGraph);\n Object insertable_edges = testGraph.getProperty(Properties.INSERTABLE_EDGES);\n // checks also against null\n if (insertable_edges instanceof LinkedList) {\n @SuppressWarnings(\"unchecked\")\n LinkedList<PEdge> missingEdges = (LinkedList<PEdge>) insertable_edges;\n if (missingEdges.size() != removeEdgeCount) {\n fail(\"The planar subgraph builder should remove exactly \" + removeEdgeCount\n + \" edges, but does \" + missingEdges.size() + \".\");\n }\n } else {\n fail(\"The planar subgraph builder should remove exactly \" + removeEdgeCount\n + \" edges, but does \" + 0 + \".\");\n }\n return testGraph;\n }", "@Override\n\tpublic void deleteAllInBatch() {\n\t\t\n\t}", "@Override\n\tpublic void deleteAllInBatch() {\n\t\t\n\t}", "private void subdivide() {\n if (!hasChildren) {\n hasChildren = true;\n this.children = new QuadtreeNodeChildren(this);\n } else {\n return;\n }\n }", "@Override\r\n\tpublic void deleteAllInBatch() {\n\t\t\r\n\t}", "public void rebuild() {\n\t\tif (!divided) {\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tint totalChildren = 0;\n\t\tfor (QuadTreeNode<E> q : nodes) {\n\t\t\t// If there is a divided child then we cant do anything\n\t\t\tif (q.isDivided()) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\t\n\t\t\ttotalChildren += q.numPoints();\n\t\t}\n\t\t\n\t\t// If the sum of all the children contained in the sub nodes\n\t\t// is greater than allowed then we cant do anything\n\t\tif (totalChildren > QUADTREE_NODE_CAPACITY) {\n\t\t\treturn;\n\t\t}\n\t\t\n\t\t// Add all the nodes from the children to this node then remvoe the nodes\n\t\tpoints = new HashMap<Point, E>();\n\t\tfor (QuadTreeNode<E> q : nodes) {\n\t\t\tpoints.putAll(q.points);\n\t\t}\n\t\t\n\t\tnodes.clear();\n\t\tdivided = false;\n\t}", "void deleteSub();", "@Test\n void test06_removeEdge_checkSize() {\n graph.addVertex(\"c\");\n graph.addEdge(\"a\", \"b\");\n graph.addEdge(\"b\", \"c\"); // adds two edges\n graph.removeEdge(\"a\", \"b\"); // removes one of the edges\n if (graph.size() != 1) {\n fail(\"graph has counted incorrect number of edges\");\n }\n }", "public void freeNodes(){\n\t\t//android.util.Log.d(TAG,\"freeNodes()\");\n\t\tfinal int size = this.nodes.size();\n\t\tfor(int index=0; index < size; index++){\n\t\t\tthis.nodes.delete(this.nodes.keyAt(index));\n\t\t}\n\t}", "@Test\r\n void add_20_remove_20_add_20() {\r\n //Add 20\r\n for(int i = 0; i < 20; i++) {\r\n graph.addVertex(\"\" +i);\r\n }\r\n vertices = graph.getAllVertices();\r\n //Check all 20 are in graph\r\n for(int i = 0; i < 20; i++) {\r\n if(!vertices.contains(\"\" + i)) {\r\n fail();\r\n }\r\n }\r\n //Remove 20 \r\n for(int i = 0; i < 20; i++) {\r\n graph.removeVertex(\"\" +i);\r\n }\r\n //Check all 20 are not in graph anymore \r\n \r\n for(int i = 0; i < 20; i++) {\r\n if(vertices.contains(\"\" + i)) {\r\n fail();\r\n }\r\n }\r\n //Add 20 again\r\n for(int i = 0; i < 20; i++) {\r\n graph.addVertex(\"\" +i);\r\n }\r\n //Check all 20 are in graph\r\n for(int i = 0; i < 20; i++) {\r\n if(!vertices.contains(\"\" + i)) {\r\n fail();\r\n }\r\n }\r\n }", "public void testRemoveVertex() {\n System.out.println(\"removeVertex\");\n\n Graph<Integer, Edge<Integer>> graph = generateGraph();\n for (int i = 24; i >= 0; i--) {\n Assert.assertTrue(graph.removeVertex(new Integer(i)));\n Assert.assertFalse(graph.containsVertex(new Integer(i)));\n Assert.assertEquals(graph.verticesSet().size(), i);\n }\n }", "public final void clean() {\n distributed_graph.unpersist(true);\n }", "@Test\r\n void test_insert_edges_remove_edges_check_size() {\r\n // Add two vertices with one edge\r\n graph.addEdge(\"A\", \"B\");\r\n graph.addEdge(\"A\", \"C\");\r\n graph.addEdge(\"A\", \"D\");\r\n graph.addEdge(\"A\", \"E\");\r\n\r\n // There are no more edges in the graph\r\n if(graph.size() != 4) {\r\n fail();\r\n }\r\n graph.removeEdge(\"A\", \"B\");\r\n graph.removeEdge(\"A\", \"C\");\r\n graph.removeEdge(\"A\", \"D\");\r\n graph.removeEdge(\"A\", \"E\");\r\n if(graph.size() != 0) {\r\n fail();\r\n }\r\n graph.addEdge(\"A\", \"B\");\r\n graph.addEdge(\"A\", \"C\");\r\n graph.addEdge(\"A\", \"D\");\r\n graph.addEdge(\"A\", \"E\");\r\n if(graph.size() != 4) {\r\n fail();\r\n }\r\n }", "@DisplayName(\"Delete directed edges\")\n @Test\n public void testDeleteEdgeDirected() {\n boolean directed1 = true;\n graph = new Graph(edges, directed1, 0, 5, GraphType.RANDOM);\n graph.deleteEdge(new Edge(0, 1));\n Assertions.assertTrue(graph.getNeighbours(0).isEmpty());\n }", "public void clearSubbedTiles() { subbedTiles.clear(); }", "@objid (\"808c0839-1dec-11e2-8cad-001ec947c8cc\")\n @Override\n public void delete() {\n // List children from the end to avoid reordering of the other GMs\n for (int i = this.children.size() - 1; i >= 0; i--) {\n GmNodeModel child = this.children.get(i);\n child.delete();\n \n // When several elements have been deleted consecutively, fix the next index\n if (i > this.children.size()) {\n i = this.children.size();\n }\n }\n \n assert (this.children.isEmpty()) : \"All children should have been deleted:\" + this.children;\n \n super.delete();\n }", "public static void testTreeDelete()\n {\n ArrayList<Tree<String>> treelist = new ArrayList<Tree<String>>();\n treelist.add(new BinaryTree<String>());\n treelist.add(new AVLTree<String>());\n treelist.add(new RBTree<String>());\n treelist.add(new SplayTree<String>());\n\n System.out.println(\"Start TreeDelete test\");\n for(Tree<String> t : treelist)\n {\n\n try\n {\n RobotRunner.loadDictionaryIntoTree(\"newDutch.dic\", t);\n// RobotRunner.loadDictionaryIntoTree(\"smallDutch.dic\", t);\n// RobotRunner.loadDictionaryIntoTree(\"Dutch.dic\", t); //Won't work with BinaryTree and SplayTree, too many items == StackOverflow\n// RobotRunner.loadDictionaryIntoTree(\"dict.txt\", t); //Won't work with BinaryTree and SplayTree, too many items == StackOverflow\n }\n catch(IOException e)\n {\n System.out.println(e);\n }\n System.out.println(\"\\nStart Testcase\");\n\n SystemAnalyser.start();\n t.delete(\"aanklotsten\");\n SystemAnalyser.stop();\n\n SystemAnalyser.printPerformance();\n\n System.out.println(\"Stop Testcase\\n\");\n }\n System.out.println(\"Values after test.\");\n SystemAnalyser.printSomeTestValues();\n }", "@DisplayName(\"Delete undirected edges\")\n @Test\n public void testDeleteEdgeUndirected() {\n graph.deleteEdge(new Edge(0, 1));\n Assertions.assertEquals(1, graph.getNeighbours(0).size());\n Assertions.assertEquals(1, graph.getNeighbours(1).size());\n }", "public void deleteSelected() {\r\n \t\tObject cells[] = graph.getSelectionCells();\r\n \t\tGraphModel graphmodel = graph.getModel();\r\n \r\n \t\t// If a cell is a blocking region avoid removing its edges and\r\n \t\t// select its element at the end of the removal process\r\n \t\tSet edges = new HashSet();\r\n \t\tSet<Object> select = new HashSet<Object>();\r\n \r\n \t\t// Set with all regions that can be deleted as its child were removed\r\n \t\tSet<Object> regions = new HashSet<Object>();\r\n \t\t// Set with all JmtCells that we are removing\r\n \t\tSet<Object> jmtCells = new HashSet<Object>();\r\n \r\n \t\t// Giuseppe De Cicco & Fabio Granara\r\n \t\t// for(int k=0; k<cells.length; k++){\r\n \t\t// if(cells[k] instanceof JmtEdge){\r\n \t\t// ((JmtCell)(graphmodel.getParent(graphmodel.getSource((JmtEdge)cells[k])))).SubOut();\r\n \t\t// ((JmtCell)(graphmodel.getParent(graphmodel.getTarget((JmtEdge)cells[k])))).SubIn();\r\n \t\t// }\r\n \t\t//\r\n \t\t// }\r\n \t\tfor (int i = 0; i < cells.length; i++) {\r\n \t\t\tif (!(cells[i] instanceof BlockingRegion)) {\r\n \t\t\t\t// Adds edge for removal\r\n \t\t\t\tedges.addAll(DefaultGraphModel.getEdges(graphmodel, new Object[] { cells[i] }));\r\n \t\t\t\t// Giuseppe De Cicco & Fabio Granara\r\n \t\t\t\t// quando vado a eliminare un nodo, a cui collegato un arco,\r\n \t\t\t\t// vado ad incrementare o diminuire il contatore per il\r\n \t\t\t\t// pulsanteAGGIUSTATUTTO\r\n \t\t\t\t// Iterator iter = edges.iterator();\r\n \t\t\t\t// while (iter.hasNext()) {\r\n \t\t\t\t// Object next = iter.next();\r\n \t\t\t\t// if (next instanceof JmtEdge){\r\n \t\t\t\t// ((JmtCell)(graphmodel.getParent(graphmodel.getSource((JmtEdge)next)))).SubOut();\r\n \t\t\t\t// ((JmtCell)(graphmodel.getParent(graphmodel.getTarget((JmtEdge)next)))).SubIn();\r\n \t\t\t\t// }\r\n \t\t\t\t//\r\n \t\t\t\t// }\r\n \t\t\t\t// Stores parents information and cell\r\n \t\t\t\tif (cells[i] instanceof JmtCell) {\r\n \t\t\t\t\tif (((JmtCell) cells[i]).getParent() instanceof BlockingRegion) {\r\n \t\t\t\t\t\tregions.add(((JmtCell) cells[i]).getParent());\r\n \t\t\t\t\t}\r\n \t\t\t\t\tjmtCells.add(cells[i]);\r\n \t\t\t\t}\r\n \t\t\t} else {\r\n \t\t\t\t// Adds node for selection\r\n \t\t\t\tObject[] nodes = graph.getDescendants(new Object[] { cells[i] });\r\n \t\t\t\tfor (Object node : nodes) {\r\n \t\t\t\t\tif (node instanceof JmtCell || node instanceof JmtEdge) {\r\n \t\t\t\t\t\tselect.add(node);\r\n \t\t\t\t\t}\r\n \t\t\t\t}\r\n \t\t\t\t// Removes blocking region from data structure\r\n \t\t\t\tmodel.deleteBlockingRegion(((BlockingRegion) cells[i]).getKey());\r\n \t\t\t}\r\n \t\t}\r\n \r\n \t\tif (!edges.isEmpty()) {\r\n \t\t\tgraphmodel.remove(edges.toArray());\r\n \t\t}\r\n \t\t// removes cells from graph\r\n \t\tgraphmodel.remove(cells);\r\n \r\n \t\t// Checks if all children of a blocking region have been removed\r\n \t\tIterator<Object> it = regions.iterator();\r\n \t\twhile (it.hasNext()) {\r\n \t\t\tjmtCells.add(null);\r\n \t\t\tBlockingRegion region = (BlockingRegion) it.next();\r\n \t\t\tList child = region.getChildren();\r\n \t\t\tboolean empty = true;\r\n \t\t\tfor (int i = 0; i < child.size(); i++) {\r\n \t\t\t\tif (child.get(i) instanceof JmtCell && !jmtCells.contains(child.get(i))) {\r\n \t\t\t\t\tempty = false;\r\n \t\t\t\t\tbreak;\r\n \t\t\t\t}\r\n \t\t\t}\r\n \t\t\tif (empty) {\r\n \t\t\t\tmodel.deleteBlockingRegion(region.getKey());\r\n \t\t\t\tgraphmodel.remove(new Object[] { region });\r\n \t\t\t}\r\n \t\t}\r\n \r\n \t\t// Removes cells from data structure\r\n \t\tfor (Object cell : cells) {\r\n \t\t\tif (cell instanceof JmtCell) {\r\n \t\t\t\tmodel.deleteStation(((CellComponent) ((JmtCell) cell).getUserObject()).getKey());\r\n \t\t\t} else if (cell instanceof JmtEdge) {\r\n \t\t\t\tJmtEdge link = (JmtEdge) cell;\r\n \t\t\t\tmodel.setConnected(link.getSourceKey(), link.getTargetKey(), false);\r\n \t\t\t}\r\n \t\t}\r\n \r\n \t\t// If no stations remains gray select and link buttons\r\n \t\tif (graph.getModel().getRootCount() == 0) {\r\n \t\t\tcomponentBar.clearButtonGroupSelection(0);\r\n \t\t\tsetConnect.setEnabled(false);\r\n \t\t\tsetSelect.setEnabled(false);\r\n \t\t}\r\n \r\n \t\t// Selects components from removed blocking regions\r\n \t\tif (select.size() > 0) {\r\n \t\t\tgraph.setSelectionCells(select.toArray());\r\n \t\t\t// Resets parent information of cells that changed parent\r\n \t\t\tit = select.iterator();\r\n \t\t\twhile (it.hasNext()) {\r\n \t\t\t\tObject next = it.next();\r\n \t\t\t\tif (next instanceof JmtCell) {\r\n \t\t\t\t\t((JmtCell) next).resetParent();\r\n \t\t\t\t}\r\n \t\t\t}\r\n \t\t}\r\n \t}", "public void testRemoveAllVertices() {\n System.out.println(\"removeAllVertices\");\n\n Graph<Integer, Edge<Integer>> graph = generateGraph();\n Assert.assertTrue(graph.removeAllVertices());\n Assert.assertEquals(graph.verticesSet().size(), 0);\n }", "@DELETE\n\t@Produces(\"application/json\")\n\tpublic Response deleteGraphNodes() {\n\t\tcurrentGraph.getNodes().clear();\n\t\t\treturn Response.status(200)\n\t\t\t\t\t.entity(DB.grafos)\n\t\t\t\t\t.build();\n\t}", "@Test\n void test02_removeVertex() {\n graph.addVertex(\"a\");\n graph.addVertex(\"b\"); // adds two\n graph.removeVertex(\"a\"); // remove\n\n Set<String> vertices = new LinkedHashSet<>();\n vertices.add(\"a\");\n vertices.add(\"b\");\n vertices.remove(\"a\"); // creates a mock up vertex list\n\n if (!graph.getAllVertices().equals(vertices)) {\n fail(\"Graph didn't remove the vertices correctly\");\n }\n }", "public void subdivide() {\n\t\tif (!divided) {\n\t\t\tdivided = true;\n\t\t\t\n\t\t\t// Calculate the width and height of the sub nodes\n\t\t\tint width = (int) Math.ceil(boundary.width/2.0) + 1;\n\t\t\tint height = (int) Math.ceil(boundary.height/2.0) + 1;\n\t\t\t\n\t\t\t// Create ArrayList for the nodes and insert them\n\t\t\tnodes = new ArrayList<QuadTreeNode<E>>();\n\t\t\t\n\t\t\tnodes.add(new QuadTreeNode<E>(boundary.x, boundary.y, height, width));\n\t\t\tnodes.add(new QuadTreeNode<E>(boundary.x + width, boundary.y, height, width));\n\t\t\tnodes.add(new QuadTreeNode<E>(boundary.x, boundary.y + height, height, width));\n\t\t\tnodes.add(new QuadTreeNode<E>(boundary.x + width, boundary.y + height, height, width));\n\t\t\t\n\t\t\t// Take all the points and insert them into the best sub node\n\t\t\tfor (Point p : points.keySet()) {\n\t\t\t\tQuadTreeNode<E> q = this.getBestQuad(p);\n\t\t\t\tq.add(p, points.get(p));\n\t\t\t}\n\t\t\t\n\t\t\tpoints = null;\n\t\t}\n\t}", "private void subDivideNode() {\n setOriginNode();\n _subdivided = true;\n _northWest = new QuadTree<Point>(getView(), _transitionSize);\n _northEast = new QuadTree<Point>(getView(), _transitionSize);\n _southWest = new QuadTree<Point>(getView(), _transitionSize);\n _southEast = new QuadTree<Point>(getView(), _transitionSize);\n Iterator<Point> it = _elements.iterator();\n while (it.hasNext()) {\n Point p = it.next();\n QuadTree<Point> qt = quadrant(p);\n qt.add(p);\n }\n _elements = null;\n _elementsSize = 0;\n }", "public synchronized void cleanup() {\n\t\t// by freeing the mother group we clean up all the nodes we've created\n\t\t// on the SC server\n\t\tsendMessage(\"/g_freeAll\", new Object[] { _motherGroupID });\n\t\tfreeNode(_motherGroupID);\n\t\tfreeAllBuffers();\n\t\t\n\t\t//reset the lists of sound nodes, nodeIds, busses, etc\n\t\tSoundNode sn;\n\t\tEnumeration<SoundNode> e = _soundNodes.elements();\n\t\twhile (e.hasMoreElements()) {\n\t\t\tsn = e.nextElement();\n\t\t\tsn.setAlive(false);\n\t\t}\n\t\t_soundNodes.clear();\n\t\t_nodeIdList.clear();\n\t\t_busList.clear();\n\t\t_bufferMap.clear();\n\t}", "@Test\n public void normal_recursive_delete_OData_collection() {\n String collectionName = \"deleteOdata\";\n String entityType = \"deleteEntType\";\n String accept = \"application/xml\";\n String complexTypeName = \"deleteComplexType\";\n String complexTypePropertyName = \"deleteComplexTypeProperty\";\n\n try {\n // Create collection.\n DavResourceUtils.createODataCollection(TOKEN, HttpStatus.SC_CREATED, Setup.TEST_CELL1, Setup.TEST_BOX1,\n collectionName);\n // Create entity type.\n Http.request(\"box/entitySet-post.txt\")\n .with(\"cellPath\", Setup.TEST_CELL1)\n .with(\"boxPath\", Setup.TEST_BOX1)\n .with(\"odataSvcPath\", collectionName)\n .with(\"token\", \"Bearer \" + TOKEN)\n .with(\"accept\", accept)\n .with(\"Name\", entityType)\n .returns()\n .statusCode(HttpStatus.SC_CREATED);\n // Create complex type.\n ComplexTypeUtils.create(Setup.TEST_CELL1, Setup.TEST_BOX1,\n collectionName, complexTypeName, HttpStatus.SC_CREATED);\n // Create complex type property.\n ComplexTypePropertyUtils.create(Setup.TEST_CELL1, Setup.TEST_BOX1, collectionName, complexTypePropertyName,\n complexTypeName, \"Edm.String\", HttpStatus.SC_CREATED);\n\n // Recursive delete collection.\n deleteRecursive(collectionName, \"true\", HttpStatus.SC_NO_CONTENT);\n } finally {\n deleteRecursive(collectionName, \"true\", -1);\n }\n }", "void forceRemoveNodesAndExit(Collection<Node> nodesToRemove) throws Exception;", "private static <N, E extends Edge<N>> ImmutableAdjacencyGraph<N, Edge<N>> deleteFromGraph(final Graph<N, E> graph, final Set<N> deleteNodes, final Set<E> deleteEdges)\n\t{\n\t\t// remove the deleteNodes\n\t\tfinal Set<N> cutNodes = graph.getNodes();\n\t\tcutNodes.removeAll(deleteNodes);\n\t\t// remove the deleteEdges\n\t\tfinal Set<Edge<N>> cutEdges = new HashSet<Edge<N>>(deleteEdges);\n\t\tfor (final E edge : deleteEdges)\n\t\t\tcutEdges.remove(edge);\n\t\t// remove any remaining deleteEdges which connect to removed deleteNodes\n\t\t// also replace deleteEdges that have one removed node but still have\n\t\t// 2 or more remaining deleteNodes with a new edge.\n\t\tfinal Set<Edge<N>> removeEdges = new HashSet<Edge<N>>();\n\t\tfinal Set<Edge<N>> addEdges = new HashSet<Edge<N>>();\n\t\tfor(final Edge<N> cutEdge : cutEdges)\n\t\t{\n\t\t\tfinal List<N> cutEdgeNeighbors = cutEdge.getNodes();\n\t\t\tcutEdgeNeighbors.removeAll(cutNodes);\n\t\t\tif( cutEdgeNeighbors.size() != cutEdge.getNodes().size() )\n\t\t\t\tremoveEdges.add(cutEdge);\n\t\t\tif( cutEdgeNeighbors.size() > 1 )\n\t\t\t\t// TODO instead of ImmutableHyperEdge implement clone or something\n\t\t\t\taddEdges.add(new ImmutableHyperEdge<N>(cutEdgeNeighbors));\n\t\t}\n\t\tfor(final Edge<N> removeEdge : removeEdges)\n\t\t\tcutEdges.remove(removeEdge);\n\t\tcutEdges.addAll(addEdges);\n\t\t// check if a graph from the new set of deleteEdges and deleteNodes is\n\t\t// still connected\n\t\treturn new ImmutableAdjacencyGraph<N, Edge<N>>(cutNodes, cutEdges);\n\t}", "@Test\n public void run() throws Exception {\n BranchName main = BranchName.of(\"main\");\n\n // create an old commit referencing both unique and non-unique assets.\n //The unique asset should be identified by the gc policy below since they are older than 1 day.\n store.setOverride(FIVE_DAYS_IN_PAST_MICROS);\n commit().put(\"k1\", new DummyValue().add(-3).add(0).add(100)).withMetadata(\"cOld\").toBranch(main);\n\n // work beyond slop but within gc allowed age.\n store.setOverride(TWO_HOURS_IN_PAST_MICROS);\n // create commits that have time-valid assets. Create more commits than ParentList.MAX_PARENT_LIST to confirm recursion.\n for (int i = 0; i < 55; i++) {\n commit().put(\"k1\", new DummyValue().add(i).add(i + 100)).withMetadata(\"c2\").toBranch(main);\n }\n\n // create a new branch, commit two assets, then delete the branch.\n BranchName toBeDeleted = BranchName.of(\"toBeDeleted\");\n versionStore.create(toBeDeleted, Optional.empty());\n Hash h = commit().put(\"k1\", new DummyValue().add(-1).add(-2)).withMetadata(\"c1\").toBranch(toBeDeleted);\n versionStore.delete(toBeDeleted, Optional.of(h));\n\n store.clearOverride();\n {\n // Create a dangling value to ensure that the slop factor avoids deletion of the assets of this otherwise dangling value.\n save(TimeUnit.MILLISECONDS.toMicros(System.currentTimeMillis()), new DummyValue().add(-50).add(-51));\n\n // create a dangling value that should be cleaned up.\n save(TimeUnit.MILLISECONDS.toMicros(System.currentTimeMillis()) - TimeUnit.DAYS.toMicros(2), new DummyValue().add(-60).add(-61));\n }\n\n SparkSession spark = SparkSession\n .builder()\n .appName(\"test-nessie-gc-collection\")\n .master(\"local[2]\")\n .getOrCreate();\n\n // now confirm that the unreferenced assets are marked for deletion. These are found based\n // on the no-longer referenced commit as well as the old commit.\n GcOptions options = ImmutableGcOptions.builder()\n .bloomFilterCapacity(10_000_000)\n .maxAgeMicros(ONE_DAY_OLD_MICROS)\n .timeSlopMicros(ONE_HOUR_OLD_MICROS)\n .build();\n IdentifyUnreferencedAssets<DummyValue> app = new IdentifyUnreferencedAssets<DummyValue>(helper, new DynamoSupplier(), spark, options);\n Dataset<UnreferencedItem> items = app.identify();\n Set<String> unreferencedItems = items.collectAsList().stream().map(UnreferencedItem::getName).collect(Collectors.toSet());\n assertThat(unreferencedItems, containsInAnyOrder(\"-1\", \"-2\", \"-3\", \"-60\", \"-61\"));\n }", "private void clean() {\n Iterable<Long> v = vertices();\n Iterator<Long> iter = v.iterator();\n while (iter.hasNext()) {\n Long n = iter.next();\n if (world.get(n).adj.size() == 0) {\n iter.remove();\n }\n }\n }", "@Test public void testPublic9() {\n Graph<Character> graph= TestGraphs.testGraph3();\n char[] toRemove= {'I', 'H', 'B', 'J', 'C', 'G', 'E', 'F'};\n int i;\n\n for (i= 0; i < toRemove.length; i++) {\n graph.removeVertex(toRemove[i]);\n assertFalse(graph.hasVertex(toRemove[i]));\n }\n }", "protected void removeFromAllSubsets()\r\n {\n if (!m_subsets.isEmpty()) {\r\n List<SubsetImpl> tmp = new ArrayList<SubsetImpl>(m_subsets);\r\n m_subsets.clear();\r\n tmp.forEach(r -> {if (r != null) r.remove(this);});\r\n }\r\n }", "private void DropEverything() throws isisicatclient.IcatException_Exception {\n List<Object> allGroupsResults = port.search(sessionId, \"Grouping\");\r\n List tempGroups = allGroupsResults;\r\n List<EntityBaseBean> allGroups = (List<EntityBaseBean>) tempGroups;\r\n port.deleteMany(sessionId, allGroups);\r\n\r\n //Drop all rules\r\n List<Object> allRulesResults = port.search(sessionId, \"Rule\");\r\n List tempRules = allRulesResults;\r\n List<EntityBaseBean> allRules = (List<EntityBaseBean>) tempRules;\r\n port.deleteMany(sessionId, allRules);\r\n\r\n //Drop all public steps\r\n List<Object> allPublicStepResults = port.search(sessionId, \"PublicStep\");\r\n List tempPublicSteps = allPublicStepResults;\r\n List<EntityBaseBean> allPublicSteps = (List<EntityBaseBean>) tempPublicSteps;\r\n port.deleteMany(sessionId, allPublicSteps);\r\n }", "public abstract boolean deleteOrphans();", "@Test\n public void testInMemoryParentCleanup()\n throws IOException, InterruptedException, ExecutionException {\n HMaster master = TEST_UTIL.getHBaseCluster().getMaster();\n final AssignmentManager am = master.getAssignmentManager();\n final ServerManager sm = master.getServerManager();\n\n Admin admin = TEST_UTIL.getAdmin();\n admin.catalogJanitorSwitch(false);\n\n final TableName tableName = name.getTableName();\n Table t = TEST_UTIL.createTable(tableName, FAMILY);\n TEST_UTIL.loadTable(t, FAMILY, false);\n\n RegionLocator locator = TEST_UTIL.getConnection().getRegionLocator(tableName);\n List<HRegionLocation> allRegionLocations = locator.getAllRegionLocations();\n\n // We need to create a valid split with daughter regions\n HRegionLocation parent = allRegionLocations.get(0);\n List<HRegionLocation> daughters = splitRegion(parent.getRegion());\n LOG.info(\"Parent region: \" + parent);\n LOG.info(\"Daughter regions: \" + daughters);\n assertNotNull(\"Should have found daughter regions for \" + parent, daughters);\n\n assertTrue(\"Parent region should exist in RegionStates\",\n am.getRegionStates().isRegionInRegionStates(parent.getRegion()));\n assertTrue(\"Parent region should exist in ServerManager\",\n sm.isRegionInServerManagerStates(parent.getRegion()));\n\n // clean the parent\n Result r = MetaMockingUtil.getMetaTableRowResult(parent.getRegion(), null,\n daughters.get(0).getRegion(), daughters.get(1).getRegion());\n CatalogJanitor.cleanParent(master, parent.getRegion(), r);\n\n // wait for procedures to complete\n Waiter.waitFor(TEST_UTIL.getConfiguration(), 10 * 1000, new Waiter.Predicate<Exception>() {\n @Override\n public boolean evaluate() throws Exception {\n ProcedureExecutor<MasterProcedureEnv> pe = master.getMasterProcedureExecutor();\n for (Procedure<MasterProcedureEnv> proc : pe.getProcedures()) {\n if (proc.getClass().isAssignableFrom(GCRegionProcedure.class) && proc.isFinished()) {\n return true;\n }\n }\n return false;\n }\n });\n\n assertFalse(\"Parent region should have been removed from RegionStates\",\n am.getRegionStates().isRegionInRegionStates(parent.getRegion()));\n assertFalse(\"Parent region should have been removed from ServerManager\",\n sm.isRegionInServerManagerStates(parent.getRegion()));\n\n }", "public void clear(){\n this.entities.clear();\n /*for(QuadTree node: this.getNodes()){\n node.clear();\n this.getNodes().remove(node);\n }*/\n this.nodes.clear();\n }", "public void RecursiveExpansion() throws TreeTooBigException {\r\n int transIndex; //Index to count transitions\r\n int[] newMarkup; //markup used to create new node\r\n boolean aTransitionIsEnabled = false; //To check for deadlock\r\n //Attribute used for assessing whether a node has occured before\r\n boolean repeatedNode = false; \r\n \r\n boolean allOmegas = false;\r\n \r\n boolean[] enabledTransitions = \r\n tree.dataLayer.getTransitionEnabledStatusArray(markup);\r\n\r\n //For each transition\r\n for (int i = 0; i < enabledTransitions.length; i++) {\r\n if (enabledTransitions[i] == true) {\r\n //Set transArray of to true for this index\r\n transArray[i] = true;\r\n \r\n //System.out.println(\"\\n Transition \" + i + \" Enabled\" );\r\n aTransitionIsEnabled = true;\r\n \r\n //print (\"\\n Old Markup is :\", markup);//debug\r\n \r\n //Fire transition to produce new markup vector\r\n newMarkup = fire(i);\r\n \r\n //print (\"\\n New Markup is :\", newMarkup);//debug\r\n \r\n //Check for safeness. If any of places have > 1 token set variable.\r\n for (int j = 0; j < newMarkup.length; j++) {\r\n if (newMarkup[j] > 1 || newMarkup[j] == -1) {\r\n tree.moreThanOneToken = true;\r\n break;\r\n }\r\n } \r\n \r\n //Create a new node using the new markup vector and attach it to\r\n //the current node as a child.\r\n children[i] = \r\n new myNode(newMarkup, this, tree, depth + 1);\r\n \r\n /* Now need to (a) check if any omegas (represented by -1) need to \r\n * be inserted in the markup vector of the new node, and (b) if the \r\n * resulting markup vector has appeared anywhere else in the tree. \r\n * We must do (a) before (b) as we need to know if the new node \r\n * contains any omegas to be able to compare it with existing nodes. \r\n */ \r\n allOmegas = children[i].InsertOmegas();\r\n \r\n //check if the resulting markup vector has occured anywhere else in the tree\r\n repeatedNode = (tree.root).FindMarkup(children[i]);\r\n \r\n if (tree.nodeCount >= Pipe.MAX_NODES && !tree.tooBig) {\r\n tree.tooBig = true;\r\n throw new TreeTooBigException();\r\n }\r\n \r\n if (!repeatedNode && !allOmegas) {\r\n children[i].RecursiveExpansion();\r\n }\r\n }\r\n }\r\n \r\n if (!aTransitionIsEnabled) {\r\n System.err.println(\"No transition enabled\");\r\n if (!tree.noEnabledTransitions || tree.pathToDeadlock.length < depth-1) {\r\n RecordDeadlockPath();\r\n tree.noEnabledTransitions = true;\r\n } else {\r\n System.err.println(\"Deadlocked node found, but path is not shorter\"\r\n + \" than current path.\");\r\n }\r\n } else {\r\n //System.out.println(\"Transitions enabled.\");\r\n }\r\n }", "public void cutNode ()\n {\n copyNode();\n deleteNode();\n }", "abstract public void deleteAfterBetaReduction();", "public void testRemoveAllEdges() {\n System.out.println(\"removeAllEdges\");\n\n Graph<Integer, Edge<Integer>> graph = generateGraph();\n Assert.assertTrue(graph.removeAllEdges());\n Assert.assertEquals(graph.edgesSet().size(), 0);\n }", "public void deallocateNode(){\n this.processId = NO_PROCESS;\n this.full = false;\n }", "int delete(Subdivision subdivision);", "void shutdownMassiveGraph();", "public native VertexList removeSubList(VertexNode a, VertexNode b);", "private void split(){\n // Slice horizontaly to get sub nodes width\n float subWidth = this.getBounds().width / 2;\n // Slice vertically to get sub nodes height\n float subHeight = this.getBounds().height / 2;\n float x = this.getBounds().x;\n float y = this.getBounds().y;\n int newLevel = this.level + 1;\n\n // Create the 4 nodes\n this.getNodes().add(0, new QuadTree(newLevel, new Rectangle(x + subWidth, y, subWidth, subHeight)));\n this.getNodes().add(1, new QuadTree(newLevel, new Rectangle(x, y, subWidth, subHeight)));\n this.getNodes().add(2, new QuadTree(newLevel, new Rectangle(x, y + subHeight, subWidth, subHeight)));\n this.getNodes().add(3, new QuadTree(newLevel, new Rectangle(x + subWidth, y + subHeight, subWidth, subHeight)));\n\n }", "@Test\n public void deleteProcessInstanceAlsoDeleteChildrenProcesses() throws Exception {\n final String simpleStepName = \"simpleStep\";\n final ProcessDefinition simpleProcess = deployAndEnableSimpleProcess(\"simpleProcess\", simpleStepName);\n processDefinitions.add(simpleProcess); // To clean in the end\n\n // deploy a process P2 containing a call activity calling P1\n final String intermediateStepName = \"intermediateStep1\";\n final String intermediateCallActivityName = \"intermediateCall\";\n final ProcessDefinition intermediateProcess = deployAndEnableProcessWithCallActivity(\"intermediateProcess\", simpleProcess.getName(),\n intermediateStepName, intermediateCallActivityName);\n processDefinitions.add(intermediateProcess); // To clean in the end\n\n // deploy a process P3 containing a call activity calling P2\n final String rootStepName = \"rootStep1\";\n final String rootCallActivityName = \"rootCall\";\n final ProcessDefinition rootProcess = deployAndEnableProcessWithCallActivity(\"rootProcess\", intermediateProcess.getName(), rootStepName,\n rootCallActivityName);\n processDefinitions.add(rootProcess); // To clean in the end\n\n // start P3, the call activities will start instances of P2 a and P1\n final ProcessInstance rootProcessInstance = getProcessAPI().startProcess(rootProcess.getId());\n waitForUserTask(rootProcessInstance, simpleStepName);\n\n // check that the instances of p1, p2 and p3 were created\n List<ProcessInstance> processInstances = getProcessAPI().getProcessInstances(0, 10, ProcessInstanceCriterion.NAME_ASC);\n assertEquals(3, processInstances.size());\n\n // check that archived flow nodes\n List<ArchivedActivityInstance> taskInstances = getProcessAPI().getArchivedActivityInstances(rootProcessInstance.getId(), 0, 100,\n ActivityInstanceCriterion.DEFAULT);\n assertTrue(taskInstances.size() > 0);\n\n // delete the root process instance\n getProcessAPI().deleteProcessInstance(rootProcessInstance.getId());\n\n // check that the instances of p1 and p2 were deleted\n processInstances = getProcessAPI().getProcessInstances(0, 10, ProcessInstanceCriterion.NAME_ASC);\n assertEquals(0, processInstances.size());\n\n // check that archived flow nodes were not deleted.\n taskInstances = getProcessAPI().getArchivedActivityInstances(rootProcessInstance.getId(), 0, 100, ActivityInstanceCriterion.DEFAULT);\n assertEquals(0, taskInstances.size());\n }", "private void clean() {\n nodesToRemove.clear();\n edgesToRemove.clear();\n }", "private void removeNoMoreExistingOriginalNodes() {\n for (Node mirrorNode : mirrorGraph.nodes()) {\n if (!isPartOfMirrorEdge(mirrorNode) && !originalGraph.has(mirrorNode)) {\n mirrorGraph.remove(mirrorNode);\n }\n }\n }", "@Test\r\n void test_insert_two_vertice_with_one_edge_remove_non_existent_edge() {\r\n // Add three vertices with two edges\r\n graph.addEdge(\"A\", \"B\");\r\n graph.addEdge(\"B\", \"C\");\r\n vertices = graph.getAllVertices();\r\n // B should be an adjacent vertex of A\r\n if(!graph.getAdjacentVerticesOf(\"A\").contains(\"B\")){\r\n fail();\r\n }\r\n // C should be an adjacent vertex of B\r\n if(!graph.getAdjacentVerticesOf(\"B\").contains(\"C\")){\r\n fail();\r\n }\r\n //Check that A,B and C are in the graph\r\n if(!vertices.contains(\"A\") |!vertices.contains(\"B\")\r\n | !vertices.contains(\"C\")) {\r\n fail();\r\n }\r\n // There are two edges in the graph\r\n if(graph.size() != 2) {\r\n fail();\r\n }\r\n // Try are remove edge from A to C\r\n graph.removeEdge(\"A\", \"C\");\r\n graph.removeEdge(\"A\", \"D\");\r\n graph.removeEdge(\"E\", \"F\");\r\n graph.removeEdge(null, \"A\");\r\n graph.removeEdge(\"A\", null);\r\n //Graph should maintain its original shape\r\n if(!graph.getAdjacentVerticesOf(\"A\").contains(\"B\")){\r\n fail();\r\n }\r\n // C should be an adjacent vertex of B\r\n if(!graph.getAdjacentVerticesOf(\"B\").contains(\"C\")){\r\n fail();\r\n }\r\n //Check that A,B and C are in the graph\r\n if(!vertices.contains(\"A\") |!vertices.contains(\"B\")\r\n | !vertices.contains(\"C\")) {\r\n fail();\r\n }\r\n // There are two edges in the graph\r\n if(graph.size() != 2) {\r\n fail();\r\n }\r\n }", "protected void enlarge ()\n {\n // The new capacity of the graph\n int newLength = 1 + vertices.length + ENLARGE_VALUE * vertices.length / 100;\n\n E[] newVertices = (E[]) new Object[newLength];\n Node[] newAdjacencySequences = new Node[newLength];\n \n for (int index = 0; index <= lastIndex; index++)\n {\n newVertices[index] = vertices[index];\n vertices[index] = null;\n newAdjacencySequences[index] = adjacencySequences[index];\n adjacencySequences[index] = null;\n }\n\n vertices = newVertices;\n adjacencySequences = newAdjacencySequences;\n }", "public void clearGraph(){\n\t\tthis.tools.clearGraph(graph);\n\t}", "public void cleanUp() {\n if (penv != null) {\n penv.cleanup();\n }\n List<ONDEXGraph> indexed = new LinkedList<ONDEXGraph>();\n Set<String> graphFolders = new HashSet<String>();\n for (Entry<ONDEXGraph, String> ent : indexedGraphs.entrySet()) {\n if (!indeciesToRetain.contains(ent.getValue())) graphFolders.add(new File(ent.getValue()).getParent());\n indexed.add(ent.getKey());\n }\n for (ONDEXGraph graph : indexed) removeIndex(graph, null);\n for (String graphDir : graphFolders) {\n try {\n DirUtils.deleteTree(graphDir);\n } catch (IOException e) {\n }\n }\n }", "void tryRemoveNodes(Collection<Node> nodesToRemove) throws Exception;", "@Override\n public void markChildrenDeleted() throws DtoStatusException {\n if (polymorphismSite != null) {\n for (com.poesys.db.dto.IDbDto dto : polymorphismSite) {\n dto.cascadeDelete();\n }\n }\n }", "void removeIsVertexOf(Subdomain_group oldIsVertexOf);", "@Test\n public void testGraphElements(){\n Vertex v1 = new Vertex(1, \"A\");\n Vertex v2 = new Vertex(2, \"B\");\n Vertex v3 = new Vertex(3, \"C\");\n Vertex v4 = new Vertex(4, \"D\");\n Vertex v5 = new Vertex(5, \"E\");\n Vertex v6 = new Vertex(6, \"F\");\n Vertex v7 = new Vertex(7, \"G\");\n Vertex v8 = new Vertex(8, \"H\");\n\n Vertex fakeVertex = new Vertex(100, \"fake vertex\");\n\n Edge<Vertex> e1 = new Edge<>(v1, v2, 1);\n Edge<Vertex> e2 = new Edge<>(v2, v3, 1);\n Edge<Vertex> e3 = new Edge<>(v3, v4, 1);\n Edge<Vertex> e4 = new Edge<>(v2, v4, 1);\n Edge<Vertex> e5 = new Edge<>(v2, v6, 1);\n Edge<Vertex> e6 = new Edge<>(v2, v5, 10);\n Edge<Vertex> e7 = new Edge<>(v5, v6, 10);\n Edge<Vertex> e8 = new Edge<>(v4, v6, 10);\n Edge<Vertex> e9 = new Edge<>(v6, v7, 10);\n Edge<Vertex> e10 = new Edge<>(v7, v8, 10);\n\n Edge<Vertex> fakeEdge = new Edge<>(fakeVertex, v1);\n Edge<Vertex> edgeToRemove = new Edge<>(v2, v7, 200);\n\n Graph<Vertex, Edge<Vertex>> g = new Graph<>();\n g.addVertex(v1);\n g.addVertex(v2);\n g.addVertex(v3);\n g.addVertex(v4);\n g.addVertex(v5);\n g.addVertex(v6);\n g.addVertex(v7);\n g.addVertex(v8);\n g.addEdge(e1);\n g.addEdge(e2);\n g.addEdge(e3);\n g.addEdge(e4);\n g.addEdge(e5);\n g.addEdge(e6);\n g.addEdge(e7);\n g.addEdge(e8);\n g.addEdge(e9);\n g.addEdge(edgeToRemove);\n\n Assert.assertTrue(g.addEdge(e10));\n\n //adding null edge or vertex to graph returns false\n Assert.assertFalse(g.addEdge(null));\n Assert.assertFalse(g.addVertex(null));\n\n //adding edge with a vertex that does not exist in graph g returns false\n Assert.assertFalse(g.addEdge(fakeEdge));\n\n //get an edge that does not exit in graph returns false\n Assert.assertFalse(g.edge(v1, fakeVertex));\n\n //getting length of edge from vertex not in graph g returns false\n Assert.assertEquals(0, g.edgeLength(fakeVertex, v2));\n\n //Remove an edge in graph g returns true\n Assert.assertTrue(g.remove(edgeToRemove));\n\n //Removing edge not in graph g returns false\n Assert.assertFalse(g.remove(fakeEdge));\n\n //Removing vertex not in graph g returns false\n Assert.assertFalse(g.remove(fakeVertex));\n\n //Finding an edge with an endpoint not in graph g returns null\n assertNull(g.getEdge(v1, fakeVertex));\n }", "@Test \n\tpublic void removeVertexTest() {\n\t\tList<Vertex> vertices = new ArrayList<>();\n\t\tvertices.add(C);\n\t\tvertices.add(D);\n\t\tedge_0.addVertices(vertices);\n\t\tgraph.addVertex(D);\n\t\tassertFalse(graph.removeVertex(C));\n\t\tgraph.addVertex(C);\n\t\tgraph.addEdge(edge_0);\n\t\tassertTrue(graph.removeVertex(D));\n\t\tassertFalse(graph.vertices().contains(D));\n\t\tassertFalse(graph.edges().contains(edge_0));\n\t\tassertTrue(graph.addVertex(D));\n\t}", "private void removeEdge() {\n boolean go = true;\n int lastNode;\n int proxNode;\n int atualNode;\n if ((parentMatrix[randomChild][0] != 1) &&\n (childMatrix[randomParent][0] != 1)) {\n lastNode =\n parentMatrix[randomChild][parentMatrix[randomChild][0] - 1];\n for (int i = (parentMatrix[randomChild][0] - 1); (i > 0 && go); i--)\n { // remove element from parentMatrix\n atualNode = parentMatrix[randomChild][i];\n if (atualNode != randomParent) {\n proxNode = atualNode;\n parentMatrix[randomChild][i] = lastNode;\n lastNode = proxNode;\n }\n else {\n parentMatrix[randomChild][i] = lastNode;\n go = false;\n }\n }\n if ((childMatrix[randomParent][0] != 1) &&\n (childMatrix[randomParent][0] != 1)) {\n lastNode = childMatrix[randomParent][\n childMatrix[randomParent][0] - 1];\n go = true;\n for (int i = (childMatrix[randomParent][0] - 1); (i > 0 &&\n go); i--) { // remove element from childMatrix\n atualNode = childMatrix[randomParent][i];\n if (atualNode != randomChild) {\n proxNode = atualNode;\n childMatrix[randomParent][i] = lastNode;\n lastNode = proxNode;\n }\n else {\n childMatrix[randomParent][i] = lastNode;\n go = false;\n }\n } // end of for\n }\n childMatrix[randomParent][(childMatrix[randomParent][0] - 1)] = -4;\n childMatrix[randomParent][0]--;\n parentMatrix[randomChild][(parentMatrix[randomChild][0] - 1)] = -4;\n parentMatrix[randomChild][0]--;\n }\n }", "void createGraphForMassiveLoad();", "@Test\n public void shouldDropUnselectedLabelIndexes() throws Exception\n {\n // GIVEN\n LabelIndex[] types = LabelIndex.values();\n Set<Node> expectedNodes = new HashSet<>();\n for ( int i = 0; i < 5; i++ )\n {\n // WHEN\n GraphDatabaseService db = db( random.among( types ) );\n Node node = createNode( db );\n expectedNodes.add( node );\n\n // THEN\n assertNodes( db, expectedNodes );\n db.shutdown();\n }\n }", "public void clear() {\r\n for (Edge edge : edges)\r\n edge.disconnect();\r\n for (Vertex vertex : vertices)\r\n vertex.disconnect();\r\n edges.clear();\r\n vertices.clear();\r\n getChildren().remove(1, getChildren().size());\r\n }", "@Override\n\tpublic List<SubGraph> split(SuperGraph superg, SubGraph oldsg) {\n\t\tList<SubGraph> sglist = new LinkedList<SubGraph>();\n\n\t\t//\t\tlog.info(\"Split for \" + oldsg);\n\n\t\t//create a new subgraph and page pair\n\t\t//\t\tPage newpage = PageManager.getInstance().createNewPage(superg.getId(), -1);\n\t\t//\t\tSubGraph newsg = superg.createSubgraph(newpage.getId());\n\t\t//\t\tnewpage.setSubgraph(newsg.getId());\n\n\t\tPage newpage = PageManager.getInstance().createNewPageWithSubgraph(superg.getId());\n\t\tSubGraph newsg = superg.getSubgraph(newpage.getSubgraphId());\n\t\tnewsg.setDirty(true);\n\n\t\tint numNodesMoved = 0;\n\t\tint maxNodesToMove = oldsg.nodeMap.size()/2;\n\t\twhile(numNodesMoved < maxNodesToMove){\n\t\t\t//BFS\n\t\t\tQueue<Pair<Node,Integer>> q = new LinkedList<Pair<Node,Integer>>();\n\t\t\tHashSet<Long> visited = new HashSet<Long>(); //hold visited node id\n\t\t\tint hopCount = 0;\t// the level, hop count\n\n\t\t\tNode root = oldsg.nodeMap.values().iterator().next(); //get a random node\n\t\t\tq.add(new Pair<Node, Integer>(root,0));\n\n\t\t\twhile(!q.isEmpty() && numNodesMoved < maxNodesToMove) {\n\t\t\t\tPair<Node, Integer> p = q.peek();\n\t\t\t\tNode n = p.getLeft();\n\t\t\t\thopCount = p.getRight();\n\n\t\t\t\t//\t\t\t\tif(numNodesMoved % 1000 == 0){\n\t\t\t\tlog.trace(\"BFS queue for iteration:\" + q);\n\t\t\t\tlog.trace(\"BFS queue size for iteration:\" + q.size());\n\t\t\t\tlog.trace(\"BFS processing node : \"+n + \" hopCount:\" + hopCount);\n\t\t\t\tlog.trace(\"BFS nodes moved : \" + numNodesMoved);\n\t\t\t\t//\t\t\t\t}\n\n\t\t\t\t// only add the neighborhood of n in the same subgraph\n\t\t\t\tfor(Edge e : n.getEdges(EdgeDirection.OUT)){\n\t\t\t\t\tLong nodeid = e.getDestinationId();\n\n\t\t\t\t\tif(!visited.contains(nodeid) && oldsg.nodeMap.containsKey(nodeid)){\n\t\t\t\t\t\tNode u = e.getDestination();\n\t\t\t\t\t\tvisited.add(nodeid);\n\t\t\t\t\t\tq.add(new Pair<Node,Integer>(u, hopCount+1));\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t//move node\n\t\t\t\tsuperg.moveNode(n, oldsg, newsg);\n\t\t\t\toldsg.nodeMap.remove(n.getId());\n\t\t\t\tnumNodesMoved++;\n\n\t\t\t\t//remove n from queue\n\t\t\t\tq.poll();\n\n\t\t\t\t//if the newsg is partitioned and there are more nodes to move\n\t\t\t\tif (!q.isEmpty() &&\n\t\t\t\t\t\tnumNodesMoved < maxNodesToMove &&\n\t\t\t\t\t\tnewsg.isPartitioned()) {\n\n\t\t\t\t\tlog.trace(\"Newly created, \" + newsg + \", is full creating a new one.\");\n\n\t\t\t\t\t//add the previous subgraph to subgraph list\n\t\t\t\t\tsglist.add(newsg);\n\n\t\t\t\t\tnewpage = PageManager.getInstance().createNewPageWithSubgraph(superg.getId());\n\t\t\t\t\tnewsg = superg.getSubgraph(newpage.getSubgraphId());\n\t\t\t\t\tnewsg.setDirty(true);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tsglist.add(oldsg);\n\t\tsglist.add(newsg);\n\n\t\treturn sglist;\n\t}", "private void deleteEdgeFromSpanningTree(int edge_level, int level_replacement, Relationship deleted_rel, Relationship replacement_rel) {\n int l;\n for (l = edge_level; l >= 0; l--) {\n int sp_idx = this.dforests.get(l).findTreeIndex(deleted_rel);\n SpanningTree sp_tree = this.dforests.get(l).trees.get(sp_idx);\n this.dforests.get(l).trees.remove(sp_idx); //remove the original spanning tree\n\n SpanningTree[] splittedTrees = new SpanningTree[3];\n splittedTrees[0] = new SpanningTree(sp_tree.neo4j, false);\n splittedTrees[1] = new SpanningTree(sp_tree.neo4j, false);\n splittedTrees[2] = new SpanningTree(sp_tree.neo4j, false);\n\n int case_number = sp_tree.split(deleted_rel, splittedTrees);\n\n SpanningTree left_tree = splittedTrees[0];\n SpanningTree middle_tree = splittedTrees[1];\n SpanningTree right_tree = splittedTrees[2];\n\n right_tree = combineSpanningTree(left_tree, right_tree, case_number);\n right_tree.etTreeUpdateInformation();\n\n /** when l > level_replacement, only needs to delete the del_rel (because replace_edge in lower forests)\n * else, delete and replace with the replacement edge.\n */\n if (l <= level_replacement) {\n long mid_new_root_id = (middle_tree.N_nodes.contains(replacement_rel.getStartNodeId())) ? replacement_rel.getStartNodeId() : replacement_rel.getEndNodeId();\n long right_new_root_id = (right_tree.N_nodes.contains(replacement_rel.getStartNodeId())) ? replacement_rel.getStartNodeId() : replacement_rel.getEndNodeId();\n right_tree.reroot(right_new_root_id);\n middle_tree.reroot(mid_new_root_id);\n connectTwoTreeByRel(middle_tree, right_tree, replacement_rel);\n middle_tree.etTreeUpdateInformation();\n this.dforests.get(l).trees.add(middle_tree);\n } else {\n\n if (!middle_tree.isSingle && !middle_tree.isEmpty) {\n this.dforests.get(l).trees.add(middle_tree);\n middle_tree.etTreeUpdateInformation();\n }\n\n if (!right_tree.isSingle && !right_tree.isEmpty) {\n this.dforests.get(l).trees.add(right_tree);\n right_tree.etTreeUpdateInformation();\n }\n }\n }\n }", "public SkipGraphOperations(boolean isBlockchain)\r\n {\r\n this.isBlockchain = isBlockchain;\r\n searchRandomGenerator = new Random();\r\n if (isBlockchain)\r\n {\r\n //mBlocks = new Blocks();\r\n mTransactions = new Transactions();\r\n }\r\n\r\n\r\n mTopologyGenerator = new TopologyGenerator();\r\n System.gc(); //a call to system garbage collector\r\n }", "void retainOutlineAndBoundaryGrid() {\n\t\tfor (final PNode child : getChildrenAsPNodeArray()) {\n\t\t\tif (child != selectedThumbOutline && child != yellowSIcolumnOutline && child != boundary) {\n\t\t\t\tremoveChild(child);\n\t\t\t}\n\t\t}\n\t\tcreateOrDeleteBoundary();\n\t}", "private void unionSmallLarge(int small, int large) {\n unionStart = System.currentTimeMillis();\n\n log.debug(\" --- union smallID=\" + small + \", largeID=\" + large);\n\n int moveCount = 0;\n for (int i = 0; i < vertexUnionLeaders.length; i++) {\n if (vertexUnionLeaders[i] == small) {\n\n\n log.debug(\" changing \" + i + \" from old smallID=\" + small + \" to new largeD=\" + large);\n vertexUnionLeaders[i] = large;\n moveCount++;\n }\n }\n\n // update the large group member count\n ClusterGroup lGroup = clusterGroupMap.get(large);\n if (lGroup == null) {\n lGroup = new ClusterGroup(large, 1);\n clusterGroupMap.put(large, lGroup);\n log.debug(\" created new ClusterGroup for largeID=\" + large + \", size=1\");\n }\n int lSize = lGroup.groupSize;\n log.debug(\" old group size=\" + lSize + \", about to add smallID size=\" + moveCount);\n lSize += moveCount;\n lGroup.groupSize = lSize;\n log.debug(\" groupID=\" + lGroup.groupID + \" size=\" + lSize);\n\n // now remove the small group from the map\n clusterGroupMap.remove(small);\n unionEnd = System.currentTimeMillis();\n }", "@Test\n void test07_tryToRemoveNonExistentEdge() {\n graph.addVertex(\"a\");\n graph.addVertex(\"b\");\n graph.addVertex(\"c\");\n graph.addEdge(\"a\", \"b\");\n graph.addEdge(\"b\", \"c\"); // adds two edges\n try {\n graph.removeEdge(\"e\", \"f\"); // remove non existent edge\n } catch (Exception e) {\n fail(\"Shouldn't have thrown exception\");\n }\n\n Set<String> vertices = new LinkedHashSet<>();\n vertices.add(\"a\");\n vertices.add(\"b\");\n vertices.add(\"c\"); // creates mock up vertex list\n\n if (!graph.getAllVertices().equals(vertices)) { // checks if vertices weren't added or removed\n fail(\"wrong vertices are inserted into the graph\");\n }\n if (graph.size() != 2) {\n fail(\"wrong number of edges in the graph\");\n }\n\n }", "public void clearSupervised() {\n supervisedNodes.clear();\n }", "void deleteNodes(ZVNode[] nodes);", "private static void deleteTest() throws SailException{\n\n\t\tString dir2 = \"repo-temp\";\n\t\tSail sail2 = new NativeStore(new File(dir2));\n\t\tsail2 = new IndexingSail(sail2, IndexManager.getInstance());\n\t\t\n//\t\tsail.initialize();\n\t\tsail2.initialize();\n\t\t\n//\t\tValueFactory factory = sail2.getValueFactory();\n//\t\tCloseableIteration<? extends Statement, SailException> statements = sail2\n//\t\t\t\t.getConnection().getStatements(null, null, null, false);\n\n\t\tSailConnection connection = sail2.getConnection();\n\n\t\tint cachesize = 1000;\n\t\tint cached = 0;\n\t\tlong count = 0;\n\t\tconnection.removeStatements(null, null, null, null);\n//\t\tconnection.commit();\n\t}", "protected void removeEdgeAndVertices(TestbedEdge edge) {\n java.util.Collection<Agent> agents = getIncidentVertices(edge);\n removeEdge(edge);\n for (Agent v : agents) {\n if (getIncidentEdges(v).isEmpty()) {\n removeVertex(v);\n }\n }\n }", "@Override\n public void deleteVertex(int vertex) {\n\n }", "private void trimX() {\n\t\tint indexIntoBranches = 0;\n\t\tfor (int i = 0; i < this.branches.size(); i++) {\n\t\t\tif (this.branches.get(i).size() == this.numXVertices) {\n\t\t\t\tindexIntoBranches = i;\n\t\t\t}\n\t\t}\n\n\t\tthis.allX = (ArrayList) this.branches.get(indexIntoBranches).clone(); // We need this for a set difference above\n\n\t\tfor (int k = 0; k < this.branches.get(indexIntoBranches).size(); k++) {\n\t\t\tfor (int j = 0; j < this.branches.get(indexIntoBranches).size(); j++) {\n\t\t\t\t// Ignore if the index is the same - otherwise remove the edges\n\t\t\t\tif (!(k == j)) {\n\t\t\t\t\tthis.branches.get(indexIntoBranches).get(k)\n\t\t\t\t\t\t\t.removeNeighbor(this.branches.get(indexIntoBranches).get(j));\n\t\t\t\t\tthis.branches.get(indexIntoBranches).get(j)\n\t\t\t\t\t\t\t.removeNeighbor(this.branches.get(indexIntoBranches).get(k));\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "private void deleteHierarchyData(TreePath[] selRows) {\r\n SponsorHierarchyBean delBean;\r\n CoeusVector delData = new CoeusVector();\r\n TreePath treePath=selRows[selRows.length-1];\r\n DefaultMutableTreeNode selNode = (DefaultMutableTreeNode)treePath.getLastPathComponent();\r\n int selRow=sponsorHierarchyTree.getRowForPath(treePath);\r\n String optionPaneMsg=EMPTY_STRING;\r\n if(selNode.isRoot()) return;\r\n if(!selNode.getAllowsChildren()) {\r\n if(selRows.length > 1) {\r\n optionPaneMsg = coeusMessageResources.parseMessageKey(\"maintainSponsorHierarchy_exceptionCode.1252\");\r\n }else {\r\n optionPaneMsg = \"Do you want to remove the sponsor \"+selNode.toString()+\" from the hierarchy?\";\r\n }\r\n int optionSelected = CoeusOptionPane.showQuestionDialog(optionPaneMsg,CoeusOptionPane.OPTION_YES_NO,CoeusOptionPane.DEFAULT_NO);\r\n if(optionSelected == CoeusOptionPane.SELECTION_YES) {\r\n for (int index=selRows.length-1; index>=0; index--) {\r\n treePath = selRows[index];\r\n selRow = sponsorHierarchyTree.getRowForPath(treePath);\r\n selNode = (DefaultMutableTreeNode)treePath.getLastPathComponent();\r\n int endIndex = selNode.toString().indexOf(\":\");\r\n Equals getRowData = new Equals(\"sponsorCode\",selNode.toString().substring(0,endIndex == -1 ? selNode.toString().length():endIndex));\r\n CoeusVector cvFilteredData = getDeleteData(cvHierarchyData.filter(getRowData));\r\n delBean = (SponsorHierarchyBean)cvFilteredData.get(0);\r\n delBean.setAcType(TypeConstants.DELETE_RECORD);\r\n flushBean(delBean);//Added for bug fix Start #1830\r\n model.removeNodeFromParent(selNode);\r\n delData.addAll(cvFilteredData);\r\n saveRequired = true;\r\n }\r\n }\r\n } else {\r\n \r\n// int optionSelected = CoeusOptionPane.showQuestionDialog(\"Do you want to remove the Group \"+selNode.toString()+\" all its children from the hierarchy.\",CoeusOptionPane.OPTION_YES_NO,CoeusOptionPane.DEFAULT_YES);\r\n int optionSelected = -1;\r\n try{\r\n if(selNode != null && selNode.getLevel() == 1 && isPrintingHierarchy && isFormsExistInGroup(selNode.toString())){\r\n optionSelected = CoeusOptionPane.showQuestionDialog(\"Do you want to remove the group \"+selNode.toString()+\" , all its children and associated sponsor forms from the hierarchy?\",CoeusOptionPane.OPTION_YES_NO,CoeusOptionPane.DEFAULT_NO);\r\n }else{\r\n optionSelected = CoeusOptionPane.showQuestionDialog(\"Do you want to remove the Group \"+selNode.toString()+\" , all its children from the hierarchy.\",CoeusOptionPane.OPTION_YES_NO,CoeusOptionPane.DEFAULT_NO);\r\n }\r\n }catch(CoeusUIException coeusUIException){\r\n CoeusOptionPane.showDialog(coeusUIException);\r\n return ;\r\n }\r\n if(optionSelected == CoeusOptionPane.SELECTION_YES) {\r\n //Case#2445 - proposal development print forms linked to indiv sponsor, should link to sponsor hierarchy - Start\r\n if(isPrintingHierarchy && selectedNode.getLevel() == 1){\r\n TreeNode root = (TreeNode)sponsorHierarchyTree.getModel().getRoot();\r\n TreePath result = findEmptyGroup(sponsorHierarchyTree, new TreePath(root));\r\n if( result == null){\r\n try{\r\n deleteForms(selNode.toString());\r\n }catch(CoeusUIException coeusUIException){\r\n CoeusOptionPane.showDialog(coeusUIException);\r\n return ;\r\n }\r\n }\r\n }\r\n Equals getRowData = new Equals(fieldName[selNode.getLevel()],selNode.toString());\r\n CoeusVector cvFilteredData = getDeleteData(cvHierarchyData.filter(getRowData));//Modified for bug fix Start #1830\r\n model.removeNodeFromParent(selNode);\r\n for (int i=0; i<cvFilteredData.size(); i++) {\r\n delBean = (SponsorHierarchyBean)cvFilteredData.get(i);\r\n delBean.setAcType(TypeConstants.DELETE_RECORD);\r\n flushBean(delBean);//Added for bug fix Start #1830\r\n saveRequired = true;\r\n }\r\n delData.addAll(cvFilteredData);\r\n }\r\n }\r\n if(selRow < sponsorHierarchyTree.getRowCount() && \r\n ((DefaultMutableTreeNode)sponsorHierarchyTree.getPathForRow(selRow).getLastPathComponent()).getAllowsChildren() && !selNode.getAllowsChildren())\r\n sponsorHierarchyTree.setSelectionPath(treePath.getParentPath());\r\n else\r\n if(selRow >= sponsorHierarchyTree.getRowCount())\r\n selRow = 0;\r\n sponsorHierarchyTree.setSelectionRow(selRow);\r\n \r\n groupsController.refreshTableData(delData);\r\n }", "public void test_dn_02() {\n OntModel mymod = ModelFactory.createOntologyModel( OntModelSpec.OWL_MEM, null );\n mymod.read( \"file:testing/ontology/testImport3/a.owl\" );\n \n assertEquals( \"Graph count..\", 2, mymod.getSubGraphs().size() );\n \n for (Iterator it = mymod.listImportedModels(); it.hasNext();) {\n mymod.removeSubModel( (Model) it.next() );\n }\n \n assertEquals( \"Graph count..\", 0, mymod.getSubGraphs().size() );\n }", "@Test\n @JUnitTemporaryDatabase // Relies on specific IDs so we need a fresh database\n public void testDelete() throws Exception {\n createAndFlushServiceTypes();\n createAndFlushCategories();\n \n //Initialize the database\n ModelImporter mi = m_importer;\n String specFile = \"/tec_dump.xml.smalltest\";\n mi.importModelFromResource(new ClassPathResource(specFile));\n \n assertEquals(10, mi.getNodeDao().countAll());\n }", "private void delete(Node next) {\n\t\t\n\t}", "public void createSubs(List<QueryTreeNode> subQueries) {\r\n\t\tif (!isBranchIndexed()) {\r\n\t\t\t//nothing to do, stop searching this branch\r\n\t\t\treturn;\r\n\t\t}\r\n\t\t\r\n\t\t//If op=OR and if and sub-nodes are indexed, then we split.\r\n\t\tif (LOG_OP.OR.equals(op)) {\r\n\t\t\t//clone both branches (WHY ?)\r\n\t\t\tQueryTreeNode node1;\r\n\t\t\tif (n1 != null) {\r\n\t\t\t\tnode1 = n1;\r\n\t\t\t} else {\r\n\t\t\t\tn1 = node1 = new QueryTreeNode(null, t1, null, null, null, false);\r\n\t\t\t\tt1 = null;\r\n\t\t\t}\r\n\t\t\tQueryTreeNode node2;\r\n\t\t\tif (n2 != null) {\r\n\t\t\t\tnode2 = n2.cloneBranch();\r\n\t\t\t} else {\r\n\t\t\t\tn2 = node2 = new QueryTreeNode(null, t2, null, null, null, false);\r\n\t\t\t\tt2 = null;\r\n\t\t\t}\r\n\t\t\t//we remove the OR from the tree and assign the first clone/branch to any parent\r\n\t\t\tQueryTreeNode newTree;\r\n\t\t\tif (p != null) {\r\n\t\t\t\t//remove local OR and replace with n1\r\n\t\t\t\tif (p.n1 == this) {\r\n\t\t\t\t\tp.n1 = node1;\r\n\t\t\t\t\tp.t1 = null;\r\n\t\t\t\t\tp.relateToChildren();\r\n\t\t\t\t} else if (p.n2 == this) {\r\n\t\t\t\t\tp.n2 = node1;\r\n\t\t\t\t\tp.t2 = null;\r\n\t\t\t\t\tp.relateToChildren();\r\n\t\t\t\t} else {\r\n\t\t\t\t\tthrow new IllegalStateException();\r\n\t\t\t\t}\r\n\t\t\t\t//clone and replace with child number n2/t2\r\n\t\t\t\t//newTree = cloneSingle(n2, t2, null, null);\r\n\t\t\t} else {\r\n\t\t\t\t//no parent.\r\n\t\t\t\t//still remove this one and replace it with the first sub-node\r\n\t\t\t\t//TODO should we use a set for faster removal?\r\n\t\t\t\tsubQueries.remove(this);\r\n\t\t\t\tsubQueries.add(node1);\r\n\t\t\t\tnode1.p = null;\r\n\t\t\t\tif (node2 != null) {\r\n\t\t\t\t\tnode2.p = null;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t//now treat second branch and create a new parent for it, if necessary.\r\n\t\t\tif (p != null) {\r\n\t\t\t\tnewTree = p.cloneTrunk(node1, node2);\r\n\t\t\t} else {\r\n\t\t\t\tnewTree = node2;\r\n\t\t\t}\r\n\t\t\t//subQueriesCandidates.add(newTree.root());\r\n\t\t\tnewTree.createSubs(subQueries);\r\n\t\t\tsubQueries.add(newTree.root());\r\n\t\t}\r\n\t\t\r\n\t\t//go into sub-nodes\r\n\t\tif (n1 != null) {\r\n\t\t\tn1.createSubs(subQueries);\r\n\t\t}\r\n\t\tif (n2 != null) {\r\n\t\t\tn2.createSubs(subQueries);\r\n\t\t}\r\n\t}", "public void delete(){\r\n\t\tblocks = null;\r\n\t\ttry {\r\n\t\t\tfinalize();\r\n\t\t} catch (Throwable e) {\t}\r\n\t}", "@Test\n void deleteUserBatchesRemainSuccess() {\n GenericDao anotherDao = new GenericDao( Batch.class );\n /* user id 2 in the test database has two associated batches */\n User userWithBatch = (User) genericDao.getById(2);\n /* store the associated batches for this user */\n Set<Batch> batches = (Set<Batch>) userWithBatch.getBatches();\n logger.debug(\"The user's batches: \" + batches);\n\n /*\n * -disassociate the batches (this is the only way I can see to not delete the orphan records)\n * -delete the user\n * -confirm deletion\n */\n userWithBatch.setBatches(null);\n\n genericDao.delete(userWithBatch);\n\n assertNull(genericDao.getById(2));\n\n /*\n * try to retrieve the batches based on id\n * confirm they have not been removed from the database\n */\n for (Batch batch : batches) {\n logger.debug(\"test batch id: \" + batch.getId());\n Batch testBatch = (Batch) anotherDao.getById(batch.getId());\n logger.debug(\"Test batch retrieved from db: \" + testBatch);\n assertNotNull(testBatch);\n }\n }", "private void clean() {\n //use iterator\n Iterator<Long> it = nodes.keySet().iterator();\n while (it.hasNext()) {\n Long node = it.next();\n if (nodes.get(node).adjs.isEmpty()) {\n it.remove();\n }\n }\n }", "public void delete() {\r\n\t\t\tif (!isDeleted && handles.remove(this)) {\r\n\t\t\t\telementsUsed -= count;\r\n\t\t\t\tisDeleted = true;\r\n\t\t\t\tif (elementsUsed < numElements / 4) {\r\n\t\t\t\t\tcompact();\r\n\t\t\t\t\tnumElements = Math.max(10, elementsUsed * 2);\r\n\t\t\t\t}\r\n\t\t\t\tshapePeer.vboHandle = null;\r\n\t\t\t}\r\n\t\t}", "public void removeAllEdges() {\n }", "public static void main(String[] args) throws IOException {\n\t\tGraph g2 = new Graph(\"graph5.txt\");\r\n\t\tPartialTreeList list = MST.initialize(g2);\r\n\t\t\r\n\t\tArrayList<PartialTree.Arc> arr = new ArrayList<PartialTree.Arc>();\r\n\t\tarr = MST.execute(list);\r\n\t\tSystem.out.println(arr);\r\n\t\t//before, when the remove method didn't decrement the size after\r\n\t\t//removing the front tree, the below statement would print the front twice\r\n\t\t//^^^^WHY??????????????\r\n\t\t/*for(PartialTree tree : list){\r\n\t\t\t\r\n\t\t\tSystem.out.println(tree.getRoot().neighbors.next.weight);\r\n\t\t}*/\r\n\t}", "@Test\n\tpublic void removeEdgeTest() {\n\t\tList<Vertex> vertices = new ArrayList<>();\n\t\tvertices.add(C);\n\t\tvertices.add(D);\n\t\tedge_0.addVertices(vertices);\n\t\tList<Vertex> vertices1 = new ArrayList<>();\n\t\tvertices.add(A);\n\t\tvertices.add(B);\n\t\tedge_1.addVertices(vertices1);\n\t\tgraph.addEdge(edge_0);\n\t\tgraph.addEdge(edge_1);\n\t\tassertTrue(graph.removeEdge(edge_0));\n\t\tassertFalse(graph.edges().contains(edge_0));\n\t\tassertTrue(graph.edges().size() == 1);\n\t}", "private static void simplify (GraphDirected<NodeCppOSMDirected, EdgeCppOSMDirected> osmGraph) {\n \t\tfinal Iterator<NodeCppOSMDirected> iteratorNodes = osmGraph.getNodes().iterator();\n \t\twhile (iteratorNodes.hasNext()) {\n \t\t\tfinal NodeCppOSMDirected node = iteratorNodes.next();\n \t\t\t// one in one out\n \t\t\tif (node.getInDegree() == 1 && node.getOutDegree() == 1) {\n \t\t\t\t// get the ids of the two connected nodes\n \t\t\t\tfinal Long currentNodeId = node.getId();\n \t\t\t\tfinal List<EdgeCppOSMDirected> edges = node.getEdges();\n \t\t\t\tfinal EdgeCppOSMDirected edge1 = edges.get(0);\n \t\t\t\tfinal EdgeCppOSMDirected edge2 = edges.get(1);\n \t\t\t\tfinal Long node1id = edge1.getNode1().getId() == (currentNodeId) ? edge2.getNode1().getId() : edge1.getNode1().getId();\n \t\t\t\tfinal Long node2id = edge1.getNode1().getId() == (currentNodeId) ? edge1.getNode2().getId() : edge2.getNode2().getId();\n \t\t\t\tif (node2id == node1id){\n \t\t\t\t\t// we are in a deadend and do not erase ourself\n \t\t\t\t\tcontinue;\n \t\t\t\t}\n \t\t\t\t// concat the list in the right way\n \t\t\t\tList<WayNodeOSM> newMetaNodes = concatMetanodes(edge1.getMetadata().getNodes(), edge2.getMetadata().getNodes(), currentNodeId);\n \t\t\t\t// add a new edge\n \t\t\t\t// TODO: Handle way properly - what would name be in this context?\n \t\t\t\tosmGraph.getNode(node1id).connectWithNodeWeigthAndMeta(osmGraph.getNode(node2id), edge1.getWeight() + edge2.getWeight(),\n \t\t\t\t\t\tnew WayOSM(0, WayOSM.WayType.UNSPECIFIED, \"unknown\", newMetaNodes));\n \t\t\t\t// remove the old node\n \t\t\t\t// do this manually because we otherwise corrupt the iterator\n \t\t\t\tnode.removeAllEdges();\n \t\t\t\titeratorNodes.remove();\n \t\t\t\tcontinue;\n \t\t\t}\n \t\t\t// two in two out\n \t\t\tif (node.getInDegree() == 2 && node.getOutDegree() == 2) {\n \t\t\t\tfinal long currentNodeId = node.getId();\n \t\t\t\t//check the connections\n \t\t\t\tArrayList<EdgeCppOSMDirected> incomingEdges = new ArrayList<>();\n \t\t\t\tArrayList<EdgeCppOSMDirected> outgoingEdges = new ArrayList<>();\n \t\t\t\tfor(EdgeCppOSMDirected edge : node.getEdges()) {\n \t\t\t\t\tif(edge.getNode1().getId() == currentNodeId){\n \t\t\t\t\t\toutgoingEdges.add(edge);\n \t\t\t\t\t}\n \t\t\t\t\telse {\n \t\t\t\t\t\tincomingEdges.add(edge);\n \t\t\t\t\t}\n \t\t\t\t}\n \t\t\t\t//TODO make this condition better\n \t\t\t\tif(outgoingEdges.get(0).getNode2().equals(incomingEdges.get(0).getNode1())){\n \t\t\t\t\t//out0 = in0\n \t\t\t\t\tif(!outgoingEdges.get(1).getNode2().equals(incomingEdges.get(1).getNode1())){\n \t\t\t\t\t\tcontinue;\n \t\t\t\t\t}\n \t\t\t\t\tif(outgoingEdges.get(0).getWeight() != incomingEdges.get(0).getWeight()){\n \t\t\t\t\t\tcontinue;\n \t\t\t\t\t}\n \t\t\t\t\tif(outgoingEdges.get(1).getWeight() != incomingEdges.get(1).getWeight()){\n \t\t\t\t\t\tcontinue;\n \t\t\t\t\t}\n \t\t\t\t}\n \t\t\t\telse {\n \t\t\t\t\t//out0 should be in1\n \t\t\t\t\t//therefore out1 = in0\n \t\t\t\t\tif(!outgoingEdges.get(0).getNode2().equals(incomingEdges.get(1).getNode1())){\n \t\t\t\t\t\tcontinue;\n \t\t\t\t\t}\n \t\t\t\t\tif(!outgoingEdges.get(1).getNode2().equals(incomingEdges.get(0).getNode1())){\n \t\t\t\t\t\tcontinue;\n \t\t\t\t\t}\n \t\t\t\t\tif(outgoingEdges.get(0).getWeight() != incomingEdges.get(1).getWeight()){\n \t\t\t\t\t\tcontinue;\n \t\t\t\t\t}\n \t\t\t\t\tif(outgoingEdges.get(1).getWeight() != incomingEdges.get(0).getWeight()){\n \t\t\t\t\t\tcontinue;\n \t\t\t\t\t}\n \t\t\t\t}\n \n \t\t\t\t// get the ids of the two connected nodes\n \t\t\t\tfinal NodeCppOSMDirected node1 = incomingEdges.get(0).getNode1();\n \t\t\t\tfinal NodeCppOSMDirected node2 = incomingEdges.get(1).getNode1();\n \t\t\t\t// \t\t\tif (node1.equals(node2)){\n \t\t\t\t// \t\t\t\t// we are in a loop and do not erase ourself\n \t\t\t\t// \t\t\t\tcontinue;\n \t\t\t\t// \t\t\t}\n \t\t\t\t// concat the list in the right way\n \t\t\t\tList<WayNodeOSM> metaNodes1 = incomingEdges.get(0).getMetadata().getNodes();\n \t\t\t\tList<WayNodeOSM> metaNodes2 = incomingEdges.get(1).getMetadata().getNodes();\n \t\t\t\tdouble weight = incomingEdges.get(0).getWeight() +incomingEdges.get(1).getWeight();\n \t\t\t\tList<WayNodeOSM> newMetaNodes = concatMetanodes(metaNodes1, metaNodes2, currentNodeId);\n \t\t\t\t// add a new edge\n \t\t\t\t// TODO: Handle way properly - what would name be in this context?\n \t\t\t\tnode1.connectWithNodeWeigthAndMeta(node2, weight,\n \t\t\t\t\t\tnew WayOSM(0, WayOSM.WayType.UNSPECIFIED, \"unknown\", newMetaNodes));\n \t\t\t\tnode2.connectWithNodeWeigthAndMeta(node1, weight,\n \t\t\t\t\t\tnew WayOSM(0, WayOSM.WayType.UNSPECIFIED, \"unknown\", newMetaNodes));\n \t\t\t\t// remove the old node\n \t\t\t\t// do this manually because we otherwise corrupt the iterator\n \t\t\t\tnode.removeAllEdges();\n \t\t\t\titeratorNodes.remove();\n \t\t\t}\n \t\t}\n \t}", "private static void simplify (GraphUndirected<NodeCppOSM, EdgeCppOSM> osmGraph) {\n \t\tfinal Iterator<NodeCppOSM> iteratorNodes = osmGraph.getNodes().iterator();\n \t\twhile (iteratorNodes.hasNext()) {\n \t\t\tfinal NodeCppOSM node = iteratorNodes.next();\n \t\t\tif (node.getDegree() == 2) {\n \t\t\t\t// get the ids of the two connected nodes\n \t\t\t\tfinal Long currentNodeId = node.getId();\n \t\t\t\tfinal List<EdgeCppOSM> edges = node.getEdges();\n \t\t\t\tfinal EdgeCppOSM edge1 = edges.get(0);\n \t\t\t\tfinal EdgeCppOSM edge2 = edges.get(1);\n \t\t\t\tfinal Long node1id = edge1.getNode1().getId() == (currentNodeId) ? edge1.getNode2().getId() : edge1.getNode1().getId();\n \t\t\t\tfinal Long node2id = edge2.getNode1().getId() == (currentNodeId) ? edge2.getNode2().getId() : edge2.getNode1().getId();\n \t\t\t\tif (currentNodeId == node1id){\n \t\t\t\t\t// we are in a loop and do not erase ourself\n \t\t\t\t\tcontinue;\n \t\t\t\t}\n \t\t\t\t// concat the list in the right way\n \t\t\t\tList<WayNodeOSM> newMetaNodes = concatMetanodes(edge1.getMetadata().getNodes(), edge2.getMetadata().getNodes(), currentNodeId);\n \t\t\t\t// add a new edge\n \t\t\t\t// TODO: Handle way properly - what would name be in this context?\n \t\t\t\t// TODO: names\n \t\t\t\tosmGraph.getNode(node1id).connectWithNodeWeigthAndMeta(osmGraph.getNode(node2id), edge1.getWeight() + edge2.getWeight(),\n\t\t\t\t\t\tnew WayOSM(0, WayOSM.WayType.UNSPECIFIED, edge1.getMetadata().getName()+edge2.getMetadata().getName(), newMetaNodes));\n \t\t\t\t// remove the old node\n \t\t\t\t// do this manually because we otherwise corrupt the iterator\n \t\t\t\tnode.removeAllEdges();\n \t\t\t\titeratorNodes.remove();\n \t\t\t}\n \t\t}\n \t}", "private void pruneTree(QuadNode node){\n int i;\n while(node.parent != null && node.quads[0] == null && node.quads[1] == null && node.quads[2] == null && node.quads[3] == null){\n i=0;\n if(node.x != node.parent.x){\n i++;\n }\n if(node.z != node.parent.z){\n i+=2;\n }\n node = node.parent;\n node.quads[i] = null;\n }\n }", "private void clearEdgeLinks() {\n edges.clear();\n //keep whole tree to maintain its position when it is expanded (within scroll pane bounds)\n Node rootNode = nodes.get(0);\n VBox rootVBox = (VBox) rootNode.getContainerPane().getParent();\n rootVBox.layout();\n Bounds rootNodeChildrenVBoxBounds = rootNode.getChildrenVBox().getBoundsInLocal();\n rootVBox.setLayoutY(Math.abs(rootVBox.getLayoutY() - ((rootNodeChildrenVBoxBounds.getHeight()) - rootNode.getHeight()) / 2 + rootNode.getLayoutY()));\n rootVBox.layout();\n\n for (int i = 0; i < nodes.size(); i++) {\n Pane containerPane = nodes.get(i).getContainerPane();\n //reposition node to the center of its children\n ObservableList<javafx.scene.Node> genericNodes = nodes.get(i).getChildrenVBox().getChildren();\n if (!genericNodes.isEmpty()) {\n nodes.get(i).setLayoutY(((nodes.get(i).getChildrenVBox().getBoundsInLocal().getHeight()) - rootNode.getHeight()) / 2);\n }\n\n for (int j = 0; j < containerPane.getChildren().size(); j++) {\n if (containerPane.getChildren().get(j) instanceof Edge) {\n containerPane.getChildren().remove(j);\n j--;\n }\n }\n }\n redrawEdges(rootNode);\n }", "static public void testBlockedDelete(Path path, int clusterSize, int clusterCount,\n int allocatorType) throws IOException {\n startUp(path);\n\n try (final FATFileSystem ffs = FATFileSystem.create(path, clusterSize, clusterCount, allocatorType)) {\n final FATFolder container = ffs.getRoot().createFolder(\"container\");\n final Throwable problem[] = new Throwable[1];\n final Object started = new Object();\n Thread worker = new Thread(new Runnable() {\n @Override\n public void run() {\n try {\n FATFile context = container.createFile(\"context\");\n FATLock lock = context.getLock(false);\n synchronized (started) {\n started.notify();\n }\n try {\n Thread.sleep(300);\n } finally {\n lock.unlock();\n }\n } catch (Throwable r) {\n r.printStackTrace();\n }\n }\n });\n worker.start();\n\n synchronized (started) {\n try {\n started.wait();\n } catch (InterruptedException e) {\n //ok\n }\n }\n\n try {\n ffs.getRoot().deleteChildren();\n throw new Error(\"Locked delete\");\n } catch (FATFileLockedException ex) {\n //ok\n }\n\n try {\n worker.join();\n } catch (InterruptedException e) {\n //ok\n }\n }\n\n tearDown(path);\n }", "@Test\r\n void test_insert_two_vertice_with_one_edge_remove_edge() {\r\n // Add two vertices with one edge\r\n graph.addEdge(\"A\", \"B\");\r\n vertices = graph.getAllVertices();\r\n // B should be an adjacent vertex of A\r\n if(!graph.getAdjacentVerticesOf(\"A\").contains(\"B\")){\r\n fail();\r\n }\r\n //Check that A and B are in the graph\r\n if(!vertices.contains(\"A\") |!vertices.contains(\"B\")) {\r\n fail();\r\n }\r\n //There's one edge in the graph\r\n if(graph.size() != 1) {\r\n fail();\r\n }\r\n //Remove edge from A to B\r\n graph.removeEdge(\"A\", \"B\");\r\n // Check that A and B are still in the graph\r\n if(!vertices.contains(\"A\") |!vertices.contains(\"B\")) {\r\n fail();\r\n }\r\n // B should not be an adjacent vertex of \r\n if(graph.getAdjacentVerticesOf(\"A\").contains(\"B\")){\r\n fail();\r\n }\r\n // There are no more edges in the graph\r\n if(graph.size() != 0) {\r\n fail();\r\n }\r\n }", "private void clearNodes()\r\n\t{\r\n\t clearMetaInfo();\r\n\t nodeMap.clear();\r\n\t}", "void clear() {\n\t\t\tfor (int i = 0 ; i < nodes.length; i++) {\n\t\t\t\tnodes[i].clear((byte) 1);\n\t\t\t}\n\t\t\tsize = 0;\n\t\t}", "@Test(timeout = 30000)\n public void testRemoveOneVolume() throws IOException {\n final int numBlocks = 100;\n for (int i = 0; i < numBlocks; i++) {\n String bpid = BLOCK_POOL_IDS[numBlocks % BLOCK_POOL_IDS.length];\n ExtendedBlock eb = new ExtendedBlock(bpid, i);\n ReplicaHandler replica = null;\n try {\n replica = dataset.createRbw(StorageType.DEFAULT, null, eb,\n false);\n } finally {\n if (replica != null) {\n replica.close();\n }\n }\n }\n\n // Remove one volume\n final String[] dataDirs =\n conf.get(DFSConfigKeys.DFS_DATANODE_DATA_DIR_KEY).split(\",\");\n final String volumePathToRemove = dataDirs[0];\n Set<StorageLocation> volumesToRemove = new HashSet<>();\n volumesToRemove.add(StorageLocation.parse(volumePathToRemove));\n\n FsVolumeReferences volReferences = dataset.getFsVolumeReferences();\n FsVolumeImpl volumeToRemove = null;\n for (FsVolumeSpi vol: volReferences) {\n if (vol.getStorageLocation().equals(volumesToRemove.iterator().next())) {\n volumeToRemove = (FsVolumeImpl) vol;\n }\n }\n assertTrue(volumeToRemove != null);\n volReferences.close();\n dataset.removeVolumes(volumesToRemove, true);\n int expectedNumVolumes = dataDirs.length - 1;\n assertEquals(\"The volume has been removed from the volumeList.\",\n expectedNumVolumes, getNumVolumes());\n assertEquals(\"The volume has been removed from the storageMap.\",\n expectedNumVolumes, dataset.storageMap.size());\n\n // DataNode.notifyNamenodeDeletedBlock() should be called 50 times\n // as we deleted one volume that has 50 blocks\n verify(datanode, times(50))\n .notifyNamenodeDeletedBlock(any(), any());\n\n try {\n dataset.asyncDiskService.execute(volumeToRemove,\n new Runnable() {\n @Override\n public void run() {}\n });\n fail(\"Expect RuntimeException: the volume has been removed from the \"\n + \"AsyncDiskService.\");\n } catch (RuntimeException e) {\n GenericTestUtils.assertExceptionContains(\"Cannot find volume\", e);\n }\n\n int totalNumReplicas = 0;\n for (String bpid : dataset.volumeMap.getBlockPoolList()) {\n totalNumReplicas += dataset.volumeMap.size(bpid);\n }\n assertEquals(\"The replica infos on this volume has been removed from the \"\n + \"volumeMap.\", numBlocks / NUM_INIT_VOLUMES,\n totalNumReplicas);\n }" ]
[ "0.7278635", "0.599739", "0.5823925", "0.5739531", "0.5693812", "0.56821156", "0.56541276", "0.56407434", "0.56407434", "0.5627781", "0.56220406", "0.56177694", "0.56053716", "0.55546874", "0.55480355", "0.5509134", "0.5497742", "0.54974985", "0.5477809", "0.547051", "0.5465604", "0.54639775", "0.54613745", "0.54425347", "0.5439496", "0.54209006", "0.54126334", "0.5409045", "0.53976434", "0.537933", "0.53592175", "0.53490543", "0.5323151", "0.5311506", "0.52928287", "0.5288298", "0.52647877", "0.5261447", "0.5261096", "0.5253435", "0.52472603", "0.5237918", "0.5235159", "0.52273047", "0.52137876", "0.5209494", "0.51896375", "0.518678", "0.51584536", "0.51507473", "0.5127295", "0.51247627", "0.51246214", "0.51148856", "0.51143587", "0.51031727", "0.5101529", "0.50937384", "0.5093295", "0.5077624", "0.50661635", "0.50629854", "0.50615203", "0.50579005", "0.50512165", "0.50501597", "0.50322884", "0.5030382", "0.5028563", "0.50266874", "0.50232726", "0.5016785", "0.5014208", "0.50008196", "0.49989316", "0.4986915", "0.4977108", "0.4973243", "0.49600932", "0.49576622", "0.49569902", "0.49552354", "0.49451482", "0.49418274", "0.49416253", "0.49300024", "0.4926928", "0.4924688", "0.4915047", "0.49104834", "0.49075854", "0.4905512", "0.49041298", "0.489815", "0.489784", "0.48947", "0.48929024", "0.48918808", "0.48807862", "0.4875469" ]
0.7420185
0
This method attempts to create a small subgraph and then delete some of the nodes in that subgraph, all within the same batch operation.
@FixFor( "MODE-788" ) @Test public void shouldCreateSubgraphAndDeleteSubgraphInSameOperation() { graph.batch() .create("/a") .with(JcrLexicon.PRIMARY_TYPE, JcrNtLexicon.FOLDER) .orReplace() .and() .create("/a/b") .with(JcrLexicon.PRIMARY_TYPE, JcrNtLexicon.FOLDER) .orReplace() .and() .create("/a/b/c") .with(JcrLexicon.PRIMARY_TYPE, JcrNtLexicon.FOLDER) .orReplace() .and() .delete("/a") .and() .execute(); // Now look up node A ... assertTrue(testWorkspaceRoot.list().length == 0); assertFalse(new File(testWorkspaceRoot, "a").exists()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@FixFor( \"MODE-788\" )\n @Test\n public void shouldCreateSubgraphAndDeletePartOfThatSubgraphInSameOperation() {\n graph.batch()\n .create(\"/a\")\n .with(JcrLexicon.PRIMARY_TYPE, JcrNtLexicon.FOLDER)\n .orReplace()\n .and()\n .create(\"/a/b\")\n .with(JcrLexicon.PRIMARY_TYPE, JcrNtLexicon.FOLDER)\n .orReplace()\n .and()\n .create(\"/a/b/c\")\n .with(JcrLexicon.PRIMARY_TYPE, JcrNtLexicon.FOLDER)\n .orReplace()\n .and()\n .delete(\"/a/b\")\n .and()\n .execute();\n\n // Now look up node A ...\n File newFile = new File(testWorkspaceRoot, \"a\");\n assertTrue(newFile.exists());\n assertTrue(newFile.isDirectory());\n assertTrue(newFile.list().length == 0);\n assertFalse(new File(newFile, \"b\").exists());\n }", "@Override\n \t\t\t\tpublic void deleteGraph() throws TransformedGraphException {\n \n \t\t\t\t}", "private void clean() {\n // TODO: Your code here.\n for (Long id : vertices()) {\n if (adj.get(id).size() == 1) {\n adj.remove(id);\n }\n }\n }", "private void Clean(){\n \t NodeIterable nodeit = graphModel.getGraph().getNodes();\n \t\n \t for (Node node : nodeit) {\n\t\t\t\n \t\t \n \t\t \n\t\t}\n \t\n }", "@Test\r\n void insert_multiple_vertexes_and_edges_remove_vertex() {\r\n graph.addEdge(\"A\", \"B\");\r\n graph.addEdge(\"B\", \"C\");\r\n graph.addEdge(\"A\", \"C\");\r\n graph.addEdge(\"B\", \"D\");\r\n \r\n List<String> adjacent;\r\n vertices = graph.getAllVertices(); \r\n int numberOfEdges = graph.size();\r\n int numberOfVertices = graph.order();\r\n if(numberOfEdges != 4) {\r\n fail();\r\n }\r\n if(numberOfVertices != 4) {\r\n fail();\r\n }\r\n \r\n // Check that graph has all added vertexes\r\n if(!vertices.contains(\"A\")| !vertices.contains(\"B\")|\r\n !vertices.contains(\"C\")|!vertices.contains(\"D\")) {\r\n fail();\r\n }\r\n \r\n // Check that A's outgoing edges are correct\r\n adjacent = graph.getAdjacentVerticesOf(\"A\");\r\n if (!adjacent.contains(\"B\") || !adjacent.contains(\"C\"))\r\n fail();\r\n // Check that B's outgoing edges are correct\r\n adjacent = graph.getAdjacentVerticesOf(\"B\");\r\n if (!adjacent.contains(\"C\") | !adjacent.contains(\"D\"))\r\n fail(); \r\n // C and D have no out going edges \r\n adjacent = graph.getAdjacentVerticesOf(\"C\");\r\n if (!adjacent.isEmpty())\r\n fail(); \r\n adjacent = graph.getAdjacentVerticesOf(\"D\");\r\n if (!adjacent.isEmpty())\r\n fail(); \r\n // Remove B from the graph \r\n graph.removeVertex(\"B\");\r\n // Check that A's outgoing edges are correct\r\n // An edge to B should no exist any more \r\n adjacent = graph.getAdjacentVerticesOf(\"A\");\r\n if (adjacent.contains(\"B\") || !adjacent.contains(\"C\"))\r\n fail();\r\n // There should be no elements in the list of successors\r\n // of B since its deleted form the graph\r\n adjacent = graph.getAdjacentVerticesOf(\"B\");\r\n if (!adjacent.isEmpty())\r\n fail(); \r\n // Check that graph has still has all vertexes not removed\r\n if(!vertices.contains(\"A\")| !vertices.contains(\"C\")|\r\n !vertices.contains(\"D\")) {\r\n fail();\r\n }\r\n //Check that vertex B was removed from graph \r\n if(vertices.contains(\"B\")) {\r\n fail();\r\n }\r\n numberOfEdges = graph.size();\r\n numberOfVertices = graph.order();\r\n if(numberOfEdges != 1) {\r\n fail();\r\n }\r\n if(numberOfVertices != 3) {\r\n fail();\r\n }\r\n }", "public void delContextNodes();", "private PGraph testSubgraphBuilder(ILayoutProcessor subgraphBuilder, PGraph testGraph,\n int removeEdgeCount) {\n subgraphBuilder.process(testGraph);\n Object insertable_edges = testGraph.getProperty(Properties.INSERTABLE_EDGES);\n // checks also against null\n if (insertable_edges instanceof LinkedList) {\n @SuppressWarnings(\"unchecked\")\n LinkedList<PEdge> missingEdges = (LinkedList<PEdge>) insertable_edges;\n if (missingEdges.size() != removeEdgeCount) {\n fail(\"The planar subgraph builder should remove exactly \" + removeEdgeCount\n + \" edges, but does \" + missingEdges.size() + \".\");\n }\n } else {\n fail(\"The planar subgraph builder should remove exactly \" + removeEdgeCount\n + \" edges, but does \" + 0 + \".\");\n }\n return testGraph;\n }", "@Override\n\tpublic void deleteAllInBatch() {\n\t\t\n\t}", "@Override\n\tpublic void deleteAllInBatch() {\n\t\t\n\t}", "private void subdivide() {\n if (!hasChildren) {\n hasChildren = true;\n this.children = new QuadtreeNodeChildren(this);\n } else {\n return;\n }\n }", "@Override\r\n\tpublic void deleteAllInBatch() {\n\t\t\r\n\t}", "public void rebuild() {\n\t\tif (!divided) {\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tint totalChildren = 0;\n\t\tfor (QuadTreeNode<E> q : nodes) {\n\t\t\t// If there is a divided child then we cant do anything\n\t\t\tif (q.isDivided()) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\t\n\t\t\ttotalChildren += q.numPoints();\n\t\t}\n\t\t\n\t\t// If the sum of all the children contained in the sub nodes\n\t\t// is greater than allowed then we cant do anything\n\t\tif (totalChildren > QUADTREE_NODE_CAPACITY) {\n\t\t\treturn;\n\t\t}\n\t\t\n\t\t// Add all the nodes from the children to this node then remvoe the nodes\n\t\tpoints = new HashMap<Point, E>();\n\t\tfor (QuadTreeNode<E> q : nodes) {\n\t\t\tpoints.putAll(q.points);\n\t\t}\n\t\t\n\t\tnodes.clear();\n\t\tdivided = false;\n\t}", "void deleteSub();", "@Test\n void test06_removeEdge_checkSize() {\n graph.addVertex(\"c\");\n graph.addEdge(\"a\", \"b\");\n graph.addEdge(\"b\", \"c\"); // adds two edges\n graph.removeEdge(\"a\", \"b\"); // removes one of the edges\n if (graph.size() != 1) {\n fail(\"graph has counted incorrect number of edges\");\n }\n }", "public void freeNodes(){\n\t\t//android.util.Log.d(TAG,\"freeNodes()\");\n\t\tfinal int size = this.nodes.size();\n\t\tfor(int index=0; index < size; index++){\n\t\t\tthis.nodes.delete(this.nodes.keyAt(index));\n\t\t}\n\t}", "@Test\r\n void add_20_remove_20_add_20() {\r\n //Add 20\r\n for(int i = 0; i < 20; i++) {\r\n graph.addVertex(\"\" +i);\r\n }\r\n vertices = graph.getAllVertices();\r\n //Check all 20 are in graph\r\n for(int i = 0; i < 20; i++) {\r\n if(!vertices.contains(\"\" + i)) {\r\n fail();\r\n }\r\n }\r\n //Remove 20 \r\n for(int i = 0; i < 20; i++) {\r\n graph.removeVertex(\"\" +i);\r\n }\r\n //Check all 20 are not in graph anymore \r\n \r\n for(int i = 0; i < 20; i++) {\r\n if(vertices.contains(\"\" + i)) {\r\n fail();\r\n }\r\n }\r\n //Add 20 again\r\n for(int i = 0; i < 20; i++) {\r\n graph.addVertex(\"\" +i);\r\n }\r\n //Check all 20 are in graph\r\n for(int i = 0; i < 20; i++) {\r\n if(!vertices.contains(\"\" + i)) {\r\n fail();\r\n }\r\n }\r\n }", "public final void clean() {\n distributed_graph.unpersist(true);\n }", "public void testRemoveVertex() {\n System.out.println(\"removeVertex\");\n\n Graph<Integer, Edge<Integer>> graph = generateGraph();\n for (int i = 24; i >= 0; i--) {\n Assert.assertTrue(graph.removeVertex(new Integer(i)));\n Assert.assertFalse(graph.containsVertex(new Integer(i)));\n Assert.assertEquals(graph.verticesSet().size(), i);\n }\n }", "@Test\r\n void test_insert_edges_remove_edges_check_size() {\r\n // Add two vertices with one edge\r\n graph.addEdge(\"A\", \"B\");\r\n graph.addEdge(\"A\", \"C\");\r\n graph.addEdge(\"A\", \"D\");\r\n graph.addEdge(\"A\", \"E\");\r\n\r\n // There are no more edges in the graph\r\n if(graph.size() != 4) {\r\n fail();\r\n }\r\n graph.removeEdge(\"A\", \"B\");\r\n graph.removeEdge(\"A\", \"C\");\r\n graph.removeEdge(\"A\", \"D\");\r\n graph.removeEdge(\"A\", \"E\");\r\n if(graph.size() != 0) {\r\n fail();\r\n }\r\n graph.addEdge(\"A\", \"B\");\r\n graph.addEdge(\"A\", \"C\");\r\n graph.addEdge(\"A\", \"D\");\r\n graph.addEdge(\"A\", \"E\");\r\n if(graph.size() != 4) {\r\n fail();\r\n }\r\n }", "@DisplayName(\"Delete directed edges\")\n @Test\n public void testDeleteEdgeDirected() {\n boolean directed1 = true;\n graph = new Graph(edges, directed1, 0, 5, GraphType.RANDOM);\n graph.deleteEdge(new Edge(0, 1));\n Assertions.assertTrue(graph.getNeighbours(0).isEmpty());\n }", "public void clearSubbedTiles() { subbedTiles.clear(); }", "@objid (\"808c0839-1dec-11e2-8cad-001ec947c8cc\")\n @Override\n public void delete() {\n // List children from the end to avoid reordering of the other GMs\n for (int i = this.children.size() - 1; i >= 0; i--) {\n GmNodeModel child = this.children.get(i);\n child.delete();\n \n // When several elements have been deleted consecutively, fix the next index\n if (i > this.children.size()) {\n i = this.children.size();\n }\n }\n \n assert (this.children.isEmpty()) : \"All children should have been deleted:\" + this.children;\n \n super.delete();\n }", "public static void testTreeDelete()\n {\n ArrayList<Tree<String>> treelist = new ArrayList<Tree<String>>();\n treelist.add(new BinaryTree<String>());\n treelist.add(new AVLTree<String>());\n treelist.add(new RBTree<String>());\n treelist.add(new SplayTree<String>());\n\n System.out.println(\"Start TreeDelete test\");\n for(Tree<String> t : treelist)\n {\n\n try\n {\n RobotRunner.loadDictionaryIntoTree(\"newDutch.dic\", t);\n// RobotRunner.loadDictionaryIntoTree(\"smallDutch.dic\", t);\n// RobotRunner.loadDictionaryIntoTree(\"Dutch.dic\", t); //Won't work with BinaryTree and SplayTree, too many items == StackOverflow\n// RobotRunner.loadDictionaryIntoTree(\"dict.txt\", t); //Won't work with BinaryTree and SplayTree, too many items == StackOverflow\n }\n catch(IOException e)\n {\n System.out.println(e);\n }\n System.out.println(\"\\nStart Testcase\");\n\n SystemAnalyser.start();\n t.delete(\"aanklotsten\");\n SystemAnalyser.stop();\n\n SystemAnalyser.printPerformance();\n\n System.out.println(\"Stop Testcase\\n\");\n }\n System.out.println(\"Values after test.\");\n SystemAnalyser.printSomeTestValues();\n }", "@DisplayName(\"Delete undirected edges\")\n @Test\n public void testDeleteEdgeUndirected() {\n graph.deleteEdge(new Edge(0, 1));\n Assertions.assertEquals(1, graph.getNeighbours(0).size());\n Assertions.assertEquals(1, graph.getNeighbours(1).size());\n }", "public void deleteSelected() {\r\n \t\tObject cells[] = graph.getSelectionCells();\r\n \t\tGraphModel graphmodel = graph.getModel();\r\n \r\n \t\t// If a cell is a blocking region avoid removing its edges and\r\n \t\t// select its element at the end of the removal process\r\n \t\tSet edges = new HashSet();\r\n \t\tSet<Object> select = new HashSet<Object>();\r\n \r\n \t\t// Set with all regions that can be deleted as its child were removed\r\n \t\tSet<Object> regions = new HashSet<Object>();\r\n \t\t// Set with all JmtCells that we are removing\r\n \t\tSet<Object> jmtCells = new HashSet<Object>();\r\n \r\n \t\t// Giuseppe De Cicco & Fabio Granara\r\n \t\t// for(int k=0; k<cells.length; k++){\r\n \t\t// if(cells[k] instanceof JmtEdge){\r\n \t\t// ((JmtCell)(graphmodel.getParent(graphmodel.getSource((JmtEdge)cells[k])))).SubOut();\r\n \t\t// ((JmtCell)(graphmodel.getParent(graphmodel.getTarget((JmtEdge)cells[k])))).SubIn();\r\n \t\t// }\r\n \t\t//\r\n \t\t// }\r\n \t\tfor (int i = 0; i < cells.length; i++) {\r\n \t\t\tif (!(cells[i] instanceof BlockingRegion)) {\r\n \t\t\t\t// Adds edge for removal\r\n \t\t\t\tedges.addAll(DefaultGraphModel.getEdges(graphmodel, new Object[] { cells[i] }));\r\n \t\t\t\t// Giuseppe De Cicco & Fabio Granara\r\n \t\t\t\t// quando vado a eliminare un nodo, a cui collegato un arco,\r\n \t\t\t\t// vado ad incrementare o diminuire il contatore per il\r\n \t\t\t\t// pulsanteAGGIUSTATUTTO\r\n \t\t\t\t// Iterator iter = edges.iterator();\r\n \t\t\t\t// while (iter.hasNext()) {\r\n \t\t\t\t// Object next = iter.next();\r\n \t\t\t\t// if (next instanceof JmtEdge){\r\n \t\t\t\t// ((JmtCell)(graphmodel.getParent(graphmodel.getSource((JmtEdge)next)))).SubOut();\r\n \t\t\t\t// ((JmtCell)(graphmodel.getParent(graphmodel.getTarget((JmtEdge)next)))).SubIn();\r\n \t\t\t\t// }\r\n \t\t\t\t//\r\n \t\t\t\t// }\r\n \t\t\t\t// Stores parents information and cell\r\n \t\t\t\tif (cells[i] instanceof JmtCell) {\r\n \t\t\t\t\tif (((JmtCell) cells[i]).getParent() instanceof BlockingRegion) {\r\n \t\t\t\t\t\tregions.add(((JmtCell) cells[i]).getParent());\r\n \t\t\t\t\t}\r\n \t\t\t\t\tjmtCells.add(cells[i]);\r\n \t\t\t\t}\r\n \t\t\t} else {\r\n \t\t\t\t// Adds node for selection\r\n \t\t\t\tObject[] nodes = graph.getDescendants(new Object[] { cells[i] });\r\n \t\t\t\tfor (Object node : nodes) {\r\n \t\t\t\t\tif (node instanceof JmtCell || node instanceof JmtEdge) {\r\n \t\t\t\t\t\tselect.add(node);\r\n \t\t\t\t\t}\r\n \t\t\t\t}\r\n \t\t\t\t// Removes blocking region from data structure\r\n \t\t\t\tmodel.deleteBlockingRegion(((BlockingRegion) cells[i]).getKey());\r\n \t\t\t}\r\n \t\t}\r\n \r\n \t\tif (!edges.isEmpty()) {\r\n \t\t\tgraphmodel.remove(edges.toArray());\r\n \t\t}\r\n \t\t// removes cells from graph\r\n \t\tgraphmodel.remove(cells);\r\n \r\n \t\t// Checks if all children of a blocking region have been removed\r\n \t\tIterator<Object> it = regions.iterator();\r\n \t\twhile (it.hasNext()) {\r\n \t\t\tjmtCells.add(null);\r\n \t\t\tBlockingRegion region = (BlockingRegion) it.next();\r\n \t\t\tList child = region.getChildren();\r\n \t\t\tboolean empty = true;\r\n \t\t\tfor (int i = 0; i < child.size(); i++) {\r\n \t\t\t\tif (child.get(i) instanceof JmtCell && !jmtCells.contains(child.get(i))) {\r\n \t\t\t\t\tempty = false;\r\n \t\t\t\t\tbreak;\r\n \t\t\t\t}\r\n \t\t\t}\r\n \t\t\tif (empty) {\r\n \t\t\t\tmodel.deleteBlockingRegion(region.getKey());\r\n \t\t\t\tgraphmodel.remove(new Object[] { region });\r\n \t\t\t}\r\n \t\t}\r\n \r\n \t\t// Removes cells from data structure\r\n \t\tfor (Object cell : cells) {\r\n \t\t\tif (cell instanceof JmtCell) {\r\n \t\t\t\tmodel.deleteStation(((CellComponent) ((JmtCell) cell).getUserObject()).getKey());\r\n \t\t\t} else if (cell instanceof JmtEdge) {\r\n \t\t\t\tJmtEdge link = (JmtEdge) cell;\r\n \t\t\t\tmodel.setConnected(link.getSourceKey(), link.getTargetKey(), false);\r\n \t\t\t}\r\n \t\t}\r\n \r\n \t\t// If no stations remains gray select and link buttons\r\n \t\tif (graph.getModel().getRootCount() == 0) {\r\n \t\t\tcomponentBar.clearButtonGroupSelection(0);\r\n \t\t\tsetConnect.setEnabled(false);\r\n \t\t\tsetSelect.setEnabled(false);\r\n \t\t}\r\n \r\n \t\t// Selects components from removed blocking regions\r\n \t\tif (select.size() > 0) {\r\n \t\t\tgraph.setSelectionCells(select.toArray());\r\n \t\t\t// Resets parent information of cells that changed parent\r\n \t\t\tit = select.iterator();\r\n \t\t\twhile (it.hasNext()) {\r\n \t\t\t\tObject next = it.next();\r\n \t\t\t\tif (next instanceof JmtCell) {\r\n \t\t\t\t\t((JmtCell) next).resetParent();\r\n \t\t\t\t}\r\n \t\t\t}\r\n \t\t}\r\n \t}", "public void testRemoveAllVertices() {\n System.out.println(\"removeAllVertices\");\n\n Graph<Integer, Edge<Integer>> graph = generateGraph();\n Assert.assertTrue(graph.removeAllVertices());\n Assert.assertEquals(graph.verticesSet().size(), 0);\n }", "@DELETE\n\t@Produces(\"application/json\")\n\tpublic Response deleteGraphNodes() {\n\t\tcurrentGraph.getNodes().clear();\n\t\t\treturn Response.status(200)\n\t\t\t\t\t.entity(DB.grafos)\n\t\t\t\t\t.build();\n\t}", "@Test\n void test02_removeVertex() {\n graph.addVertex(\"a\");\n graph.addVertex(\"b\"); // adds two\n graph.removeVertex(\"a\"); // remove\n\n Set<String> vertices = new LinkedHashSet<>();\n vertices.add(\"a\");\n vertices.add(\"b\");\n vertices.remove(\"a\"); // creates a mock up vertex list\n\n if (!graph.getAllVertices().equals(vertices)) {\n fail(\"Graph didn't remove the vertices correctly\");\n }\n }", "public void subdivide() {\n\t\tif (!divided) {\n\t\t\tdivided = true;\n\t\t\t\n\t\t\t// Calculate the width and height of the sub nodes\n\t\t\tint width = (int) Math.ceil(boundary.width/2.0) + 1;\n\t\t\tint height = (int) Math.ceil(boundary.height/2.0) + 1;\n\t\t\t\n\t\t\t// Create ArrayList for the nodes and insert them\n\t\t\tnodes = new ArrayList<QuadTreeNode<E>>();\n\t\t\t\n\t\t\tnodes.add(new QuadTreeNode<E>(boundary.x, boundary.y, height, width));\n\t\t\tnodes.add(new QuadTreeNode<E>(boundary.x + width, boundary.y, height, width));\n\t\t\tnodes.add(new QuadTreeNode<E>(boundary.x, boundary.y + height, height, width));\n\t\t\tnodes.add(new QuadTreeNode<E>(boundary.x + width, boundary.y + height, height, width));\n\t\t\t\n\t\t\t// Take all the points and insert them into the best sub node\n\t\t\tfor (Point p : points.keySet()) {\n\t\t\t\tQuadTreeNode<E> q = this.getBestQuad(p);\n\t\t\t\tq.add(p, points.get(p));\n\t\t\t}\n\t\t\t\n\t\t\tpoints = null;\n\t\t}\n\t}", "private void subDivideNode() {\n setOriginNode();\n _subdivided = true;\n _northWest = new QuadTree<Point>(getView(), _transitionSize);\n _northEast = new QuadTree<Point>(getView(), _transitionSize);\n _southWest = new QuadTree<Point>(getView(), _transitionSize);\n _southEast = new QuadTree<Point>(getView(), _transitionSize);\n Iterator<Point> it = _elements.iterator();\n while (it.hasNext()) {\n Point p = it.next();\n QuadTree<Point> qt = quadrant(p);\n qt.add(p);\n }\n _elements = null;\n _elementsSize = 0;\n }", "public synchronized void cleanup() {\n\t\t// by freeing the mother group we clean up all the nodes we've created\n\t\t// on the SC server\n\t\tsendMessage(\"/g_freeAll\", new Object[] { _motherGroupID });\n\t\tfreeNode(_motherGroupID);\n\t\tfreeAllBuffers();\n\t\t\n\t\t//reset the lists of sound nodes, nodeIds, busses, etc\n\t\tSoundNode sn;\n\t\tEnumeration<SoundNode> e = _soundNodes.elements();\n\t\twhile (e.hasMoreElements()) {\n\t\t\tsn = e.nextElement();\n\t\t\tsn.setAlive(false);\n\t\t}\n\t\t_soundNodes.clear();\n\t\t_nodeIdList.clear();\n\t\t_busList.clear();\n\t\t_bufferMap.clear();\n\t}", "@Test\n public void normal_recursive_delete_OData_collection() {\n String collectionName = \"deleteOdata\";\n String entityType = \"deleteEntType\";\n String accept = \"application/xml\";\n String complexTypeName = \"deleteComplexType\";\n String complexTypePropertyName = \"deleteComplexTypeProperty\";\n\n try {\n // Create collection.\n DavResourceUtils.createODataCollection(TOKEN, HttpStatus.SC_CREATED, Setup.TEST_CELL1, Setup.TEST_BOX1,\n collectionName);\n // Create entity type.\n Http.request(\"box/entitySet-post.txt\")\n .with(\"cellPath\", Setup.TEST_CELL1)\n .with(\"boxPath\", Setup.TEST_BOX1)\n .with(\"odataSvcPath\", collectionName)\n .with(\"token\", \"Bearer \" + TOKEN)\n .with(\"accept\", accept)\n .with(\"Name\", entityType)\n .returns()\n .statusCode(HttpStatus.SC_CREATED);\n // Create complex type.\n ComplexTypeUtils.create(Setup.TEST_CELL1, Setup.TEST_BOX1,\n collectionName, complexTypeName, HttpStatus.SC_CREATED);\n // Create complex type property.\n ComplexTypePropertyUtils.create(Setup.TEST_CELL1, Setup.TEST_BOX1, collectionName, complexTypePropertyName,\n complexTypeName, \"Edm.String\", HttpStatus.SC_CREATED);\n\n // Recursive delete collection.\n deleteRecursive(collectionName, \"true\", HttpStatus.SC_NO_CONTENT);\n } finally {\n deleteRecursive(collectionName, \"true\", -1);\n }\n }", "void forceRemoveNodesAndExit(Collection<Node> nodesToRemove) throws Exception;", "private static <N, E extends Edge<N>> ImmutableAdjacencyGraph<N, Edge<N>> deleteFromGraph(final Graph<N, E> graph, final Set<N> deleteNodes, final Set<E> deleteEdges)\n\t{\n\t\t// remove the deleteNodes\n\t\tfinal Set<N> cutNodes = graph.getNodes();\n\t\tcutNodes.removeAll(deleteNodes);\n\t\t// remove the deleteEdges\n\t\tfinal Set<Edge<N>> cutEdges = new HashSet<Edge<N>>(deleteEdges);\n\t\tfor (final E edge : deleteEdges)\n\t\t\tcutEdges.remove(edge);\n\t\t// remove any remaining deleteEdges which connect to removed deleteNodes\n\t\t// also replace deleteEdges that have one removed node but still have\n\t\t// 2 or more remaining deleteNodes with a new edge.\n\t\tfinal Set<Edge<N>> removeEdges = new HashSet<Edge<N>>();\n\t\tfinal Set<Edge<N>> addEdges = new HashSet<Edge<N>>();\n\t\tfor(final Edge<N> cutEdge : cutEdges)\n\t\t{\n\t\t\tfinal List<N> cutEdgeNeighbors = cutEdge.getNodes();\n\t\t\tcutEdgeNeighbors.removeAll(cutNodes);\n\t\t\tif( cutEdgeNeighbors.size() != cutEdge.getNodes().size() )\n\t\t\t\tremoveEdges.add(cutEdge);\n\t\t\tif( cutEdgeNeighbors.size() > 1 )\n\t\t\t\t// TODO instead of ImmutableHyperEdge implement clone or something\n\t\t\t\taddEdges.add(new ImmutableHyperEdge<N>(cutEdgeNeighbors));\n\t\t}\n\t\tfor(final Edge<N> removeEdge : removeEdges)\n\t\t\tcutEdges.remove(removeEdge);\n\t\tcutEdges.addAll(addEdges);\n\t\t// check if a graph from the new set of deleteEdges and deleteNodes is\n\t\t// still connected\n\t\treturn new ImmutableAdjacencyGraph<N, Edge<N>>(cutNodes, cutEdges);\n\t}", "@Test\n public void run() throws Exception {\n BranchName main = BranchName.of(\"main\");\n\n // create an old commit referencing both unique and non-unique assets.\n //The unique asset should be identified by the gc policy below since they are older than 1 day.\n store.setOverride(FIVE_DAYS_IN_PAST_MICROS);\n commit().put(\"k1\", new DummyValue().add(-3).add(0).add(100)).withMetadata(\"cOld\").toBranch(main);\n\n // work beyond slop but within gc allowed age.\n store.setOverride(TWO_HOURS_IN_PAST_MICROS);\n // create commits that have time-valid assets. Create more commits than ParentList.MAX_PARENT_LIST to confirm recursion.\n for (int i = 0; i < 55; i++) {\n commit().put(\"k1\", new DummyValue().add(i).add(i + 100)).withMetadata(\"c2\").toBranch(main);\n }\n\n // create a new branch, commit two assets, then delete the branch.\n BranchName toBeDeleted = BranchName.of(\"toBeDeleted\");\n versionStore.create(toBeDeleted, Optional.empty());\n Hash h = commit().put(\"k1\", new DummyValue().add(-1).add(-2)).withMetadata(\"c1\").toBranch(toBeDeleted);\n versionStore.delete(toBeDeleted, Optional.of(h));\n\n store.clearOverride();\n {\n // Create a dangling value to ensure that the slop factor avoids deletion of the assets of this otherwise dangling value.\n save(TimeUnit.MILLISECONDS.toMicros(System.currentTimeMillis()), new DummyValue().add(-50).add(-51));\n\n // create a dangling value that should be cleaned up.\n save(TimeUnit.MILLISECONDS.toMicros(System.currentTimeMillis()) - TimeUnit.DAYS.toMicros(2), new DummyValue().add(-60).add(-61));\n }\n\n SparkSession spark = SparkSession\n .builder()\n .appName(\"test-nessie-gc-collection\")\n .master(\"local[2]\")\n .getOrCreate();\n\n // now confirm that the unreferenced assets are marked for deletion. These are found based\n // on the no-longer referenced commit as well as the old commit.\n GcOptions options = ImmutableGcOptions.builder()\n .bloomFilterCapacity(10_000_000)\n .maxAgeMicros(ONE_DAY_OLD_MICROS)\n .timeSlopMicros(ONE_HOUR_OLD_MICROS)\n .build();\n IdentifyUnreferencedAssets<DummyValue> app = new IdentifyUnreferencedAssets<DummyValue>(helper, new DynamoSupplier(), spark, options);\n Dataset<UnreferencedItem> items = app.identify();\n Set<String> unreferencedItems = items.collectAsList().stream().map(UnreferencedItem::getName).collect(Collectors.toSet());\n assertThat(unreferencedItems, containsInAnyOrder(\"-1\", \"-2\", \"-3\", \"-60\", \"-61\"));\n }", "private void clean() {\n Iterable<Long> v = vertices();\n Iterator<Long> iter = v.iterator();\n while (iter.hasNext()) {\n Long n = iter.next();\n if (world.get(n).adj.size() == 0) {\n iter.remove();\n }\n }\n }", "@Test public void testPublic9() {\n Graph<Character> graph= TestGraphs.testGraph3();\n char[] toRemove= {'I', 'H', 'B', 'J', 'C', 'G', 'E', 'F'};\n int i;\n\n for (i= 0; i < toRemove.length; i++) {\n graph.removeVertex(toRemove[i]);\n assertFalse(graph.hasVertex(toRemove[i]));\n }\n }", "private void DropEverything() throws isisicatclient.IcatException_Exception {\n List<Object> allGroupsResults = port.search(sessionId, \"Grouping\");\r\n List tempGroups = allGroupsResults;\r\n List<EntityBaseBean> allGroups = (List<EntityBaseBean>) tempGroups;\r\n port.deleteMany(sessionId, allGroups);\r\n\r\n //Drop all rules\r\n List<Object> allRulesResults = port.search(sessionId, \"Rule\");\r\n List tempRules = allRulesResults;\r\n List<EntityBaseBean> allRules = (List<EntityBaseBean>) tempRules;\r\n port.deleteMany(sessionId, allRules);\r\n\r\n //Drop all public steps\r\n List<Object> allPublicStepResults = port.search(sessionId, \"PublicStep\");\r\n List tempPublicSteps = allPublicStepResults;\r\n List<EntityBaseBean> allPublicSteps = (List<EntityBaseBean>) tempPublicSteps;\r\n port.deleteMany(sessionId, allPublicSteps);\r\n }", "protected void removeFromAllSubsets()\r\n {\n if (!m_subsets.isEmpty()) {\r\n List<SubsetImpl> tmp = new ArrayList<SubsetImpl>(m_subsets);\r\n m_subsets.clear();\r\n tmp.forEach(r -> {if (r != null) r.remove(this);});\r\n }\r\n }", "public abstract boolean deleteOrphans();", "@Test\n public void testInMemoryParentCleanup()\n throws IOException, InterruptedException, ExecutionException {\n HMaster master = TEST_UTIL.getHBaseCluster().getMaster();\n final AssignmentManager am = master.getAssignmentManager();\n final ServerManager sm = master.getServerManager();\n\n Admin admin = TEST_UTIL.getAdmin();\n admin.catalogJanitorSwitch(false);\n\n final TableName tableName = name.getTableName();\n Table t = TEST_UTIL.createTable(tableName, FAMILY);\n TEST_UTIL.loadTable(t, FAMILY, false);\n\n RegionLocator locator = TEST_UTIL.getConnection().getRegionLocator(tableName);\n List<HRegionLocation> allRegionLocations = locator.getAllRegionLocations();\n\n // We need to create a valid split with daughter regions\n HRegionLocation parent = allRegionLocations.get(0);\n List<HRegionLocation> daughters = splitRegion(parent.getRegion());\n LOG.info(\"Parent region: \" + parent);\n LOG.info(\"Daughter regions: \" + daughters);\n assertNotNull(\"Should have found daughter regions for \" + parent, daughters);\n\n assertTrue(\"Parent region should exist in RegionStates\",\n am.getRegionStates().isRegionInRegionStates(parent.getRegion()));\n assertTrue(\"Parent region should exist in ServerManager\",\n sm.isRegionInServerManagerStates(parent.getRegion()));\n\n // clean the parent\n Result r = MetaMockingUtil.getMetaTableRowResult(parent.getRegion(), null,\n daughters.get(0).getRegion(), daughters.get(1).getRegion());\n CatalogJanitor.cleanParent(master, parent.getRegion(), r);\n\n // wait for procedures to complete\n Waiter.waitFor(TEST_UTIL.getConfiguration(), 10 * 1000, new Waiter.Predicate<Exception>() {\n @Override\n public boolean evaluate() throws Exception {\n ProcedureExecutor<MasterProcedureEnv> pe = master.getMasterProcedureExecutor();\n for (Procedure<MasterProcedureEnv> proc : pe.getProcedures()) {\n if (proc.getClass().isAssignableFrom(GCRegionProcedure.class) && proc.isFinished()) {\n return true;\n }\n }\n return false;\n }\n });\n\n assertFalse(\"Parent region should have been removed from RegionStates\",\n am.getRegionStates().isRegionInRegionStates(parent.getRegion()));\n assertFalse(\"Parent region should have been removed from ServerManager\",\n sm.isRegionInServerManagerStates(parent.getRegion()));\n\n }", "public void clear(){\n this.entities.clear();\n /*for(QuadTree node: this.getNodes()){\n node.clear();\n this.getNodes().remove(node);\n }*/\n this.nodes.clear();\n }", "public void RecursiveExpansion() throws TreeTooBigException {\r\n int transIndex; //Index to count transitions\r\n int[] newMarkup; //markup used to create new node\r\n boolean aTransitionIsEnabled = false; //To check for deadlock\r\n //Attribute used for assessing whether a node has occured before\r\n boolean repeatedNode = false; \r\n \r\n boolean allOmegas = false;\r\n \r\n boolean[] enabledTransitions = \r\n tree.dataLayer.getTransitionEnabledStatusArray(markup);\r\n\r\n //For each transition\r\n for (int i = 0; i < enabledTransitions.length; i++) {\r\n if (enabledTransitions[i] == true) {\r\n //Set transArray of to true for this index\r\n transArray[i] = true;\r\n \r\n //System.out.println(\"\\n Transition \" + i + \" Enabled\" );\r\n aTransitionIsEnabled = true;\r\n \r\n //print (\"\\n Old Markup is :\", markup);//debug\r\n \r\n //Fire transition to produce new markup vector\r\n newMarkup = fire(i);\r\n \r\n //print (\"\\n New Markup is :\", newMarkup);//debug\r\n \r\n //Check for safeness. If any of places have > 1 token set variable.\r\n for (int j = 0; j < newMarkup.length; j++) {\r\n if (newMarkup[j] > 1 || newMarkup[j] == -1) {\r\n tree.moreThanOneToken = true;\r\n break;\r\n }\r\n } \r\n \r\n //Create a new node using the new markup vector and attach it to\r\n //the current node as a child.\r\n children[i] = \r\n new myNode(newMarkup, this, tree, depth + 1);\r\n \r\n /* Now need to (a) check if any omegas (represented by -1) need to \r\n * be inserted in the markup vector of the new node, and (b) if the \r\n * resulting markup vector has appeared anywhere else in the tree. \r\n * We must do (a) before (b) as we need to know if the new node \r\n * contains any omegas to be able to compare it with existing nodes. \r\n */ \r\n allOmegas = children[i].InsertOmegas();\r\n \r\n //check if the resulting markup vector has occured anywhere else in the tree\r\n repeatedNode = (tree.root).FindMarkup(children[i]);\r\n \r\n if (tree.nodeCount >= Pipe.MAX_NODES && !tree.tooBig) {\r\n tree.tooBig = true;\r\n throw new TreeTooBigException();\r\n }\r\n \r\n if (!repeatedNode && !allOmegas) {\r\n children[i].RecursiveExpansion();\r\n }\r\n }\r\n }\r\n \r\n if (!aTransitionIsEnabled) {\r\n System.err.println(\"No transition enabled\");\r\n if (!tree.noEnabledTransitions || tree.pathToDeadlock.length < depth-1) {\r\n RecordDeadlockPath();\r\n tree.noEnabledTransitions = true;\r\n } else {\r\n System.err.println(\"Deadlocked node found, but path is not shorter\"\r\n + \" than current path.\");\r\n }\r\n } else {\r\n //System.out.println(\"Transitions enabled.\");\r\n }\r\n }", "public void cutNode ()\n {\n copyNode();\n deleteNode();\n }", "abstract public void deleteAfterBetaReduction();", "public void testRemoveAllEdges() {\n System.out.println(\"removeAllEdges\");\n\n Graph<Integer, Edge<Integer>> graph = generateGraph();\n Assert.assertTrue(graph.removeAllEdges());\n Assert.assertEquals(graph.edgesSet().size(), 0);\n }", "public void deallocateNode(){\n this.processId = NO_PROCESS;\n this.full = false;\n }", "int delete(Subdivision subdivision);", "void shutdownMassiveGraph();", "public native VertexList removeSubList(VertexNode a, VertexNode b);", "private void split(){\n // Slice horizontaly to get sub nodes width\n float subWidth = this.getBounds().width / 2;\n // Slice vertically to get sub nodes height\n float subHeight = this.getBounds().height / 2;\n float x = this.getBounds().x;\n float y = this.getBounds().y;\n int newLevel = this.level + 1;\n\n // Create the 4 nodes\n this.getNodes().add(0, new QuadTree(newLevel, new Rectangle(x + subWidth, y, subWidth, subHeight)));\n this.getNodes().add(1, new QuadTree(newLevel, new Rectangle(x, y, subWidth, subHeight)));\n this.getNodes().add(2, new QuadTree(newLevel, new Rectangle(x, y + subHeight, subWidth, subHeight)));\n this.getNodes().add(3, new QuadTree(newLevel, new Rectangle(x + subWidth, y + subHeight, subWidth, subHeight)));\n\n }", "@Test\n public void deleteProcessInstanceAlsoDeleteChildrenProcesses() throws Exception {\n final String simpleStepName = \"simpleStep\";\n final ProcessDefinition simpleProcess = deployAndEnableSimpleProcess(\"simpleProcess\", simpleStepName);\n processDefinitions.add(simpleProcess); // To clean in the end\n\n // deploy a process P2 containing a call activity calling P1\n final String intermediateStepName = \"intermediateStep1\";\n final String intermediateCallActivityName = \"intermediateCall\";\n final ProcessDefinition intermediateProcess = deployAndEnableProcessWithCallActivity(\"intermediateProcess\", simpleProcess.getName(),\n intermediateStepName, intermediateCallActivityName);\n processDefinitions.add(intermediateProcess); // To clean in the end\n\n // deploy a process P3 containing a call activity calling P2\n final String rootStepName = \"rootStep1\";\n final String rootCallActivityName = \"rootCall\";\n final ProcessDefinition rootProcess = deployAndEnableProcessWithCallActivity(\"rootProcess\", intermediateProcess.getName(), rootStepName,\n rootCallActivityName);\n processDefinitions.add(rootProcess); // To clean in the end\n\n // start P3, the call activities will start instances of P2 a and P1\n final ProcessInstance rootProcessInstance = getProcessAPI().startProcess(rootProcess.getId());\n waitForUserTask(rootProcessInstance, simpleStepName);\n\n // check that the instances of p1, p2 and p3 were created\n List<ProcessInstance> processInstances = getProcessAPI().getProcessInstances(0, 10, ProcessInstanceCriterion.NAME_ASC);\n assertEquals(3, processInstances.size());\n\n // check that archived flow nodes\n List<ArchivedActivityInstance> taskInstances = getProcessAPI().getArchivedActivityInstances(rootProcessInstance.getId(), 0, 100,\n ActivityInstanceCriterion.DEFAULT);\n assertTrue(taskInstances.size() > 0);\n\n // delete the root process instance\n getProcessAPI().deleteProcessInstance(rootProcessInstance.getId());\n\n // check that the instances of p1 and p2 were deleted\n processInstances = getProcessAPI().getProcessInstances(0, 10, ProcessInstanceCriterion.NAME_ASC);\n assertEquals(0, processInstances.size());\n\n // check that archived flow nodes were not deleted.\n taskInstances = getProcessAPI().getArchivedActivityInstances(rootProcessInstance.getId(), 0, 100, ActivityInstanceCriterion.DEFAULT);\n assertEquals(0, taskInstances.size());\n }", "private void clean() {\n nodesToRemove.clear();\n edgesToRemove.clear();\n }", "private void removeNoMoreExistingOriginalNodes() {\n for (Node mirrorNode : mirrorGraph.nodes()) {\n if (!isPartOfMirrorEdge(mirrorNode) && !originalGraph.has(mirrorNode)) {\n mirrorGraph.remove(mirrorNode);\n }\n }\n }", "@Test\r\n void test_insert_two_vertice_with_one_edge_remove_non_existent_edge() {\r\n // Add three vertices with two edges\r\n graph.addEdge(\"A\", \"B\");\r\n graph.addEdge(\"B\", \"C\");\r\n vertices = graph.getAllVertices();\r\n // B should be an adjacent vertex of A\r\n if(!graph.getAdjacentVerticesOf(\"A\").contains(\"B\")){\r\n fail();\r\n }\r\n // C should be an adjacent vertex of B\r\n if(!graph.getAdjacentVerticesOf(\"B\").contains(\"C\")){\r\n fail();\r\n }\r\n //Check that A,B and C are in the graph\r\n if(!vertices.contains(\"A\") |!vertices.contains(\"B\")\r\n | !vertices.contains(\"C\")) {\r\n fail();\r\n }\r\n // There are two edges in the graph\r\n if(graph.size() != 2) {\r\n fail();\r\n }\r\n // Try are remove edge from A to C\r\n graph.removeEdge(\"A\", \"C\");\r\n graph.removeEdge(\"A\", \"D\");\r\n graph.removeEdge(\"E\", \"F\");\r\n graph.removeEdge(null, \"A\");\r\n graph.removeEdge(\"A\", null);\r\n //Graph should maintain its original shape\r\n if(!graph.getAdjacentVerticesOf(\"A\").contains(\"B\")){\r\n fail();\r\n }\r\n // C should be an adjacent vertex of B\r\n if(!graph.getAdjacentVerticesOf(\"B\").contains(\"C\")){\r\n fail();\r\n }\r\n //Check that A,B and C are in the graph\r\n if(!vertices.contains(\"A\") |!vertices.contains(\"B\")\r\n | !vertices.contains(\"C\")) {\r\n fail();\r\n }\r\n // There are two edges in the graph\r\n if(graph.size() != 2) {\r\n fail();\r\n }\r\n }", "protected void enlarge ()\n {\n // The new capacity of the graph\n int newLength = 1 + vertices.length + ENLARGE_VALUE * vertices.length / 100;\n\n E[] newVertices = (E[]) new Object[newLength];\n Node[] newAdjacencySequences = new Node[newLength];\n \n for (int index = 0; index <= lastIndex; index++)\n {\n newVertices[index] = vertices[index];\n vertices[index] = null;\n newAdjacencySequences[index] = adjacencySequences[index];\n adjacencySequences[index] = null;\n }\n\n vertices = newVertices;\n adjacencySequences = newAdjacencySequences;\n }", "public void clearGraph(){\n\t\tthis.tools.clearGraph(graph);\n\t}", "public void cleanUp() {\n if (penv != null) {\n penv.cleanup();\n }\n List<ONDEXGraph> indexed = new LinkedList<ONDEXGraph>();\n Set<String> graphFolders = new HashSet<String>();\n for (Entry<ONDEXGraph, String> ent : indexedGraphs.entrySet()) {\n if (!indeciesToRetain.contains(ent.getValue())) graphFolders.add(new File(ent.getValue()).getParent());\n indexed.add(ent.getKey());\n }\n for (ONDEXGraph graph : indexed) removeIndex(graph, null);\n for (String graphDir : graphFolders) {\n try {\n DirUtils.deleteTree(graphDir);\n } catch (IOException e) {\n }\n }\n }", "void tryRemoveNodes(Collection<Node> nodesToRemove) throws Exception;", "@Override\n public void markChildrenDeleted() throws DtoStatusException {\n if (polymorphismSite != null) {\n for (com.poesys.db.dto.IDbDto dto : polymorphismSite) {\n dto.cascadeDelete();\n }\n }\n }", "void removeIsVertexOf(Subdomain_group oldIsVertexOf);", "@Test\n public void testGraphElements(){\n Vertex v1 = new Vertex(1, \"A\");\n Vertex v2 = new Vertex(2, \"B\");\n Vertex v3 = new Vertex(3, \"C\");\n Vertex v4 = new Vertex(4, \"D\");\n Vertex v5 = new Vertex(5, \"E\");\n Vertex v6 = new Vertex(6, \"F\");\n Vertex v7 = new Vertex(7, \"G\");\n Vertex v8 = new Vertex(8, \"H\");\n\n Vertex fakeVertex = new Vertex(100, \"fake vertex\");\n\n Edge<Vertex> e1 = new Edge<>(v1, v2, 1);\n Edge<Vertex> e2 = new Edge<>(v2, v3, 1);\n Edge<Vertex> e3 = new Edge<>(v3, v4, 1);\n Edge<Vertex> e4 = new Edge<>(v2, v4, 1);\n Edge<Vertex> e5 = new Edge<>(v2, v6, 1);\n Edge<Vertex> e6 = new Edge<>(v2, v5, 10);\n Edge<Vertex> e7 = new Edge<>(v5, v6, 10);\n Edge<Vertex> e8 = new Edge<>(v4, v6, 10);\n Edge<Vertex> e9 = new Edge<>(v6, v7, 10);\n Edge<Vertex> e10 = new Edge<>(v7, v8, 10);\n\n Edge<Vertex> fakeEdge = new Edge<>(fakeVertex, v1);\n Edge<Vertex> edgeToRemove = new Edge<>(v2, v7, 200);\n\n Graph<Vertex, Edge<Vertex>> g = new Graph<>();\n g.addVertex(v1);\n g.addVertex(v2);\n g.addVertex(v3);\n g.addVertex(v4);\n g.addVertex(v5);\n g.addVertex(v6);\n g.addVertex(v7);\n g.addVertex(v8);\n g.addEdge(e1);\n g.addEdge(e2);\n g.addEdge(e3);\n g.addEdge(e4);\n g.addEdge(e5);\n g.addEdge(e6);\n g.addEdge(e7);\n g.addEdge(e8);\n g.addEdge(e9);\n g.addEdge(edgeToRemove);\n\n Assert.assertTrue(g.addEdge(e10));\n\n //adding null edge or vertex to graph returns false\n Assert.assertFalse(g.addEdge(null));\n Assert.assertFalse(g.addVertex(null));\n\n //adding edge with a vertex that does not exist in graph g returns false\n Assert.assertFalse(g.addEdge(fakeEdge));\n\n //get an edge that does not exit in graph returns false\n Assert.assertFalse(g.edge(v1, fakeVertex));\n\n //getting length of edge from vertex not in graph g returns false\n Assert.assertEquals(0, g.edgeLength(fakeVertex, v2));\n\n //Remove an edge in graph g returns true\n Assert.assertTrue(g.remove(edgeToRemove));\n\n //Removing edge not in graph g returns false\n Assert.assertFalse(g.remove(fakeEdge));\n\n //Removing vertex not in graph g returns false\n Assert.assertFalse(g.remove(fakeVertex));\n\n //Finding an edge with an endpoint not in graph g returns null\n assertNull(g.getEdge(v1, fakeVertex));\n }", "@Test \n\tpublic void removeVertexTest() {\n\t\tList<Vertex> vertices = new ArrayList<>();\n\t\tvertices.add(C);\n\t\tvertices.add(D);\n\t\tedge_0.addVertices(vertices);\n\t\tgraph.addVertex(D);\n\t\tassertFalse(graph.removeVertex(C));\n\t\tgraph.addVertex(C);\n\t\tgraph.addEdge(edge_0);\n\t\tassertTrue(graph.removeVertex(D));\n\t\tassertFalse(graph.vertices().contains(D));\n\t\tassertFalse(graph.edges().contains(edge_0));\n\t\tassertTrue(graph.addVertex(D));\n\t}", "private void removeEdge() {\n boolean go = true;\n int lastNode;\n int proxNode;\n int atualNode;\n if ((parentMatrix[randomChild][0] != 1) &&\n (childMatrix[randomParent][0] != 1)) {\n lastNode =\n parentMatrix[randomChild][parentMatrix[randomChild][0] - 1];\n for (int i = (parentMatrix[randomChild][0] - 1); (i > 0 && go); i--)\n { // remove element from parentMatrix\n atualNode = parentMatrix[randomChild][i];\n if (atualNode != randomParent) {\n proxNode = atualNode;\n parentMatrix[randomChild][i] = lastNode;\n lastNode = proxNode;\n }\n else {\n parentMatrix[randomChild][i] = lastNode;\n go = false;\n }\n }\n if ((childMatrix[randomParent][0] != 1) &&\n (childMatrix[randomParent][0] != 1)) {\n lastNode = childMatrix[randomParent][\n childMatrix[randomParent][0] - 1];\n go = true;\n for (int i = (childMatrix[randomParent][0] - 1); (i > 0 &&\n go); i--) { // remove element from childMatrix\n atualNode = childMatrix[randomParent][i];\n if (atualNode != randomChild) {\n proxNode = atualNode;\n childMatrix[randomParent][i] = lastNode;\n lastNode = proxNode;\n }\n else {\n childMatrix[randomParent][i] = lastNode;\n go = false;\n }\n } // end of for\n }\n childMatrix[randomParent][(childMatrix[randomParent][0] - 1)] = -4;\n childMatrix[randomParent][0]--;\n parentMatrix[randomChild][(parentMatrix[randomChild][0] - 1)] = -4;\n parentMatrix[randomChild][0]--;\n }\n }", "void createGraphForMassiveLoad();", "@Test\n public void shouldDropUnselectedLabelIndexes() throws Exception\n {\n // GIVEN\n LabelIndex[] types = LabelIndex.values();\n Set<Node> expectedNodes = new HashSet<>();\n for ( int i = 0; i < 5; i++ )\n {\n // WHEN\n GraphDatabaseService db = db( random.among( types ) );\n Node node = createNode( db );\n expectedNodes.add( node );\n\n // THEN\n assertNodes( db, expectedNodes );\n db.shutdown();\n }\n }", "public void clear() {\r\n for (Edge edge : edges)\r\n edge.disconnect();\r\n for (Vertex vertex : vertices)\r\n vertex.disconnect();\r\n edges.clear();\r\n vertices.clear();\r\n getChildren().remove(1, getChildren().size());\r\n }", "@Override\n\tpublic List<SubGraph> split(SuperGraph superg, SubGraph oldsg) {\n\t\tList<SubGraph> sglist = new LinkedList<SubGraph>();\n\n\t\t//\t\tlog.info(\"Split for \" + oldsg);\n\n\t\t//create a new subgraph and page pair\n\t\t//\t\tPage newpage = PageManager.getInstance().createNewPage(superg.getId(), -1);\n\t\t//\t\tSubGraph newsg = superg.createSubgraph(newpage.getId());\n\t\t//\t\tnewpage.setSubgraph(newsg.getId());\n\n\t\tPage newpage = PageManager.getInstance().createNewPageWithSubgraph(superg.getId());\n\t\tSubGraph newsg = superg.getSubgraph(newpage.getSubgraphId());\n\t\tnewsg.setDirty(true);\n\n\t\tint numNodesMoved = 0;\n\t\tint maxNodesToMove = oldsg.nodeMap.size()/2;\n\t\twhile(numNodesMoved < maxNodesToMove){\n\t\t\t//BFS\n\t\t\tQueue<Pair<Node,Integer>> q = new LinkedList<Pair<Node,Integer>>();\n\t\t\tHashSet<Long> visited = new HashSet<Long>(); //hold visited node id\n\t\t\tint hopCount = 0;\t// the level, hop count\n\n\t\t\tNode root = oldsg.nodeMap.values().iterator().next(); //get a random node\n\t\t\tq.add(new Pair<Node, Integer>(root,0));\n\n\t\t\twhile(!q.isEmpty() && numNodesMoved < maxNodesToMove) {\n\t\t\t\tPair<Node, Integer> p = q.peek();\n\t\t\t\tNode n = p.getLeft();\n\t\t\t\thopCount = p.getRight();\n\n\t\t\t\t//\t\t\t\tif(numNodesMoved % 1000 == 0){\n\t\t\t\tlog.trace(\"BFS queue for iteration:\" + q);\n\t\t\t\tlog.trace(\"BFS queue size for iteration:\" + q.size());\n\t\t\t\tlog.trace(\"BFS processing node : \"+n + \" hopCount:\" + hopCount);\n\t\t\t\tlog.trace(\"BFS nodes moved : \" + numNodesMoved);\n\t\t\t\t//\t\t\t\t}\n\n\t\t\t\t// only add the neighborhood of n in the same subgraph\n\t\t\t\tfor(Edge e : n.getEdges(EdgeDirection.OUT)){\n\t\t\t\t\tLong nodeid = e.getDestinationId();\n\n\t\t\t\t\tif(!visited.contains(nodeid) && oldsg.nodeMap.containsKey(nodeid)){\n\t\t\t\t\t\tNode u = e.getDestination();\n\t\t\t\t\t\tvisited.add(nodeid);\n\t\t\t\t\t\tq.add(new Pair<Node,Integer>(u, hopCount+1));\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t//move node\n\t\t\t\tsuperg.moveNode(n, oldsg, newsg);\n\t\t\t\toldsg.nodeMap.remove(n.getId());\n\t\t\t\tnumNodesMoved++;\n\n\t\t\t\t//remove n from queue\n\t\t\t\tq.poll();\n\n\t\t\t\t//if the newsg is partitioned and there are more nodes to move\n\t\t\t\tif (!q.isEmpty() &&\n\t\t\t\t\t\tnumNodesMoved < maxNodesToMove &&\n\t\t\t\t\t\tnewsg.isPartitioned()) {\n\n\t\t\t\t\tlog.trace(\"Newly created, \" + newsg + \", is full creating a new one.\");\n\n\t\t\t\t\t//add the previous subgraph to subgraph list\n\t\t\t\t\tsglist.add(newsg);\n\n\t\t\t\t\tnewpage = PageManager.getInstance().createNewPageWithSubgraph(superg.getId());\n\t\t\t\t\tnewsg = superg.getSubgraph(newpage.getSubgraphId());\n\t\t\t\t\tnewsg.setDirty(true);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tsglist.add(oldsg);\n\t\tsglist.add(newsg);\n\n\t\treturn sglist;\n\t}", "public SkipGraphOperations(boolean isBlockchain)\r\n {\r\n this.isBlockchain = isBlockchain;\r\n searchRandomGenerator = new Random();\r\n if (isBlockchain)\r\n {\r\n //mBlocks = new Blocks();\r\n mTransactions = new Transactions();\r\n }\r\n\r\n\r\n mTopologyGenerator = new TopologyGenerator();\r\n System.gc(); //a call to system garbage collector\r\n }", "private void deleteEdgeFromSpanningTree(int edge_level, int level_replacement, Relationship deleted_rel, Relationship replacement_rel) {\n int l;\n for (l = edge_level; l >= 0; l--) {\n int sp_idx = this.dforests.get(l).findTreeIndex(deleted_rel);\n SpanningTree sp_tree = this.dforests.get(l).trees.get(sp_idx);\n this.dforests.get(l).trees.remove(sp_idx); //remove the original spanning tree\n\n SpanningTree[] splittedTrees = new SpanningTree[3];\n splittedTrees[0] = new SpanningTree(sp_tree.neo4j, false);\n splittedTrees[1] = new SpanningTree(sp_tree.neo4j, false);\n splittedTrees[2] = new SpanningTree(sp_tree.neo4j, false);\n\n int case_number = sp_tree.split(deleted_rel, splittedTrees);\n\n SpanningTree left_tree = splittedTrees[0];\n SpanningTree middle_tree = splittedTrees[1];\n SpanningTree right_tree = splittedTrees[2];\n\n right_tree = combineSpanningTree(left_tree, right_tree, case_number);\n right_tree.etTreeUpdateInformation();\n\n /** when l > level_replacement, only needs to delete the del_rel (because replace_edge in lower forests)\n * else, delete and replace with the replacement edge.\n */\n if (l <= level_replacement) {\n long mid_new_root_id = (middle_tree.N_nodes.contains(replacement_rel.getStartNodeId())) ? replacement_rel.getStartNodeId() : replacement_rel.getEndNodeId();\n long right_new_root_id = (right_tree.N_nodes.contains(replacement_rel.getStartNodeId())) ? replacement_rel.getStartNodeId() : replacement_rel.getEndNodeId();\n right_tree.reroot(right_new_root_id);\n middle_tree.reroot(mid_new_root_id);\n connectTwoTreeByRel(middle_tree, right_tree, replacement_rel);\n middle_tree.etTreeUpdateInformation();\n this.dforests.get(l).trees.add(middle_tree);\n } else {\n\n if (!middle_tree.isSingle && !middle_tree.isEmpty) {\n this.dforests.get(l).trees.add(middle_tree);\n middle_tree.etTreeUpdateInformation();\n }\n\n if (!right_tree.isSingle && !right_tree.isEmpty) {\n this.dforests.get(l).trees.add(right_tree);\n right_tree.etTreeUpdateInformation();\n }\n }\n }\n }", "void retainOutlineAndBoundaryGrid() {\n\t\tfor (final PNode child : getChildrenAsPNodeArray()) {\n\t\t\tif (child != selectedThumbOutline && child != yellowSIcolumnOutline && child != boundary) {\n\t\t\t\tremoveChild(child);\n\t\t\t}\n\t\t}\n\t\tcreateOrDeleteBoundary();\n\t}", "private void unionSmallLarge(int small, int large) {\n unionStart = System.currentTimeMillis();\n\n log.debug(\" --- union smallID=\" + small + \", largeID=\" + large);\n\n int moveCount = 0;\n for (int i = 0; i < vertexUnionLeaders.length; i++) {\n if (vertexUnionLeaders[i] == small) {\n\n\n log.debug(\" changing \" + i + \" from old smallID=\" + small + \" to new largeD=\" + large);\n vertexUnionLeaders[i] = large;\n moveCount++;\n }\n }\n\n // update the large group member count\n ClusterGroup lGroup = clusterGroupMap.get(large);\n if (lGroup == null) {\n lGroup = new ClusterGroup(large, 1);\n clusterGroupMap.put(large, lGroup);\n log.debug(\" created new ClusterGroup for largeID=\" + large + \", size=1\");\n }\n int lSize = lGroup.groupSize;\n log.debug(\" old group size=\" + lSize + \", about to add smallID size=\" + moveCount);\n lSize += moveCount;\n lGroup.groupSize = lSize;\n log.debug(\" groupID=\" + lGroup.groupID + \" size=\" + lSize);\n\n // now remove the small group from the map\n clusterGroupMap.remove(small);\n unionEnd = System.currentTimeMillis();\n }", "@Test\n void test07_tryToRemoveNonExistentEdge() {\n graph.addVertex(\"a\");\n graph.addVertex(\"b\");\n graph.addVertex(\"c\");\n graph.addEdge(\"a\", \"b\");\n graph.addEdge(\"b\", \"c\"); // adds two edges\n try {\n graph.removeEdge(\"e\", \"f\"); // remove non existent edge\n } catch (Exception e) {\n fail(\"Shouldn't have thrown exception\");\n }\n\n Set<String> vertices = new LinkedHashSet<>();\n vertices.add(\"a\");\n vertices.add(\"b\");\n vertices.add(\"c\"); // creates mock up vertex list\n\n if (!graph.getAllVertices().equals(vertices)) { // checks if vertices weren't added or removed\n fail(\"wrong vertices are inserted into the graph\");\n }\n if (graph.size() != 2) {\n fail(\"wrong number of edges in the graph\");\n }\n\n }", "public void clearSupervised() {\n supervisedNodes.clear();\n }", "void deleteNodes(ZVNode[] nodes);", "private static void deleteTest() throws SailException{\n\n\t\tString dir2 = \"repo-temp\";\n\t\tSail sail2 = new NativeStore(new File(dir2));\n\t\tsail2 = new IndexingSail(sail2, IndexManager.getInstance());\n\t\t\n//\t\tsail.initialize();\n\t\tsail2.initialize();\n\t\t\n//\t\tValueFactory factory = sail2.getValueFactory();\n//\t\tCloseableIteration<? extends Statement, SailException> statements = sail2\n//\t\t\t\t.getConnection().getStatements(null, null, null, false);\n\n\t\tSailConnection connection = sail2.getConnection();\n\n\t\tint cachesize = 1000;\n\t\tint cached = 0;\n\t\tlong count = 0;\n\t\tconnection.removeStatements(null, null, null, null);\n//\t\tconnection.commit();\n\t}", "protected void removeEdgeAndVertices(TestbedEdge edge) {\n java.util.Collection<Agent> agents = getIncidentVertices(edge);\n removeEdge(edge);\n for (Agent v : agents) {\n if (getIncidentEdges(v).isEmpty()) {\n removeVertex(v);\n }\n }\n }", "@Override\n public void deleteVertex(int vertex) {\n\n }", "private void trimX() {\n\t\tint indexIntoBranches = 0;\n\t\tfor (int i = 0; i < this.branches.size(); i++) {\n\t\t\tif (this.branches.get(i).size() == this.numXVertices) {\n\t\t\t\tindexIntoBranches = i;\n\t\t\t}\n\t\t}\n\n\t\tthis.allX = (ArrayList) this.branches.get(indexIntoBranches).clone(); // We need this for a set difference above\n\n\t\tfor (int k = 0; k < this.branches.get(indexIntoBranches).size(); k++) {\n\t\t\tfor (int j = 0; j < this.branches.get(indexIntoBranches).size(); j++) {\n\t\t\t\t// Ignore if the index is the same - otherwise remove the edges\n\t\t\t\tif (!(k == j)) {\n\t\t\t\t\tthis.branches.get(indexIntoBranches).get(k)\n\t\t\t\t\t\t\t.removeNeighbor(this.branches.get(indexIntoBranches).get(j));\n\t\t\t\t\tthis.branches.get(indexIntoBranches).get(j)\n\t\t\t\t\t\t\t.removeNeighbor(this.branches.get(indexIntoBranches).get(k));\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "private void deleteHierarchyData(TreePath[] selRows) {\r\n SponsorHierarchyBean delBean;\r\n CoeusVector delData = new CoeusVector();\r\n TreePath treePath=selRows[selRows.length-1];\r\n DefaultMutableTreeNode selNode = (DefaultMutableTreeNode)treePath.getLastPathComponent();\r\n int selRow=sponsorHierarchyTree.getRowForPath(treePath);\r\n String optionPaneMsg=EMPTY_STRING;\r\n if(selNode.isRoot()) return;\r\n if(!selNode.getAllowsChildren()) {\r\n if(selRows.length > 1) {\r\n optionPaneMsg = coeusMessageResources.parseMessageKey(\"maintainSponsorHierarchy_exceptionCode.1252\");\r\n }else {\r\n optionPaneMsg = \"Do you want to remove the sponsor \"+selNode.toString()+\" from the hierarchy?\";\r\n }\r\n int optionSelected = CoeusOptionPane.showQuestionDialog(optionPaneMsg,CoeusOptionPane.OPTION_YES_NO,CoeusOptionPane.DEFAULT_NO);\r\n if(optionSelected == CoeusOptionPane.SELECTION_YES) {\r\n for (int index=selRows.length-1; index>=0; index--) {\r\n treePath = selRows[index];\r\n selRow = sponsorHierarchyTree.getRowForPath(treePath);\r\n selNode = (DefaultMutableTreeNode)treePath.getLastPathComponent();\r\n int endIndex = selNode.toString().indexOf(\":\");\r\n Equals getRowData = new Equals(\"sponsorCode\",selNode.toString().substring(0,endIndex == -1 ? selNode.toString().length():endIndex));\r\n CoeusVector cvFilteredData = getDeleteData(cvHierarchyData.filter(getRowData));\r\n delBean = (SponsorHierarchyBean)cvFilteredData.get(0);\r\n delBean.setAcType(TypeConstants.DELETE_RECORD);\r\n flushBean(delBean);//Added for bug fix Start #1830\r\n model.removeNodeFromParent(selNode);\r\n delData.addAll(cvFilteredData);\r\n saveRequired = true;\r\n }\r\n }\r\n } else {\r\n \r\n// int optionSelected = CoeusOptionPane.showQuestionDialog(\"Do you want to remove the Group \"+selNode.toString()+\" all its children from the hierarchy.\",CoeusOptionPane.OPTION_YES_NO,CoeusOptionPane.DEFAULT_YES);\r\n int optionSelected = -1;\r\n try{\r\n if(selNode != null && selNode.getLevel() == 1 && isPrintingHierarchy && isFormsExistInGroup(selNode.toString())){\r\n optionSelected = CoeusOptionPane.showQuestionDialog(\"Do you want to remove the group \"+selNode.toString()+\" , all its children and associated sponsor forms from the hierarchy?\",CoeusOptionPane.OPTION_YES_NO,CoeusOptionPane.DEFAULT_NO);\r\n }else{\r\n optionSelected = CoeusOptionPane.showQuestionDialog(\"Do you want to remove the Group \"+selNode.toString()+\" , all its children from the hierarchy.\",CoeusOptionPane.OPTION_YES_NO,CoeusOptionPane.DEFAULT_NO);\r\n }\r\n }catch(CoeusUIException coeusUIException){\r\n CoeusOptionPane.showDialog(coeusUIException);\r\n return ;\r\n }\r\n if(optionSelected == CoeusOptionPane.SELECTION_YES) {\r\n //Case#2445 - proposal development print forms linked to indiv sponsor, should link to sponsor hierarchy - Start\r\n if(isPrintingHierarchy && selectedNode.getLevel() == 1){\r\n TreeNode root = (TreeNode)sponsorHierarchyTree.getModel().getRoot();\r\n TreePath result = findEmptyGroup(sponsorHierarchyTree, new TreePath(root));\r\n if( result == null){\r\n try{\r\n deleteForms(selNode.toString());\r\n }catch(CoeusUIException coeusUIException){\r\n CoeusOptionPane.showDialog(coeusUIException);\r\n return ;\r\n }\r\n }\r\n }\r\n Equals getRowData = new Equals(fieldName[selNode.getLevel()],selNode.toString());\r\n CoeusVector cvFilteredData = getDeleteData(cvHierarchyData.filter(getRowData));//Modified for bug fix Start #1830\r\n model.removeNodeFromParent(selNode);\r\n for (int i=0; i<cvFilteredData.size(); i++) {\r\n delBean = (SponsorHierarchyBean)cvFilteredData.get(i);\r\n delBean.setAcType(TypeConstants.DELETE_RECORD);\r\n flushBean(delBean);//Added for bug fix Start #1830\r\n saveRequired = true;\r\n }\r\n delData.addAll(cvFilteredData);\r\n }\r\n }\r\n if(selRow < sponsorHierarchyTree.getRowCount() && \r\n ((DefaultMutableTreeNode)sponsorHierarchyTree.getPathForRow(selRow).getLastPathComponent()).getAllowsChildren() && !selNode.getAllowsChildren())\r\n sponsorHierarchyTree.setSelectionPath(treePath.getParentPath());\r\n else\r\n if(selRow >= sponsorHierarchyTree.getRowCount())\r\n selRow = 0;\r\n sponsorHierarchyTree.setSelectionRow(selRow);\r\n \r\n groupsController.refreshTableData(delData);\r\n }", "public void test_dn_02() {\n OntModel mymod = ModelFactory.createOntologyModel( OntModelSpec.OWL_MEM, null );\n mymod.read( \"file:testing/ontology/testImport3/a.owl\" );\n \n assertEquals( \"Graph count..\", 2, mymod.getSubGraphs().size() );\n \n for (Iterator it = mymod.listImportedModels(); it.hasNext();) {\n mymod.removeSubModel( (Model) it.next() );\n }\n \n assertEquals( \"Graph count..\", 0, mymod.getSubGraphs().size() );\n }", "@Test\n @JUnitTemporaryDatabase // Relies on specific IDs so we need a fresh database\n public void testDelete() throws Exception {\n createAndFlushServiceTypes();\n createAndFlushCategories();\n \n //Initialize the database\n ModelImporter mi = m_importer;\n String specFile = \"/tec_dump.xml.smalltest\";\n mi.importModelFromResource(new ClassPathResource(specFile));\n \n assertEquals(10, mi.getNodeDao().countAll());\n }", "private void delete(Node next) {\n\t\t\n\t}", "public void createSubs(List<QueryTreeNode> subQueries) {\r\n\t\tif (!isBranchIndexed()) {\r\n\t\t\t//nothing to do, stop searching this branch\r\n\t\t\treturn;\r\n\t\t}\r\n\t\t\r\n\t\t//If op=OR and if and sub-nodes are indexed, then we split.\r\n\t\tif (LOG_OP.OR.equals(op)) {\r\n\t\t\t//clone both branches (WHY ?)\r\n\t\t\tQueryTreeNode node1;\r\n\t\t\tif (n1 != null) {\r\n\t\t\t\tnode1 = n1;\r\n\t\t\t} else {\r\n\t\t\t\tn1 = node1 = new QueryTreeNode(null, t1, null, null, null, false);\r\n\t\t\t\tt1 = null;\r\n\t\t\t}\r\n\t\t\tQueryTreeNode node2;\r\n\t\t\tif (n2 != null) {\r\n\t\t\t\tnode2 = n2.cloneBranch();\r\n\t\t\t} else {\r\n\t\t\t\tn2 = node2 = new QueryTreeNode(null, t2, null, null, null, false);\r\n\t\t\t\tt2 = null;\r\n\t\t\t}\r\n\t\t\t//we remove the OR from the tree and assign the first clone/branch to any parent\r\n\t\t\tQueryTreeNode newTree;\r\n\t\t\tif (p != null) {\r\n\t\t\t\t//remove local OR and replace with n1\r\n\t\t\t\tif (p.n1 == this) {\r\n\t\t\t\t\tp.n1 = node1;\r\n\t\t\t\t\tp.t1 = null;\r\n\t\t\t\t\tp.relateToChildren();\r\n\t\t\t\t} else if (p.n2 == this) {\r\n\t\t\t\t\tp.n2 = node1;\r\n\t\t\t\t\tp.t2 = null;\r\n\t\t\t\t\tp.relateToChildren();\r\n\t\t\t\t} else {\r\n\t\t\t\t\tthrow new IllegalStateException();\r\n\t\t\t\t}\r\n\t\t\t\t//clone and replace with child number n2/t2\r\n\t\t\t\t//newTree = cloneSingle(n2, t2, null, null);\r\n\t\t\t} else {\r\n\t\t\t\t//no parent.\r\n\t\t\t\t//still remove this one and replace it with the first sub-node\r\n\t\t\t\t//TODO should we use a set for faster removal?\r\n\t\t\t\tsubQueries.remove(this);\r\n\t\t\t\tsubQueries.add(node1);\r\n\t\t\t\tnode1.p = null;\r\n\t\t\t\tif (node2 != null) {\r\n\t\t\t\t\tnode2.p = null;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t//now treat second branch and create a new parent for it, if necessary.\r\n\t\t\tif (p != null) {\r\n\t\t\t\tnewTree = p.cloneTrunk(node1, node2);\r\n\t\t\t} else {\r\n\t\t\t\tnewTree = node2;\r\n\t\t\t}\r\n\t\t\t//subQueriesCandidates.add(newTree.root());\r\n\t\t\tnewTree.createSubs(subQueries);\r\n\t\t\tsubQueries.add(newTree.root());\r\n\t\t}\r\n\t\t\r\n\t\t//go into sub-nodes\r\n\t\tif (n1 != null) {\r\n\t\t\tn1.createSubs(subQueries);\r\n\t\t}\r\n\t\tif (n2 != null) {\r\n\t\t\tn2.createSubs(subQueries);\r\n\t\t}\r\n\t}", "public void delete(){\r\n\t\tblocks = null;\r\n\t\ttry {\r\n\t\t\tfinalize();\r\n\t\t} catch (Throwable e) {\t}\r\n\t}", "@Test\n void deleteUserBatchesRemainSuccess() {\n GenericDao anotherDao = new GenericDao( Batch.class );\n /* user id 2 in the test database has two associated batches */\n User userWithBatch = (User) genericDao.getById(2);\n /* store the associated batches for this user */\n Set<Batch> batches = (Set<Batch>) userWithBatch.getBatches();\n logger.debug(\"The user's batches: \" + batches);\n\n /*\n * -disassociate the batches (this is the only way I can see to not delete the orphan records)\n * -delete the user\n * -confirm deletion\n */\n userWithBatch.setBatches(null);\n\n genericDao.delete(userWithBatch);\n\n assertNull(genericDao.getById(2));\n\n /*\n * try to retrieve the batches based on id\n * confirm they have not been removed from the database\n */\n for (Batch batch : batches) {\n logger.debug(\"test batch id: \" + batch.getId());\n Batch testBatch = (Batch) anotherDao.getById(batch.getId());\n logger.debug(\"Test batch retrieved from db: \" + testBatch);\n assertNotNull(testBatch);\n }\n }", "private void clean() {\n //use iterator\n Iterator<Long> it = nodes.keySet().iterator();\n while (it.hasNext()) {\n Long node = it.next();\n if (nodes.get(node).adjs.isEmpty()) {\n it.remove();\n }\n }\n }", "public void delete() {\r\n\t\t\tif (!isDeleted && handles.remove(this)) {\r\n\t\t\t\telementsUsed -= count;\r\n\t\t\t\tisDeleted = true;\r\n\t\t\t\tif (elementsUsed < numElements / 4) {\r\n\t\t\t\t\tcompact();\r\n\t\t\t\t\tnumElements = Math.max(10, elementsUsed * 2);\r\n\t\t\t\t}\r\n\t\t\t\tshapePeer.vboHandle = null;\r\n\t\t\t}\r\n\t\t}", "public void removeAllEdges() {\n }", "public static void main(String[] args) throws IOException {\n\t\tGraph g2 = new Graph(\"graph5.txt\");\r\n\t\tPartialTreeList list = MST.initialize(g2);\r\n\t\t\r\n\t\tArrayList<PartialTree.Arc> arr = new ArrayList<PartialTree.Arc>();\r\n\t\tarr = MST.execute(list);\r\n\t\tSystem.out.println(arr);\r\n\t\t//before, when the remove method didn't decrement the size after\r\n\t\t//removing the front tree, the below statement would print the front twice\r\n\t\t//^^^^WHY??????????????\r\n\t\t/*for(PartialTree tree : list){\r\n\t\t\t\r\n\t\t\tSystem.out.println(tree.getRoot().neighbors.next.weight);\r\n\t\t}*/\r\n\t}", "@Test\n\tpublic void removeEdgeTest() {\n\t\tList<Vertex> vertices = new ArrayList<>();\n\t\tvertices.add(C);\n\t\tvertices.add(D);\n\t\tedge_0.addVertices(vertices);\n\t\tList<Vertex> vertices1 = new ArrayList<>();\n\t\tvertices.add(A);\n\t\tvertices.add(B);\n\t\tedge_1.addVertices(vertices1);\n\t\tgraph.addEdge(edge_0);\n\t\tgraph.addEdge(edge_1);\n\t\tassertTrue(graph.removeEdge(edge_0));\n\t\tassertFalse(graph.edges().contains(edge_0));\n\t\tassertTrue(graph.edges().size() == 1);\n\t}", "private static void simplify (GraphDirected<NodeCppOSMDirected, EdgeCppOSMDirected> osmGraph) {\n \t\tfinal Iterator<NodeCppOSMDirected> iteratorNodes = osmGraph.getNodes().iterator();\n \t\twhile (iteratorNodes.hasNext()) {\n \t\t\tfinal NodeCppOSMDirected node = iteratorNodes.next();\n \t\t\t// one in one out\n \t\t\tif (node.getInDegree() == 1 && node.getOutDegree() == 1) {\n \t\t\t\t// get the ids of the two connected nodes\n \t\t\t\tfinal Long currentNodeId = node.getId();\n \t\t\t\tfinal List<EdgeCppOSMDirected> edges = node.getEdges();\n \t\t\t\tfinal EdgeCppOSMDirected edge1 = edges.get(0);\n \t\t\t\tfinal EdgeCppOSMDirected edge2 = edges.get(1);\n \t\t\t\tfinal Long node1id = edge1.getNode1().getId() == (currentNodeId) ? edge2.getNode1().getId() : edge1.getNode1().getId();\n \t\t\t\tfinal Long node2id = edge1.getNode1().getId() == (currentNodeId) ? edge1.getNode2().getId() : edge2.getNode2().getId();\n \t\t\t\tif (node2id == node1id){\n \t\t\t\t\t// we are in a deadend and do not erase ourself\n \t\t\t\t\tcontinue;\n \t\t\t\t}\n \t\t\t\t// concat the list in the right way\n \t\t\t\tList<WayNodeOSM> newMetaNodes = concatMetanodes(edge1.getMetadata().getNodes(), edge2.getMetadata().getNodes(), currentNodeId);\n \t\t\t\t// add a new edge\n \t\t\t\t// TODO: Handle way properly - what would name be in this context?\n \t\t\t\tosmGraph.getNode(node1id).connectWithNodeWeigthAndMeta(osmGraph.getNode(node2id), edge1.getWeight() + edge2.getWeight(),\n \t\t\t\t\t\tnew WayOSM(0, WayOSM.WayType.UNSPECIFIED, \"unknown\", newMetaNodes));\n \t\t\t\t// remove the old node\n \t\t\t\t// do this manually because we otherwise corrupt the iterator\n \t\t\t\tnode.removeAllEdges();\n \t\t\t\titeratorNodes.remove();\n \t\t\t\tcontinue;\n \t\t\t}\n \t\t\t// two in two out\n \t\t\tif (node.getInDegree() == 2 && node.getOutDegree() == 2) {\n \t\t\t\tfinal long currentNodeId = node.getId();\n \t\t\t\t//check the connections\n \t\t\t\tArrayList<EdgeCppOSMDirected> incomingEdges = new ArrayList<>();\n \t\t\t\tArrayList<EdgeCppOSMDirected> outgoingEdges = new ArrayList<>();\n \t\t\t\tfor(EdgeCppOSMDirected edge : node.getEdges()) {\n \t\t\t\t\tif(edge.getNode1().getId() == currentNodeId){\n \t\t\t\t\t\toutgoingEdges.add(edge);\n \t\t\t\t\t}\n \t\t\t\t\telse {\n \t\t\t\t\t\tincomingEdges.add(edge);\n \t\t\t\t\t}\n \t\t\t\t}\n \t\t\t\t//TODO make this condition better\n \t\t\t\tif(outgoingEdges.get(0).getNode2().equals(incomingEdges.get(0).getNode1())){\n \t\t\t\t\t//out0 = in0\n \t\t\t\t\tif(!outgoingEdges.get(1).getNode2().equals(incomingEdges.get(1).getNode1())){\n \t\t\t\t\t\tcontinue;\n \t\t\t\t\t}\n \t\t\t\t\tif(outgoingEdges.get(0).getWeight() != incomingEdges.get(0).getWeight()){\n \t\t\t\t\t\tcontinue;\n \t\t\t\t\t}\n \t\t\t\t\tif(outgoingEdges.get(1).getWeight() != incomingEdges.get(1).getWeight()){\n \t\t\t\t\t\tcontinue;\n \t\t\t\t\t}\n \t\t\t\t}\n \t\t\t\telse {\n \t\t\t\t\t//out0 should be in1\n \t\t\t\t\t//therefore out1 = in0\n \t\t\t\t\tif(!outgoingEdges.get(0).getNode2().equals(incomingEdges.get(1).getNode1())){\n \t\t\t\t\t\tcontinue;\n \t\t\t\t\t}\n \t\t\t\t\tif(!outgoingEdges.get(1).getNode2().equals(incomingEdges.get(0).getNode1())){\n \t\t\t\t\t\tcontinue;\n \t\t\t\t\t}\n \t\t\t\t\tif(outgoingEdges.get(0).getWeight() != incomingEdges.get(1).getWeight()){\n \t\t\t\t\t\tcontinue;\n \t\t\t\t\t}\n \t\t\t\t\tif(outgoingEdges.get(1).getWeight() != incomingEdges.get(0).getWeight()){\n \t\t\t\t\t\tcontinue;\n \t\t\t\t\t}\n \t\t\t\t}\n \n \t\t\t\t// get the ids of the two connected nodes\n \t\t\t\tfinal NodeCppOSMDirected node1 = incomingEdges.get(0).getNode1();\n \t\t\t\tfinal NodeCppOSMDirected node2 = incomingEdges.get(1).getNode1();\n \t\t\t\t// \t\t\tif (node1.equals(node2)){\n \t\t\t\t// \t\t\t\t// we are in a loop and do not erase ourself\n \t\t\t\t// \t\t\t\tcontinue;\n \t\t\t\t// \t\t\t}\n \t\t\t\t// concat the list in the right way\n \t\t\t\tList<WayNodeOSM> metaNodes1 = incomingEdges.get(0).getMetadata().getNodes();\n \t\t\t\tList<WayNodeOSM> metaNodes2 = incomingEdges.get(1).getMetadata().getNodes();\n \t\t\t\tdouble weight = incomingEdges.get(0).getWeight() +incomingEdges.get(1).getWeight();\n \t\t\t\tList<WayNodeOSM> newMetaNodes = concatMetanodes(metaNodes1, metaNodes2, currentNodeId);\n \t\t\t\t// add a new edge\n \t\t\t\t// TODO: Handle way properly - what would name be in this context?\n \t\t\t\tnode1.connectWithNodeWeigthAndMeta(node2, weight,\n \t\t\t\t\t\tnew WayOSM(0, WayOSM.WayType.UNSPECIFIED, \"unknown\", newMetaNodes));\n \t\t\t\tnode2.connectWithNodeWeigthAndMeta(node1, weight,\n \t\t\t\t\t\tnew WayOSM(0, WayOSM.WayType.UNSPECIFIED, \"unknown\", newMetaNodes));\n \t\t\t\t// remove the old node\n \t\t\t\t// do this manually because we otherwise corrupt the iterator\n \t\t\t\tnode.removeAllEdges();\n \t\t\t\titeratorNodes.remove();\n \t\t\t}\n \t\t}\n \t}", "private static void simplify (GraphUndirected<NodeCppOSM, EdgeCppOSM> osmGraph) {\n \t\tfinal Iterator<NodeCppOSM> iteratorNodes = osmGraph.getNodes().iterator();\n \t\twhile (iteratorNodes.hasNext()) {\n \t\t\tfinal NodeCppOSM node = iteratorNodes.next();\n \t\t\tif (node.getDegree() == 2) {\n \t\t\t\t// get the ids of the two connected nodes\n \t\t\t\tfinal Long currentNodeId = node.getId();\n \t\t\t\tfinal List<EdgeCppOSM> edges = node.getEdges();\n \t\t\t\tfinal EdgeCppOSM edge1 = edges.get(0);\n \t\t\t\tfinal EdgeCppOSM edge2 = edges.get(1);\n \t\t\t\tfinal Long node1id = edge1.getNode1().getId() == (currentNodeId) ? edge1.getNode2().getId() : edge1.getNode1().getId();\n \t\t\t\tfinal Long node2id = edge2.getNode1().getId() == (currentNodeId) ? edge2.getNode2().getId() : edge2.getNode1().getId();\n \t\t\t\tif (currentNodeId == node1id){\n \t\t\t\t\t// we are in a loop and do not erase ourself\n \t\t\t\t\tcontinue;\n \t\t\t\t}\n \t\t\t\t// concat the list in the right way\n \t\t\t\tList<WayNodeOSM> newMetaNodes = concatMetanodes(edge1.getMetadata().getNodes(), edge2.getMetadata().getNodes(), currentNodeId);\n \t\t\t\t// add a new edge\n \t\t\t\t// TODO: Handle way properly - what would name be in this context?\n \t\t\t\t// TODO: names\n \t\t\t\tosmGraph.getNode(node1id).connectWithNodeWeigthAndMeta(osmGraph.getNode(node2id), edge1.getWeight() + edge2.getWeight(),\n\t\t\t\t\t\tnew WayOSM(0, WayOSM.WayType.UNSPECIFIED, edge1.getMetadata().getName()+edge2.getMetadata().getName(), newMetaNodes));\n \t\t\t\t// remove the old node\n \t\t\t\t// do this manually because we otherwise corrupt the iterator\n \t\t\t\tnode.removeAllEdges();\n \t\t\t\titeratorNodes.remove();\n \t\t\t}\n \t\t}\n \t}", "private void pruneTree(QuadNode node){\n int i;\n while(node.parent != null && node.quads[0] == null && node.quads[1] == null && node.quads[2] == null && node.quads[3] == null){\n i=0;\n if(node.x != node.parent.x){\n i++;\n }\n if(node.z != node.parent.z){\n i+=2;\n }\n node = node.parent;\n node.quads[i] = null;\n }\n }", "private void clearEdgeLinks() {\n edges.clear();\n //keep whole tree to maintain its position when it is expanded (within scroll pane bounds)\n Node rootNode = nodes.get(0);\n VBox rootVBox = (VBox) rootNode.getContainerPane().getParent();\n rootVBox.layout();\n Bounds rootNodeChildrenVBoxBounds = rootNode.getChildrenVBox().getBoundsInLocal();\n rootVBox.setLayoutY(Math.abs(rootVBox.getLayoutY() - ((rootNodeChildrenVBoxBounds.getHeight()) - rootNode.getHeight()) / 2 + rootNode.getLayoutY()));\n rootVBox.layout();\n\n for (int i = 0; i < nodes.size(); i++) {\n Pane containerPane = nodes.get(i).getContainerPane();\n //reposition node to the center of its children\n ObservableList<javafx.scene.Node> genericNodes = nodes.get(i).getChildrenVBox().getChildren();\n if (!genericNodes.isEmpty()) {\n nodes.get(i).setLayoutY(((nodes.get(i).getChildrenVBox().getBoundsInLocal().getHeight()) - rootNode.getHeight()) / 2);\n }\n\n for (int j = 0; j < containerPane.getChildren().size(); j++) {\n if (containerPane.getChildren().get(j) instanceof Edge) {\n containerPane.getChildren().remove(j);\n j--;\n }\n }\n }\n redrawEdges(rootNode);\n }", "static public void testBlockedDelete(Path path, int clusterSize, int clusterCount,\n int allocatorType) throws IOException {\n startUp(path);\n\n try (final FATFileSystem ffs = FATFileSystem.create(path, clusterSize, clusterCount, allocatorType)) {\n final FATFolder container = ffs.getRoot().createFolder(\"container\");\n final Throwable problem[] = new Throwable[1];\n final Object started = new Object();\n Thread worker = new Thread(new Runnable() {\n @Override\n public void run() {\n try {\n FATFile context = container.createFile(\"context\");\n FATLock lock = context.getLock(false);\n synchronized (started) {\n started.notify();\n }\n try {\n Thread.sleep(300);\n } finally {\n lock.unlock();\n }\n } catch (Throwable r) {\n r.printStackTrace();\n }\n }\n });\n worker.start();\n\n synchronized (started) {\n try {\n started.wait();\n } catch (InterruptedException e) {\n //ok\n }\n }\n\n try {\n ffs.getRoot().deleteChildren();\n throw new Error(\"Locked delete\");\n } catch (FATFileLockedException ex) {\n //ok\n }\n\n try {\n worker.join();\n } catch (InterruptedException e) {\n //ok\n }\n }\n\n tearDown(path);\n }", "@Test\r\n void test_insert_two_vertice_with_one_edge_remove_edge() {\r\n // Add two vertices with one edge\r\n graph.addEdge(\"A\", \"B\");\r\n vertices = graph.getAllVertices();\r\n // B should be an adjacent vertex of A\r\n if(!graph.getAdjacentVerticesOf(\"A\").contains(\"B\")){\r\n fail();\r\n }\r\n //Check that A and B are in the graph\r\n if(!vertices.contains(\"A\") |!vertices.contains(\"B\")) {\r\n fail();\r\n }\r\n //There's one edge in the graph\r\n if(graph.size() != 1) {\r\n fail();\r\n }\r\n //Remove edge from A to B\r\n graph.removeEdge(\"A\", \"B\");\r\n // Check that A and B are still in the graph\r\n if(!vertices.contains(\"A\") |!vertices.contains(\"B\")) {\r\n fail();\r\n }\r\n // B should not be an adjacent vertex of \r\n if(graph.getAdjacentVerticesOf(\"A\").contains(\"B\")){\r\n fail();\r\n }\r\n // There are no more edges in the graph\r\n if(graph.size() != 0) {\r\n fail();\r\n }\r\n }", "private void clearNodes()\r\n\t{\r\n\t clearMetaInfo();\r\n\t nodeMap.clear();\r\n\t}", "void clear() {\n\t\t\tfor (int i = 0 ; i < nodes.length; i++) {\n\t\t\t\tnodes[i].clear((byte) 1);\n\t\t\t}\n\t\t\tsize = 0;\n\t\t}", "@Test(timeout = 30000)\n public void testRemoveOneVolume() throws IOException {\n final int numBlocks = 100;\n for (int i = 0; i < numBlocks; i++) {\n String bpid = BLOCK_POOL_IDS[numBlocks % BLOCK_POOL_IDS.length];\n ExtendedBlock eb = new ExtendedBlock(bpid, i);\n ReplicaHandler replica = null;\n try {\n replica = dataset.createRbw(StorageType.DEFAULT, null, eb,\n false);\n } finally {\n if (replica != null) {\n replica.close();\n }\n }\n }\n\n // Remove one volume\n final String[] dataDirs =\n conf.get(DFSConfigKeys.DFS_DATANODE_DATA_DIR_KEY).split(\",\");\n final String volumePathToRemove = dataDirs[0];\n Set<StorageLocation> volumesToRemove = new HashSet<>();\n volumesToRemove.add(StorageLocation.parse(volumePathToRemove));\n\n FsVolumeReferences volReferences = dataset.getFsVolumeReferences();\n FsVolumeImpl volumeToRemove = null;\n for (FsVolumeSpi vol: volReferences) {\n if (vol.getStorageLocation().equals(volumesToRemove.iterator().next())) {\n volumeToRemove = (FsVolumeImpl) vol;\n }\n }\n assertTrue(volumeToRemove != null);\n volReferences.close();\n dataset.removeVolumes(volumesToRemove, true);\n int expectedNumVolumes = dataDirs.length - 1;\n assertEquals(\"The volume has been removed from the volumeList.\",\n expectedNumVolumes, getNumVolumes());\n assertEquals(\"The volume has been removed from the storageMap.\",\n expectedNumVolumes, dataset.storageMap.size());\n\n // DataNode.notifyNamenodeDeletedBlock() should be called 50 times\n // as we deleted one volume that has 50 blocks\n verify(datanode, times(50))\n .notifyNamenodeDeletedBlock(any(), any());\n\n try {\n dataset.asyncDiskService.execute(volumeToRemove,\n new Runnable() {\n @Override\n public void run() {}\n });\n fail(\"Expect RuntimeException: the volume has been removed from the \"\n + \"AsyncDiskService.\");\n } catch (RuntimeException e) {\n GenericTestUtils.assertExceptionContains(\"Cannot find volume\", e);\n }\n\n int totalNumReplicas = 0;\n for (String bpid : dataset.volumeMap.getBlockPoolList()) {\n totalNumReplicas += dataset.volumeMap.size(bpid);\n }\n assertEquals(\"The replica infos on this volume has been removed from the \"\n + \"volumeMap.\", numBlocks / NUM_INIT_VOLUMES,\n totalNumReplicas);\n }" ]
[ "0.7420843", "0.59974355", "0.582291", "0.5739358", "0.5693441", "0.5682855", "0.5651998", "0.564225", "0.564225", "0.5626353", "0.5623594", "0.56165606", "0.5603594", "0.5553024", "0.55465573", "0.5509044", "0.5497688", "0.5496958", "0.5476319", "0.5468764", "0.5463897", "0.546337", "0.5461029", "0.54405224", "0.5439552", "0.5419544", "0.5412404", "0.5408268", "0.53960407", "0.5377582", "0.53585166", "0.5348837", "0.5322625", "0.5310068", "0.52930224", "0.52869856", "0.5264247", "0.5261598", "0.5261013", "0.52542347", "0.52475375", "0.5237154", "0.5234264", "0.5227394", "0.521382", "0.5208007", "0.5188453", "0.5186254", "0.5158985", "0.5148993", "0.51271623", "0.512566", "0.5123051", "0.51137424", "0.5113547", "0.51010066", "0.510086", "0.50934446", "0.5092642", "0.507744", "0.5064303", "0.5061267", "0.5061129", "0.5055468", "0.5052554", "0.5051458", "0.5031217", "0.50291073", "0.5027722", "0.5025996", "0.502248", "0.5015959", "0.50128853", "0.49996254", "0.49985448", "0.49876", "0.49749574", "0.4972456", "0.49594894", "0.49570817", "0.49564552", "0.49561545", "0.49436954", "0.49426797", "0.49411818", "0.49308923", "0.49255064", "0.49235156", "0.49143127", "0.49108434", "0.49059454", "0.49049008", "0.4903842", "0.48974112", "0.48952296", "0.48949492", "0.48918566", "0.4890695", "0.48796985", "0.48772618" ]
0.7279151
1
============ Equivalence Partitions Tests ============== TC01: the closest point is in the middle of the list
@Test public void findClosestPointTest() { Ray ray = new Ray(new Point3D(0, 0, 10), new Vector(1, 10, -100)); List<Point3D> list = new LinkedList<Point3D>(); list.add(new Point3D(1, 1, -100)); list.add(new Point3D(-1, 1, -99)); list.add(new Point3D(0, 2, -10)); list.add(new Point3D(0.5, 0, -100)); assertEquals(list.get(2), ray.findClosestPoint(list)); // =============== Boundary Values Tests ================== //TC01: the list is empty List<Point3D> list2 = null; assertNull("try again",ray.findClosestPoint(list2)); //TC11: the closest point is the first in the list List<Point3D> list3 = new LinkedList<Point3D>(); list3.add(new Point3D(0, 2, -10)); list3.add(new Point3D(-1, 1, -99)); list3.add(new Point3D(1, 1, -100)); list3.add(new Point3D(0.5, 0, -100)); assertEquals(list3.get(0), ray.findClosestPoint(list3)); //TC12: the closest point is the last in the list List<Point3D> list4 = new LinkedList<Point3D>(); list4.add(new Point3D(1, 1, -100)); list4.add(new Point3D(0.5, 0, -100)); list4.add(new Point3D(-1, 1, -99)); list4.add(new Point3D(0, 2, -10)); assertEquals(list4.get(3), ray.findClosestPoint(list4)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test\n public void findClosestGeoPointTest() {\n Ray ray = new Ray(new Point3D(0, 0, 10), new Vector(1, 10, -100));\n Geometry geo = new Sphere(new Point3D(1,1,1),2);\n\n List<Intersectable.GeoPoint> list = new LinkedList<Intersectable.GeoPoint>();\n list.add(new GeoPoint(geo,new Point3D(1, 1, -100)));\n list.add(new GeoPoint(geo,new Point3D(-1, 1, -99)));\n list.add(new GeoPoint(geo,new Point3D(0, 2, -10)));\n list.add(new GeoPoint(geo,new Point3D(0.5, 0, -100)));\n\n\n\n assertEquals(list.get(2), ray.findClosestGeoPoint(list));\n\n // =============== Boundary Values Tests ==================\n //TC01: the list is empty\n List<GeoPoint> list2 = null;\n assertNull(\"try again\",ray.findClosestGeoPoint(list2));\n\n //TC11: the closest point is the first in the list\n List<GeoPoint> list3 = new LinkedList<GeoPoint>();\n list3.add(new GeoPoint(geo,new Point3D(0, 2, -10)));\n list3.add(new GeoPoint(geo,new Point3D(-1, 1, -99)));\n list3.add(new GeoPoint(geo,new Point3D(1, 1, -100)));\n list3.add(new GeoPoint(geo,new Point3D(0.5, 0, -100)));\n\n assertEquals(list3.get(0), ray.findClosestGeoPoint(list3));\n\n //TC12: the closest point is the last in the list\n List<GeoPoint> list4 = new LinkedList<GeoPoint>();\n list4.add(new GeoPoint(geo,new Point3D(1, 1, -100)));\n list4.add(new GeoPoint(geo,new Point3D(0.5, 0, -100)));\n list4.add(new GeoPoint(geo,new Point3D(-1, 1, -99)));\n list4.add(new GeoPoint(geo,new Point3D(0, 2, -10)));\n\n assertEquals(list4.get(3), ray.findClosestGeoPoint(list4));\n }", "private static Pair closest_pair(ArrayList<Point> pointset){\n\t\treturn null;\n\t}", "public Point[] nearestPair() {\n\t\t\tPoint[] Answer = new Point[2];\n\t\t\tif (this.size<2)\treturn null; //step 1\n\t\t\tif (this.size==2){\n\t\t\t\tAnswer[0]=this.minx.getData();\n\t\t\t\tAnswer[1]=this.maxx.getData();\n\t\t\t\treturn Answer;\t\t\t\n\t\t\t}\n\t\t\tdouble MinDistance=-1; // for sure it will be change in the next section, just for avoid warrning.\n\t\t\tdouble MinDistanceInStrip=-1;\n\t\t\tPoint[] MinPointsLeft = new Point[2];\n\t\t\tPoint[] MinPointsRight = new Point[2];\n\t\t\tPoint[] MinPointsInStrip = new Point[2]; // around the median\n\t\t\tboolean LargestAxis = getLargestAxis(); //step 2\n\t\t\tContainer median = getMedian(LargestAxis); //step 3\n\t\t\tif (LargestAxis){// step 4 - calling the recursive function nearestPairRec\n\t\t\t\tMinPointsLeft = nearestPairRec(getPointsInRangeRegAxis(this.minx.getData().getX(), median.getData().getX(),LargestAxis), LargestAxis);\n\t\t\t\tMinPointsRight =nearestPairRec(getPointsInRangeRegAxis(median.getNextX().getData().getX(), this.maxx.getData().getX(),LargestAxis), LargestAxis);\n\t\t\t}\n\t\t\telse{\n\t\t\t\tMinPointsLeft = nearestPairRec(getPointsInRangeRegAxis(this.miny.getData().getY(), median.getData().getY(),LargestAxis), LargestAxis);\n\t\t\t\tMinPointsRight =nearestPairRec(getPointsInRangeRegAxis(median.getNextY().getData().getY(), this.maxy.getData().getY(),LargestAxis), LargestAxis);\n\t\t\t}\n\t\t\t//step 5\n\t\t\tif (MinPointsLeft!=null && MinPointsRight!=null){\n\t\t\t\tif (Distance(MinPointsLeft[0], MinPointsLeft[1]) > Distance(MinPointsRight[0], MinPointsRight[1])){\n\t\t\t\t\tMinDistance = Distance(MinPointsRight[0], MinPointsRight[1]);\n\t\t\t\t\tAnswer = MinPointsRight;\n\t\t\t\t}else{\n\t\t\t\t\tMinDistance = Distance(MinPointsLeft[0], MinPointsLeft[1]);\n\t\t\t\t\tAnswer = MinPointsLeft;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse if (MinPointsLeft!=null) {\n\t\t\t\tMinDistance = Distance(MinPointsLeft[0], MinPointsLeft[1]);\n\t\t\t\tAnswer = MinPointsLeft;\n\t\t\t}\n\t\t\telse if (MinPointsRight!=null){\n\t\t\t\tMinDistance = Distance(MinPointsRight[0], MinPointsRight[1]);\n\t\t\t\tAnswer = MinPointsRight;\n\t\t\t}\n\t\t\t//step 6 - nearest point around the median\n\t\t\tif (MinDistance==-1) MinDistance=0;\n\t\t\tMinPointsInStrip = nearestPairInStrip(median, MinDistance*2, LargestAxis);\n\t\t\tif (MinPointsInStrip != null){\n\t\t\t\tMinDistanceInStrip = Distance(MinPointsInStrip[0], MinPointsInStrip[1]);\n\t\t\t\tif (MinDistanceInStrip < MinDistance) return MinPointsInStrip;\n\t\t\t}\n\t\t\treturn Answer;\n\t\t}", "public static double closestPair(Point[] sortedX) {\n if (sortedX.length <= 1) {\n return Double.MAX_VALUE;\n }\n double mid = sortedX[(sortedX.length) / 2].getX();\n double firstHalf = closestPair(Arrays.copyOfRange(sortedX, 0, (sortedX.length) / 2));\n double secondHalf = closestPair(Arrays.copyOfRange(sortedX, (sortedX.length) / 2, sortedX.length));\n double min = Math.min(firstHalf, secondHalf);\n ArrayList<Point> close = new ArrayList<Point>();\n for (int i = 0; i < sortedX.length; i++) {\n double dis = Math.abs(sortedX[i].getX() - mid);\n if (dis < min) {\n close.add(sortedX[i]);\n }\n }\n // sort by Y coordinates\n Collections.sort(close, new Comparator<Point>() {\n public int compare(Point obj1, Point obj2) {\n return (int) (obj1.getY() - obj2.getY());\n }\n });\n Point[] near = close.toArray(new Point[close.size()]);\n\n for (int i = 0; i < near.length; i++) {\n int k = 1;\n while (i + k < near.length && near[i + k].getY() < near[i].getY() + min) {\n if (min > near[i].distance(near[i + k])) {\n min = near[i].distance(near[i + k]);\n System.out.println(\"near \" + near[i].distance(near[i + k]));\n System.out.println(\"best \" + best);\n\n if (near[i].distance(near[i + k]) < best) {\n best = near[i].distance(near[i + k]);\n arr[0] = near[i];\n arr[1] = near[i + k];\n // System.out.println(arr[0].getX());\n // System.out.println(arr[1].getX());\n\n }\n }\n k++;\n }\n }\n return min;\n }", "@Test\n public void basicTest() {\n Point myPoint;\n\n// myPoint = pointSet.nearest(2, 2);\n// System.out.println(myPoint.toString());\n// myPoint = pointSet.nearest(2, -2);\n// System.out.println(myPoint.toString());\n// myPoint = pointSet.nearest(1, 4);\n// System.out.println(myPoint.toString());\n// myPoint = pointSet.nearest(3, -100);\n// System.out.println(myPoint.toString());\n// myPoint = pointSet.nearest(0, 0);\n// System.out.println(myPoint.toString());\n//\n// myPoint = kdPointSet.nearest(2, 2); //THIS ONE DOES NOT MATCH NAIVE!\n// System.out.println(myPoint.toString());\n// myPoint = kdPointSet.nearest(2, -2);\n// System.out.println(myPoint.toString());\n// myPoint = kdPointSet.nearest(1, 4);\n// System.out.println(myPoint.toString());\n// myPoint = kdPointSet.nearest(3, -100);\n// System.out.println(myPoint.toString());\n// myPoint = kdPointSet.nearest(0, 0);\n// System.out.println(myPoint.toString());\n\n\n\n\n\n\n }", "public static Point searchNearestEgde(Rectangle bounds, Point first, Point next) {\n\n // One offset needed to avoid intersection with the wrong line.\n if (bounds.x + bounds.width <= first.x)\n first.x = bounds.x + bounds.width - 1;\n else if (bounds.x >= first.x) first.x = bounds.x + 1;\n\n if (bounds.y + bounds.height <= first.y)\n first.y = bounds.height + bounds.y - 1;\n else if (bounds.y >= first.y) first.y = bounds.y + 1;\n\n Line2D relationLine = new Line2D.Float(first.x, first.y, next.x, next.y);\n Line2D lineTop = new Line2D.Float(bounds.x, bounds.y, bounds.x\n + bounds.width, bounds.y);\n Line2D lineRight = new Line2D.Float(bounds.x + bounds.width, bounds.y,\n bounds.x + bounds.width, bounds.y + bounds.height);\n Line2D lineBottom = new Line2D.Float(bounds.x + bounds.width, bounds.y\n + bounds.height, bounds.x, bounds.y + bounds.height);\n Line2D lineLeft = new Line2D.Float(bounds.x, bounds.y + bounds.height,\n bounds.x, bounds.y);\n\n Point2D ptIntersectTop = ptIntersectsLines(relationLine, lineTop);\n Point2D ptIntersectRight = ptIntersectsLines(relationLine, lineRight);\n Point2D ptIntersectBottom = ptIntersectsLines(relationLine, lineBottom);\n Point2D ptIntersectLeft = ptIntersectsLines(relationLine, lineLeft);\n\n // line is to infinite, we must verify that the point find interst the\n // correct edge and the relation.\n int distTop = (int) lineTop.ptSegDist(ptIntersectTop)\n + (int) relationLine.ptSegDist(ptIntersectTop);\n int distRight = (int) lineRight.ptSegDist(ptIntersectRight)\n + (int) relationLine.ptSegDist(ptIntersectRight);\n int distBottom = (int) lineBottom.ptSegDist(ptIntersectBottom)\n + (int) relationLine.ptSegDist(ptIntersectBottom);\n int distLeft = (int) lineLeft.ptSegDist(ptIntersectLeft)\n + (int) relationLine.ptSegDist(ptIntersectLeft);\n\n if (ptIntersectTop != null && distTop == 0) {\n return new Point(RelationGrip.adjust((int) ptIntersectTop.getX()),\n (int) ptIntersectTop.getY());\n\n } else if (ptIntersectRight != null && distRight == 0) {\n return new Point((int) ptIntersectRight.getX(),\n RelationGrip.adjust((int) ptIntersectRight.getY()));\n\n } else if (ptIntersectBottom != null && distBottom == 0) {\n return new Point(RelationGrip.adjust((int) ptIntersectBottom.getX()),\n (int) ptIntersectBottom.getY());\n\n } else if (ptIntersectLeft != null && distLeft == 0) {\n return new Point((int) ptIntersectLeft.getX(),\n RelationGrip.adjust((int) ptIntersectLeft.getY()));\n\n } else {\n return null; // no point found!\n }\n }", "@Test\n public void testNearest() {\n for (int dx = -5; dx <= 5; dx++) {\n for (int dy = -5; dy <= 5; dy++) {\n if (dy > 0 && Math.abs(dx) < Math.abs(dy))\n assertEquals(Direction.SOUTH, Direction.nearest(dx, dy));\n else if (dy < 0 && Math.abs(dx) < Math.abs(dy))\n assertEquals(Direction.NORTH, Direction.nearest(dx, dy));\n else if (dx > 0 && Math.abs(dy) < Math.abs(dx))\n assertEquals(Direction.EAST, Direction.nearest(dx, dy));\n else if (dx < 0 && Math.abs(dy) < Math.abs(dx))\n assertEquals(Direction.WEST, Direction.nearest(dx, dy));\n else if (Math.abs(dx) == Math.abs(dy))\n assertEquals(null, Direction.nearest(dx, dy));\n else\n fail(\"Case not covered: dx=\" + dx + \", dy=\" + dy + \".\");\n }\n }\n }", "private double closestDistanceFromPointToEndlessLine(Vector point, Vector startSegment, Vector endSegment) {\n\t\t// Generate a line out of two points.\n\t\tRay3D gerade = geradeAusPunkten(startSegment, endSegment);\n\t\tVector direction = gerade.getDirection();\n\t\tdouble directionNorm = direction.getNorm();\n\t\t// d(PunktA, (line[B, directionU]) = (B-A) cross directionU durch norm u\n\t\tVector b = gerade.getPoint();\n\t\tVector ba = b.subtract(point);\n\t\tdouble factor = 1.0 / directionNorm; // Geteilt durch geraden länge\n\t\tVector distance = ba.cross(direction).multiply(factor);\n\t\tdouble distanceToGerade = distance.getNorm();\n\t\treturn distanceToGerade;\n\t}", "static float stripClosest(ArrayList<Point> strip, float d) \n\t{ \n\t float min = d; // Initialize the minimum distance as d \n\t \n\t //This loop runs at most 7 times \n\t for (int i = 0; i < strip.size(); ++i) \n\t for (int j = i+1; j < strip.size() && (strip.get(j).y - strip.get(i).y) < min; ++j) \n\t if (Dist(strip.get(i),strip.get(j)) < min) \n\t min = Dist(strip.get(i), strip.get(j)); \n\t \n\t return min; \n\t}", "public static void main(String[] args) {\n Random r = new Random();\n// r.setSeed(1982);\n int R = 500;\n int L = 100000;\n\n int start = -500;\n int end = 500;\n HashSet<Point> hi3 = new HashSet<>();\n List<Point> hi5 = new ArrayList<>();\n Stopwatch sw = new Stopwatch();\n for (int i = 0; i < L; i += 1) {\n double ran = r.nextDouble();\n double x = start + (ran * (end - start));\n ran = r.nextDouble();\n double y = start + (ran * (end - start));\n Point temp = new Point(x, y);\n hi5.add(temp);\n\n }\n KDTree speedTest = new KDTree(hi5);\n NaivePointSet speedTest2 = new NaivePointSet(hi5);\n\n// for (int i = 0; i < 1000; i++) {\n// double ran = r.nextDouble();\n// double x2 = start + (ran *(end - start));\n// ran = r.nextDouble();\n// double y2 = start + (ran *(end - start));\n// assertEquals(speedTest2.nearest(x2, y2), speedTest.nearest(x2, y2 ));\n// }\n// assertEquals(speedTest2.nearest(r.nextInt(R + 1 - 500) + 500,\n// r.nextInt(R + 1 - 500) + 100), speedTest.nearest(427.535670, -735.656403));\n\n System.out.println(\"elapsed time1: \" + sw.elapsedTime());\n\n int R2 = 100;\n int L2 = 10000;\n Stopwatch sw2 = new Stopwatch();\n for (int i = 0; i < L2; i += 1) {\n\n speedTest2.nearest(r.nextDouble(), r.nextDouble());\n }\n\n System.out.println(\"elapsed time: \" + sw2.elapsedTime());\n }", "private static double divideAndConquer(ArrayList<Point> X, ArrayList<Point> Y) {\n\n\t\t//Assigns size of array\n\t\tint size = X.size();\n\n\t\t//If less than 3 points, efficiency is better by brute force\n\t\tif (size <= 3) {\n\t\t\treturn BruteForceClosestPairs(X);\n\t\t}\n\t\t\n\t\t//Ceiling of array size / 2\n\t\tint ceil = (int) Math.ceil(size / 2);\n\t\t//Floor of array size / 2\n\t\tint floor = (int) Math.floor(size / 2);\n\t\t\n\t\t//Array list for x & y values left of midpoint\n\t\tArrayList<Point> xL = new ArrayList<Point>();\t\n\t\tArrayList<Point> yL = new ArrayList<Point>();\n\t\t\n\t\t//for [0 ... ceiling of array / 2]\n\t\t//add the points onto the new arrays\n\t\tfor (int i = 0; i < ceil; i++) {\n\t\t\t\n\t\t\txL.add(X.get(i));\n\t\t\tyL.add(Y.get(i));\n\t\t}\n\t\t\n\t\t// Array list for x & y values right of midpoint\n\t\tArrayList<Point> xR = new ArrayList<Point>();\n\t\tArrayList<Point> yR = new ArrayList<Point>();\n\t\t\n\t\t//for [floor of array / 2 ... size of array]\n\t\t//add the points onto the new arrays\n\t\tfor (int i = floor; i < size - 1; i++) {\n\n\t\t xR.add(X.get(i));\n\t\t\tyR.add(Y.get(i));\n\t\t}\n\t\t\n\t\t//Recursively find the shortest distance\n\t\tdouble distanceL = divideAndConquer(xL, yL);\n\t\tdouble distanceR = divideAndConquer(xR, xL);\n\t\t//Smaller of both distances\n\t\tdouble distance = Math.min(distanceL, distanceR);\n\t\t//Mid-line\n\t\tdouble mid = X.get(ceil - 1).getX();\n\n\t\tArrayList<Point> S = new ArrayList<Point>();\n\n\t\t//copy all the points of Y for which |x - m| < d into S[0..num - 1]\n\t\tfor (int i = 0; i < Y.size() - 1; i++) {\n\n\t\t\tif (Math.abs(X.get(i).getX() - mid) < distance) {\n\t\t\t\tS.add(Y.get(i));\n\t\t\t}\n\t\t}\n\t\t\n\t\t//Square minimum distance\n\t\tdouble dminsq = distance * distance;\n\t\t//Counter\n\t\tint k = 0;\n\t\tint num = S.size();\n\n\t\tfor (int i = 0; i < num - 2; i++) {\n\t\t\t\n\t\t\tk = i + 1;\n\t\t\t\n\t\t\twhile (k <= num - 1 && (Math.pow((S.get(k).getY() - S.get(i).getY()), 2) < dminsq)) {\n\n\t\t\t\t//Find distance between points and find the minimum compared to dminsq\n\t\t\t\tdminsq = Math.min(Math.pow(S.get(k).getX() - S.get(i).getX(), 2) \n\t\t\t\t\t\t\t\t+ Math.pow(S.get(k).getY() - S.get(i).getY(), 2), dminsq);\n\n\t\t\t\tk = k + 1;\n\t\t\t}\n\t\t}\n\n\t\treturn Math.sqrt(dminsq);\n\t}", "private ArrayList<Point> findS(ArrayList<Point> s, Point p1, Point p2) {\n ArrayList<Point> s1 = new ArrayList<>();\n for(int i = 1; i < s.size(); i++){\n if(p1.x*p2.y + s.get(i).x*p1.y + p2.x*s.get(i).y - s.get(i).x*p2.y - p2.x*p1.y - p1.x*s.get(i).y > 0) {\n s1.add(s.get(i));\n }\n }\n return s1;\n }", "private Point[] nearestPairRec(Point[] range, boolean axis) {\n\t\t\tPoint[] Answer = new Point[2];\n\t\t\tif (range.length < 4) return nearestPair3Points(range);\n\t\t\tPoint[] MinPointsLeft = new Point[2];\n\t\t\tPoint[] MinPointsRight = new Point[2];\n\t\t\tPoint[] MinPointsInStrip = new Point[2];\n\t\t\tdouble MinDistance = -1; //it will be change for sure, because we pass the array only if it containes 4 points and above.\n\t\t\tdouble MinDistanceInStrip;\n\t\t\t//step 4\n\t\t\tif (axis){\n\t\t\t\tMinPointsLeft = nearestPairRec(getPointsInRangeRegAxis(range[0].getX(), range[(range.length)/2].getX(), axis), axis);\n\t\t\t\tMinPointsRight =nearestPairRec(getPointsInRangeRegAxis(range[((range.length)/2)+1].getX(), range[range.length-1].getX() ,axis), axis);\n\t\t\t}\n\t\t\telse{\n\t\t\t\tMinPointsLeft = nearestPairRec(getPointsInRangeRegAxis(range[0].getY(), range[(range.length)/2].getY(), axis), axis);\n\t\t\t\tMinPointsRight =nearestPairRec(getPointsInRangeRegAxis(range[((range.length)/2)+1].getY(), range[range.length-1].getY() ,axis), axis);\n\t\t\t}\n\t\t\t//step 5\n\t\t\tif (MinPointsLeft!=null && MinPointsRight!=null){\n\t\t\t\tif (Distance(MinPointsLeft[0], MinPointsLeft[1]) > Distance(MinPointsRight[0], MinPointsRight[1])){\n\t\t\t\t\tMinDistance = Distance(MinPointsRight[0], MinPointsRight[1]);\n\t\t\t\t\tAnswer = MinPointsRight;\n\t\t\t\t}else{\n\t\t\t\t\tMinDistance = Distance(MinPointsLeft[0], MinPointsLeft[1]);\n\t\t\t\t\tAnswer = MinPointsLeft;\n\t\t\t\t}\n\t\t\t}else if (MinPointsLeft!=null && MinPointsRight==null) {\n\t\t\t\tMinDistance = Distance(MinPointsLeft[0], MinPointsLeft[1]);\n\t\t\t\tAnswer = MinPointsLeft;\n\t\t\t}else if (MinPointsRight!=null && MinPointsLeft==null){\n\t\t\t\tMinDistance = Distance(MinPointsRight[0], MinPointsRight[1]);\n\t\t\t\tAnswer = MinPointsRight;\n\t\t\t}\n\t\t\t//step 6 find the nearest point around the median\n\t\t\tint upper;\n\t\t\tint lower;\n\t\t\tif (MinDistance==-1) MinDistance = 0;\n\t\t\tif (axis){\n\t\t\t\tupper = (int) (range[(range.length)/2].getX()+MinDistance);\n\t\t\t\tlower = (int) (range[(range.length)/2].getX()-MinDistance);\n\t\t\t}\n\t\t\telse{\n\t\t\t\tupper = (int) (range[(range.length)/2].getY()+MinDistance);\n\t\t\t\tlower = (int) (range[(range.length)/2].getY()-MinDistance);\n\t\t\t}\n\t\t\trange = getPointsInRangeOppAxis(lower, upper, axis);\n\t\t\tif (range.length>=2) MinPointsInStrip = nearestPointInArray(range);\n\t\t\tif (MinPointsInStrip[0]!=null){\n\t\t\t\tMinDistanceInStrip = Distance(MinPointsInStrip[0], MinPointsInStrip[1]);\n\t\t\t\tif (MinDistanceInStrip < MinDistance) return MinPointsInStrip;\n\t\t\t}\n\t\t\treturn Answer;\n\t\t}", "public scala.Tuple2<java.lang.Object, java.lang.Object> findClosest (scala.collection.TraversableOnce<org.apache.spark.mllib.clustering.VectorWithNorm> centers, org.apache.spark.mllib.clustering.VectorWithNorm point) { throw new RuntimeException(); }", "Execution getClosestDistance();", "static S2Point getIntersectionExact(S2Point a0, S2Point a1, S2Point b0, S2Point b1) {\n // Since we are using exact arithmetic, we don't need to worry about numerical stability.\n BigPoint aNormBp = (new BigPoint(a0)).crossProd(new BigPoint(a1));\n BigPoint bNormBp = (new BigPoint(b0)).crossProd(new BigPoint(b1));\n BigPoint xBp = aNormBp.crossProd(bNormBp);\n\n // The last two operations are done in double precision, which creates a directional error of\n // up to 2 * S2.DBL_EPSILON. (BigPoint.toS2Point() and S2Point.normalize() each contribute up to\n // S2.DBL_EPSILON of directional error.)\n S2Point x = xBp.toS2Point().normalize();\n\n if (x.equals(S2Point.ORIGIN)) {\n // The two edges are exactly collinear, but we still consider them to be \"crossing\" because of\n // simulation of simplicity. Out of the four endpoints, exactly two lie in the interior of\n // the other edge. Of those two we return the one that is lexicographically smallest.\n x = new S2Point(10, 10, 10); // Greater than any valid S2Point\n S2Point aNorm = aNormBp.toS2Point().normalize();\n S2Point bNorm = bNormBp.toS2Point().normalize();\n // Note: To support antipodal edges properly, we would need to add a crossProd() function that\n // computes the cross product using simulation of simplicity and rounds the result to the\n // nearest floating-point representation.\n Preconditions.checkArgument(\n !(aNorm.equals(S2Point.ORIGIN) || bNorm.equals(S2Point.ORIGIN)),\n \"Exactly antipodal edges not supported by getIntersectionExact\");\n x = closestAcceptableEndpoint(a0, a1, aNorm, b0, b1, bNorm, x);\n }\n // assert (S2.isUnitLength(x));\n return x;\n }", "private Point[] nearestPair3Points(Point[] range) {\n\t\t\tif (range.length < 2)\treturn null; \n\t\t\tif (range.length == 2)\treturn range; \n\t\t\t//else - its mean that we have 3 points in the array\n\t\t\tPoint[] Answer = new Point[2];\n\t\t\tdouble currentMinDistance = Distance(range[0], range[1]);\n\t\t\tAnswer[0]= range[0];\n\t\t\tAnswer[1]= range[1];\n\t\t\tif (Distance(range[0], range[2]) < currentMinDistance){\n\t\t\t\tcurrentMinDistance = Distance(range[0], range[2]);\n\t\t\t\tAnswer[0]= range[0];\n\t\t\t\tAnswer[1]= range[2];\n\t\t\t}\n\t\t\tif (Distance(range[1], range[2]) < currentMinDistance){\n\t\t\t\tAnswer[0]= range[1];\n\t\t\t\tAnswer[1]= range[2];\n\t\t\t}\n\t\t\treturn Answer;\n\t\t}", "private static double dynamically_select_epsilon(ArrayList<Point> pointset){\n\t\tPair closestPair = closest_pair(pointset);\n\t\t\n\t\t// Calculate Chebyshev distance between nearest pair\n\t\tdouble distance = chebyshev_distance(closestPair.getFirst(), closestPair.getSecond());\n\t\t\n\t\t// Divide by 8 to fit 8e box constraint set in Gabe's paper\n\t\treturn distance / 8.0;\n\t}", "@Test\r\n\tpublic void ST_ClosestCoordinate() {\n\r\n\t}", "private Point findStartPoint(){\n Point min = points.get(0);\n for (int i = 1; i < points.size(); i++) {\n min = getMinValue(min, points.get(i));\n }\n return min;\n }", "private double distanceResult(double preLng, double preLat, double nextLng, double nextLat) {\n\t\treturn Math.sqrt((preLng - nextLng) * (preLng - nextLng) + (preLat - nextLat) * (preLat - nextLat));\n\t}", "public static Point[] closestPair(double[] x, double[]y) throws Exception\r\n {\r\n /*if x-coordinates dont match y-coordinates*/\r\n if(x.length != y.length)\r\n {\r\n System.out.println(\"Can't compute closest pair. Input lengths mismatch!\");\r\n throw new Exception();\r\n }\r\n /*if there is one or less points*/\r\n if(x.length <2 || y.length <2)\r\n {\r\n System.out.println(\"Can't compute closest pair. Fewer inputs!\");\r\n throw new Exception();\r\n }\r\n /*if there are two points*/\r\n if(x.length == 2)\r\n {\r\n Point[] closest = {new Point(x[0],y[0]), new Point(x[1],y[1])};\r\n return closest;\r\n }\r\n /*if there are three points*/\r\n if(x.length == 3)\r\n {\r\n double cx1 = x[0], cy1 = y[0], cx2 = x[1], cy2 = y[1];\r\n //P0 and P1\r\n double cdist = Math.pow((cx1-cx2),2) + Math.pow((cy1-cy2),2); //ignoring square root to reduce computation time\r\n //P1 and P2\r\n double dist = Math.pow((x[0]-x[2]),2) + Math.pow((y[0]-y[2]),2);\r\n if(dist<cdist)\r\n {\r\n cx1 = x[0]; cy1 = y[0]; cx2 = x[2]; cy2 = y[2]; cdist = dist;\r\n }\r\n //P2 and P3\r\n dist = Math.pow((x[1]-x[2]),2) + Math.pow((y[1]-y[2]),2);\r\n if(dist<cdist)\r\n {\r\n cx1 = x[1]; cy1 = y[1]; cx2 = x[2]; cy2 = y[2]; cdist = dist;\r\n }\r\n Point[] closest = {new Point(cx1,cy1), new Point(cx2,cy2)};\r\n return closest;\r\n }\r\n \r\n //sorting based on x values\r\n int i=0;\r\n double z,zz;\r\n while (i < x.length) \r\n \t{\r\n \t\tif (i == 0 || x[i-1] <= x[i])\r\n \t\t\ti++;\r\n \t\telse \r\n \t\t{\r\n \t\t\tz = x[i];\r\n \t\t\tzz = y[i];\r\n \t\t\tx[i] = x[i-1];\r\n \t\t\ty[i] = y[i-1];\r\n \t\t\tx[--i] = z;\r\n \t\t\ty[i] = zz;\r\n \t\t}\r\n \t}\r\n \r\n //finding left closest pair\r\n Point[] closestL = closestPair(Arrays.copyOfRange(x, 0, x.length/2),Arrays.copyOfRange(y, 0, y.length/2));\r\n //finding right closest pair\r\n Point[] closestR = closestPair(Arrays.copyOfRange(x, x.length/2, x.length),Arrays.copyOfRange(y, y.length/2, y.length));\r\n \r\n double distLsq = Math.pow((closestL[0].getX() - closestL[1].getX()),2) + Math.pow((closestL[0].getY() - closestL[1].getY()),2);\r\n double distRsq = Math.pow((closestR[0].getX() - closestR[1].getX()),2) + Math.pow((closestR[0].getY() - closestR[1].getY()),2);\r\n \r\n double minD;\r\n Point[] closest;\r\n if(distLsq<distRsq)\r\n {\r\n minD = distLsq;\r\n closest = closestL;\r\n }\r\n else \r\n {\r\n minD = distRsq;\r\n closest = closestR;\r\n }\r\n \r\n double midLine = ((x[x.length/2-1]) + (x[x.length/2]))/2;\r\n \r\n //System.out.println(Arrays.toString(x));\r\n //System.out.println(\"midline... x = \" + midLine);\r\n \r\n /*looking at points at a horizontal distance of minD from the mid line*/\r\n for(i = 0; i < x.length/2; i++)\r\n {\r\n if(midLine - x[i] < minD)\r\n {\r\n for(int j = x.length/2; j < x.length; j++)\r\n {\r\n /*looking at points at a vertical and horizontal distance of minD from the current point*/\r\n if((x[j] - midLine < minD) && (y[j] - y [i] < minD || y[i] - y [j] < minD))\r\n {\r\n if(Math.pow((x[i] - x[j]),2) + Math.pow((y[i] - y[j]),2) < minD)\r\n {\r\n closest = new Point[]{new Point(x[i],y[i]), new Point(x[j],y[j])};\r\n minD = Math.pow((x[i] - x[j]),2) + Math.pow((y[i] - y[j]),2);\r\n }\r\n }\r\n }\r\n }\r\n }\r\n return closest;\r\n \r\n }", "public void testClosestApprochDist() {\r\n System.out.println(\"closestApprochDist\");\r\n\r\n ParametricLine2d other = new ParametricLine2d(new Point2d(), new Vector2d(0.0, 1.0));;\r\n ParametricLine2d instance = new ParametricLine2d();\r\n\r\n double expResult = 0.0;\r\n double result = instance.closestApprochDist(other);\r\n assertEquals(expResult, result);\r\n }", "private List<BlockPoint> chooseFurthestPoints(List<BlockPoint> originalPoints){\n if(plattformsPerChunk <= 0 || plattformsPerChunk > originalPoints.size()){\n throw new IllegalArgumentException(\"plattformsPerChunk can not be negative or larger than originalPoints\");\n\t}\n\tList<BlockPoint> startingPoints = new ArrayList<>(originalPoints);\n List<BlockPoint> chosenPoints = new ArrayList<>();\n\tint randomIndex = random.nextInt(startingPoints.size()-1);\n\t// Add the random starting position\n chosenPoints.add(startingPoints.get(randomIndex));\n // Remove it from the list since we can't add the same point many times\n\tstartingPoints.remove(randomIndex);\n\n\t// Choose \"plattformsPerChunk - 1\" amount of plattforms other than the starting point\n\tfor(int i = 0; i < plattformsPerChunk-1; i++){\n\t\tif(startingPoints.isEmpty()){\n\t\t break;\n\t\t}\n\n\t // Set every consideredPositions weight to its lowest distance\n\t // to any considered node\n\t for(BlockPoint consideredPos : startingPoints){\n\t\tdouble globalMinDist = INFINITY;\n\t\tfor(BlockPoint chosenPos : chosenPoints){\n\t\t double currentMinDist = consideredPos.distanceTo(chosenPos);\n\t\t if(currentMinDist < globalMinDist){\n\t\t\tglobalMinDist = currentMinDist;\n\t\t }\n\t\t}\n\t\tconsideredPos.weight = globalMinDist;\n\t }\n\n\t // Choose the position with the highest weight and add/remove it.\n\t // This means choose the point with largest min distance\n\t double highestMinDist = -1;\n\t BlockPoint chosenPoint = null;\n\t for(BlockPoint consideredPos : startingPoints){\n\t\tif(highestMinDist < consideredPos.weight){\n\t\t highestMinDist = consideredPos.weight;\n\t\t chosenPoint = consideredPos;\n\t\t}\n\t }\n\t assert chosenPoint != null;\n\t chosenPoints.add(chosenPoint.copy());\n\t startingPoints.remove(chosenPoint);\n\t}\n\treturn chosenPoints;\n }", "private double dynamically_select_epsilon(ArrayList<Point> pointset) {\n\t\tPair closestPair = closest_pair(pointset);\n\n\t\t// Calculate Chebyshev distance between nearest pair\n\t\tdouble distance = chebyshev_distance(closestPair);\n\n\t\t// Divide by 16 to fit 8e box constraint set in Gabe's paper\n\t\treturn distance / 16.0;\n\t}", "private static double nearestNeighbour(List<Point> points, Point startPoint, Point endPoint) {\n double tentative_distance; // to evaluate nearest neighbour\n double cummulative_distance = 0; // cummulative distance of tour\n double dist; // temporary variable\n Point current = startPoint;\n //System.out.println(\"start at: #\" + current.getId());\n\n int indexToRemove = 0;\n int numberOfLoops = points.size() - 1;\n\n for (int i = 0; i <= numberOfLoops; i++) {\n //System.out.println(\"outerloop #\" + i);\n tentative_distance = Double.MAX_VALUE;\n // evaluate nearest neighbour\n for (int j = 0; j < points.size(); j++) {\n dist = getDistance(points.get(j), current);\n if (dist < tentative_distance) {\n tentative_distance = dist;\n indexToRemove = j;\n }\n }\n //System.out.println(\"next point: #\" + points.get(indexToRemove).getId());\n cummulative_distance += getDistance(points.get(indexToRemove), current);\n current = points.remove(indexToRemove);\n }\n // add distance to endpoint\n cummulative_distance += getDistance(current, endPoint);\n return cummulative_distance;\n }", "@Test\n\tpublic void testLateralNeighbors() {\n\t\tPosition left = new Position(0,0);\n\t\tPosition right = new Position(1,0);\n\n\t\tint distance = euclideanSquaredMetric.calculateCost(left, right);\n\t\tassertEquals(lateralDistanceWeight, distance);\n\n\t\tPosition top = new Position(0,0);\n\t\tPosition bottom = new Position(0,1);\n\n\t\tdistance = euclideanSquaredMetric.calculateCost(top, bottom);\n\t\tassertEquals(lateralDistanceWeight, distance);\n\t}", "private Exemplar nearestExemplar(Instance inst){\n\n if (m_Exemplars == null)\n return null;\n Exemplar cur = m_Exemplars, nearest = m_Exemplars;\n double dist, smallestDist = cur.squaredDistance(inst);\n while (cur.next != null){\n cur = cur.next;\n dist = cur.squaredDistance(inst);\n if (dist < smallestDist){\n\tsmallestDist = dist;\n\tnearest = cur;\n }\n }\n return nearest;\n }", "public static double BruteForceClosestPairs(ArrayList<Point> P) {\n\n\t\t//Assume closest distance is very large\n\t\tdouble distance = Double.POSITIVE_INFINITY;\n\t\t//Size of Arraylist\n\t\tint size = P.size();\n\t\t// New minimum \n\t\tdouble distchange = 0.0;\n\n\t\tfor (int i = 0; i < size - 1; i++) {\n\t\t\tfor (int j = i + 1; j < size; j++) {\n\n\t\t\t\tdistchange = distance;\n\t\t\t\t// Calculate distance between two points\n\t\t\t\tdistance = Math.min(Math.sqrt(Math.pow(P.get(i).getX() - P.get(j).getX(), 2) \n\t\t\t\t\t\t + Math.pow(P.get(i).getY() - P.get(j).getY(), 2)), distance);\n\t\t\t\t\n\t\t\t\tif (distchange != distance) {\n\t\t\t\t\t// If a new min was found, assign the new points \n\t\t\t\t\t// used for output to get \"coordinates of closest pair\"\n\t\t\t\t\tcoordinatepairs = \"(\" + P.get(i).getX() + \", \" + P.get(i).getY()+ \"), \" +\n\t\t\t\t\t\t\t\t \"(\" + P.get(j).getX() + \", \" + P.get(j).getY() + \")\";\n\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\treturn distance;\t\t\t\n\t}", "public Point getFurthermost(){\n\t\t\tdouble distance;\n\t\t\tdouble distanceMin = Double.MAX_VALUE;\n\t\t\tPoint centroid = centroid();\n\t\t\tPoint closest = new Point();\n\t\t\tfor(Point p : clusterPointsList){\n\t\t\t\tdistance = p.dist(centroid);\t\t\t\n\t\t\t\tif(distance < distanceMin){\n\t\t\t\t\tdistanceMin = distance;\n\t\t\t\t\tclosest = p;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn closest;\n\t\t}", "@Test\n public void testPreviousIndex_Middle() {\n\n OasisList<Integer> baseList = new SegmentedOasisList<>();\n baseList.addAll(Arrays.asList(1, 2, 6, 8));\n\n ListIterator<Integer> instance = baseList.listIterator();\n instance.next();\n instance.next();\n\n int expResult = 1;\n int result = instance.previousIndex();\n\n assertEquals(expResult, result);\n }", "@Test\n public void testPrevious_Middle() {\n OasisList<Integer> baseList = new SegmentedOasisList<>();\n baseList.addAll(Arrays.asList(1, 2, 5, 8));\n\n ListIterator<Integer> instance = baseList.listIterator();\n instance.next();\n instance.next();\n instance.next();\n\n Integer expResult = 5;\n Integer result = instance.previous();\n assertEquals(expResult, result);\n }", "private Point findLeadingPt() {\n\t\tPoint2D.Double pt1 = new Point2D.Double(xs[0], ys[0]);\n\t\tPoint2D.Double pt2 = new Point2D.Double(xs[1], ys[1]);\n\t\tPoint2D.Double pt3 = new Point2D.Double(xs[2], ys[2]);\n\n\t\tPoint leadingPt = new Point((int) pt2.getX(), (int) pt2.getY());\n\t\tdouble smallestRadius = this.findRadiusFromChordAndPt(pt1, pt3, pt2);\n\n\t\tfor (int i = 2; i < xs.length - 1; i++) {\n\t\t\tPoint2D.Double ptA = new Point2D.Double(xs[i - 1], ys[i - 1]);\n\t\t\tPoint2D.Double ptC = new Point2D.Double(xs[i], ys[i]);\n\t\t\tPoint2D.Double ptB = new Point2D.Double(xs[i + 1], ys[i + 1]);\n\t\t\tif (smallestRadius > this.findRadiusFromChordAndPt(ptA, ptB, ptC)) {\n\t\t\t\tsmallestRadius = this.findRadiusFromChordAndPt(ptA, ptB, ptC);\n\t\t\t\tleadingPt = new Point((int) ptC.getX(), (int) ptC.getY());\n\t\t\t}\n\t\t}\n\t\t/*\n\t\t * double yArrow = Controller.flowArrow.findCenterOfMass().getY(); for (int i =\n\t\t * 0; i < xs.length; i++) { if (ys[i] == yArrow) { leadingPt = new Point((int)\n\t\t * xs[i], (int) ys[i]); } }\n\t\t */\n\t\treturn leadingPt;\n\t}", "protected Coordinates intersectionFromClosestPoints() {\n if (closestPointA != null && closestPointB != null\n && geometry.almostEqual(closestPointA, closestPointB)) {\n return closestPointA;\n } else {\n return null;\n }\n }", "private double distancePointToSegment(Vector point, Vector startSegment, Vector endSegment) {\n\t\t// Segment. Starts and Ends in the same point -> Distance == distance\n\t\tif (startSegment.subtract(endSegment).equals(NULL_VECTOR_3DIM)) {\n\t\t\treturn point.subtract(startSegment).getNorm(); // Length of a-b\n\t\t}\n\t\t// https://en.wikipedia.org/wiki/Distance_from_a_point_to_a_line\n\t\t/*\n\t\t * es reicht aber aus, wenn man zusätzlich noch die Länge AB der Strecke\n\t\t * kennt. (Die Strecke sei AB, der Punkt P.) Dann kann man nämlich\n\t\t * testen, ob der Winkel bei A (PB²>PA²+AB²) oder bei B (PA²>PB²+AB²)\n\t\t * stumpf (>90 <180grad) ist. Im ersten Fall ist PA, im zweiten PB der\n\t\t * kürzeste Abstand, ansonsten ist es der Abstand P-Gerade(AB).\n\t\t */\n\n\t\t// TESTEN WO ES AM NÄCHSTEN AN DER STRECKE IST,NICHT NUR AN DER GERADEN\n\t\tline = startSegment.subtract(endSegment); // Vektor von start zum end.\n\t\tlineToPoint = startSegment.subtract(point); // vom start zum punkt.\n\t\tlineEnd = endSegment.subtract(startSegment); // vom ende zum start\n\t\tlineEndToPoint = endSegment.subtract(point); // vom start zum ende\n\n\t\t// Wenn größer 90Grad-> closest ist start\n\t\tdouble winkelStart = getWinkel(line, lineToPoint);\n\t\t// Wenn größer 90Grad -> closest ist end\n\t\tdouble winkelEnde = getWinkel(lineEnd, lineEndToPoint);\n\t\tif (winkelStart > 90.0 && winkelStart < 180.0) {\n\t\t\t// Start ist am nächsten. Der winkel ist über 90Grad somit wurde nur\n\t\t\t// der nächste nachbar auf der geraden ausserhalb der strecke\n\t\t\t// gefunden\n\t\t\treturn startSegment.subtract(point).getNorm();\n\t\t}\n\t\tif (winkelEnde > 90.0 && winkelEnde < 180.0) {\n\t\t\t// Ende ist am nächsten\n\t\t\treturn endSegment.subtract(point).getNorm();\n\t\t}\n\n\t\t// If not returned yet. The closest position ist on the line\n\t\treturn closestDistanceFromPointToEndlessLine(point, startSegment, endSegment);\n\t}", "private GeoPoint getClosestPoint(List<GeoPoint> intersectionPoints) {\n Point3D p0 = scene.getCamera().getSpo();//the point location of the camera.\n double minDist = Double.MAX_VALUE;//(meatchelim ldistance hamaximily)\n double currentDistance = 0;\n GeoPoint pt = null;\n for (GeoPoint geoPoint : intersectionPoints) {\n currentDistance = p0.distance(geoPoint.getPoint());//checks the distance from camera to point\n if (currentDistance < minDist) {\n minDist = currentDistance;\n pt = geoPoint;\n }\n }\n return pt;\n }", "Point findNearestActualPoint(Point a, Point b) {\n\t\tPoint left = new Point(a.x-this.delta/3,a.y);\n\t\tPoint right = new Point(a.x+this.delta/3,a.y);\n\t\tPoint down = new Point(a.x,a.y-this.delta/3);\n\t\tPoint up = new Point(a.x,a.y+this.delta/3);\n\t\tPoint a_neighbor = left;\n\t\tif (distance(right,b) < distance(a_neighbor,b)) a_neighbor = right;\n\t\tif (distance(down,b) < distance(a_neighbor,b)) a_neighbor = down;\n\t\tif (distance(up,b) < distance(a_neighbor,b)) a_neighbor = up;\n\n\t\treturn a_neighbor;\n\t}", "public Point3D findClosestPoint(List<Point3D> pointsList) {\n /**\n * the near point\n */\n Point3D result = null;\n /**\n * initialize with a big number that we sure it will change\n */\n double closestDistance = Double.MAX_VALUE;\n\n /**\n * if the point equals to null, it`s mean there\n * is no point that close to it\n */\n if (pointsList == null) {\n return null;\n }\n\n for (Point3D p : pointsList) {\n double temp = p.distance(_p0);\n if (temp < closestDistance) {\n closestDistance = temp;\n result = p;\n }\n }\n\n return result;\n }", "@Test\n public void test23() throws Throwable {\n double double0 = UnivariateRealSolverUtils.midpoint((-1052.8959089), (-1052.8959089));\n assertEquals((-1052.8959089), double0, 0.01D);\n }", "@Override\n public Point nearest(double x, double y) {\n double distance = Double.POSITIVE_INFINITY;\n Point nearestPoint = new Point(0, 0);\n Point targetPoint = new Point(x, y);\n\n for (Point p : pointsList) {\n double tempdist = Point.distance(p, targetPoint);\n if (tempdist < distance) {\n distance = tempdist;\n nearestPoint = p;\n }\n }\n\n return nearestPoint;\n }", "public Point closestIntersectionToStartOfLine(Rectangle rect) {\r\n List<Point> list = rect.intersectionPoints(this);\r\n if (list.isEmpty()) {\r\n return null;\r\n // there is only one point in list\r\n } else if (list.size() == 1) {\r\n return list.get(0);\r\n // first point in list closer than the second one\r\n } else if (this.start.distance(list.get(0)) < this.start.distance(list.get(1))) {\r\n return list.get(0);\r\n // second point in list closer than the first one\r\n } else {\r\n return list.get(1);\r\n }\r\n }", "@Test\n public void testDistanceTo() {\n System.out.println(\"Testing distanceTo() for a range of different GPS coordinates\");\n double distancesExpected[] = {\n 786.3,\n 786.3,\n 786.3,\n 786.3,\n\t\t\t102.2,\n\t\t\t102.2,\n\t\t\t102.2,\n\t\t\t102.2\n };\n\t\t\n for (int i = 0; i < this.testCoordinates.length; i++) {\n double expResult = distancesExpected[i];\n double result = this.origin.distanceTo(this.testCoordinates[i]);\n\t\t\tSystem.out.println(\"Expected: \" + expResult + \", Actual: \" + result);\n assertEquals(expResult, result, 0.1);\n }\n }", "private static Point getNearest(Collection<Point> centers, Point p) {\n\t\tdouble min = 0;\n\t\tPoint minPoint = null;\n\t\tfor(Point c : centers){\n\t\t\tif(minPoint == null || c.distance(p) < min){\n\t\t\t\tmin = c.distance(p);\n\t\t\t\tminPoint = c;\n\t\t\t}\n\t\t}\n\t\treturn minPoint;\n\t}", "@Test\n public void testHasPrevious_Middle() {\n OasisList<Integer> baseList = new SegmentedOasisList<>();\n baseList.addAll(Arrays.asList(1, 2, 3, 4, 5));\n\n ListIterator<Integer> instance = baseList.listIterator();\n\n instance.next();\n instance.next();\n\n boolean expResult = true;\n boolean result = instance.hasPrevious();\n\n assertEquals(expResult, result);\n }", "private Point[] nearestPointInArray(Point[] strip){\n\t\tint j = 1; // with each point we measure the distance with the following 6 point's\n\t\tPoint[] currentMinPoints = {strip[0],strip[1]};\n\t\tdouble currentMinDistance = Distance(currentMinPoints[0], currentMinPoints[1]);\n\t\tdouble currentDistance;\t\n\t\tfor (int i=0; i< strip.length; i++){\n\t\t\twhile (j<8 && i+j < strip.length){\n\t\t\t\tcurrentDistance = Distance(strip[i], strip[i+j]);\n\t\t\t\tif (currentDistance<currentMinDistance){\n\t\t\t\t\tcurrentMinDistance = currentDistance;\n\t\t\t\t\tcurrentMinPoints[0] = strip[i];\n\t\t\t\t\tcurrentMinPoints[1] = strip[i+j];\n\t\t\t\t}\n\t\t\t\tj++;\n\t\t\t}\n\t\t\tj=1;\n\t\t}\n\t\treturn currentMinPoints;\n\t}", "private GeoPoint getClosestPoint(List<GeoPoint> points) {\r\n\t\tGeoPoint closestPoint = null;\r\n\t\tdouble distance = Double.MAX_VALUE;\r\n\r\n\t\tPoint3D P0 = _scene.get_camera().get_p0();\r\n\r\n\t\tfor (GeoPoint i : points) {\r\n\t\t\tdouble tempDistance = i.point.distance(P0);\r\n\t\t\tif (tempDistance < distance) {\r\n\t\t\t\tclosestPoint = i;\r\n\t\t\t\tdistance = tempDistance;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn closestPoint;\r\n\r\n\t}", "public static IDirectPosition getClosestPointsInDirection(\n IDirectPosition point, IDirectPosition previousPoint,\n IDirectPosition nextPoint, IGeometry geom, boolean left) {\n\n double minDistance = Double.MAX_VALUE;\n IDirectPosition c0;\n IDirectPosition c2;\n\n if (previousPoint != null) {\n c0 = previousPoint;\n c2 = point;\n } else {\n c0 = point;\n c2 = nextPoint;\n }\n IDirectPosition toReturn = null;\n for (IDirectPosition p : geom.coord()) {\n double distance = point.distance2D(p);\n if (distance < minDistance) {\n // Calculation of the angle (c0, p, c2) in a radian value between -pi\n // and pi.\n\n // Calculation of the coordinate of c1-c0 vector\n double x10 = c0.getX() - p.getX();\n double y10 = c0.getY() - p.getY();\n\n // Calculation of the coordinate of c1-c0 vector\n double x12 = c2.getX() - p.getX();\n double y12 = c2.getY() - p.getY();\n\n double angle = Math.atan2(x10 * y12 - y10 * x12, x10 * x12 + y10 * y12);\n\n // angle = angle % (2 * Math.PI);\n if ((left && (angle >= 0)) || (!left && (angle <= 0))) {\n minDistance = distance;\n toReturn = p;\n }\n\n }\n }\n\n return toReturn;\n\n }", "private static void findClosestElement(int[] a, int element) {\n int low = 0, high = a.length - 1;\n\n\n // Corner cases\n if (a[high] < element) {\n System.out.println(a[high]);\n return;\n }\n\n if (element < a[low]) {\n System.out.println(a[low]);\n return;\n }\n\n while (low <= high) {\n\n int mid = low + (high - low) / 2;\n\n // element == mid\n if (a[mid] == element) {\n\n int leftDiff = Integer.MAX_VALUE;\n int rightDiff = Integer.MAX_VALUE;\n\n if (mid > 0) {\n leftDiff = element - a[mid - 1];\n }\n\n if (mid < a.length - 1) {\n rightDiff = a[mid + 1] - element;\n }\n\n\n if (leftDiff != Integer.MAX_VALUE && leftDiff < rightDiff) {\n System.out.println(a[mid - 1]);\n } else if (rightDiff != Integer.MAX_VALUE) {\n System.out.println(a[mid + 1]);\n }\n return;\n }\n\n // element < mid\n if (element < a[mid]) {\n\n if (low <= mid - 1 && a[mid - 1] < element) { // Cross over point is mid-1 to mid\n System.out.println(getClosest(element, a[mid - 1], a[mid]));\n return;\n } else\n high = mid;\n } else {\n if (mid + 1 <= high && element < a[mid + 1]) { // Cross over point is mid to mid+1\n System.out.println(getClosest(element, a[mid], a[mid + 1]));\n return;\n } else\n low = mid + 1;\n }\n }\n\n }", "@Test\n public void getDistancesTest() {\n final double[] pointA = new double[3];\n final double[] pointB = new double[3];\n double result;\n\n //points\n //A->B\n pointA[0] = -4; pointA[1] = -6; pointA[2] = -3;\n pointB[0] = 2; pointB[1] = 3; pointB[2] = 4;\n result = Math.sqrt(166);\n Assert.assertEquals(\"getDistanceBetween2Envelopes : A -> B\", result, getDistanceBetween2Positions(pointA, pointB), EPSILON);\n //b->A\n Assert.assertEquals(\"getDistanceBetween2Envelopes : B -> A\", result, getDistanceBetween2Positions(pointB, pointA), EPSILON);\n\n final double[] envelopeA = new double[6];\n final double[] envelopeB = new double[6];\n\n //envelopes\n //A->B\n envelopeA[0] = -6; envelopeA[3] = -2;\n envelopeA[1] = -12; envelopeA[4] = 0;\n envelopeA[2] = -3.5; envelopeA[5] = -2.5;\n\n envelopeB[0] = 1; envelopeB[3] = 3;\n envelopeB[1] = 0; envelopeB[4] = 6;\n envelopeB[2] = 3.5; envelopeB[5] = 4.5;\n Assert.assertEquals(\"getDistanceBetween2Envelopes : A -> B\", result, getDistanceBetween2Envelopes(envelopeA, envelopeB), EPSILON);\n //b->A\n Assert.assertEquals(\"getDistanceBetween2Envelopes : B -> A\", result, getDistanceBetween2Envelopes(envelopeB, envelopeA), EPSILON);\n }", "@Override\r\n\tpublic int compareTo(Candidate e) {\n\t double d = e.getDistance();\r\n\t \r\n\t if (this.getDistance() <= d) {\r\n\t return -1;\r\n\t }\r\n\t\r\n\t if (this.getDistance() > d) {\r\n\t return 1;\r\n\t }\r\n\t \r\n\t // Should not reach here \r\n\t return 0;\r\n\t}", "public static List<Point> ParetoOptimal(List<Point> listofPts)\n {\n \n if(listofPts.size() == 1 || listofPts.size() == 0)\n return listofPts;\n \n \n \n \n int pos = listofPts.size() /2 ;\n \n /*\n * quickSelect time complexity (n)\n */\n \n Point median = quickSelect(listofPts, pos, 0, listofPts.size() - 1); \n \n \n \n List<Point> points1 = new ArrayList<Point>();\n List<Point> points2 = new ArrayList<Point>();\n List<Point> points3 = new ArrayList<Point>();\n List<Point> points4 = new ArrayList<Point>();\n \n //O(n)\n if(oldMedian == median)\n {\n \t\n for(int x= 0; x < listofPts.size(); x++)\n {\n if(listofPts.get(x).getX() <= median.getX())\n {\n points1.add(listofPts.get(x));\n \n }\n else\n {\n points2.add(listofPts.get(x));\n \n }\n }\n \n \n }\n else\n {\n for(int x= 0; x < listofPts.size(); x++)\n {\n if(listofPts.get(x).getX() < median.getX())\n {\n points1.add(listofPts.get(x));\n \n }\n else\n {\n points2.add(listofPts.get(x));\n \n }\n }\n \n \n }\n //O(n)\n int yRightMax = -100000;\n for(int x= 0; x < points2.size(); x++)\n {\n if(points2.get(x).getY() > yRightMax)\n yRightMax = (int) points2.get(x).getY();\n \n }\n \n \n for(int x= 0; x < points1.size() ; x++)\n {\n if(points1.get(x).getY()> yRightMax)\n { \n points3.add(points1.get(x));\n \n } \n }\n \n for(int x= 0; x < points2.size() ; x++)\n {\n if(points2.get(x).getY() < yRightMax)\n {\n points4.add(points2.get(x));\n \n }\n \n }\n //System.out.println(\"points2: \" + points2);\n /*\n * Below bounded by T(n/c) + T(n/2) where c is ratio by which left side is shortened \n */\n oldMedian = median;\n return addTo \n ( ParetoOptimal(points3), \n ParetoOptimal(points2)) ;\n }", "@Test\n public void testPreviousIndex_Start() {\n OasisList<Integer> baseList = new SegmentedOasisList<>();\n baseList.addAll(Arrays.asList(1, 2, 3, 4, 5));\n\n ListIterator<Integer> instance = baseList.listIterator();\n int expResult = -1;\n int result = instance.previousIndex();\n\n assertEquals(expResult, result);\n }", "private PointDist findNearest(Node curr, RectHV rect, PointDist minP, boolean Isx) {\n double currDist;\n PointDist p1;\n PointDist p2;\n // double currDist = findNearP.distanceSquaredTo(curr.point);\n /*\n if (currDist < pointDist.dist)\n minP = new PointDist(curr.point, currDist);\n else\n minP = pointDist;\n\n */\n if (Isx) {\n if (curr.left != null) {\n RectHV leftRect = new RectHV(rect.xmin(), rect.ymin(), curr.point.x(), rect.ymax());\n currDist = findNearP.distanceSquaredTo(curr.left.point);\n if (currDist < minP.dist)\n minP = new PointDist(curr.left.point, currDist);\n if (minP.dist > leftRect.distanceSquaredTo(findNearP)) {\n p1 = findNearest(curr.left, leftRect, minP, false);\n if (p1 != null)\n if (p1.dist < minP.dist)\n minP = p1;\n }\n }\n if (curr.right != null) {\n RectHV rightRect = new RectHV(curr.point.x(), rect.ymin(), rect.xmax(), rect.ymax());\n currDist = findNearP.distanceSquaredTo(curr.right.point);\n if (currDist < minP.dist)\n minP = new PointDist(curr.right.point, currDist);\n if (minP.dist > rightRect.distanceSquaredTo(findNearP)) {\n p2 = findNearest(curr.right, rightRect, minP, false);\n if (p2 != null)\n if (p2.dist < minP.dist)\n minP = p2;\n }\n }\n }\n else {\n if (curr.left != null) {\n RectHV leftRect = new RectHV(rect.xmin(), rect.ymin(), rect.xmax(), curr.point.y());\n currDist = findNearP.distanceSquaredTo(curr.left.point);\n if (currDist < minP.dist)\n minP = new PointDist(curr.left.point, currDist);\n if (minP.dist > leftRect.distanceSquaredTo(findNearP)) {\n p1 = findNearest(curr.left, leftRect, minP, true);\n if (p1 != null)\n if (p1.dist < minP.dist)\n minP = p1;\n }\n }\n if (curr.right != null) {\n RectHV rightRect = new RectHV(rect.xmin(), curr.point.y(), rect.xmax(), rect.ymax());\n currDist = findNearP.distanceSquaredTo(curr.right.point);\n if (currDist < minP.dist)\n minP = new PointDist(curr.right.point, currDist);\n if (minP.dist > rightRect.distanceSquaredTo(findNearP)) {\n p2 = findNearest(curr.right, rightRect, minP, true);\n if (p2 != null)\n if (p2.dist < minP.dist)\n minP = p2;\n }\n }\n }\n return minP;\n }", "private Point findTrailingPt() {\n\t\tPoint farthestPt = new Point(getDisplayXs()[0], getDisplayYs()[0]);\n\t\tfor (int i = 0; i < getDisplayXs().length; i++) {\n\t\t\tPoint nextPt = new Point(getDisplayXs()[i], getDisplayYs()[i]);\n\t\t\tPoint centerOfMass = Controller.flowArrow.findCenterOfMass();\n\t\t\tif (farthestPt.distance(centerOfMass) < nextPt.distance(centerOfMass)) {\n\t\t\t\tfarthestPt = nextPt; // update fartestPt\n\t\t\t}\n\t\t}\n\t\treturn farthestPt;\n\t}", "private double[] getGoalPointAtLookaheadDistance(\n double[] initialPointOfLine, double[] finalPointOfLine, double[] nearestPoint) {\n\n // TODO: use lookahead distance proportional to robot max speed -> 0.5 * getRobotMaxSpeed()\n return Geometry.getPointAtDistance(\n initialPointOfLine, finalPointOfLine, nearestPoint, lookaheadDistance);\n }", "ArrayList<OrderedPair<Curve, Integer>>\n tryFindIntersections(\n XY mid_point,\n HashSet<Curve> all_curves,\n HashSet<XY> curve_joints,\n double diameter, double tol,\n Random random)\n {\n for (int i = 0; i < 25; i++)\n {\n double rand_ang = random.nextDouble() * Math.PI * 2;\n double dx = Math.sin(rand_ang);\n double dy = Math.cos(rand_ang);\n\n XY direction = new XY(dx, dy);\n\n XY start = mid_point.minus(direction.multiply(diameter));\n\n LineCurve lc = new LineCurve(start, direction, 2 * diameter);\n\n // must use a smaller tolerance here as our curve splitting can\n // give us curves < 2 * tol long, and if we are on the midpoint of one of those\n // we can't cleat both ends by tol...\n if (!lineClearsPoints(lc, curve_joints, tol / 10))\n continue;\n\n ArrayList<OrderedPair<Curve, Integer>> ret =\n tryFindCurveIntersections(lc, all_curves);\n\n if (ret != null)\n {\n return ret;\n }\n }\n\n return null;\n }", "static S2Point closestAcceptableEndpoint(\n S2Point a0, S2Point a1, S2Point aNorm, S2Point b0, S2Point b1, S2Point bNorm, S2Point x) {\n CloserResult r = new CloserResult(Double.POSITIVE_INFINITY, x);\n if (orderedCCW(b0, a0, b1, bNorm)) {\n r.replaceIfCloser(x, a0);\n }\n if (orderedCCW(b0, a1, b1, bNorm)) {\n r.replaceIfCloser(x, a1);\n }\n if (orderedCCW(a0, b0, a1, aNorm)) {\n r.replaceIfCloser(x, b0);\n }\n if (orderedCCW(a0, b1, a1, aNorm)) {\n r.replaceIfCloser(x, b1);\n }\n return r.getVmin();\n }", "public Point getClosest(){\n\t\t\tdouble distance;\n\t\t\tdouble distanceMax = 0.0;\n\t\t\tPoint centroid = centroid();\n\t\t\tPoint furthermost = new Point();\n\t\t\tfor(Point p : clusterPointsList){\n\t\t\t\tdistance = p.dist(centroid);\t\t\t\n\t\t\t\tif(distance > distanceMax){\n\t\t\t\t\tdistanceMax = distance;\n\t\t\t\t\tfurthermost = p;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn furthermost;\n\t\t}", "protected IgniteBiTuple<Integer, Double> findClosest(Vector[] centers, Vector pnt) {\n double bestDistance = Double.POSITIVE_INFINITY;\n int bestInd = 0;\n\n for (int i = 0; i < centers.length; i++) {\n double dist = distance(centers[i], pnt);\n if (dist < bestDistance) {\n bestDistance = dist;\n bestInd = i;\n }\n }\n\n return new IgniteBiTuple<>(bestInd, bestDistance);\n }", "private Point2D nearest(Node x, Point2D p, RectHV rect, boolean test) {\n\t\tPoint2D incumbent = x.point;\n\t\tPoint2D challenger;\n\t\tRectHV leftRect, rightRect;\n\t\tdouble distance = incumbent.distanceTo(p);\n\t\t\n\t\tif (test) {\n\t\t\tleftRect = new RectHV(rect.xmin(), rect.ymin(), x.point.x(), rect.ymax());\n\t\t\trightRect = new RectHV(x.point.x(), rect.ymin(), rect.xmax(), rect.ymax());\n\t\t} else {\n\t\t\tleftRect = new RectHV(rect.xmin(), rect.ymin(), rect.xmax(), x.point.y());\n\t\t\trightRect = new RectHV(rect.xmin(), x.point.y(), rect.xmax(), rect.ymax());\n\t\t}\n\n\t\tdouble comp = comparePoints(x, p, test);\n\t\tif (comp <= 0) {\n\t\t\tif (x.left != null) {\n\t\t\t\tif ((challenger = nearest(x.left, p, leftRect, !test)).distanceTo(p) < distance) {\n\t\t\t\t\tincumbent = challenger;\n\t\t\t\t\tdistance = challenger.distanceTo(p);\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (x.right != null) {\n\t\t\t\tif (rightRect.distanceTo(p) < distance) {\n\t\t\t\t\tif ((challenger = nearest(x.right, p, rightRect, !test)).distanceTo(p) < distance) {\n\t\t\t\t\t\tincumbent = challenger;\n\t\t\t\t\t\tdistance = challenger.distanceTo(p);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\telse {\n\t\t\tif (x.right != null) {\n\t\t\t\tif ((challenger = nearest(x.right, p, rightRect, !test)).distanceTo(p) < distance) {\n\t\t\t\t\tincumbent = challenger;\n\t\t\t\t\tdistance = challenger.distanceTo(p);\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (x.left != null) {\n\t\t\t\tif (leftRect.distanceTo(p) < distance) {\n\t\t\t\t\tif ((challenger = nearest(x.left, p, leftRect, !test)).distanceTo(p) < distance) {\n\t\t\t\t\t\tincumbent = challenger;\n\t\t\t\t\t\tdistance = challenger.distanceTo(p);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn incumbent;\n\t}", "private void computeDistances() {\n for (int i = 0; i < groundTruthInstant.size(); ++i)\n for (int j = 0; j < estimatedInstant.size(); ++j) {\n float currentDist = groundTruthInstant.get(i).getDistanceTo(estimatedInstant.get(j).getPos());\n if (currentDist < distToClosestEstimate[i][0]) {\n distToClosestEstimate[i][0] = currentDist;\n distToClosestEstimate[i][1] = j;\n }\n }\n }", "private Coordinate fetchClosestIntersection (Coordinate endPoint, List<Coordinate> intersectionPoints) {\r\n\t\tif (intersectionPoints!=null ) {\r\n\t\t\tif (intersectionPoints.size()>1) {\r\n\t\t\t\treturn GeometryOperations.getNearestVertex(endPoint, intersectionPoints.toArray(new Coordinate[0]));\r\n\t\t\t}\r\n\t\t\t if (intersectionPoints.size()==1) {\r\n\t\t\t\t\treturn intersectionPoints.get(0);\r\n\t\t\t }\r\n\t\t} \r\n\t\treturn null;\r\n\t}", "public static void main(String[] args) {\n \n PointSET pset = new PointSET();\n System.out.println(\"Empty: \" + pset.isEmpty());\n pset.insert(new Point2D(0.5, 0.5));\n pset.insert(new Point2D(0.5, 0.5));\n pset.insert(new Point2D(0.5, 0.6));\n pset.insert(new Point2D(0.5, 0.7));\n pset.insert(new Point2D(0.5, 0.8));\n pset.insert(new Point2D(0.1, 0.5));\n pset.insert(new Point2D(0.8, 0.5));\n pset.insert(new Point2D(0.1, 0.1));\n System.out.println(\"Empty: \" + pset.isEmpty());\n System.out.println(\"Size: \" + pset.size());\n System.out.println(\"Nearest to start: \" + pset.nearest(new Point2D(0.0, 0.0)));\n System.out.println(\"Contains #1: \" + pset.contains(new Point2D(0.0, 0.0)));\n System.out.println(\"Contains #2: \" + pset.contains(new Point2D(0.5, 0.5)));\n System.out.print(\"Range #1: \");\n for (Point2D p : pset.range(new RectHV(0.001, 0.001, 0.002, 0.002)))\n System.out.print(p.toString() + \"; \");\n System.out.print(\"\\n\");\n System.out.print(\"Range #2: \");\n for (Point2D p : pset.range(new RectHV(0.05, 0.05, 0.15, 0.15)))\n System.out.print(p.toString() + \"; \");\n System.out.print(\"\\n\");\n System.out.print(\"Range #3: \");\n for (Point2D p : pset.range(new RectHV(0.25, 0.35, 0.65, 0.75)))\n System.out.print(p.toString() + \"; \");\n System.out.print(\"\\n\");\n \n }", "private List<Integer> getClosestRange(List<Integer> ranges, double predictionAmount) {\n List<Integer> bestRange = new ArrayList<>();\n double bestRangeDistance = Double.MAX_VALUE;\n for (int i = 0; i < ranges.size(); i += 2) {\n double rangeDistance = Math.abs(predictionAmount - getRangeCenter(ranges.get(i), ranges.get(i + 1)));\n if (rangeDistance < bestRangeDistance) {\n bestRangeDistance = rangeDistance;\n bestRange.clear();\n bestRange.add(ranges.get(i));\n bestRange.add(ranges.get(i + 1));\n }\n }\n return bestRange;\n }", "private Point findFront(Point[] points) {\n\t\t// Loop through the passed points.\n\t\tdouble[] dists = new double[3];\n\t\tfor (int i = 0; i < 3; i++) {\n\t\t\t// Get outer-loop point.\n\t\t\tPoint a = points[i];\n\t\t\t\n\t\t\t// Loop through rest of points.\n\t\t\tfor (int k = 0; k < 3; k++) {\n\t\t\t\t// Continue if current outer.\n\t\t\t\tif (i == k) continue;\n\t\t\t\t\n\t\t\t\t// Get inner-loop point.\n\t\t\t\tPoint b = points[k];\n\t\t\t\t\n\t\t\t\t// Add distance between out and inner.\n\t\t\t\tdists[i] += Math.sqrt(\n\t\t\t\t\tMath.pow(a.x - b.x, 2) + Math.pow(a.y - b.y, 2)\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\t\t\n\t\t// Prepare index and largest holder.\n\t\tint index = 0;\n\t\tdouble largest = 0;\n\t\t\n\t\t// Loop through the found distances.\n\t\tfor (int i = 0; i < 3; i++) {\n\t\t\t// Skip if dist is lower than largest.\n\t\t\tif (dists[i] < largest) continue;\n\t\t\t\n\t\t\t// Save the index and largest value.\n\t\t\tindex = i;\n\t\t\tlargest = dists[i];\n\t\t}\n\t\t\n\t\t// Return the largest point index.\n\t\treturn points[index];\n\t}", "synchronized protected int findClosestSegment(final int x_p, final int y_p, final long layer_id, final double mag) {\n\t\tif (1 == n_points) return -1;\n \t\tif (0 == n_points) return -1;\n \t\tint index = -1;\n \t\tdouble d = (10.0D / mag);\n \t\tif (d < 2) d = 2;\n \t\tdouble sq_d = d*d;\n \t\tdouble min_sq_dist = Double.MAX_VALUE;\n \t\tfinal Calibration cal = layer_set.getCalibration();\n \t\tfinal double z = layer_set.getLayer(layer_id).getZ() * cal.pixelWidth;\n \n \t\tdouble x2 = p[0][0] * cal.pixelWidth;\n \t\tdouble y2 = p[1][0] * cal.pixelHeight;\n \t\tdouble z2 = layer_set.getLayer(p_layer[0]).getZ() * cal.pixelWidth;\n \t\tdouble x1, y1, z1;\n \n \t\tfor (int i=1; i<n_points; i++) {\n \t\t\tx1 = x2;\n \t\t\ty1 = y2;\n \t\t\tz1 = z2;\n \t\t\tx2 = p[0][i] * cal.pixelWidth;\n \t\t\ty2 = p[1][i] * cal.pixelHeight;\n \t\t\tz2 = layer_set.getLayer(p_layer[i]).getZ() * cal.pixelWidth;\n \n \t\t\tdouble sq_dist = M.distancePointToSegmentSq(x_p * cal.pixelWidth, y_p * cal.pixelHeight, z,\n \t\t\t\t\t x1, y1, z1,\n \t\t\t\t\t\t\t\t x2, y2, z2);\n \n \t\t\tif (sq_dist < sq_d && sq_dist < min_sq_dist) {\n \t\t\t\tmin_sq_dist = sq_dist;\n \t\t\t\tindex = i-1; // previous\n \t\t\t}\n \t\t}\n \t\treturn index;\n \t}", "public double closestPointInSegment(Vector v1, Vector v2) {\n if (v1.same(v2)) return dist(v1);\n\n Vector v = this.sub(v1);\n Vector p = v2.sub(v1).norm();\n\n Vector proj = p.mul(v.dot(p)).add(v1);\n if (proj.inBoundingBox(v1, v2)) {\n return Math.abs(v2.x - v1.x) > EPS ?\n (proj.x - v1.x) / (v2.x - v1.x)\n : (proj.y - v1.y) / (v2.y - v1.y);\n } else {\n return dist(v1) < dist(v2) ? 0 : 1;\n }\n }", "private int locate (List<Integer> list, int hash) {\n\t\tif (list.size() == 0) {\n\t\t\treturn 0;\n\t\t}\n\n\t\tint index_a = -1;\n\t\tint index_b = list.size();\n\t\tfloat value_a = (float)list.get(index_a+1);\n\t\tfloat value_b = (float)list.get(index_b-1);\n\t\tfloat hash_float = (float)hash;\n\n\t\tif (hash <= value_a) {\n\t\t\treturn 0;\n\t\t}\n\t\tif (hash > value_b) {\n\t\t\treturn list.size();\n\t\t}\n\n\t\twhile (index_b - index_a > 1) {\n\t\t\tint index_mid = index_a+(int)((float)(index_b-index_a)*(hash_float-value_a)/(value_b-value_a));\n\t\t\tif (index_mid == index_a) {\n\t\t\t\tindex_mid++;\n\t\t\t} else if (index_mid == index_b) {\n\t\t\t\tindex_mid--;\n\t\t\t}\n\t\t\tif (hash >= list.get(index_mid)) {\n\t\t\t\tindex_a = index_mid;\n\t\t\t\tvalue_a = list.get(index_a);\n\t\t\t} else {\n\t\t\t\tindex_b = index_mid;\n\t\t\t\tvalue_b = list.get(index_b);\n\t\t\t}\n\t\t}\n\t\tif (hash == list.get(index_a)) {\n\t\t\treturn index_a;\n\t\t}\n\t\treturn index_b;\n\t}", "public Coordinates midPoint(Coordinates a, Coordinates b);", "private int calcDistance()\n\t{\n\t\tint distance = 0;\n\n\t\t// Generate a sum of all of the difference in locations of each list element\n\t\tfor(int i = 0; i < listSize; i++) \n\t\t{\n\t\t\tdistance += Math.abs(indexOf(unsortedList, sortedList[i]) - i);\n\t\t}\n\n\t\treturn distance;\n\t}", "public int FindNearbyPts(Vector CurvData, int Eleindex, Stroke theStroke){\n\t\tint index;\n\t\tVector WinElements = new Vector();\n\t\tint CurvEleIndex;\n\t\tDouble minDistance = 999.0; // initialized to some larger value say 999.0\n\t\tDouble Distance;\n\t\tint ReturnIndex = -1;\n\t\tint min = Eleindex - PixelIndexWindow;\n\t\tint max = Eleindex + PixelIndexWindow;\n\t\tfor(index=0;index<CurvData.size(); index++){\n\t\t\tCurvEleIndex = (Integer)CurvData.elementAt(index);\n\t\t\tif(CurvEleIndex >= min && CurvEleIndex <= max){\n\t\t\t\t\tVector ptList = theStroke.getM_ptList();\n\t\t\t\t\tPoint CurvPt = ((PixelInfo) ptList.get(CurvEleIndex));\n\t\t\t\t\tPoint SpeedPt = ((PixelInfo)ptList.get(Eleindex));\n\t\t\t\t\tif((Distance = SpeedPt.distance(CurvPt)) < TolerantDistance){\n\t\t\t\t\t\tif(minDistance > Distance){\n\t\t\t\t\t\t\tminDistance = Distance;\n\t\t\t\t\t\t\tReturnIndex = index;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn ReturnIndex;\n\t}", "@Test\n public void testNextIndex_Middle() {\n OasisList<Integer> baseList = new SegmentedOasisList<>();\n baseList.addAll(Arrays.asList(1, 2, 3, 4, 5));\n\n ListIterator<Integer> instance = baseList.listIterator();\n instance.next();\n instance.next();\n\n int expResult = 2;\n int result = instance.nextIndex();\n\n assertEquals(expResult, result);\n }", "List<CoordinateDistance> getNearestCoordinates(Point coordinate, int n);", "private int findMaxPt(ArrayList<Point> s, Point p1, Point p2) {\n double maxPt = 0;\n int maxIndex = 0;\n for(int i = 1; i < s.size()-2; i++){\n if(p1.x*p2.y + s.get(i).x*p1.y + p2.x*s.get(i).y - s.get(i).x*p2.y - p2.x*p1.y - p1.x*s.get(i).y > maxPt) {\n maxPt = p1.x*p2.y + s.get(i).x*p1.y + p2.x*s.get(i).y - s.get(i).x*p2.y - p2.x*p1.y - p1.x*s.get(i).y;\n maxIndex = i;\n }\n }\n return maxIndex;\n }", "public boolean getNearestTownforTheFirstTime() {\n\t\tint eigenePositionX = stadtposition.x;\r\n\t\tint eigenePositionY = stadtposition.y;\r\n\t\tint anderePositionX, anderePositionY;\r\n\t\tint deltaX, deltaY;\r\n\t\tint distance;\r\n\t\tint distancesum;\r\n\t\tint mindistance = 1200;\r\n\t\tint minIndex = 0;\r\n\r\n\t\tfor (int i = 0; i < otherTowns.size(); i++) {\r\n\t\t\tanderePositionX = otherTowns.get(i).stadtposition.x;\r\n\t\t\tanderePositionY = otherTowns.get(i).stadtposition.y;\r\n\t\t\tdeltaX = eigenePositionX - anderePositionX;\r\n\t\t\tdeltaY = eigenePositionY - anderePositionY;\r\n\t\t\tdistancesum = deltaX * deltaX + deltaY * deltaY;\r\n\t\t\tdistance = (int) Math.sqrt(distancesum);\r\n\r\n\t\t\tif (distance == 0) {\r\n\t\t\t\tdistance = 1500;\r\n\t\t\t}\r\n\r\n\t\t\tif (distance < mindistance) {\r\n\t\t\t\t// System.out.println(distance+\" von minindex i \"+i+\"ist kleiner\");\r\n\t\t\t\tminIndex = i;\r\n\t\t\t\tmindistance = distance;\r\n\t\t\t\tif (mindistance < 33) {\r\n\t\t\t\t\tmindistance = 1200;\r\n\t\t\t\t\ti = 0;\r\n\t\t\t\t\tstadtposition.x = (int) (Math.random() * 1000);\r\n\t\t\t\t\tstadtposition.y = (int) ((Math.random() * 680) + 100);\r\n\r\n//\t\t\t\t\tSystem.out.println(\"stadt ist zu nahe, ändere stadtposition\");\r\n\t\t\t\t\treturn false;\r\n\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t}\r\n//\t\tSystem.out.println(\"minIndex: \" + minIndex + \" ist mit mindistance \" + mindistance + \" am nahsten\");\r\n\t\tnahsteStadt = otherTowns.get(minIndex);\r\n\t\treturn true;\r\n\r\n\t}", "private static void findPair(int[] nums, int target, int start, List<List<Integer>> result) {\n int end = nums.length - 1;\n\n while (start < end) {\n int diff = target - nums[start] - nums[end];\n\n if (diff == 0) {\n ArrayList<Integer> triplet = new ArrayList<>();\n triplet.add(target * -1);\n triplet.add(nums[start]);\n triplet.add(nums[end]);\n result.add(triplet);\n start++;\n end--;\n\n while (start < end && nums[start] == nums[start - 1]) {\n start++;\n }\n\n while (start < end && nums[end] == nums[end + 1]) {\n end--;\n }\n } else if (diff > 0) {\n start++;\n } else {\n end--;\n }\n }\n }", "public static Position getClosest2reference(ArrayList<Position> c, Position reference){\n \t// Gets the closest point to the user's current position\n \tPosition temp;\n \tPosition min = new Position(0,0);\n \tdouble d;\n \tdouble minDistance = 1000;\n \tIterator<Position> t = c.iterator();\n \twhile (t.hasNext()){\n \t\ttemp = (Position) t.next();\n \t\t//System.out.println(\"Checking: \" + temp.getLat() + \",\" + temp.getLon());\n \t\td = Tools.distance(reference, temp);\n \t\tif (d < minDistance){\n \t\t\tmin = temp;\n \t\t\tminDistance = d;\n \t\t}\n \t}\n \treturn min;\n }", "private PanImageEntry findPanImageEntryClosestToCenter() {\n\t\tfindProjectedZs();\n\t\t\n\t\tPanImageEntry closestEntry = null;\n\t\tfor (int n=0; n<panImageList.length; n++) {\n\t\t\tPanImageEntry entry = panImageList[n];\n\t\t\tif (entry.draw) {\n\t\t\t\tif (closestEntry == null) {\n\t\t\t\t\tclosestEntry = entry;\n\t\t\t\t}\n\t\t\t\telse if (entry.projectedZ > closestEntry.projectedZ) {\n\t\t\t\t\tclosestEntry = entry;\n\t\t\t\t}\n\t\t\t\telse if (entry.projectedZ == closestEntry.projectedZ) {\n\t\t\t\t\tif (isSuperiorImageCat(entry.imageListEntry.getImageCategory(), closestEntry.imageListEntry.getImageCategory())) {\n\t\t\t\t\t\tclosestEntry = entry;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif (selectedPanImageEntry != null) {\n\t\t\tdouble dAz = closestEntry.imageListEntry.getImageMetadataEntry().inst_az_rover - \n\t\t\tselectedPanImageEntry.imageListEntry.getImageMetadataEntry().inst_az_rover;\n\t\t\tdouble dEl = closestEntry.imageListEntry.getImageMetadataEntry().inst_el_rover - \n\t\t\tselectedPanImageEntry.imageListEntry.getImageMetadataEntry().inst_el_rover;\n\t\t\tif ((selectedPanImageEntry.imageListEntry.getImageMetadataEntry().inst_el_rover < -85.0 \n\t\t\t\t\t&& closestEntry.imageListEntry.getImageMetadataEntry().inst_el_rover < 85.0)\n\t\t\t\t\t|| (selectedPanImageEntry.imageListEntry.getImageMetadataEntry().inst_el_rover > 85\n\t\t\t\t\t\t&& closestEntry.imageListEntry.getImageMetadataEntry().inst_el_rover > 85)\t\n\t\t\t\t\t) {\n\t\t\t\t// this is a fix because the distance computation doesn't work right at high or low elevations...\n\t\t\t\t// in fact, the whole thing is pretty messed up\n\t\t\t\tclosestEntry = selectedPanImageEntry;\t\t\t\t\n\t\t\t}\n\t\t\telse if ((Math.abs(dAz) < selectTolerance) && (Math.abs(dEl) < selectTolerance)) {\n\t\t\t\tclosestEntry = selectedPanImageEntry;\n\t\t\t}\n\t\t}\n\t\treturn closestEntry;\n\t}", "@Test\n public void test06() throws Throwable {\n double double0 = UnivariateRealSolverUtils.midpoint(0.0, 244.30128428311448);\n assertEquals(122.15064214155724, double0, 0.01D);\n }", "@Test\n public void testPreviousIndex_End() {\n\n OasisList<Integer> baseList = new SegmentedOasisList<>();\n baseList.addAll(Arrays.asList(1, 2));\n\n ListIterator<Integer> instance = baseList.listIterator();\n instance.next();\n instance.next();\n\n int expResult = 1;\n int result = instance.previousIndex();\n\n assertEquals(expResult, result);\n }", "Pair<Vertex, Double> closestVertexToPath(Loc pos);", "List<Long> getBestSolIntersection();", "@Test\n public void testPrevious_End() {\n OasisList<Integer> baseList = new SegmentedOasisList<>();\n baseList.addAll(Arrays.asList(1, 2));\n\n ListIterator<Integer> instance = baseList.listIterator();\n instance.next();\n instance.next();\n\n Integer expResult = 2;\n Integer result = instance.previous();\n assertEquals(expResult, result);\n }", "private double calcNearestNeighborIndex(ArrayList<Point> pts) {\n int width = layoutPanel.getLayoutSize().width;\n int height = layoutPanel.getLayoutSize().height;\n\n // calculate average nearest neighbor\n double avgNN = 0;\n int n = pts.size();\n for (int i = 0; i < n; i++) {\n double minDist = Float.MAX_VALUE;\n for (int j = 0; j < n; j++) {\n if (i != j) {\n Point pti = pts.get(i);\n Point ptj = pts.get(j);\n double dist = Point2D\n .distanceSq(pti.x, pti.y, ptj.x, ptj.y);\n if (minDist > dist) {\n minDist = dist;\n }\n }\n }\n avgNN += Math.sqrt(minDist);\n }\n avgNN = avgNN / (double) n;\n\n // calculate estimated average neighbor\n double estANN = 1.0 / (2.0 * Math.sqrt((double) n\n / (double) (width * height)));\n\n return avgNN / estANN;\n }", "private static boolean kthSmallesElementFound(int[] list1, int[] list2, int nElementsList1, int nElementsList2) {\n if(nElementsList2 < 1) {\n return true;\n }\n\n if(list1[nElementsList1-1] == list2[nElementsList2-1]) {\n return true;\n }\n\n if(nElementsList1 == list1.length) {\n return list1[nElementsList1-1] <= list2[nElementsList2];\n }\n\n if(nElementsList2 == list2.length) {\n return list2[nElementsList2-1] <= list1[nElementsList1];\n }\n\n return list1[nElementsList1-1] <= list2[nElementsList2] && list2[nElementsList2-1] <= list1[nElementsList1];\n }", "public void testClosestApprochDistSqr() {\r\n System.out.println(\"closestApprochDistSqr\");\r\n\r\n ParametricLine2d other = new ParametricLine2d(new Point2d(), new Vector2d(0.0, 1.0));\r\n ParametricLine2d instance = new ParametricLine2d();\r\n\r\n double expResult = 0.0;\r\n double result = instance.closestApprochDistSqr(other);\r\n assertEquals(expResult, result);\r\n }", "private void findLargestNNIPointsIndexPair(float ratioInh, float ratioAct) {\n ArrayList<Point> pts0 = new ArrayList<Point>();\n ArrayList<Point> pts1 = new ArrayList<Point>();\n Dimension dim = layoutPanel.getLayoutSize();\n int height = dim.height;\n int width = dim.width;\n int size = height * width;\n int newNListSize;\n if (ratioInh > ratioAct) {\n newNListSize = (int) (size * ratioInh);\n pts0 = cnvIndexList2Points(layoutPanel.activeNList);\n pts1 = cnvIndexList2Points(layoutPanel.inhNList);\n } else {\n newNListSize = (int) (size * ratioAct);\n pts0 = cnvIndexList2Points(layoutPanel.inhNList);\n pts1 = cnvIndexList2Points(layoutPanel.activeNList);\n }\n double len = Math.sqrt((double) size / (double) newNListSize);\n\n ArrayList<Point> union = new ArrayList<Point>(pts0);\n union.addAll(pts1);\n double maxNNI = calcNearestNeighborIndex(union);\n ArrayList<Point> maxPts0 = pts0;\n ArrayList<Point> maxPts1 = pts1;\n for (int xShift = (int) Math.floor(-len / 2); xShift <= Math\n .ceil(len / 2); xShift++) {\n for (int yShift = (int) Math.floor(-len / 2); yShift <= Math\n .ceil(len / 2); yShift++) {\n if (xShift == 0 && yShift == 0) {\n continue;\n }\n int xShift0 = (int) Math.ceil((double) xShift / 2);\n int xShift1 = (int) Math.ceil((double) -xShift / 2);\n int yShift0 = (int) Math.ceil((double) yShift / 2);\n int yShift1 = (int) Math.ceil((double) -yShift / 2);\n // System.out.println(\"xShift = \" + xShift + \", xShift0 = \" +\n // xShift0 + \", xShift1 = \" + xShift1);\n ArrayList<Point> sftPts0 = getShiftedPoints(pts0, xShift0,\n yShift0);\n ArrayList<Point> sftPts1 = getShiftedPoints(pts1, xShift1,\n yShift1);\n union = new ArrayList<Point>(sftPts0);\n union.addAll(sftPts1);\n double nni = calcNearestNeighborIndex(union);\n if (nni > maxNNI) {\n maxNNI = nni;\n maxPts0 = sftPts0;\n maxPts1 = sftPts1;\n }\n }\n }\n\n if (ratioInh > ratioAct) {\n layoutPanel.activeNList = cnvPoints2IndexList(maxPts0);\n layoutPanel.inhNList = cnvPoints2IndexList(maxPts1);\n } else {\n layoutPanel.inhNList = cnvPoints2IndexList(maxPts0);\n layoutPanel.activeNList = cnvPoints2IndexList(maxPts1);\n }\n }", "@Test\n public void testHasPrevious_Start() {\n OasisList<Integer> baseList = new SegmentedOasisList<>();\n baseList.addAll(Arrays.asList(1, 2, 3, 4, 5));\n\n ListIterator<Integer> instance = baseList.listIterator();\n boolean expResult = false;\n boolean result = instance.hasPrevious();\n\n assertEquals(expResult, result);\n }", "private static int getMinDistIndex(ArrayList<Double> list, int indexNotInterested) {\n \tdouble newDistMin = Double.MAX_VALUE;\n\t\tint newMinDistIndex = -1;\n\t\t\n\t\tfor(int i = 0; i < list.size(); i++) {\n\t\t\tif(i != indexNotInterested && newDistMin > list.get(i)) {\n\t\t\t\tnewDistMin = list.get(i);\n\t\t\t\tnewMinDistIndex = i;\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn newMinDistIndex;\n }", "public void testClosestApprochTime() {\r\n System.out.println(\"closestApprochTime\");\r\n\r\n ParametricLine2d other = new ParametricLine2d(new Point2d(), new Vector2d(0.0, 1.0));\r\n ParametricLine2d instance = new ParametricLine2d();\r\n\r\n double expResult = 0.0;\r\n double result = instance.closestApprochTime(other);\r\n assertEquals(expResult, result);\r\n }", "public static void compareAStarLimitedOpen(List<Position> places, int start, int end, int step) {\n if (end < start) {\n int tmp = end;\n end = start;\n start = tmp;\n }\n Node startNode = graph.findClosest(places.get(0), false);\n Node endNode = graph.findClosest(places.get((1)), false);\n System.out.println(\"==================================================\");\n System.out.println(\"Benchmark A-Star with weighted h\");\n System.out.println(\"From \" + start + \" to \" + end + \" steps \" + step);\n System.out.println(distance.calcDist(startNode, endNode));\n System.out.println(\"==================================================\");\n System.out.println();\n\n AStarResult compareResult;\n try {\n compareResult = AStarAlgorithm.search(graph, startNode, endNode, \"Compare\", 1, 0);\n } catch (Exception e) {\n System.out.println(e.getMessage());\n return;\n }\n\n //\n int curr;\n for (curr = start; curr <= end; curr += step) {\n Path path = new Path(\"\");\n AStarResult result;\n try {\n result = AStarAlgorithm.search(graph, startNode, endNode, \"Compare \" + curr, 1, curr);\n path.addSegment(result.getPath());\n FileWriter fstream = new FileWriter(curr + \".gpx\");\n BufferedWriter out = new BufferedWriter(fstream);\n String gpx = GPXBuilder.build(path.getGeoLineString(true), path.getName());\n out.write(gpx);\n out.close();\n fstream.close();\n System.out.println(\"Result for w=\" + curr);\n System.out.println(\"Expanded Nodes: \" + result.getExpandedNodesCount() + \" (\" + (result.getExpandedNodesCount() - compareResult.getExpandedNodesCount()) + \")\");\n System.out.println(\"Path Length: \" + result.getPath().getLength() + \" (\" + (result.getPath().getLength() - compareResult.getPath().getLength()) + \")\");\n System.out.println(\"SortTime: \" + result.getSorttime() + \" (\" + (result.getSorttime() - compareResult.getSorttime()) + \")\");\n System.out.println(\"Runtime: \" + result.getRuntime() + \" (\" + (result.getRuntime() - compareResult.getRuntime()) + \")\");\n System.out.println();\n } catch (Exception e) {\n System.out.println(e.getMessage());\n }\n }\n }", "private boolean isInList(List<Point3D> pointsList, Point3D point) {\r\n for (Point3D tempPoint : pointsList) {\r\n if(point.isAlmostEquals(tempPoint))\r\n return true;\r\n }\r\n return false;\r\n }", "public double getClosestDistance(){\n\t\t\tdouble distance;\n\t\t\tdouble distanceMin = Double.MAX_VALUE;\n\t\t\tPoint centroid = centroid();\n\t\t\tfor(Point p : clusterPointsList){\n\t\t\t\tdistance = p.dist(centroid);\t\t\t\n\t\t\t\tif(distance < distanceMin){\n\t\t\t\t\tdistanceMin = distance;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn distanceMin;\n\t\t}", "public double NearestPointOnCurve(Position P, Position[] V)\t{\r\n\t Position[] w;\t\t\t/* Ctl pts for 5th-degree eqn\t*/\r\n\t double[] t_candidate = new double[W_DEGREE];\t/* Possible roots\t\t*/ \r\n\t int \tn_solutions;\t\t/* Number of roots found\t*/\r\n\t double\tt;\t\t\t/* Parameter value of closest pt*/\r\n\r\n\t /* Convert problem to 5th-degree Bezier form\t*/\r\n\t w = ConvertToBezierForm(P, V);\r\n\r\n\t /* Find all possible roots of 5th-degree equation */\r\n\t n_solutions = FindRoots(w, W_DEGREE, t_candidate, 0);\r\n\r\n\t /* Compare distances of P to all candidates, and to t=0, and t=1 */\r\n\t {\r\n\t\t\tdouble \tdist, new_dist;\r\n\t\t\tPosition p;\r\n\t\t\tint\t\ti;\r\n\r\n\t\t\r\n\t\t/* Check distance to beginning of curve, where t = 0\t*/\r\n\t\t\tdist = V2SquaredLength(V2Sub(P, V[0]));\r\n\t t = 0.0;\r\n\r\n\t\t/* Find distances for candidate points\t*/\r\n\t for (i = 0; i < n_solutions; i++) {\r\n\t\t \tp = Bezier(V, DEGREE, t_candidate[i], null, null);\r\n\t\t \tnew_dist = V2SquaredLength(V2Sub(P, p));\r\n\t\t \tif (new_dist < dist) {\r\n\t \tdist = new_dist;\r\n\t\t \t\tt = t_candidate[i];\r\n\t \t }\r\n\t }\r\n\r\n\t\t/* Finally, look at distance to end point, where t = 1.0 */\r\n\t\t\tnew_dist = V2SquaredLength(V2Sub(P, V[DEGREE]));\r\n\t \tif (new_dist < dist) {\r\n\t \tdist = new_dist;\r\n\t \tt = 1.0;\r\n\t }\r\n\t }\r\n\r\n\t return t;\r\n\t /* Return the point on the curve at parameter value t */\r\n//\t return (Bezier(V, DEGREE, t, null, null));\r\n\t}", "private static List<Point> possibleNextPos(Point currPos, Point coord1, Point coord2, double buildingSideGrad, Point buildingCentre){\r\n\t\tvar coord1Lat = coord1.latitude();\r\n\t\tvar coord1Lon = coord1.longitude();\r\n\t\tvar coord2Lat = coord2.latitude();\r\n\t\tvar coord2Lon = coord2.longitude();\r\n\t\t\r\n\t\tvar currPosLon = currPos.longitude();\r\n\t\tvar currPosLat = currPos.latitude();\r\n\t\t\r\n\t\tvar buildingLon = buildingCentre.longitude();\r\n\t\tvar buildingLat = buildingCentre.latitude();\r\n\t\t\r\n\t\tvar dir1 = computeDir(coord1, coord2); //in the case that the drone is moving in the direction coord1 to coord2\r\n\t\tvar nextPosTemp1 = nextPos(dir1, currPos); //the temporary next position if the drone moves in dir1\r\n\t\t\r\n\t\tvar dir2 = computeDir(coord2, coord1); //in the case that the drone is moving in the direction coord2 to coord1\r\n\t\tvar nextPosTemp2 = nextPos(dir2, currPos); //the temporary next position if the drone moves in dir2 \r\n\t\t\r\n\t\tvar possibleNextPos = new ArrayList<Point>();\r\n\t\t\r\n\t\tif(Math.abs(buildingSideGrad)>=1) { //in this case, longitudes of building centre and drone current position are compared\r\n\t\t\t//coord1 to coord2 scenario\r\n\t\t\tif((coord1Lat>coord2Lat && buildingLon<currPosLon) || (coord1Lat<coord2Lat && buildingLon>currPosLon)) {\r\n\t\t\t\tdir1 = (dir1+10)%360; //angle increased such that drone doesn't fly over side of building\r\n\t\t\t\tnextPosTemp1 = nextPos(dir1, currPos);\r\n\t\t\t}\r\n\t\t\t//coord2 to coord1 scenario\r\n\t\t\tif((coord1Lat<coord2Lat && buildingLon<currPosLon) || (coord1Lat>coord2Lat && buildingLon>currPosLon)) {\r\n\t\t\t\tdir2 = (dir2+10)%360;\r\n\t\t\t\tnextPosTemp2 = nextPos(dir2, currPos);\r\n\t\t\t}\t\t\t\r\n\t\t}\r\n\t\telse { //in this case, latitudes of building centre and drone current position are compared\r\n\t\t\tif((coord1Lon>coord2Lon && buildingLat>currPosLat) || (coord1Lon<coord2Lon && buildingLat<currPosLat)) {\r\n\t\t\t\tdir1 = (dir1+10)%360; \r\n\t\t\t\tnextPosTemp1 = nextPos(dir1, currPos);\r\n\t\t\t}\r\n\r\n\t\t\tif((coord1Lon<coord2Lon && buildingLat>currPosLat) || (coord1Lon>coord2Lon && buildingLat<currPosLat)) {\r\n\t\t\t\tdir2 = (dir2+10)%360;\r\n\t\t\t\tnextPosTemp2 = nextPos(dir2, currPos);\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tpossibleNextPos.add(nextPosTemp1);\r\n\t\tpossibleNextPos.add(nextPosTemp2);\r\n\t\t\r\n\t\treturn possibleNextPos;\r\n\t}", "private Exemplar nearestExemplar(Instance inst, double c){\n\n if (m_ExemplarsByClass[(int) c] == null)\n return null;\n Exemplar cur = m_ExemplarsByClass[(int) c], nearest = m_ExemplarsByClass[(int) c];\n double dist, smallestDist = cur.squaredDistance(inst);\n while (cur.nextWithClass != null){\n cur = cur.nextWithClass;\n dist = cur.squaredDistance(inst);\n if (dist < smallestDist){\n\tsmallestDist = dist;\n\tnearest = cur;\n }\n }\n return nearest;\n }", "static <E> int minPos( List<E> list, Comparator<E> fn ) {\n if ( list.isEmpty() ) {\n return -1;\n }\n E eBest = list.get( 0 );\n int iBest = 0;\n for ( int i = 1; i < list.size(); i++ ) {\n E e = list.get( i );\n if ( fn.compare( e, eBest ) < 0 ) {\n eBest = e;\n iBest = i;\n }\n }\n return iBest;\n }", "@Override\r\n public Point nearest(double x, double y) {\r\n Point input = new Point(x, y);\r\n Point ans = points.get(0);\r\n double dist = Point.distance(ans, input);\r\n for (Point point : points) {\r\n if (Point.distance(point, input) < dist) {\r\n ans = point;\r\n dist = Point.distance(ans, input);\r\n }\r\n }\r\n return ans;\r\n }", "protected static Set<Point2D.Float> getSortedPointSet(\n\t\t\tList<Point2D.Float> points) {\n\n\t\tfinal Point2D.Float lowest = getLowestPoint(points);\n\n\t\tTreeSet<Point2D.Float> set = new TreeSet<Point2D.Float>(\n\t\t\t\tnew Comparator<Point2D.Float>() {\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic int compare(Point2D.Float a, Point2D.Float b) {\n\n\t\t\t\t\t\tif (a == b || a.equals(b)) {\n\t\t\t\t\t\t\treturn 0;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// use longs to guard against int-underflow\n\t\t\t\t\t\tdouble thetaA = Math.atan2((long) a.y - lowest.y,\n\t\t\t\t\t\t\t\t(long) a.x - lowest.x);\n\t\t\t\t\t\tdouble thetaB = Math.atan2((long) b.y - lowest.y,\n\t\t\t\t\t\t\t\t(long) b.x - lowest.x);\n\n\t\t\t\t\t\tif (thetaA < thetaB) {\n\t\t\t\t\t\t\treturn -1;\n\t\t\t\t\t\t} else if (thetaA > thetaB) {\n\t\t\t\t\t\t\treturn 1;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t// collinear with the 'lowest' point, let the point\n\t\t\t\t\t\t\t// closest to it come first\n\n\t\t\t\t\t\t\t// use longs to guard against int-over/underflow\n\t\t\t\t\t\t\tdouble distanceA = Math\n\t\t\t\t\t\t\t\t\t.sqrt((((long) lowest.x - a.x) * ((long) lowest.x - a.x))\n\t\t\t\t\t\t\t\t\t\t\t+ (((long) lowest.y - a.y) * ((long) lowest.y - a.y)));\n\t\t\t\t\t\t\tdouble distanceB = Math\n\t\t\t\t\t\t\t\t\t.sqrt((((long) lowest.x - b.x) * ((long) lowest.x - b.x))\n\t\t\t\t\t\t\t\t\t\t\t+ (((long) lowest.y - b.y) * ((long) lowest.y - b.y)));\n\n\t\t\t\t\t\t\tif (distanceA < distanceB) {\n\t\t\t\t\t\t\t\treturn -1;\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\treturn 1;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t});\n\n\t\tset.addAll(points);\n\n\t\treturn set;\n\t}", "public static double prepareDivideAndConquer(ArrayList<Point> P) {\n\n\t\t//Sort by X\n\t\tArrayList<Point> X = new ArrayList<Point>(P);\n\t\tsortX(X);\n\t\t//Sort by Y\n\t\tArrayList<Point> Y = new ArrayList<Point>(P);\n\t\tsortY(Y);\n\t\t//Call divide and conquer closest pairs algorithm for solution\n\t\treturn divideAndConquer(X, Y);\n\n\t}" ]
[ "0.6686584", "0.66632354", "0.6312553", "0.6272355", "0.61855155", "0.6176435", "0.6023272", "0.6021953", "0.60191184", "0.5979776", "0.5958544", "0.5944896", "0.59373707", "0.59077567", "0.5896149", "0.58902943", "0.58853793", "0.5877106", "0.58695483", "0.58572495", "0.5854365", "0.5833303", "0.5826939", "0.58130854", "0.5810842", "0.58097196", "0.5803355", "0.57887876", "0.57844007", "0.5782319", "0.57702667", "0.5739744", "0.5726262", "0.57136387", "0.5681999", "0.56791943", "0.56765157", "0.5676186", "0.5654487", "0.5653956", "0.5652511", "0.56463355", "0.5635491", "0.563408", "0.5633515", "0.5621212", "0.56152713", "0.5602241", "0.5599584", "0.5596236", "0.5572204", "0.55702466", "0.5557132", "0.55514246", "0.5551254", "0.55499613", "0.55448663", "0.55389845", "0.553758", "0.55349904", "0.55200815", "0.5519905", "0.55190545", "0.5515192", "0.5507698", "0.5492761", "0.5489814", "0.54826015", "0.54758483", "0.5468204", "0.5468027", "0.5448458", "0.54417324", "0.5440346", "0.54380566", "0.5427701", "0.5426538", "0.5420766", "0.541939", "0.541318", "0.5412979", "0.5408046", "0.5401694", "0.5399732", "0.53993165", "0.5397298", "0.5395913", "0.5381504", "0.537575", "0.53747356", "0.53482366", "0.53407633", "0.5340649", "0.5335593", "0.53322196", "0.53256255", "0.5325089", "0.5324301", "0.5318572", "0.5311931" ]
0.67657083
0
============ Equivalence Partitions Tests ============== TC01: the closest point is in the middle of the list
@Test public void findClosestGeoPointTest() { Ray ray = new Ray(new Point3D(0, 0, 10), new Vector(1, 10, -100)); Geometry geo = new Sphere(new Point3D(1,1,1),2); List<Intersectable.GeoPoint> list = new LinkedList<Intersectable.GeoPoint>(); list.add(new GeoPoint(geo,new Point3D(1, 1, -100))); list.add(new GeoPoint(geo,new Point3D(-1, 1, -99))); list.add(new GeoPoint(geo,new Point3D(0, 2, -10))); list.add(new GeoPoint(geo,new Point3D(0.5, 0, -100))); assertEquals(list.get(2), ray.findClosestGeoPoint(list)); // =============== Boundary Values Tests ================== //TC01: the list is empty List<GeoPoint> list2 = null; assertNull("try again",ray.findClosestGeoPoint(list2)); //TC11: the closest point is the first in the list List<GeoPoint> list3 = new LinkedList<GeoPoint>(); list3.add(new GeoPoint(geo,new Point3D(0, 2, -10))); list3.add(new GeoPoint(geo,new Point3D(-1, 1, -99))); list3.add(new GeoPoint(geo,new Point3D(1, 1, -100))); list3.add(new GeoPoint(geo,new Point3D(0.5, 0, -100))); assertEquals(list3.get(0), ray.findClosestGeoPoint(list3)); //TC12: the closest point is the last in the list List<GeoPoint> list4 = new LinkedList<GeoPoint>(); list4.add(new GeoPoint(geo,new Point3D(1, 1, -100))); list4.add(new GeoPoint(geo,new Point3D(0.5, 0, -100))); list4.add(new GeoPoint(geo,new Point3D(-1, 1, -99))); list4.add(new GeoPoint(geo,new Point3D(0, 2, -10))); assertEquals(list4.get(3), ray.findClosestGeoPoint(list4)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test\n public void findClosestPointTest() {\n Ray ray = new Ray(new Point3D(0, 0, 10), new Vector(1, 10, -100));\n\n List<Point3D> list = new LinkedList<Point3D>();\n list.add(new Point3D(1, 1, -100));\n list.add(new Point3D(-1, 1, -99));\n list.add(new Point3D(0, 2, -10));\n list.add(new Point3D(0.5, 0, -100));\n\n assertEquals(list.get(2), ray.findClosestPoint(list));\n\n // =============== Boundary Values Tests ==================\n //TC01: the list is empty\n List<Point3D> list2 = null;\n assertNull(\"try again\",ray.findClosestPoint(list2));\n\n //TC11: the closest point is the first in the list\n List<Point3D> list3 = new LinkedList<Point3D>();\n list3.add(new Point3D(0, 2, -10));\n list3.add(new Point3D(-1, 1, -99));\n list3.add(new Point3D(1, 1, -100));\n list3.add(new Point3D(0.5, 0, -100));\n assertEquals(list3.get(0), ray.findClosestPoint(list3));\n\n //TC12: the closest point is the last in the list\n List<Point3D> list4 = new LinkedList<Point3D>();\n list4.add(new Point3D(1, 1, -100));\n list4.add(new Point3D(0.5, 0, -100));\n list4.add(new Point3D(-1, 1, -99));\n list4.add(new Point3D(0, 2, -10));\n assertEquals(list4.get(3), ray.findClosestPoint(list4));\n\n }", "private static Pair closest_pair(ArrayList<Point> pointset){\n\t\treturn null;\n\t}", "public Point[] nearestPair() {\n\t\t\tPoint[] Answer = new Point[2];\n\t\t\tif (this.size<2)\treturn null; //step 1\n\t\t\tif (this.size==2){\n\t\t\t\tAnswer[0]=this.minx.getData();\n\t\t\t\tAnswer[1]=this.maxx.getData();\n\t\t\t\treturn Answer;\t\t\t\n\t\t\t}\n\t\t\tdouble MinDistance=-1; // for sure it will be change in the next section, just for avoid warrning.\n\t\t\tdouble MinDistanceInStrip=-1;\n\t\t\tPoint[] MinPointsLeft = new Point[2];\n\t\t\tPoint[] MinPointsRight = new Point[2];\n\t\t\tPoint[] MinPointsInStrip = new Point[2]; // around the median\n\t\t\tboolean LargestAxis = getLargestAxis(); //step 2\n\t\t\tContainer median = getMedian(LargestAxis); //step 3\n\t\t\tif (LargestAxis){// step 4 - calling the recursive function nearestPairRec\n\t\t\t\tMinPointsLeft = nearestPairRec(getPointsInRangeRegAxis(this.minx.getData().getX(), median.getData().getX(),LargestAxis), LargestAxis);\n\t\t\t\tMinPointsRight =nearestPairRec(getPointsInRangeRegAxis(median.getNextX().getData().getX(), this.maxx.getData().getX(),LargestAxis), LargestAxis);\n\t\t\t}\n\t\t\telse{\n\t\t\t\tMinPointsLeft = nearestPairRec(getPointsInRangeRegAxis(this.miny.getData().getY(), median.getData().getY(),LargestAxis), LargestAxis);\n\t\t\t\tMinPointsRight =nearestPairRec(getPointsInRangeRegAxis(median.getNextY().getData().getY(), this.maxy.getData().getY(),LargestAxis), LargestAxis);\n\t\t\t}\n\t\t\t//step 5\n\t\t\tif (MinPointsLeft!=null && MinPointsRight!=null){\n\t\t\t\tif (Distance(MinPointsLeft[0], MinPointsLeft[1]) > Distance(MinPointsRight[0], MinPointsRight[1])){\n\t\t\t\t\tMinDistance = Distance(MinPointsRight[0], MinPointsRight[1]);\n\t\t\t\t\tAnswer = MinPointsRight;\n\t\t\t\t}else{\n\t\t\t\t\tMinDistance = Distance(MinPointsLeft[0], MinPointsLeft[1]);\n\t\t\t\t\tAnswer = MinPointsLeft;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse if (MinPointsLeft!=null) {\n\t\t\t\tMinDistance = Distance(MinPointsLeft[0], MinPointsLeft[1]);\n\t\t\t\tAnswer = MinPointsLeft;\n\t\t\t}\n\t\t\telse if (MinPointsRight!=null){\n\t\t\t\tMinDistance = Distance(MinPointsRight[0], MinPointsRight[1]);\n\t\t\t\tAnswer = MinPointsRight;\n\t\t\t}\n\t\t\t//step 6 - nearest point around the median\n\t\t\tif (MinDistance==-1) MinDistance=0;\n\t\t\tMinPointsInStrip = nearestPairInStrip(median, MinDistance*2, LargestAxis);\n\t\t\tif (MinPointsInStrip != null){\n\t\t\t\tMinDistanceInStrip = Distance(MinPointsInStrip[0], MinPointsInStrip[1]);\n\t\t\t\tif (MinDistanceInStrip < MinDistance) return MinPointsInStrip;\n\t\t\t}\n\t\t\treturn Answer;\n\t\t}", "public static double closestPair(Point[] sortedX) {\n if (sortedX.length <= 1) {\n return Double.MAX_VALUE;\n }\n double mid = sortedX[(sortedX.length) / 2].getX();\n double firstHalf = closestPair(Arrays.copyOfRange(sortedX, 0, (sortedX.length) / 2));\n double secondHalf = closestPair(Arrays.copyOfRange(sortedX, (sortedX.length) / 2, sortedX.length));\n double min = Math.min(firstHalf, secondHalf);\n ArrayList<Point> close = new ArrayList<Point>();\n for (int i = 0; i < sortedX.length; i++) {\n double dis = Math.abs(sortedX[i].getX() - mid);\n if (dis < min) {\n close.add(sortedX[i]);\n }\n }\n // sort by Y coordinates\n Collections.sort(close, new Comparator<Point>() {\n public int compare(Point obj1, Point obj2) {\n return (int) (obj1.getY() - obj2.getY());\n }\n });\n Point[] near = close.toArray(new Point[close.size()]);\n\n for (int i = 0; i < near.length; i++) {\n int k = 1;\n while (i + k < near.length && near[i + k].getY() < near[i].getY() + min) {\n if (min > near[i].distance(near[i + k])) {\n min = near[i].distance(near[i + k]);\n System.out.println(\"near \" + near[i].distance(near[i + k]));\n System.out.println(\"best \" + best);\n\n if (near[i].distance(near[i + k]) < best) {\n best = near[i].distance(near[i + k]);\n arr[0] = near[i];\n arr[1] = near[i + k];\n // System.out.println(arr[0].getX());\n // System.out.println(arr[1].getX());\n\n }\n }\n k++;\n }\n }\n return min;\n }", "@Test\n public void basicTest() {\n Point myPoint;\n\n// myPoint = pointSet.nearest(2, 2);\n// System.out.println(myPoint.toString());\n// myPoint = pointSet.nearest(2, -2);\n// System.out.println(myPoint.toString());\n// myPoint = pointSet.nearest(1, 4);\n// System.out.println(myPoint.toString());\n// myPoint = pointSet.nearest(3, -100);\n// System.out.println(myPoint.toString());\n// myPoint = pointSet.nearest(0, 0);\n// System.out.println(myPoint.toString());\n//\n// myPoint = kdPointSet.nearest(2, 2); //THIS ONE DOES NOT MATCH NAIVE!\n// System.out.println(myPoint.toString());\n// myPoint = kdPointSet.nearest(2, -2);\n// System.out.println(myPoint.toString());\n// myPoint = kdPointSet.nearest(1, 4);\n// System.out.println(myPoint.toString());\n// myPoint = kdPointSet.nearest(3, -100);\n// System.out.println(myPoint.toString());\n// myPoint = kdPointSet.nearest(0, 0);\n// System.out.println(myPoint.toString());\n\n\n\n\n\n\n }", "public static Point searchNearestEgde(Rectangle bounds, Point first, Point next) {\n\n // One offset needed to avoid intersection with the wrong line.\n if (bounds.x + bounds.width <= first.x)\n first.x = bounds.x + bounds.width - 1;\n else if (bounds.x >= first.x) first.x = bounds.x + 1;\n\n if (bounds.y + bounds.height <= first.y)\n first.y = bounds.height + bounds.y - 1;\n else if (bounds.y >= first.y) first.y = bounds.y + 1;\n\n Line2D relationLine = new Line2D.Float(first.x, first.y, next.x, next.y);\n Line2D lineTop = new Line2D.Float(bounds.x, bounds.y, bounds.x\n + bounds.width, bounds.y);\n Line2D lineRight = new Line2D.Float(bounds.x + bounds.width, bounds.y,\n bounds.x + bounds.width, bounds.y + bounds.height);\n Line2D lineBottom = new Line2D.Float(bounds.x + bounds.width, bounds.y\n + bounds.height, bounds.x, bounds.y + bounds.height);\n Line2D lineLeft = new Line2D.Float(bounds.x, bounds.y + bounds.height,\n bounds.x, bounds.y);\n\n Point2D ptIntersectTop = ptIntersectsLines(relationLine, lineTop);\n Point2D ptIntersectRight = ptIntersectsLines(relationLine, lineRight);\n Point2D ptIntersectBottom = ptIntersectsLines(relationLine, lineBottom);\n Point2D ptIntersectLeft = ptIntersectsLines(relationLine, lineLeft);\n\n // line is to infinite, we must verify that the point find interst the\n // correct edge and the relation.\n int distTop = (int) lineTop.ptSegDist(ptIntersectTop)\n + (int) relationLine.ptSegDist(ptIntersectTop);\n int distRight = (int) lineRight.ptSegDist(ptIntersectRight)\n + (int) relationLine.ptSegDist(ptIntersectRight);\n int distBottom = (int) lineBottom.ptSegDist(ptIntersectBottom)\n + (int) relationLine.ptSegDist(ptIntersectBottom);\n int distLeft = (int) lineLeft.ptSegDist(ptIntersectLeft)\n + (int) relationLine.ptSegDist(ptIntersectLeft);\n\n if (ptIntersectTop != null && distTop == 0) {\n return new Point(RelationGrip.adjust((int) ptIntersectTop.getX()),\n (int) ptIntersectTop.getY());\n\n } else if (ptIntersectRight != null && distRight == 0) {\n return new Point((int) ptIntersectRight.getX(),\n RelationGrip.adjust((int) ptIntersectRight.getY()));\n\n } else if (ptIntersectBottom != null && distBottom == 0) {\n return new Point(RelationGrip.adjust((int) ptIntersectBottom.getX()),\n (int) ptIntersectBottom.getY());\n\n } else if (ptIntersectLeft != null && distLeft == 0) {\n return new Point((int) ptIntersectLeft.getX(),\n RelationGrip.adjust((int) ptIntersectLeft.getY()));\n\n } else {\n return null; // no point found!\n }\n }", "@Test\n public void testNearest() {\n for (int dx = -5; dx <= 5; dx++) {\n for (int dy = -5; dy <= 5; dy++) {\n if (dy > 0 && Math.abs(dx) < Math.abs(dy))\n assertEquals(Direction.SOUTH, Direction.nearest(dx, dy));\n else if (dy < 0 && Math.abs(dx) < Math.abs(dy))\n assertEquals(Direction.NORTH, Direction.nearest(dx, dy));\n else if (dx > 0 && Math.abs(dy) < Math.abs(dx))\n assertEquals(Direction.EAST, Direction.nearest(dx, dy));\n else if (dx < 0 && Math.abs(dy) < Math.abs(dx))\n assertEquals(Direction.WEST, Direction.nearest(dx, dy));\n else if (Math.abs(dx) == Math.abs(dy))\n assertEquals(null, Direction.nearest(dx, dy));\n else\n fail(\"Case not covered: dx=\" + dx + \", dy=\" + dy + \".\");\n }\n }\n }", "private double closestDistanceFromPointToEndlessLine(Vector point, Vector startSegment, Vector endSegment) {\n\t\t// Generate a line out of two points.\n\t\tRay3D gerade = geradeAusPunkten(startSegment, endSegment);\n\t\tVector direction = gerade.getDirection();\n\t\tdouble directionNorm = direction.getNorm();\n\t\t// d(PunktA, (line[B, directionU]) = (B-A) cross directionU durch norm u\n\t\tVector b = gerade.getPoint();\n\t\tVector ba = b.subtract(point);\n\t\tdouble factor = 1.0 / directionNorm; // Geteilt durch geraden länge\n\t\tVector distance = ba.cross(direction).multiply(factor);\n\t\tdouble distanceToGerade = distance.getNorm();\n\t\treturn distanceToGerade;\n\t}", "static float stripClosest(ArrayList<Point> strip, float d) \n\t{ \n\t float min = d; // Initialize the minimum distance as d \n\t \n\t //This loop runs at most 7 times \n\t for (int i = 0; i < strip.size(); ++i) \n\t for (int j = i+1; j < strip.size() && (strip.get(j).y - strip.get(i).y) < min; ++j) \n\t if (Dist(strip.get(i),strip.get(j)) < min) \n\t min = Dist(strip.get(i), strip.get(j)); \n\t \n\t return min; \n\t}", "public static void main(String[] args) {\n Random r = new Random();\n// r.setSeed(1982);\n int R = 500;\n int L = 100000;\n\n int start = -500;\n int end = 500;\n HashSet<Point> hi3 = new HashSet<>();\n List<Point> hi5 = new ArrayList<>();\n Stopwatch sw = new Stopwatch();\n for (int i = 0; i < L; i += 1) {\n double ran = r.nextDouble();\n double x = start + (ran * (end - start));\n ran = r.nextDouble();\n double y = start + (ran * (end - start));\n Point temp = new Point(x, y);\n hi5.add(temp);\n\n }\n KDTree speedTest = new KDTree(hi5);\n NaivePointSet speedTest2 = new NaivePointSet(hi5);\n\n// for (int i = 0; i < 1000; i++) {\n// double ran = r.nextDouble();\n// double x2 = start + (ran *(end - start));\n// ran = r.nextDouble();\n// double y2 = start + (ran *(end - start));\n// assertEquals(speedTest2.nearest(x2, y2), speedTest.nearest(x2, y2 ));\n// }\n// assertEquals(speedTest2.nearest(r.nextInt(R + 1 - 500) + 500,\n// r.nextInt(R + 1 - 500) + 100), speedTest.nearest(427.535670, -735.656403));\n\n System.out.println(\"elapsed time1: \" + sw.elapsedTime());\n\n int R2 = 100;\n int L2 = 10000;\n Stopwatch sw2 = new Stopwatch();\n for (int i = 0; i < L2; i += 1) {\n\n speedTest2.nearest(r.nextDouble(), r.nextDouble());\n }\n\n System.out.println(\"elapsed time: \" + sw2.elapsedTime());\n }", "private static double divideAndConquer(ArrayList<Point> X, ArrayList<Point> Y) {\n\n\t\t//Assigns size of array\n\t\tint size = X.size();\n\n\t\t//If less than 3 points, efficiency is better by brute force\n\t\tif (size <= 3) {\n\t\t\treturn BruteForceClosestPairs(X);\n\t\t}\n\t\t\n\t\t//Ceiling of array size / 2\n\t\tint ceil = (int) Math.ceil(size / 2);\n\t\t//Floor of array size / 2\n\t\tint floor = (int) Math.floor(size / 2);\n\t\t\n\t\t//Array list for x & y values left of midpoint\n\t\tArrayList<Point> xL = new ArrayList<Point>();\t\n\t\tArrayList<Point> yL = new ArrayList<Point>();\n\t\t\n\t\t//for [0 ... ceiling of array / 2]\n\t\t//add the points onto the new arrays\n\t\tfor (int i = 0; i < ceil; i++) {\n\t\t\t\n\t\t\txL.add(X.get(i));\n\t\t\tyL.add(Y.get(i));\n\t\t}\n\t\t\n\t\t// Array list for x & y values right of midpoint\n\t\tArrayList<Point> xR = new ArrayList<Point>();\n\t\tArrayList<Point> yR = new ArrayList<Point>();\n\t\t\n\t\t//for [floor of array / 2 ... size of array]\n\t\t//add the points onto the new arrays\n\t\tfor (int i = floor; i < size - 1; i++) {\n\n\t\t xR.add(X.get(i));\n\t\t\tyR.add(Y.get(i));\n\t\t}\n\t\t\n\t\t//Recursively find the shortest distance\n\t\tdouble distanceL = divideAndConquer(xL, yL);\n\t\tdouble distanceR = divideAndConquer(xR, xL);\n\t\t//Smaller of both distances\n\t\tdouble distance = Math.min(distanceL, distanceR);\n\t\t//Mid-line\n\t\tdouble mid = X.get(ceil - 1).getX();\n\n\t\tArrayList<Point> S = new ArrayList<Point>();\n\n\t\t//copy all the points of Y for which |x - m| < d into S[0..num - 1]\n\t\tfor (int i = 0; i < Y.size() - 1; i++) {\n\n\t\t\tif (Math.abs(X.get(i).getX() - mid) < distance) {\n\t\t\t\tS.add(Y.get(i));\n\t\t\t}\n\t\t}\n\t\t\n\t\t//Square minimum distance\n\t\tdouble dminsq = distance * distance;\n\t\t//Counter\n\t\tint k = 0;\n\t\tint num = S.size();\n\n\t\tfor (int i = 0; i < num - 2; i++) {\n\t\t\t\n\t\t\tk = i + 1;\n\t\t\t\n\t\t\twhile (k <= num - 1 && (Math.pow((S.get(k).getY() - S.get(i).getY()), 2) < dminsq)) {\n\n\t\t\t\t//Find distance between points and find the minimum compared to dminsq\n\t\t\t\tdminsq = Math.min(Math.pow(S.get(k).getX() - S.get(i).getX(), 2) \n\t\t\t\t\t\t\t\t+ Math.pow(S.get(k).getY() - S.get(i).getY(), 2), dminsq);\n\n\t\t\t\tk = k + 1;\n\t\t\t}\n\t\t}\n\n\t\treturn Math.sqrt(dminsq);\n\t}", "private ArrayList<Point> findS(ArrayList<Point> s, Point p1, Point p2) {\n ArrayList<Point> s1 = new ArrayList<>();\n for(int i = 1; i < s.size(); i++){\n if(p1.x*p2.y + s.get(i).x*p1.y + p2.x*s.get(i).y - s.get(i).x*p2.y - p2.x*p1.y - p1.x*s.get(i).y > 0) {\n s1.add(s.get(i));\n }\n }\n return s1;\n }", "private Point[] nearestPairRec(Point[] range, boolean axis) {\n\t\t\tPoint[] Answer = new Point[2];\n\t\t\tif (range.length < 4) return nearestPair3Points(range);\n\t\t\tPoint[] MinPointsLeft = new Point[2];\n\t\t\tPoint[] MinPointsRight = new Point[2];\n\t\t\tPoint[] MinPointsInStrip = new Point[2];\n\t\t\tdouble MinDistance = -1; //it will be change for sure, because we pass the array only if it containes 4 points and above.\n\t\t\tdouble MinDistanceInStrip;\n\t\t\t//step 4\n\t\t\tif (axis){\n\t\t\t\tMinPointsLeft = nearestPairRec(getPointsInRangeRegAxis(range[0].getX(), range[(range.length)/2].getX(), axis), axis);\n\t\t\t\tMinPointsRight =nearestPairRec(getPointsInRangeRegAxis(range[((range.length)/2)+1].getX(), range[range.length-1].getX() ,axis), axis);\n\t\t\t}\n\t\t\telse{\n\t\t\t\tMinPointsLeft = nearestPairRec(getPointsInRangeRegAxis(range[0].getY(), range[(range.length)/2].getY(), axis), axis);\n\t\t\t\tMinPointsRight =nearestPairRec(getPointsInRangeRegAxis(range[((range.length)/2)+1].getY(), range[range.length-1].getY() ,axis), axis);\n\t\t\t}\n\t\t\t//step 5\n\t\t\tif (MinPointsLeft!=null && MinPointsRight!=null){\n\t\t\t\tif (Distance(MinPointsLeft[0], MinPointsLeft[1]) > Distance(MinPointsRight[0], MinPointsRight[1])){\n\t\t\t\t\tMinDistance = Distance(MinPointsRight[0], MinPointsRight[1]);\n\t\t\t\t\tAnswer = MinPointsRight;\n\t\t\t\t}else{\n\t\t\t\t\tMinDistance = Distance(MinPointsLeft[0], MinPointsLeft[1]);\n\t\t\t\t\tAnswer = MinPointsLeft;\n\t\t\t\t}\n\t\t\t}else if (MinPointsLeft!=null && MinPointsRight==null) {\n\t\t\t\tMinDistance = Distance(MinPointsLeft[0], MinPointsLeft[1]);\n\t\t\t\tAnswer = MinPointsLeft;\n\t\t\t}else if (MinPointsRight!=null && MinPointsLeft==null){\n\t\t\t\tMinDistance = Distance(MinPointsRight[0], MinPointsRight[1]);\n\t\t\t\tAnswer = MinPointsRight;\n\t\t\t}\n\t\t\t//step 6 find the nearest point around the median\n\t\t\tint upper;\n\t\t\tint lower;\n\t\t\tif (MinDistance==-1) MinDistance = 0;\n\t\t\tif (axis){\n\t\t\t\tupper = (int) (range[(range.length)/2].getX()+MinDistance);\n\t\t\t\tlower = (int) (range[(range.length)/2].getX()-MinDistance);\n\t\t\t}\n\t\t\telse{\n\t\t\t\tupper = (int) (range[(range.length)/2].getY()+MinDistance);\n\t\t\t\tlower = (int) (range[(range.length)/2].getY()-MinDistance);\n\t\t\t}\n\t\t\trange = getPointsInRangeOppAxis(lower, upper, axis);\n\t\t\tif (range.length>=2) MinPointsInStrip = nearestPointInArray(range);\n\t\t\tif (MinPointsInStrip[0]!=null){\n\t\t\t\tMinDistanceInStrip = Distance(MinPointsInStrip[0], MinPointsInStrip[1]);\n\t\t\t\tif (MinDistanceInStrip < MinDistance) return MinPointsInStrip;\n\t\t\t}\n\t\t\treturn Answer;\n\t\t}", "public scala.Tuple2<java.lang.Object, java.lang.Object> findClosest (scala.collection.TraversableOnce<org.apache.spark.mllib.clustering.VectorWithNorm> centers, org.apache.spark.mllib.clustering.VectorWithNorm point) { throw new RuntimeException(); }", "Execution getClosestDistance();", "static S2Point getIntersectionExact(S2Point a0, S2Point a1, S2Point b0, S2Point b1) {\n // Since we are using exact arithmetic, we don't need to worry about numerical stability.\n BigPoint aNormBp = (new BigPoint(a0)).crossProd(new BigPoint(a1));\n BigPoint bNormBp = (new BigPoint(b0)).crossProd(new BigPoint(b1));\n BigPoint xBp = aNormBp.crossProd(bNormBp);\n\n // The last two operations are done in double precision, which creates a directional error of\n // up to 2 * S2.DBL_EPSILON. (BigPoint.toS2Point() and S2Point.normalize() each contribute up to\n // S2.DBL_EPSILON of directional error.)\n S2Point x = xBp.toS2Point().normalize();\n\n if (x.equals(S2Point.ORIGIN)) {\n // The two edges are exactly collinear, but we still consider them to be \"crossing\" because of\n // simulation of simplicity. Out of the four endpoints, exactly two lie in the interior of\n // the other edge. Of those two we return the one that is lexicographically smallest.\n x = new S2Point(10, 10, 10); // Greater than any valid S2Point\n S2Point aNorm = aNormBp.toS2Point().normalize();\n S2Point bNorm = bNormBp.toS2Point().normalize();\n // Note: To support antipodal edges properly, we would need to add a crossProd() function that\n // computes the cross product using simulation of simplicity and rounds the result to the\n // nearest floating-point representation.\n Preconditions.checkArgument(\n !(aNorm.equals(S2Point.ORIGIN) || bNorm.equals(S2Point.ORIGIN)),\n \"Exactly antipodal edges not supported by getIntersectionExact\");\n x = closestAcceptableEndpoint(a0, a1, aNorm, b0, b1, bNorm, x);\n }\n // assert (S2.isUnitLength(x));\n return x;\n }", "private Point[] nearestPair3Points(Point[] range) {\n\t\t\tif (range.length < 2)\treturn null; \n\t\t\tif (range.length == 2)\treturn range; \n\t\t\t//else - its mean that we have 3 points in the array\n\t\t\tPoint[] Answer = new Point[2];\n\t\t\tdouble currentMinDistance = Distance(range[0], range[1]);\n\t\t\tAnswer[0]= range[0];\n\t\t\tAnswer[1]= range[1];\n\t\t\tif (Distance(range[0], range[2]) < currentMinDistance){\n\t\t\t\tcurrentMinDistance = Distance(range[0], range[2]);\n\t\t\t\tAnswer[0]= range[0];\n\t\t\t\tAnswer[1]= range[2];\n\t\t\t}\n\t\t\tif (Distance(range[1], range[2]) < currentMinDistance){\n\t\t\t\tAnswer[0]= range[1];\n\t\t\t\tAnswer[1]= range[2];\n\t\t\t}\n\t\t\treturn Answer;\n\t\t}", "private static double dynamically_select_epsilon(ArrayList<Point> pointset){\n\t\tPair closestPair = closest_pair(pointset);\n\t\t\n\t\t// Calculate Chebyshev distance between nearest pair\n\t\tdouble distance = chebyshev_distance(closestPair.getFirst(), closestPair.getSecond());\n\t\t\n\t\t// Divide by 8 to fit 8e box constraint set in Gabe's paper\n\t\treturn distance / 8.0;\n\t}", "@Test\r\n\tpublic void ST_ClosestCoordinate() {\n\r\n\t}", "private Point findStartPoint(){\n Point min = points.get(0);\n for (int i = 1; i < points.size(); i++) {\n min = getMinValue(min, points.get(i));\n }\n return min;\n }", "private double distanceResult(double preLng, double preLat, double nextLng, double nextLat) {\n\t\treturn Math.sqrt((preLng - nextLng) * (preLng - nextLng) + (preLat - nextLat) * (preLat - nextLat));\n\t}", "public static Point[] closestPair(double[] x, double[]y) throws Exception\r\n {\r\n /*if x-coordinates dont match y-coordinates*/\r\n if(x.length != y.length)\r\n {\r\n System.out.println(\"Can't compute closest pair. Input lengths mismatch!\");\r\n throw new Exception();\r\n }\r\n /*if there is one or less points*/\r\n if(x.length <2 || y.length <2)\r\n {\r\n System.out.println(\"Can't compute closest pair. Fewer inputs!\");\r\n throw new Exception();\r\n }\r\n /*if there are two points*/\r\n if(x.length == 2)\r\n {\r\n Point[] closest = {new Point(x[0],y[0]), new Point(x[1],y[1])};\r\n return closest;\r\n }\r\n /*if there are three points*/\r\n if(x.length == 3)\r\n {\r\n double cx1 = x[0], cy1 = y[0], cx2 = x[1], cy2 = y[1];\r\n //P0 and P1\r\n double cdist = Math.pow((cx1-cx2),2) + Math.pow((cy1-cy2),2); //ignoring square root to reduce computation time\r\n //P1 and P2\r\n double dist = Math.pow((x[0]-x[2]),2) + Math.pow((y[0]-y[2]),2);\r\n if(dist<cdist)\r\n {\r\n cx1 = x[0]; cy1 = y[0]; cx2 = x[2]; cy2 = y[2]; cdist = dist;\r\n }\r\n //P2 and P3\r\n dist = Math.pow((x[1]-x[2]),2) + Math.pow((y[1]-y[2]),2);\r\n if(dist<cdist)\r\n {\r\n cx1 = x[1]; cy1 = y[1]; cx2 = x[2]; cy2 = y[2]; cdist = dist;\r\n }\r\n Point[] closest = {new Point(cx1,cy1), new Point(cx2,cy2)};\r\n return closest;\r\n }\r\n \r\n //sorting based on x values\r\n int i=0;\r\n double z,zz;\r\n while (i < x.length) \r\n \t{\r\n \t\tif (i == 0 || x[i-1] <= x[i])\r\n \t\t\ti++;\r\n \t\telse \r\n \t\t{\r\n \t\t\tz = x[i];\r\n \t\t\tzz = y[i];\r\n \t\t\tx[i] = x[i-1];\r\n \t\t\ty[i] = y[i-1];\r\n \t\t\tx[--i] = z;\r\n \t\t\ty[i] = zz;\r\n \t\t}\r\n \t}\r\n \r\n //finding left closest pair\r\n Point[] closestL = closestPair(Arrays.copyOfRange(x, 0, x.length/2),Arrays.copyOfRange(y, 0, y.length/2));\r\n //finding right closest pair\r\n Point[] closestR = closestPair(Arrays.copyOfRange(x, x.length/2, x.length),Arrays.copyOfRange(y, y.length/2, y.length));\r\n \r\n double distLsq = Math.pow((closestL[0].getX() - closestL[1].getX()),2) + Math.pow((closestL[0].getY() - closestL[1].getY()),2);\r\n double distRsq = Math.pow((closestR[0].getX() - closestR[1].getX()),2) + Math.pow((closestR[0].getY() - closestR[1].getY()),2);\r\n \r\n double minD;\r\n Point[] closest;\r\n if(distLsq<distRsq)\r\n {\r\n minD = distLsq;\r\n closest = closestL;\r\n }\r\n else \r\n {\r\n minD = distRsq;\r\n closest = closestR;\r\n }\r\n \r\n double midLine = ((x[x.length/2-1]) + (x[x.length/2]))/2;\r\n \r\n //System.out.println(Arrays.toString(x));\r\n //System.out.println(\"midline... x = \" + midLine);\r\n \r\n /*looking at points at a horizontal distance of minD from the mid line*/\r\n for(i = 0; i < x.length/2; i++)\r\n {\r\n if(midLine - x[i] < minD)\r\n {\r\n for(int j = x.length/2; j < x.length; j++)\r\n {\r\n /*looking at points at a vertical and horizontal distance of minD from the current point*/\r\n if((x[j] - midLine < minD) && (y[j] - y [i] < minD || y[i] - y [j] < minD))\r\n {\r\n if(Math.pow((x[i] - x[j]),2) + Math.pow((y[i] - y[j]),2) < minD)\r\n {\r\n closest = new Point[]{new Point(x[i],y[i]), new Point(x[j],y[j])};\r\n minD = Math.pow((x[i] - x[j]),2) + Math.pow((y[i] - y[j]),2);\r\n }\r\n }\r\n }\r\n }\r\n }\r\n return closest;\r\n \r\n }", "public void testClosestApprochDist() {\r\n System.out.println(\"closestApprochDist\");\r\n\r\n ParametricLine2d other = new ParametricLine2d(new Point2d(), new Vector2d(0.0, 1.0));;\r\n ParametricLine2d instance = new ParametricLine2d();\r\n\r\n double expResult = 0.0;\r\n double result = instance.closestApprochDist(other);\r\n assertEquals(expResult, result);\r\n }", "private List<BlockPoint> chooseFurthestPoints(List<BlockPoint> originalPoints){\n if(plattformsPerChunk <= 0 || plattformsPerChunk > originalPoints.size()){\n throw new IllegalArgumentException(\"plattformsPerChunk can not be negative or larger than originalPoints\");\n\t}\n\tList<BlockPoint> startingPoints = new ArrayList<>(originalPoints);\n List<BlockPoint> chosenPoints = new ArrayList<>();\n\tint randomIndex = random.nextInt(startingPoints.size()-1);\n\t// Add the random starting position\n chosenPoints.add(startingPoints.get(randomIndex));\n // Remove it from the list since we can't add the same point many times\n\tstartingPoints.remove(randomIndex);\n\n\t// Choose \"plattformsPerChunk - 1\" amount of plattforms other than the starting point\n\tfor(int i = 0; i < plattformsPerChunk-1; i++){\n\t\tif(startingPoints.isEmpty()){\n\t\t break;\n\t\t}\n\n\t // Set every consideredPositions weight to its lowest distance\n\t // to any considered node\n\t for(BlockPoint consideredPos : startingPoints){\n\t\tdouble globalMinDist = INFINITY;\n\t\tfor(BlockPoint chosenPos : chosenPoints){\n\t\t double currentMinDist = consideredPos.distanceTo(chosenPos);\n\t\t if(currentMinDist < globalMinDist){\n\t\t\tglobalMinDist = currentMinDist;\n\t\t }\n\t\t}\n\t\tconsideredPos.weight = globalMinDist;\n\t }\n\n\t // Choose the position with the highest weight and add/remove it.\n\t // This means choose the point with largest min distance\n\t double highestMinDist = -1;\n\t BlockPoint chosenPoint = null;\n\t for(BlockPoint consideredPos : startingPoints){\n\t\tif(highestMinDist < consideredPos.weight){\n\t\t highestMinDist = consideredPos.weight;\n\t\t chosenPoint = consideredPos;\n\t\t}\n\t }\n\t assert chosenPoint != null;\n\t chosenPoints.add(chosenPoint.copy());\n\t startingPoints.remove(chosenPoint);\n\t}\n\treturn chosenPoints;\n }", "private double dynamically_select_epsilon(ArrayList<Point> pointset) {\n\t\tPair closestPair = closest_pair(pointset);\n\n\t\t// Calculate Chebyshev distance between nearest pair\n\t\tdouble distance = chebyshev_distance(closestPair);\n\n\t\t// Divide by 16 to fit 8e box constraint set in Gabe's paper\n\t\treturn distance / 16.0;\n\t}", "private static double nearestNeighbour(List<Point> points, Point startPoint, Point endPoint) {\n double tentative_distance; // to evaluate nearest neighbour\n double cummulative_distance = 0; // cummulative distance of tour\n double dist; // temporary variable\n Point current = startPoint;\n //System.out.println(\"start at: #\" + current.getId());\n\n int indexToRemove = 0;\n int numberOfLoops = points.size() - 1;\n\n for (int i = 0; i <= numberOfLoops; i++) {\n //System.out.println(\"outerloop #\" + i);\n tentative_distance = Double.MAX_VALUE;\n // evaluate nearest neighbour\n for (int j = 0; j < points.size(); j++) {\n dist = getDistance(points.get(j), current);\n if (dist < tentative_distance) {\n tentative_distance = dist;\n indexToRemove = j;\n }\n }\n //System.out.println(\"next point: #\" + points.get(indexToRemove).getId());\n cummulative_distance += getDistance(points.get(indexToRemove), current);\n current = points.remove(indexToRemove);\n }\n // add distance to endpoint\n cummulative_distance += getDistance(current, endPoint);\n return cummulative_distance;\n }", "@Test\n\tpublic void testLateralNeighbors() {\n\t\tPosition left = new Position(0,0);\n\t\tPosition right = new Position(1,0);\n\n\t\tint distance = euclideanSquaredMetric.calculateCost(left, right);\n\t\tassertEquals(lateralDistanceWeight, distance);\n\n\t\tPosition top = new Position(0,0);\n\t\tPosition bottom = new Position(0,1);\n\n\t\tdistance = euclideanSquaredMetric.calculateCost(top, bottom);\n\t\tassertEquals(lateralDistanceWeight, distance);\n\t}", "private Exemplar nearestExemplar(Instance inst){\n\n if (m_Exemplars == null)\n return null;\n Exemplar cur = m_Exemplars, nearest = m_Exemplars;\n double dist, smallestDist = cur.squaredDistance(inst);\n while (cur.next != null){\n cur = cur.next;\n dist = cur.squaredDistance(inst);\n if (dist < smallestDist){\n\tsmallestDist = dist;\n\tnearest = cur;\n }\n }\n return nearest;\n }", "public static double BruteForceClosestPairs(ArrayList<Point> P) {\n\n\t\t//Assume closest distance is very large\n\t\tdouble distance = Double.POSITIVE_INFINITY;\n\t\t//Size of Arraylist\n\t\tint size = P.size();\n\t\t// New minimum \n\t\tdouble distchange = 0.0;\n\n\t\tfor (int i = 0; i < size - 1; i++) {\n\t\t\tfor (int j = i + 1; j < size; j++) {\n\n\t\t\t\tdistchange = distance;\n\t\t\t\t// Calculate distance between two points\n\t\t\t\tdistance = Math.min(Math.sqrt(Math.pow(P.get(i).getX() - P.get(j).getX(), 2) \n\t\t\t\t\t\t + Math.pow(P.get(i).getY() - P.get(j).getY(), 2)), distance);\n\t\t\t\t\n\t\t\t\tif (distchange != distance) {\n\t\t\t\t\t// If a new min was found, assign the new points \n\t\t\t\t\t// used for output to get \"coordinates of closest pair\"\n\t\t\t\t\tcoordinatepairs = \"(\" + P.get(i).getX() + \", \" + P.get(i).getY()+ \"), \" +\n\t\t\t\t\t\t\t\t \"(\" + P.get(j).getX() + \", \" + P.get(j).getY() + \")\";\n\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\treturn distance;\t\t\t\n\t}", "public Point getFurthermost(){\n\t\t\tdouble distance;\n\t\t\tdouble distanceMin = Double.MAX_VALUE;\n\t\t\tPoint centroid = centroid();\n\t\t\tPoint closest = new Point();\n\t\t\tfor(Point p : clusterPointsList){\n\t\t\t\tdistance = p.dist(centroid);\t\t\t\n\t\t\t\tif(distance < distanceMin){\n\t\t\t\t\tdistanceMin = distance;\n\t\t\t\t\tclosest = p;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn closest;\n\t\t}", "@Test\n public void testPreviousIndex_Middle() {\n\n OasisList<Integer> baseList = new SegmentedOasisList<>();\n baseList.addAll(Arrays.asList(1, 2, 6, 8));\n\n ListIterator<Integer> instance = baseList.listIterator();\n instance.next();\n instance.next();\n\n int expResult = 1;\n int result = instance.previousIndex();\n\n assertEquals(expResult, result);\n }", "@Test\n public void testPrevious_Middle() {\n OasisList<Integer> baseList = new SegmentedOasisList<>();\n baseList.addAll(Arrays.asList(1, 2, 5, 8));\n\n ListIterator<Integer> instance = baseList.listIterator();\n instance.next();\n instance.next();\n instance.next();\n\n Integer expResult = 5;\n Integer result = instance.previous();\n assertEquals(expResult, result);\n }", "private Point findLeadingPt() {\n\t\tPoint2D.Double pt1 = new Point2D.Double(xs[0], ys[0]);\n\t\tPoint2D.Double pt2 = new Point2D.Double(xs[1], ys[1]);\n\t\tPoint2D.Double pt3 = new Point2D.Double(xs[2], ys[2]);\n\n\t\tPoint leadingPt = new Point((int) pt2.getX(), (int) pt2.getY());\n\t\tdouble smallestRadius = this.findRadiusFromChordAndPt(pt1, pt3, pt2);\n\n\t\tfor (int i = 2; i < xs.length - 1; i++) {\n\t\t\tPoint2D.Double ptA = new Point2D.Double(xs[i - 1], ys[i - 1]);\n\t\t\tPoint2D.Double ptC = new Point2D.Double(xs[i], ys[i]);\n\t\t\tPoint2D.Double ptB = new Point2D.Double(xs[i + 1], ys[i + 1]);\n\t\t\tif (smallestRadius > this.findRadiusFromChordAndPt(ptA, ptB, ptC)) {\n\t\t\t\tsmallestRadius = this.findRadiusFromChordAndPt(ptA, ptB, ptC);\n\t\t\t\tleadingPt = new Point((int) ptC.getX(), (int) ptC.getY());\n\t\t\t}\n\t\t}\n\t\t/*\n\t\t * double yArrow = Controller.flowArrow.findCenterOfMass().getY(); for (int i =\n\t\t * 0; i < xs.length; i++) { if (ys[i] == yArrow) { leadingPt = new Point((int)\n\t\t * xs[i], (int) ys[i]); } }\n\t\t */\n\t\treturn leadingPt;\n\t}", "protected Coordinates intersectionFromClosestPoints() {\n if (closestPointA != null && closestPointB != null\n && geometry.almostEqual(closestPointA, closestPointB)) {\n return closestPointA;\n } else {\n return null;\n }\n }", "private double distancePointToSegment(Vector point, Vector startSegment, Vector endSegment) {\n\t\t// Segment. Starts and Ends in the same point -> Distance == distance\n\t\tif (startSegment.subtract(endSegment).equals(NULL_VECTOR_3DIM)) {\n\t\t\treturn point.subtract(startSegment).getNorm(); // Length of a-b\n\t\t}\n\t\t// https://en.wikipedia.org/wiki/Distance_from_a_point_to_a_line\n\t\t/*\n\t\t * es reicht aber aus, wenn man zusätzlich noch die Länge AB der Strecke\n\t\t * kennt. (Die Strecke sei AB, der Punkt P.) Dann kann man nämlich\n\t\t * testen, ob der Winkel bei A (PB²>PA²+AB²) oder bei B (PA²>PB²+AB²)\n\t\t * stumpf (>90 <180grad) ist. Im ersten Fall ist PA, im zweiten PB der\n\t\t * kürzeste Abstand, ansonsten ist es der Abstand P-Gerade(AB).\n\t\t */\n\n\t\t// TESTEN WO ES AM NÄCHSTEN AN DER STRECKE IST,NICHT NUR AN DER GERADEN\n\t\tline = startSegment.subtract(endSegment); // Vektor von start zum end.\n\t\tlineToPoint = startSegment.subtract(point); // vom start zum punkt.\n\t\tlineEnd = endSegment.subtract(startSegment); // vom ende zum start\n\t\tlineEndToPoint = endSegment.subtract(point); // vom start zum ende\n\n\t\t// Wenn größer 90Grad-> closest ist start\n\t\tdouble winkelStart = getWinkel(line, lineToPoint);\n\t\t// Wenn größer 90Grad -> closest ist end\n\t\tdouble winkelEnde = getWinkel(lineEnd, lineEndToPoint);\n\t\tif (winkelStart > 90.0 && winkelStart < 180.0) {\n\t\t\t// Start ist am nächsten. Der winkel ist über 90Grad somit wurde nur\n\t\t\t// der nächste nachbar auf der geraden ausserhalb der strecke\n\t\t\t// gefunden\n\t\t\treturn startSegment.subtract(point).getNorm();\n\t\t}\n\t\tif (winkelEnde > 90.0 && winkelEnde < 180.0) {\n\t\t\t// Ende ist am nächsten\n\t\t\treturn endSegment.subtract(point).getNorm();\n\t\t}\n\n\t\t// If not returned yet. The closest position ist on the line\n\t\treturn closestDistanceFromPointToEndlessLine(point, startSegment, endSegment);\n\t}", "private GeoPoint getClosestPoint(List<GeoPoint> intersectionPoints) {\n Point3D p0 = scene.getCamera().getSpo();//the point location of the camera.\n double minDist = Double.MAX_VALUE;//(meatchelim ldistance hamaximily)\n double currentDistance = 0;\n GeoPoint pt = null;\n for (GeoPoint geoPoint : intersectionPoints) {\n currentDistance = p0.distance(geoPoint.getPoint());//checks the distance from camera to point\n if (currentDistance < minDist) {\n minDist = currentDistance;\n pt = geoPoint;\n }\n }\n return pt;\n }", "Point findNearestActualPoint(Point a, Point b) {\n\t\tPoint left = new Point(a.x-this.delta/3,a.y);\n\t\tPoint right = new Point(a.x+this.delta/3,a.y);\n\t\tPoint down = new Point(a.x,a.y-this.delta/3);\n\t\tPoint up = new Point(a.x,a.y+this.delta/3);\n\t\tPoint a_neighbor = left;\n\t\tif (distance(right,b) < distance(a_neighbor,b)) a_neighbor = right;\n\t\tif (distance(down,b) < distance(a_neighbor,b)) a_neighbor = down;\n\t\tif (distance(up,b) < distance(a_neighbor,b)) a_neighbor = up;\n\n\t\treturn a_neighbor;\n\t}", "public Point3D findClosestPoint(List<Point3D> pointsList) {\n /**\n * the near point\n */\n Point3D result = null;\n /**\n * initialize with a big number that we sure it will change\n */\n double closestDistance = Double.MAX_VALUE;\n\n /**\n * if the point equals to null, it`s mean there\n * is no point that close to it\n */\n if (pointsList == null) {\n return null;\n }\n\n for (Point3D p : pointsList) {\n double temp = p.distance(_p0);\n if (temp < closestDistance) {\n closestDistance = temp;\n result = p;\n }\n }\n\n return result;\n }", "@Test\n public void test23() throws Throwable {\n double double0 = UnivariateRealSolverUtils.midpoint((-1052.8959089), (-1052.8959089));\n assertEquals((-1052.8959089), double0, 0.01D);\n }", "@Override\n public Point nearest(double x, double y) {\n double distance = Double.POSITIVE_INFINITY;\n Point nearestPoint = new Point(0, 0);\n Point targetPoint = new Point(x, y);\n\n for (Point p : pointsList) {\n double tempdist = Point.distance(p, targetPoint);\n if (tempdist < distance) {\n distance = tempdist;\n nearestPoint = p;\n }\n }\n\n return nearestPoint;\n }", "public Point closestIntersectionToStartOfLine(Rectangle rect) {\r\n List<Point> list = rect.intersectionPoints(this);\r\n if (list.isEmpty()) {\r\n return null;\r\n // there is only one point in list\r\n } else if (list.size() == 1) {\r\n return list.get(0);\r\n // first point in list closer than the second one\r\n } else if (this.start.distance(list.get(0)) < this.start.distance(list.get(1))) {\r\n return list.get(0);\r\n // second point in list closer than the first one\r\n } else {\r\n return list.get(1);\r\n }\r\n }", "@Test\n public void testDistanceTo() {\n System.out.println(\"Testing distanceTo() for a range of different GPS coordinates\");\n double distancesExpected[] = {\n 786.3,\n 786.3,\n 786.3,\n 786.3,\n\t\t\t102.2,\n\t\t\t102.2,\n\t\t\t102.2,\n\t\t\t102.2\n };\n\t\t\n for (int i = 0; i < this.testCoordinates.length; i++) {\n double expResult = distancesExpected[i];\n double result = this.origin.distanceTo(this.testCoordinates[i]);\n\t\t\tSystem.out.println(\"Expected: \" + expResult + \", Actual: \" + result);\n assertEquals(expResult, result, 0.1);\n }\n }", "@Test\n public void testHasPrevious_Middle() {\n OasisList<Integer> baseList = new SegmentedOasisList<>();\n baseList.addAll(Arrays.asList(1, 2, 3, 4, 5));\n\n ListIterator<Integer> instance = baseList.listIterator();\n\n instance.next();\n instance.next();\n\n boolean expResult = true;\n boolean result = instance.hasPrevious();\n\n assertEquals(expResult, result);\n }", "private static Point getNearest(Collection<Point> centers, Point p) {\n\t\tdouble min = 0;\n\t\tPoint minPoint = null;\n\t\tfor(Point c : centers){\n\t\t\tif(minPoint == null || c.distance(p) < min){\n\t\t\t\tmin = c.distance(p);\n\t\t\t\tminPoint = c;\n\t\t\t}\n\t\t}\n\t\treturn minPoint;\n\t}", "private Point[] nearestPointInArray(Point[] strip){\n\t\tint j = 1; // with each point we measure the distance with the following 6 point's\n\t\tPoint[] currentMinPoints = {strip[0],strip[1]};\n\t\tdouble currentMinDistance = Distance(currentMinPoints[0], currentMinPoints[1]);\n\t\tdouble currentDistance;\t\n\t\tfor (int i=0; i< strip.length; i++){\n\t\t\twhile (j<8 && i+j < strip.length){\n\t\t\t\tcurrentDistance = Distance(strip[i], strip[i+j]);\n\t\t\t\tif (currentDistance<currentMinDistance){\n\t\t\t\t\tcurrentMinDistance = currentDistance;\n\t\t\t\t\tcurrentMinPoints[0] = strip[i];\n\t\t\t\t\tcurrentMinPoints[1] = strip[i+j];\n\t\t\t\t}\n\t\t\t\tj++;\n\t\t\t}\n\t\t\tj=1;\n\t\t}\n\t\treturn currentMinPoints;\n\t}", "private GeoPoint getClosestPoint(List<GeoPoint> points) {\r\n\t\tGeoPoint closestPoint = null;\r\n\t\tdouble distance = Double.MAX_VALUE;\r\n\r\n\t\tPoint3D P0 = _scene.get_camera().get_p0();\r\n\r\n\t\tfor (GeoPoint i : points) {\r\n\t\t\tdouble tempDistance = i.point.distance(P0);\r\n\t\t\tif (tempDistance < distance) {\r\n\t\t\t\tclosestPoint = i;\r\n\t\t\t\tdistance = tempDistance;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn closestPoint;\r\n\r\n\t}", "public static IDirectPosition getClosestPointsInDirection(\n IDirectPosition point, IDirectPosition previousPoint,\n IDirectPosition nextPoint, IGeometry geom, boolean left) {\n\n double minDistance = Double.MAX_VALUE;\n IDirectPosition c0;\n IDirectPosition c2;\n\n if (previousPoint != null) {\n c0 = previousPoint;\n c2 = point;\n } else {\n c0 = point;\n c2 = nextPoint;\n }\n IDirectPosition toReturn = null;\n for (IDirectPosition p : geom.coord()) {\n double distance = point.distance2D(p);\n if (distance < minDistance) {\n // Calculation of the angle (c0, p, c2) in a radian value between -pi\n // and pi.\n\n // Calculation of the coordinate of c1-c0 vector\n double x10 = c0.getX() - p.getX();\n double y10 = c0.getY() - p.getY();\n\n // Calculation of the coordinate of c1-c0 vector\n double x12 = c2.getX() - p.getX();\n double y12 = c2.getY() - p.getY();\n\n double angle = Math.atan2(x10 * y12 - y10 * x12, x10 * x12 + y10 * y12);\n\n // angle = angle % (2 * Math.PI);\n if ((left && (angle >= 0)) || (!left && (angle <= 0))) {\n minDistance = distance;\n toReturn = p;\n }\n\n }\n }\n\n return toReturn;\n\n }", "private static void findClosestElement(int[] a, int element) {\n int low = 0, high = a.length - 1;\n\n\n // Corner cases\n if (a[high] < element) {\n System.out.println(a[high]);\n return;\n }\n\n if (element < a[low]) {\n System.out.println(a[low]);\n return;\n }\n\n while (low <= high) {\n\n int mid = low + (high - low) / 2;\n\n // element == mid\n if (a[mid] == element) {\n\n int leftDiff = Integer.MAX_VALUE;\n int rightDiff = Integer.MAX_VALUE;\n\n if (mid > 0) {\n leftDiff = element - a[mid - 1];\n }\n\n if (mid < a.length - 1) {\n rightDiff = a[mid + 1] - element;\n }\n\n\n if (leftDiff != Integer.MAX_VALUE && leftDiff < rightDiff) {\n System.out.println(a[mid - 1]);\n } else if (rightDiff != Integer.MAX_VALUE) {\n System.out.println(a[mid + 1]);\n }\n return;\n }\n\n // element < mid\n if (element < a[mid]) {\n\n if (low <= mid - 1 && a[mid - 1] < element) { // Cross over point is mid-1 to mid\n System.out.println(getClosest(element, a[mid - 1], a[mid]));\n return;\n } else\n high = mid;\n } else {\n if (mid + 1 <= high && element < a[mid + 1]) { // Cross over point is mid to mid+1\n System.out.println(getClosest(element, a[mid], a[mid + 1]));\n return;\n } else\n low = mid + 1;\n }\n }\n\n }", "@Test\n public void getDistancesTest() {\n final double[] pointA = new double[3];\n final double[] pointB = new double[3];\n double result;\n\n //points\n //A->B\n pointA[0] = -4; pointA[1] = -6; pointA[2] = -3;\n pointB[0] = 2; pointB[1] = 3; pointB[2] = 4;\n result = Math.sqrt(166);\n Assert.assertEquals(\"getDistanceBetween2Envelopes : A -> B\", result, getDistanceBetween2Positions(pointA, pointB), EPSILON);\n //b->A\n Assert.assertEquals(\"getDistanceBetween2Envelopes : B -> A\", result, getDistanceBetween2Positions(pointB, pointA), EPSILON);\n\n final double[] envelopeA = new double[6];\n final double[] envelopeB = new double[6];\n\n //envelopes\n //A->B\n envelopeA[0] = -6; envelopeA[3] = -2;\n envelopeA[1] = -12; envelopeA[4] = 0;\n envelopeA[2] = -3.5; envelopeA[5] = -2.5;\n\n envelopeB[0] = 1; envelopeB[3] = 3;\n envelopeB[1] = 0; envelopeB[4] = 6;\n envelopeB[2] = 3.5; envelopeB[5] = 4.5;\n Assert.assertEquals(\"getDistanceBetween2Envelopes : A -> B\", result, getDistanceBetween2Envelopes(envelopeA, envelopeB), EPSILON);\n //b->A\n Assert.assertEquals(\"getDistanceBetween2Envelopes : B -> A\", result, getDistanceBetween2Envelopes(envelopeB, envelopeA), EPSILON);\n }", "@Override\r\n\tpublic int compareTo(Candidate e) {\n\t double d = e.getDistance();\r\n\t \r\n\t if (this.getDistance() <= d) {\r\n\t return -1;\r\n\t }\r\n\t\r\n\t if (this.getDistance() > d) {\r\n\t return 1;\r\n\t }\r\n\t \r\n\t // Should not reach here \r\n\t return 0;\r\n\t}", "public static List<Point> ParetoOptimal(List<Point> listofPts)\n {\n \n if(listofPts.size() == 1 || listofPts.size() == 0)\n return listofPts;\n \n \n \n \n int pos = listofPts.size() /2 ;\n \n /*\n * quickSelect time complexity (n)\n */\n \n Point median = quickSelect(listofPts, pos, 0, listofPts.size() - 1); \n \n \n \n List<Point> points1 = new ArrayList<Point>();\n List<Point> points2 = new ArrayList<Point>();\n List<Point> points3 = new ArrayList<Point>();\n List<Point> points4 = new ArrayList<Point>();\n \n //O(n)\n if(oldMedian == median)\n {\n \t\n for(int x= 0; x < listofPts.size(); x++)\n {\n if(listofPts.get(x).getX() <= median.getX())\n {\n points1.add(listofPts.get(x));\n \n }\n else\n {\n points2.add(listofPts.get(x));\n \n }\n }\n \n \n }\n else\n {\n for(int x= 0; x < listofPts.size(); x++)\n {\n if(listofPts.get(x).getX() < median.getX())\n {\n points1.add(listofPts.get(x));\n \n }\n else\n {\n points2.add(listofPts.get(x));\n \n }\n }\n \n \n }\n //O(n)\n int yRightMax = -100000;\n for(int x= 0; x < points2.size(); x++)\n {\n if(points2.get(x).getY() > yRightMax)\n yRightMax = (int) points2.get(x).getY();\n \n }\n \n \n for(int x= 0; x < points1.size() ; x++)\n {\n if(points1.get(x).getY()> yRightMax)\n { \n points3.add(points1.get(x));\n \n } \n }\n \n for(int x= 0; x < points2.size() ; x++)\n {\n if(points2.get(x).getY() < yRightMax)\n {\n points4.add(points2.get(x));\n \n }\n \n }\n //System.out.println(\"points2: \" + points2);\n /*\n * Below bounded by T(n/c) + T(n/2) where c is ratio by which left side is shortened \n */\n oldMedian = median;\n return addTo \n ( ParetoOptimal(points3), \n ParetoOptimal(points2)) ;\n }", "@Test\n public void testPreviousIndex_Start() {\n OasisList<Integer> baseList = new SegmentedOasisList<>();\n baseList.addAll(Arrays.asList(1, 2, 3, 4, 5));\n\n ListIterator<Integer> instance = baseList.listIterator();\n int expResult = -1;\n int result = instance.previousIndex();\n\n assertEquals(expResult, result);\n }", "private PointDist findNearest(Node curr, RectHV rect, PointDist minP, boolean Isx) {\n double currDist;\n PointDist p1;\n PointDist p2;\n // double currDist = findNearP.distanceSquaredTo(curr.point);\n /*\n if (currDist < pointDist.dist)\n minP = new PointDist(curr.point, currDist);\n else\n minP = pointDist;\n\n */\n if (Isx) {\n if (curr.left != null) {\n RectHV leftRect = new RectHV(rect.xmin(), rect.ymin(), curr.point.x(), rect.ymax());\n currDist = findNearP.distanceSquaredTo(curr.left.point);\n if (currDist < minP.dist)\n minP = new PointDist(curr.left.point, currDist);\n if (minP.dist > leftRect.distanceSquaredTo(findNearP)) {\n p1 = findNearest(curr.left, leftRect, minP, false);\n if (p1 != null)\n if (p1.dist < minP.dist)\n minP = p1;\n }\n }\n if (curr.right != null) {\n RectHV rightRect = new RectHV(curr.point.x(), rect.ymin(), rect.xmax(), rect.ymax());\n currDist = findNearP.distanceSquaredTo(curr.right.point);\n if (currDist < minP.dist)\n minP = new PointDist(curr.right.point, currDist);\n if (minP.dist > rightRect.distanceSquaredTo(findNearP)) {\n p2 = findNearest(curr.right, rightRect, minP, false);\n if (p2 != null)\n if (p2.dist < minP.dist)\n minP = p2;\n }\n }\n }\n else {\n if (curr.left != null) {\n RectHV leftRect = new RectHV(rect.xmin(), rect.ymin(), rect.xmax(), curr.point.y());\n currDist = findNearP.distanceSquaredTo(curr.left.point);\n if (currDist < minP.dist)\n minP = new PointDist(curr.left.point, currDist);\n if (minP.dist > leftRect.distanceSquaredTo(findNearP)) {\n p1 = findNearest(curr.left, leftRect, minP, true);\n if (p1 != null)\n if (p1.dist < minP.dist)\n minP = p1;\n }\n }\n if (curr.right != null) {\n RectHV rightRect = new RectHV(rect.xmin(), curr.point.y(), rect.xmax(), rect.ymax());\n currDist = findNearP.distanceSquaredTo(curr.right.point);\n if (currDist < minP.dist)\n minP = new PointDist(curr.right.point, currDist);\n if (minP.dist > rightRect.distanceSquaredTo(findNearP)) {\n p2 = findNearest(curr.right, rightRect, minP, true);\n if (p2 != null)\n if (p2.dist < minP.dist)\n minP = p2;\n }\n }\n }\n return minP;\n }", "private Point findTrailingPt() {\n\t\tPoint farthestPt = new Point(getDisplayXs()[0], getDisplayYs()[0]);\n\t\tfor (int i = 0; i < getDisplayXs().length; i++) {\n\t\t\tPoint nextPt = new Point(getDisplayXs()[i], getDisplayYs()[i]);\n\t\t\tPoint centerOfMass = Controller.flowArrow.findCenterOfMass();\n\t\t\tif (farthestPt.distance(centerOfMass) < nextPt.distance(centerOfMass)) {\n\t\t\t\tfarthestPt = nextPt; // update fartestPt\n\t\t\t}\n\t\t}\n\t\treturn farthestPt;\n\t}", "private double[] getGoalPointAtLookaheadDistance(\n double[] initialPointOfLine, double[] finalPointOfLine, double[] nearestPoint) {\n\n // TODO: use lookahead distance proportional to robot max speed -> 0.5 * getRobotMaxSpeed()\n return Geometry.getPointAtDistance(\n initialPointOfLine, finalPointOfLine, nearestPoint, lookaheadDistance);\n }", "ArrayList<OrderedPair<Curve, Integer>>\n tryFindIntersections(\n XY mid_point,\n HashSet<Curve> all_curves,\n HashSet<XY> curve_joints,\n double diameter, double tol,\n Random random)\n {\n for (int i = 0; i < 25; i++)\n {\n double rand_ang = random.nextDouble() * Math.PI * 2;\n double dx = Math.sin(rand_ang);\n double dy = Math.cos(rand_ang);\n\n XY direction = new XY(dx, dy);\n\n XY start = mid_point.minus(direction.multiply(diameter));\n\n LineCurve lc = new LineCurve(start, direction, 2 * diameter);\n\n // must use a smaller tolerance here as our curve splitting can\n // give us curves < 2 * tol long, and if we are on the midpoint of one of those\n // we can't cleat both ends by tol...\n if (!lineClearsPoints(lc, curve_joints, tol / 10))\n continue;\n\n ArrayList<OrderedPair<Curve, Integer>> ret =\n tryFindCurveIntersections(lc, all_curves);\n\n if (ret != null)\n {\n return ret;\n }\n }\n\n return null;\n }", "static S2Point closestAcceptableEndpoint(\n S2Point a0, S2Point a1, S2Point aNorm, S2Point b0, S2Point b1, S2Point bNorm, S2Point x) {\n CloserResult r = new CloserResult(Double.POSITIVE_INFINITY, x);\n if (orderedCCW(b0, a0, b1, bNorm)) {\n r.replaceIfCloser(x, a0);\n }\n if (orderedCCW(b0, a1, b1, bNorm)) {\n r.replaceIfCloser(x, a1);\n }\n if (orderedCCW(a0, b0, a1, aNorm)) {\n r.replaceIfCloser(x, b0);\n }\n if (orderedCCW(a0, b1, a1, aNorm)) {\n r.replaceIfCloser(x, b1);\n }\n return r.getVmin();\n }", "public Point getClosest(){\n\t\t\tdouble distance;\n\t\t\tdouble distanceMax = 0.0;\n\t\t\tPoint centroid = centroid();\n\t\t\tPoint furthermost = new Point();\n\t\t\tfor(Point p : clusterPointsList){\n\t\t\t\tdistance = p.dist(centroid);\t\t\t\n\t\t\t\tif(distance > distanceMax){\n\t\t\t\t\tdistanceMax = distance;\n\t\t\t\t\tfurthermost = p;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn furthermost;\n\t\t}", "protected IgniteBiTuple<Integer, Double> findClosest(Vector[] centers, Vector pnt) {\n double bestDistance = Double.POSITIVE_INFINITY;\n int bestInd = 0;\n\n for (int i = 0; i < centers.length; i++) {\n double dist = distance(centers[i], pnt);\n if (dist < bestDistance) {\n bestDistance = dist;\n bestInd = i;\n }\n }\n\n return new IgniteBiTuple<>(bestInd, bestDistance);\n }", "private Point2D nearest(Node x, Point2D p, RectHV rect, boolean test) {\n\t\tPoint2D incumbent = x.point;\n\t\tPoint2D challenger;\n\t\tRectHV leftRect, rightRect;\n\t\tdouble distance = incumbent.distanceTo(p);\n\t\t\n\t\tif (test) {\n\t\t\tleftRect = new RectHV(rect.xmin(), rect.ymin(), x.point.x(), rect.ymax());\n\t\t\trightRect = new RectHV(x.point.x(), rect.ymin(), rect.xmax(), rect.ymax());\n\t\t} else {\n\t\t\tleftRect = new RectHV(rect.xmin(), rect.ymin(), rect.xmax(), x.point.y());\n\t\t\trightRect = new RectHV(rect.xmin(), x.point.y(), rect.xmax(), rect.ymax());\n\t\t}\n\n\t\tdouble comp = comparePoints(x, p, test);\n\t\tif (comp <= 0) {\n\t\t\tif (x.left != null) {\n\t\t\t\tif ((challenger = nearest(x.left, p, leftRect, !test)).distanceTo(p) < distance) {\n\t\t\t\t\tincumbent = challenger;\n\t\t\t\t\tdistance = challenger.distanceTo(p);\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (x.right != null) {\n\t\t\t\tif (rightRect.distanceTo(p) < distance) {\n\t\t\t\t\tif ((challenger = nearest(x.right, p, rightRect, !test)).distanceTo(p) < distance) {\n\t\t\t\t\t\tincumbent = challenger;\n\t\t\t\t\t\tdistance = challenger.distanceTo(p);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\telse {\n\t\t\tif (x.right != null) {\n\t\t\t\tif ((challenger = nearest(x.right, p, rightRect, !test)).distanceTo(p) < distance) {\n\t\t\t\t\tincumbent = challenger;\n\t\t\t\t\tdistance = challenger.distanceTo(p);\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (x.left != null) {\n\t\t\t\tif (leftRect.distanceTo(p) < distance) {\n\t\t\t\t\tif ((challenger = nearest(x.left, p, leftRect, !test)).distanceTo(p) < distance) {\n\t\t\t\t\t\tincumbent = challenger;\n\t\t\t\t\t\tdistance = challenger.distanceTo(p);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn incumbent;\n\t}", "private void computeDistances() {\n for (int i = 0; i < groundTruthInstant.size(); ++i)\n for (int j = 0; j < estimatedInstant.size(); ++j) {\n float currentDist = groundTruthInstant.get(i).getDistanceTo(estimatedInstant.get(j).getPos());\n if (currentDist < distToClosestEstimate[i][0]) {\n distToClosestEstimate[i][0] = currentDist;\n distToClosestEstimate[i][1] = j;\n }\n }\n }", "private Coordinate fetchClosestIntersection (Coordinate endPoint, List<Coordinate> intersectionPoints) {\r\n\t\tif (intersectionPoints!=null ) {\r\n\t\t\tif (intersectionPoints.size()>1) {\r\n\t\t\t\treturn GeometryOperations.getNearestVertex(endPoint, intersectionPoints.toArray(new Coordinate[0]));\r\n\t\t\t}\r\n\t\t\t if (intersectionPoints.size()==1) {\r\n\t\t\t\t\treturn intersectionPoints.get(0);\r\n\t\t\t }\r\n\t\t} \r\n\t\treturn null;\r\n\t}", "public static void main(String[] args) {\n \n PointSET pset = new PointSET();\n System.out.println(\"Empty: \" + pset.isEmpty());\n pset.insert(new Point2D(0.5, 0.5));\n pset.insert(new Point2D(0.5, 0.5));\n pset.insert(new Point2D(0.5, 0.6));\n pset.insert(new Point2D(0.5, 0.7));\n pset.insert(new Point2D(0.5, 0.8));\n pset.insert(new Point2D(0.1, 0.5));\n pset.insert(new Point2D(0.8, 0.5));\n pset.insert(new Point2D(0.1, 0.1));\n System.out.println(\"Empty: \" + pset.isEmpty());\n System.out.println(\"Size: \" + pset.size());\n System.out.println(\"Nearest to start: \" + pset.nearest(new Point2D(0.0, 0.0)));\n System.out.println(\"Contains #1: \" + pset.contains(new Point2D(0.0, 0.0)));\n System.out.println(\"Contains #2: \" + pset.contains(new Point2D(0.5, 0.5)));\n System.out.print(\"Range #1: \");\n for (Point2D p : pset.range(new RectHV(0.001, 0.001, 0.002, 0.002)))\n System.out.print(p.toString() + \"; \");\n System.out.print(\"\\n\");\n System.out.print(\"Range #2: \");\n for (Point2D p : pset.range(new RectHV(0.05, 0.05, 0.15, 0.15)))\n System.out.print(p.toString() + \"; \");\n System.out.print(\"\\n\");\n System.out.print(\"Range #3: \");\n for (Point2D p : pset.range(new RectHV(0.25, 0.35, 0.65, 0.75)))\n System.out.print(p.toString() + \"; \");\n System.out.print(\"\\n\");\n \n }", "private List<Integer> getClosestRange(List<Integer> ranges, double predictionAmount) {\n List<Integer> bestRange = new ArrayList<>();\n double bestRangeDistance = Double.MAX_VALUE;\n for (int i = 0; i < ranges.size(); i += 2) {\n double rangeDistance = Math.abs(predictionAmount - getRangeCenter(ranges.get(i), ranges.get(i + 1)));\n if (rangeDistance < bestRangeDistance) {\n bestRangeDistance = rangeDistance;\n bestRange.clear();\n bestRange.add(ranges.get(i));\n bestRange.add(ranges.get(i + 1));\n }\n }\n return bestRange;\n }", "private Point findFront(Point[] points) {\n\t\t// Loop through the passed points.\n\t\tdouble[] dists = new double[3];\n\t\tfor (int i = 0; i < 3; i++) {\n\t\t\t// Get outer-loop point.\n\t\t\tPoint a = points[i];\n\t\t\t\n\t\t\t// Loop through rest of points.\n\t\t\tfor (int k = 0; k < 3; k++) {\n\t\t\t\t// Continue if current outer.\n\t\t\t\tif (i == k) continue;\n\t\t\t\t\n\t\t\t\t// Get inner-loop point.\n\t\t\t\tPoint b = points[k];\n\t\t\t\t\n\t\t\t\t// Add distance between out and inner.\n\t\t\t\tdists[i] += Math.sqrt(\n\t\t\t\t\tMath.pow(a.x - b.x, 2) + Math.pow(a.y - b.y, 2)\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\t\t\n\t\t// Prepare index and largest holder.\n\t\tint index = 0;\n\t\tdouble largest = 0;\n\t\t\n\t\t// Loop through the found distances.\n\t\tfor (int i = 0; i < 3; i++) {\n\t\t\t// Skip if dist is lower than largest.\n\t\t\tif (dists[i] < largest) continue;\n\t\t\t\n\t\t\t// Save the index and largest value.\n\t\t\tindex = i;\n\t\t\tlargest = dists[i];\n\t\t}\n\t\t\n\t\t// Return the largest point index.\n\t\treturn points[index];\n\t}", "synchronized protected int findClosestSegment(final int x_p, final int y_p, final long layer_id, final double mag) {\n\t\tif (1 == n_points) return -1;\n \t\tif (0 == n_points) return -1;\n \t\tint index = -1;\n \t\tdouble d = (10.0D / mag);\n \t\tif (d < 2) d = 2;\n \t\tdouble sq_d = d*d;\n \t\tdouble min_sq_dist = Double.MAX_VALUE;\n \t\tfinal Calibration cal = layer_set.getCalibration();\n \t\tfinal double z = layer_set.getLayer(layer_id).getZ() * cal.pixelWidth;\n \n \t\tdouble x2 = p[0][0] * cal.pixelWidth;\n \t\tdouble y2 = p[1][0] * cal.pixelHeight;\n \t\tdouble z2 = layer_set.getLayer(p_layer[0]).getZ() * cal.pixelWidth;\n \t\tdouble x1, y1, z1;\n \n \t\tfor (int i=1; i<n_points; i++) {\n \t\t\tx1 = x2;\n \t\t\ty1 = y2;\n \t\t\tz1 = z2;\n \t\t\tx2 = p[0][i] * cal.pixelWidth;\n \t\t\ty2 = p[1][i] * cal.pixelHeight;\n \t\t\tz2 = layer_set.getLayer(p_layer[i]).getZ() * cal.pixelWidth;\n \n \t\t\tdouble sq_dist = M.distancePointToSegmentSq(x_p * cal.pixelWidth, y_p * cal.pixelHeight, z,\n \t\t\t\t\t x1, y1, z1,\n \t\t\t\t\t\t\t\t x2, y2, z2);\n \n \t\t\tif (sq_dist < sq_d && sq_dist < min_sq_dist) {\n \t\t\t\tmin_sq_dist = sq_dist;\n \t\t\t\tindex = i-1; // previous\n \t\t\t}\n \t\t}\n \t\treturn index;\n \t}", "public double closestPointInSegment(Vector v1, Vector v2) {\n if (v1.same(v2)) return dist(v1);\n\n Vector v = this.sub(v1);\n Vector p = v2.sub(v1).norm();\n\n Vector proj = p.mul(v.dot(p)).add(v1);\n if (proj.inBoundingBox(v1, v2)) {\n return Math.abs(v2.x - v1.x) > EPS ?\n (proj.x - v1.x) / (v2.x - v1.x)\n : (proj.y - v1.y) / (v2.y - v1.y);\n } else {\n return dist(v1) < dist(v2) ? 0 : 1;\n }\n }", "private int locate (List<Integer> list, int hash) {\n\t\tif (list.size() == 0) {\n\t\t\treturn 0;\n\t\t}\n\n\t\tint index_a = -1;\n\t\tint index_b = list.size();\n\t\tfloat value_a = (float)list.get(index_a+1);\n\t\tfloat value_b = (float)list.get(index_b-1);\n\t\tfloat hash_float = (float)hash;\n\n\t\tif (hash <= value_a) {\n\t\t\treturn 0;\n\t\t}\n\t\tif (hash > value_b) {\n\t\t\treturn list.size();\n\t\t}\n\n\t\twhile (index_b - index_a > 1) {\n\t\t\tint index_mid = index_a+(int)((float)(index_b-index_a)*(hash_float-value_a)/(value_b-value_a));\n\t\t\tif (index_mid == index_a) {\n\t\t\t\tindex_mid++;\n\t\t\t} else if (index_mid == index_b) {\n\t\t\t\tindex_mid--;\n\t\t\t}\n\t\t\tif (hash >= list.get(index_mid)) {\n\t\t\t\tindex_a = index_mid;\n\t\t\t\tvalue_a = list.get(index_a);\n\t\t\t} else {\n\t\t\t\tindex_b = index_mid;\n\t\t\t\tvalue_b = list.get(index_b);\n\t\t\t}\n\t\t}\n\t\tif (hash == list.get(index_a)) {\n\t\t\treturn index_a;\n\t\t}\n\t\treturn index_b;\n\t}", "public Coordinates midPoint(Coordinates a, Coordinates b);", "public int FindNearbyPts(Vector CurvData, int Eleindex, Stroke theStroke){\n\t\tint index;\n\t\tVector WinElements = new Vector();\n\t\tint CurvEleIndex;\n\t\tDouble minDistance = 999.0; // initialized to some larger value say 999.0\n\t\tDouble Distance;\n\t\tint ReturnIndex = -1;\n\t\tint min = Eleindex - PixelIndexWindow;\n\t\tint max = Eleindex + PixelIndexWindow;\n\t\tfor(index=0;index<CurvData.size(); index++){\n\t\t\tCurvEleIndex = (Integer)CurvData.elementAt(index);\n\t\t\tif(CurvEleIndex >= min && CurvEleIndex <= max){\n\t\t\t\t\tVector ptList = theStroke.getM_ptList();\n\t\t\t\t\tPoint CurvPt = ((PixelInfo) ptList.get(CurvEleIndex));\n\t\t\t\t\tPoint SpeedPt = ((PixelInfo)ptList.get(Eleindex));\n\t\t\t\t\tif((Distance = SpeedPt.distance(CurvPt)) < TolerantDistance){\n\t\t\t\t\t\tif(minDistance > Distance){\n\t\t\t\t\t\t\tminDistance = Distance;\n\t\t\t\t\t\t\tReturnIndex = index;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn ReturnIndex;\n\t}", "private int calcDistance()\n\t{\n\t\tint distance = 0;\n\n\t\t// Generate a sum of all of the difference in locations of each list element\n\t\tfor(int i = 0; i < listSize; i++) \n\t\t{\n\t\t\tdistance += Math.abs(indexOf(unsortedList, sortedList[i]) - i);\n\t\t}\n\n\t\treturn distance;\n\t}", "@Test\n public void testNextIndex_Middle() {\n OasisList<Integer> baseList = new SegmentedOasisList<>();\n baseList.addAll(Arrays.asList(1, 2, 3, 4, 5));\n\n ListIterator<Integer> instance = baseList.listIterator();\n instance.next();\n instance.next();\n\n int expResult = 2;\n int result = instance.nextIndex();\n\n assertEquals(expResult, result);\n }", "List<CoordinateDistance> getNearestCoordinates(Point coordinate, int n);", "private int findMaxPt(ArrayList<Point> s, Point p1, Point p2) {\n double maxPt = 0;\n int maxIndex = 0;\n for(int i = 1; i < s.size()-2; i++){\n if(p1.x*p2.y + s.get(i).x*p1.y + p2.x*s.get(i).y - s.get(i).x*p2.y - p2.x*p1.y - p1.x*s.get(i).y > maxPt) {\n maxPt = p1.x*p2.y + s.get(i).x*p1.y + p2.x*s.get(i).y - s.get(i).x*p2.y - p2.x*p1.y - p1.x*s.get(i).y;\n maxIndex = i;\n }\n }\n return maxIndex;\n }", "public boolean getNearestTownforTheFirstTime() {\n\t\tint eigenePositionX = stadtposition.x;\r\n\t\tint eigenePositionY = stadtposition.y;\r\n\t\tint anderePositionX, anderePositionY;\r\n\t\tint deltaX, deltaY;\r\n\t\tint distance;\r\n\t\tint distancesum;\r\n\t\tint mindistance = 1200;\r\n\t\tint minIndex = 0;\r\n\r\n\t\tfor (int i = 0; i < otherTowns.size(); i++) {\r\n\t\t\tanderePositionX = otherTowns.get(i).stadtposition.x;\r\n\t\t\tanderePositionY = otherTowns.get(i).stadtposition.y;\r\n\t\t\tdeltaX = eigenePositionX - anderePositionX;\r\n\t\t\tdeltaY = eigenePositionY - anderePositionY;\r\n\t\t\tdistancesum = deltaX * deltaX + deltaY * deltaY;\r\n\t\t\tdistance = (int) Math.sqrt(distancesum);\r\n\r\n\t\t\tif (distance == 0) {\r\n\t\t\t\tdistance = 1500;\r\n\t\t\t}\r\n\r\n\t\t\tif (distance < mindistance) {\r\n\t\t\t\t// System.out.println(distance+\" von minindex i \"+i+\"ist kleiner\");\r\n\t\t\t\tminIndex = i;\r\n\t\t\t\tmindistance = distance;\r\n\t\t\t\tif (mindistance < 33) {\r\n\t\t\t\t\tmindistance = 1200;\r\n\t\t\t\t\ti = 0;\r\n\t\t\t\t\tstadtposition.x = (int) (Math.random() * 1000);\r\n\t\t\t\t\tstadtposition.y = (int) ((Math.random() * 680) + 100);\r\n\r\n//\t\t\t\t\tSystem.out.println(\"stadt ist zu nahe, ändere stadtposition\");\r\n\t\t\t\t\treturn false;\r\n\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t}\r\n//\t\tSystem.out.println(\"minIndex: \" + minIndex + \" ist mit mindistance \" + mindistance + \" am nahsten\");\r\n\t\tnahsteStadt = otherTowns.get(minIndex);\r\n\t\treturn true;\r\n\r\n\t}", "private static void findPair(int[] nums, int target, int start, List<List<Integer>> result) {\n int end = nums.length - 1;\n\n while (start < end) {\n int diff = target - nums[start] - nums[end];\n\n if (diff == 0) {\n ArrayList<Integer> triplet = new ArrayList<>();\n triplet.add(target * -1);\n triplet.add(nums[start]);\n triplet.add(nums[end]);\n result.add(triplet);\n start++;\n end--;\n\n while (start < end && nums[start] == nums[start - 1]) {\n start++;\n }\n\n while (start < end && nums[end] == nums[end + 1]) {\n end--;\n }\n } else if (diff > 0) {\n start++;\n } else {\n end--;\n }\n }\n }", "public static Position getClosest2reference(ArrayList<Position> c, Position reference){\n \t// Gets the closest point to the user's current position\n \tPosition temp;\n \tPosition min = new Position(0,0);\n \tdouble d;\n \tdouble minDistance = 1000;\n \tIterator<Position> t = c.iterator();\n \twhile (t.hasNext()){\n \t\ttemp = (Position) t.next();\n \t\t//System.out.println(\"Checking: \" + temp.getLat() + \",\" + temp.getLon());\n \t\td = Tools.distance(reference, temp);\n \t\tif (d < minDistance){\n \t\t\tmin = temp;\n \t\t\tminDistance = d;\n \t\t}\n \t}\n \treturn min;\n }", "@Test\n public void test06() throws Throwable {\n double double0 = UnivariateRealSolverUtils.midpoint(0.0, 244.30128428311448);\n assertEquals(122.15064214155724, double0, 0.01D);\n }", "private PanImageEntry findPanImageEntryClosestToCenter() {\n\t\tfindProjectedZs();\n\t\t\n\t\tPanImageEntry closestEntry = null;\n\t\tfor (int n=0; n<panImageList.length; n++) {\n\t\t\tPanImageEntry entry = panImageList[n];\n\t\t\tif (entry.draw) {\n\t\t\t\tif (closestEntry == null) {\n\t\t\t\t\tclosestEntry = entry;\n\t\t\t\t}\n\t\t\t\telse if (entry.projectedZ > closestEntry.projectedZ) {\n\t\t\t\t\tclosestEntry = entry;\n\t\t\t\t}\n\t\t\t\telse if (entry.projectedZ == closestEntry.projectedZ) {\n\t\t\t\t\tif (isSuperiorImageCat(entry.imageListEntry.getImageCategory(), closestEntry.imageListEntry.getImageCategory())) {\n\t\t\t\t\t\tclosestEntry = entry;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif (selectedPanImageEntry != null) {\n\t\t\tdouble dAz = closestEntry.imageListEntry.getImageMetadataEntry().inst_az_rover - \n\t\t\tselectedPanImageEntry.imageListEntry.getImageMetadataEntry().inst_az_rover;\n\t\t\tdouble dEl = closestEntry.imageListEntry.getImageMetadataEntry().inst_el_rover - \n\t\t\tselectedPanImageEntry.imageListEntry.getImageMetadataEntry().inst_el_rover;\n\t\t\tif ((selectedPanImageEntry.imageListEntry.getImageMetadataEntry().inst_el_rover < -85.0 \n\t\t\t\t\t&& closestEntry.imageListEntry.getImageMetadataEntry().inst_el_rover < 85.0)\n\t\t\t\t\t|| (selectedPanImageEntry.imageListEntry.getImageMetadataEntry().inst_el_rover > 85\n\t\t\t\t\t\t&& closestEntry.imageListEntry.getImageMetadataEntry().inst_el_rover > 85)\t\n\t\t\t\t\t) {\n\t\t\t\t// this is a fix because the distance computation doesn't work right at high or low elevations...\n\t\t\t\t// in fact, the whole thing is pretty messed up\n\t\t\t\tclosestEntry = selectedPanImageEntry;\t\t\t\t\n\t\t\t}\n\t\t\telse if ((Math.abs(dAz) < selectTolerance) && (Math.abs(dEl) < selectTolerance)) {\n\t\t\t\tclosestEntry = selectedPanImageEntry;\n\t\t\t}\n\t\t}\n\t\treturn closestEntry;\n\t}", "@Test\n public void testPreviousIndex_End() {\n\n OasisList<Integer> baseList = new SegmentedOasisList<>();\n baseList.addAll(Arrays.asList(1, 2));\n\n ListIterator<Integer> instance = baseList.listIterator();\n instance.next();\n instance.next();\n\n int expResult = 1;\n int result = instance.previousIndex();\n\n assertEquals(expResult, result);\n }", "Pair<Vertex, Double> closestVertexToPath(Loc pos);", "List<Long> getBestSolIntersection();", "@Test\n public void testPrevious_End() {\n OasisList<Integer> baseList = new SegmentedOasisList<>();\n baseList.addAll(Arrays.asList(1, 2));\n\n ListIterator<Integer> instance = baseList.listIterator();\n instance.next();\n instance.next();\n\n Integer expResult = 2;\n Integer result = instance.previous();\n assertEquals(expResult, result);\n }", "private double calcNearestNeighborIndex(ArrayList<Point> pts) {\n int width = layoutPanel.getLayoutSize().width;\n int height = layoutPanel.getLayoutSize().height;\n\n // calculate average nearest neighbor\n double avgNN = 0;\n int n = pts.size();\n for (int i = 0; i < n; i++) {\n double minDist = Float.MAX_VALUE;\n for (int j = 0; j < n; j++) {\n if (i != j) {\n Point pti = pts.get(i);\n Point ptj = pts.get(j);\n double dist = Point2D\n .distanceSq(pti.x, pti.y, ptj.x, ptj.y);\n if (minDist > dist) {\n minDist = dist;\n }\n }\n }\n avgNN += Math.sqrt(minDist);\n }\n avgNN = avgNN / (double) n;\n\n // calculate estimated average neighbor\n double estANN = 1.0 / (2.0 * Math.sqrt((double) n\n / (double) (width * height)));\n\n return avgNN / estANN;\n }", "private static boolean kthSmallesElementFound(int[] list1, int[] list2, int nElementsList1, int nElementsList2) {\n if(nElementsList2 < 1) {\n return true;\n }\n\n if(list1[nElementsList1-1] == list2[nElementsList2-1]) {\n return true;\n }\n\n if(nElementsList1 == list1.length) {\n return list1[nElementsList1-1] <= list2[nElementsList2];\n }\n\n if(nElementsList2 == list2.length) {\n return list2[nElementsList2-1] <= list1[nElementsList1];\n }\n\n return list1[nElementsList1-1] <= list2[nElementsList2] && list2[nElementsList2-1] <= list1[nElementsList1];\n }", "public void testClosestApprochDistSqr() {\r\n System.out.println(\"closestApprochDistSqr\");\r\n\r\n ParametricLine2d other = new ParametricLine2d(new Point2d(), new Vector2d(0.0, 1.0));\r\n ParametricLine2d instance = new ParametricLine2d();\r\n\r\n double expResult = 0.0;\r\n double result = instance.closestApprochDistSqr(other);\r\n assertEquals(expResult, result);\r\n }", "private void findLargestNNIPointsIndexPair(float ratioInh, float ratioAct) {\n ArrayList<Point> pts0 = new ArrayList<Point>();\n ArrayList<Point> pts1 = new ArrayList<Point>();\n Dimension dim = layoutPanel.getLayoutSize();\n int height = dim.height;\n int width = dim.width;\n int size = height * width;\n int newNListSize;\n if (ratioInh > ratioAct) {\n newNListSize = (int) (size * ratioInh);\n pts0 = cnvIndexList2Points(layoutPanel.activeNList);\n pts1 = cnvIndexList2Points(layoutPanel.inhNList);\n } else {\n newNListSize = (int) (size * ratioAct);\n pts0 = cnvIndexList2Points(layoutPanel.inhNList);\n pts1 = cnvIndexList2Points(layoutPanel.activeNList);\n }\n double len = Math.sqrt((double) size / (double) newNListSize);\n\n ArrayList<Point> union = new ArrayList<Point>(pts0);\n union.addAll(pts1);\n double maxNNI = calcNearestNeighborIndex(union);\n ArrayList<Point> maxPts0 = pts0;\n ArrayList<Point> maxPts1 = pts1;\n for (int xShift = (int) Math.floor(-len / 2); xShift <= Math\n .ceil(len / 2); xShift++) {\n for (int yShift = (int) Math.floor(-len / 2); yShift <= Math\n .ceil(len / 2); yShift++) {\n if (xShift == 0 && yShift == 0) {\n continue;\n }\n int xShift0 = (int) Math.ceil((double) xShift / 2);\n int xShift1 = (int) Math.ceil((double) -xShift / 2);\n int yShift0 = (int) Math.ceil((double) yShift / 2);\n int yShift1 = (int) Math.ceil((double) -yShift / 2);\n // System.out.println(\"xShift = \" + xShift + \", xShift0 = \" +\n // xShift0 + \", xShift1 = \" + xShift1);\n ArrayList<Point> sftPts0 = getShiftedPoints(pts0, xShift0,\n yShift0);\n ArrayList<Point> sftPts1 = getShiftedPoints(pts1, xShift1,\n yShift1);\n union = new ArrayList<Point>(sftPts0);\n union.addAll(sftPts1);\n double nni = calcNearestNeighborIndex(union);\n if (nni > maxNNI) {\n maxNNI = nni;\n maxPts0 = sftPts0;\n maxPts1 = sftPts1;\n }\n }\n }\n\n if (ratioInh > ratioAct) {\n layoutPanel.activeNList = cnvPoints2IndexList(maxPts0);\n layoutPanel.inhNList = cnvPoints2IndexList(maxPts1);\n } else {\n layoutPanel.inhNList = cnvPoints2IndexList(maxPts0);\n layoutPanel.activeNList = cnvPoints2IndexList(maxPts1);\n }\n }", "@Test\n public void testHasPrevious_Start() {\n OasisList<Integer> baseList = new SegmentedOasisList<>();\n baseList.addAll(Arrays.asList(1, 2, 3, 4, 5));\n\n ListIterator<Integer> instance = baseList.listIterator();\n boolean expResult = false;\n boolean result = instance.hasPrevious();\n\n assertEquals(expResult, result);\n }", "public void testClosestApprochTime() {\r\n System.out.println(\"closestApprochTime\");\r\n\r\n ParametricLine2d other = new ParametricLine2d(new Point2d(), new Vector2d(0.0, 1.0));\r\n ParametricLine2d instance = new ParametricLine2d();\r\n\r\n double expResult = 0.0;\r\n double result = instance.closestApprochTime(other);\r\n assertEquals(expResult, result);\r\n }", "private static int getMinDistIndex(ArrayList<Double> list, int indexNotInterested) {\n \tdouble newDistMin = Double.MAX_VALUE;\n\t\tint newMinDistIndex = -1;\n\t\t\n\t\tfor(int i = 0; i < list.size(); i++) {\n\t\t\tif(i != indexNotInterested && newDistMin > list.get(i)) {\n\t\t\t\tnewDistMin = list.get(i);\n\t\t\t\tnewMinDistIndex = i;\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn newMinDistIndex;\n }", "public static void compareAStarLimitedOpen(List<Position> places, int start, int end, int step) {\n if (end < start) {\n int tmp = end;\n end = start;\n start = tmp;\n }\n Node startNode = graph.findClosest(places.get(0), false);\n Node endNode = graph.findClosest(places.get((1)), false);\n System.out.println(\"==================================================\");\n System.out.println(\"Benchmark A-Star with weighted h\");\n System.out.println(\"From \" + start + \" to \" + end + \" steps \" + step);\n System.out.println(distance.calcDist(startNode, endNode));\n System.out.println(\"==================================================\");\n System.out.println();\n\n AStarResult compareResult;\n try {\n compareResult = AStarAlgorithm.search(graph, startNode, endNode, \"Compare\", 1, 0);\n } catch (Exception e) {\n System.out.println(e.getMessage());\n return;\n }\n\n //\n int curr;\n for (curr = start; curr <= end; curr += step) {\n Path path = new Path(\"\");\n AStarResult result;\n try {\n result = AStarAlgorithm.search(graph, startNode, endNode, \"Compare \" + curr, 1, curr);\n path.addSegment(result.getPath());\n FileWriter fstream = new FileWriter(curr + \".gpx\");\n BufferedWriter out = new BufferedWriter(fstream);\n String gpx = GPXBuilder.build(path.getGeoLineString(true), path.getName());\n out.write(gpx);\n out.close();\n fstream.close();\n System.out.println(\"Result for w=\" + curr);\n System.out.println(\"Expanded Nodes: \" + result.getExpandedNodesCount() + \" (\" + (result.getExpandedNodesCount() - compareResult.getExpandedNodesCount()) + \")\");\n System.out.println(\"Path Length: \" + result.getPath().getLength() + \" (\" + (result.getPath().getLength() - compareResult.getPath().getLength()) + \")\");\n System.out.println(\"SortTime: \" + result.getSorttime() + \" (\" + (result.getSorttime() - compareResult.getSorttime()) + \")\");\n System.out.println(\"Runtime: \" + result.getRuntime() + \" (\" + (result.getRuntime() - compareResult.getRuntime()) + \")\");\n System.out.println();\n } catch (Exception e) {\n System.out.println(e.getMessage());\n }\n }\n }", "public double getClosestDistance(){\n\t\t\tdouble distance;\n\t\t\tdouble distanceMin = Double.MAX_VALUE;\n\t\t\tPoint centroid = centroid();\n\t\t\tfor(Point p : clusterPointsList){\n\t\t\t\tdistance = p.dist(centroid);\t\t\t\n\t\t\t\tif(distance < distanceMin){\n\t\t\t\t\tdistanceMin = distance;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn distanceMin;\n\t\t}", "private boolean isInList(List<Point3D> pointsList, Point3D point) {\r\n for (Point3D tempPoint : pointsList) {\r\n if(point.isAlmostEquals(tempPoint))\r\n return true;\r\n }\r\n return false;\r\n }", "public double NearestPointOnCurve(Position P, Position[] V)\t{\r\n\t Position[] w;\t\t\t/* Ctl pts for 5th-degree eqn\t*/\r\n\t double[] t_candidate = new double[W_DEGREE];\t/* Possible roots\t\t*/ \r\n\t int \tn_solutions;\t\t/* Number of roots found\t*/\r\n\t double\tt;\t\t\t/* Parameter value of closest pt*/\r\n\r\n\t /* Convert problem to 5th-degree Bezier form\t*/\r\n\t w = ConvertToBezierForm(P, V);\r\n\r\n\t /* Find all possible roots of 5th-degree equation */\r\n\t n_solutions = FindRoots(w, W_DEGREE, t_candidate, 0);\r\n\r\n\t /* Compare distances of P to all candidates, and to t=0, and t=1 */\r\n\t {\r\n\t\t\tdouble \tdist, new_dist;\r\n\t\t\tPosition p;\r\n\t\t\tint\t\ti;\r\n\r\n\t\t\r\n\t\t/* Check distance to beginning of curve, where t = 0\t*/\r\n\t\t\tdist = V2SquaredLength(V2Sub(P, V[0]));\r\n\t t = 0.0;\r\n\r\n\t\t/* Find distances for candidate points\t*/\r\n\t for (i = 0; i < n_solutions; i++) {\r\n\t\t \tp = Bezier(V, DEGREE, t_candidate[i], null, null);\r\n\t\t \tnew_dist = V2SquaredLength(V2Sub(P, p));\r\n\t\t \tif (new_dist < dist) {\r\n\t \tdist = new_dist;\r\n\t\t \t\tt = t_candidate[i];\r\n\t \t }\r\n\t }\r\n\r\n\t\t/* Finally, look at distance to end point, where t = 1.0 */\r\n\t\t\tnew_dist = V2SquaredLength(V2Sub(P, V[DEGREE]));\r\n\t \tif (new_dist < dist) {\r\n\t \tdist = new_dist;\r\n\t \tt = 1.0;\r\n\t }\r\n\t }\r\n\r\n\t return t;\r\n\t /* Return the point on the curve at parameter value t */\r\n//\t return (Bezier(V, DEGREE, t, null, null));\r\n\t}", "private static List<Point> possibleNextPos(Point currPos, Point coord1, Point coord2, double buildingSideGrad, Point buildingCentre){\r\n\t\tvar coord1Lat = coord1.latitude();\r\n\t\tvar coord1Lon = coord1.longitude();\r\n\t\tvar coord2Lat = coord2.latitude();\r\n\t\tvar coord2Lon = coord2.longitude();\r\n\t\t\r\n\t\tvar currPosLon = currPos.longitude();\r\n\t\tvar currPosLat = currPos.latitude();\r\n\t\t\r\n\t\tvar buildingLon = buildingCentre.longitude();\r\n\t\tvar buildingLat = buildingCentre.latitude();\r\n\t\t\r\n\t\tvar dir1 = computeDir(coord1, coord2); //in the case that the drone is moving in the direction coord1 to coord2\r\n\t\tvar nextPosTemp1 = nextPos(dir1, currPos); //the temporary next position if the drone moves in dir1\r\n\t\t\r\n\t\tvar dir2 = computeDir(coord2, coord1); //in the case that the drone is moving in the direction coord2 to coord1\r\n\t\tvar nextPosTemp2 = nextPos(dir2, currPos); //the temporary next position if the drone moves in dir2 \r\n\t\t\r\n\t\tvar possibleNextPos = new ArrayList<Point>();\r\n\t\t\r\n\t\tif(Math.abs(buildingSideGrad)>=1) { //in this case, longitudes of building centre and drone current position are compared\r\n\t\t\t//coord1 to coord2 scenario\r\n\t\t\tif((coord1Lat>coord2Lat && buildingLon<currPosLon) || (coord1Lat<coord2Lat && buildingLon>currPosLon)) {\r\n\t\t\t\tdir1 = (dir1+10)%360; //angle increased such that drone doesn't fly over side of building\r\n\t\t\t\tnextPosTemp1 = nextPos(dir1, currPos);\r\n\t\t\t}\r\n\t\t\t//coord2 to coord1 scenario\r\n\t\t\tif((coord1Lat<coord2Lat && buildingLon<currPosLon) || (coord1Lat>coord2Lat && buildingLon>currPosLon)) {\r\n\t\t\t\tdir2 = (dir2+10)%360;\r\n\t\t\t\tnextPosTemp2 = nextPos(dir2, currPos);\r\n\t\t\t}\t\t\t\r\n\t\t}\r\n\t\telse { //in this case, latitudes of building centre and drone current position are compared\r\n\t\t\tif((coord1Lon>coord2Lon && buildingLat>currPosLat) || (coord1Lon<coord2Lon && buildingLat<currPosLat)) {\r\n\t\t\t\tdir1 = (dir1+10)%360; \r\n\t\t\t\tnextPosTemp1 = nextPos(dir1, currPos);\r\n\t\t\t}\r\n\r\n\t\t\tif((coord1Lon<coord2Lon && buildingLat>currPosLat) || (coord1Lon>coord2Lon && buildingLat<currPosLat)) {\r\n\t\t\t\tdir2 = (dir2+10)%360;\r\n\t\t\t\tnextPosTemp2 = nextPos(dir2, currPos);\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tpossibleNextPos.add(nextPosTemp1);\r\n\t\tpossibleNextPos.add(nextPosTemp2);\r\n\t\t\r\n\t\treturn possibleNextPos;\r\n\t}", "private Exemplar nearestExemplar(Instance inst, double c){\n\n if (m_ExemplarsByClass[(int) c] == null)\n return null;\n Exemplar cur = m_ExemplarsByClass[(int) c], nearest = m_ExemplarsByClass[(int) c];\n double dist, smallestDist = cur.squaredDistance(inst);\n while (cur.nextWithClass != null){\n cur = cur.nextWithClass;\n dist = cur.squaredDistance(inst);\n if (dist < smallestDist){\n\tsmallestDist = dist;\n\tnearest = cur;\n }\n }\n return nearest;\n }", "@Override\r\n public Point nearest(double x, double y) {\r\n Point input = new Point(x, y);\r\n Point ans = points.get(0);\r\n double dist = Point.distance(ans, input);\r\n for (Point point : points) {\r\n if (Point.distance(point, input) < dist) {\r\n ans = point;\r\n dist = Point.distance(ans, input);\r\n }\r\n }\r\n return ans;\r\n }", "static <E> int minPos( List<E> list, Comparator<E> fn ) {\n if ( list.isEmpty() ) {\n return -1;\n }\n E eBest = list.get( 0 );\n int iBest = 0;\n for ( int i = 1; i < list.size(); i++ ) {\n E e = list.get( i );\n if ( fn.compare( e, eBest ) < 0 ) {\n eBest = e;\n iBest = i;\n }\n }\n return iBest;\n }", "protected static Set<Point2D.Float> getSortedPointSet(\n\t\t\tList<Point2D.Float> points) {\n\n\t\tfinal Point2D.Float lowest = getLowestPoint(points);\n\n\t\tTreeSet<Point2D.Float> set = new TreeSet<Point2D.Float>(\n\t\t\t\tnew Comparator<Point2D.Float>() {\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic int compare(Point2D.Float a, Point2D.Float b) {\n\n\t\t\t\t\t\tif (a == b || a.equals(b)) {\n\t\t\t\t\t\t\treturn 0;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// use longs to guard against int-underflow\n\t\t\t\t\t\tdouble thetaA = Math.atan2((long) a.y - lowest.y,\n\t\t\t\t\t\t\t\t(long) a.x - lowest.x);\n\t\t\t\t\t\tdouble thetaB = Math.atan2((long) b.y - lowest.y,\n\t\t\t\t\t\t\t\t(long) b.x - lowest.x);\n\n\t\t\t\t\t\tif (thetaA < thetaB) {\n\t\t\t\t\t\t\treturn -1;\n\t\t\t\t\t\t} else if (thetaA > thetaB) {\n\t\t\t\t\t\t\treturn 1;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t// collinear with the 'lowest' point, let the point\n\t\t\t\t\t\t\t// closest to it come first\n\n\t\t\t\t\t\t\t// use longs to guard against int-over/underflow\n\t\t\t\t\t\t\tdouble distanceA = Math\n\t\t\t\t\t\t\t\t\t.sqrt((((long) lowest.x - a.x) * ((long) lowest.x - a.x))\n\t\t\t\t\t\t\t\t\t\t\t+ (((long) lowest.y - a.y) * ((long) lowest.y - a.y)));\n\t\t\t\t\t\t\tdouble distanceB = Math\n\t\t\t\t\t\t\t\t\t.sqrt((((long) lowest.x - b.x) * ((long) lowest.x - b.x))\n\t\t\t\t\t\t\t\t\t\t\t+ (((long) lowest.y - b.y) * ((long) lowest.y - b.y)));\n\n\t\t\t\t\t\t\tif (distanceA < distanceB) {\n\t\t\t\t\t\t\t\treturn -1;\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\treturn 1;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t});\n\n\t\tset.addAll(points);\n\n\t\treturn set;\n\t}", "public static double prepareDivideAndConquer(ArrayList<Point> P) {\n\n\t\t//Sort by X\n\t\tArrayList<Point> X = new ArrayList<Point>(P);\n\t\tsortX(X);\n\t\t//Sort by Y\n\t\tArrayList<Point> Y = new ArrayList<Point>(P);\n\t\tsortY(Y);\n\t\t//Call divide and conquer closest pairs algorithm for solution\n\t\treturn divideAndConquer(X, Y);\n\n\t}" ]
[ "0.6764975", "0.66624093", "0.6311925", "0.6270923", "0.61857826", "0.6175613", "0.60234827", "0.60216856", "0.6017866", "0.59805524", "0.5957756", "0.5943561", "0.5937141", "0.5905895", "0.5896286", "0.589011", "0.58854115", "0.58774817", "0.58703387", "0.5857428", "0.58547014", "0.583285", "0.582682", "0.5812911", "0.581116", "0.58092874", "0.58045614", "0.5789091", "0.57835436", "0.5781076", "0.577118", "0.5740934", "0.5726174", "0.5712619", "0.56807745", "0.5678796", "0.5676282", "0.5674929", "0.5655224", "0.56522715", "0.5651845", "0.56458586", "0.56350183", "0.5634649", "0.5633068", "0.56202585", "0.5614715", "0.5601259", "0.5599231", "0.5595372", "0.5571157", "0.5570835", "0.5556341", "0.5550999", "0.55509603", "0.55491614", "0.55437684", "0.5537658", "0.5536845", "0.5534434", "0.55202377", "0.55198014", "0.5519701", "0.551372", "0.5507", "0.54924226", "0.5488763", "0.54814655", "0.54764897", "0.546789", "0.5466988", "0.5449013", "0.5441104", "0.5438477", "0.5437855", "0.54275435", "0.5424826", "0.54201394", "0.5420107", "0.54138386", "0.5412526", "0.54073626", "0.5402523", "0.5399188", "0.5398047", "0.5397145", "0.53957903", "0.5382292", "0.5375349", "0.53745884", "0.5349692", "0.5339493", "0.53388244", "0.5334901", "0.5331437", "0.5325893", "0.5323263", "0.53232", "0.5317246", "0.5311933" ]
0.66859096
1
Open your local db as the input stream
protected static void copyDataBaseFromAssets(Context context) throws IOException { InputStream myInput = context.getAssets().open("employee_mobile.db"); // Path to the just created empty db String outFileName = "/data/data/com.example.multiframe/databases/" + ETConstants.DB_NAME; SQLiteDatabase db = context.openOrCreateDatabase("employee_mobile.db", context.MODE_PRIVATE, null); db.close(); Log.w("DBHelper", "Copying file from "+myInput+" to "+outFileName); //Open the empty db as the output stream OutputStream myOutput = new FileOutputStream(outFileName); //transfer bytes from the inputfile to the outputfile byte[] buffer = new byte[1024]; int length; while ((length = myInput.read(buffer))>0){ myOutput.write(buffer, 0, length); } //Close the streams myOutput.flush(); myOutput.close(); myInput.close(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public File getInputDb();", "private void open()\n\t\t{\n\t\t\tconfig=Db4oEmbedded.newConfiguration();\n\t\t\tconfig.common().objectClass(Census.class).cascadeOnUpdate(true);\n\t\t\ttry\n\t\t\t{\n\t\t\t\t\n\t\t\t\tDB=Db4oEmbedded.openFile(config, PATH);\n\t\t\t\tSystem.out.println(\"[DB4O]Database was open\");\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(\"[DB4O]ERROR:Database could not be open\");\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}", "public abstract ODatabaseInternal<?> openDatabase();", "public void open() {\n db = dbHelper.getWritableDatabase();\n articleDAO.open(db);\n categoryDAO.open(db);\n sourceDAO.open(db);\n }", "public void open() {\n this.db = this.mSqlHelper.getWritableDatabase();\n }", "public DaoSession openReadableDb() {\n isInitOk();\n SQLiteDatabase db = openHelper.getReadableDatabase();\n DaoMaster daoMaster = new DaoMaster(db);\n DaoSession daoSession = daoMaster.newSession();\n return daoSession;\n }", "private void openDatabase() {\n database = new DatabaseExpenses(this);\n database.open();\n }", "public void open() {\n\n\t\t_database = _dbHelper.getWritableDatabase();\n\t}", "public void open(){\n\t\tbdd = maBaseSQLite.getWritableDatabase();\n\t}", "public void open(){\n this.db = this.typeDatabase.getWritableDatabase();\n }", "@Override\n\tprotected SQLiteDatabase openReadableDb() {\n\t\treturn super.openReadableDb();\n\t}", "public void openRODB() throws SQLException {\r\n\t\tString mPath = DATABASE_PATH + DATABASE_NAME;\r\n\t\tmDataBase = SQLiteDatabase.openDatabase(mPath, null,\r\n\t\t\t\tSQLiteDatabase.OPEN_READONLY);\r\n\t}", "public void open() {\n dbHelper = new DatabaseHelper(context);\n sqLiteDatabase = dbHelper.getWritableDatabase();\n }", "public void openRWDB() throws SQLException {\r\n\t\tString mPath = DATABASE_PATH + DATABASE_NAME;\r\n\t\tmDataBase = SQLiteDatabase.openDatabase(mPath, null,\r\n\t\t\t\tSQLiteDatabase.OPEN_READWRITE);\r\n\t}", "private void open() {\n\t\tFile dbf = new File( dbName );\n\n\t\tif ( dbf.exists( ) == false ) {\n\t\t\tSystem.out.println(\n\t\t\t\t \"SQLite database file [\"\n\t\t\t\t+ dbName\n\t\t\t\t+ \"] does not exist\");\n\t\t\tSystem.exit( 0 );\n\t\t}\n\t\n\t\ttry {\n\t\t\tClass.forName( JDBC_DRIVER );\n\t\t\tgetConnection( );\n\t\t}\n\t\tcatch ( ClassNotFoundException cnfe ) {\n\t\t\tnotify( \"Db.Open\", cnfe );\n\t\t}\n\n\t\tif ( debug )\n\t\t\tSystem.out.println( \"Db.Open : leaving\" );\n\t}", "DataBaseReadStream createNewStream(Cursor beginCursor) throws SQLException;", "public void open() {\n this.database = openHelper.getWritableDatabase();\n }", "public void open() {\n this.database = openHelper.getWritableDatabase();\n }", "public void open() {\n this.database = openHelper.getWritableDatabase();\n }", "public void open() {\n this.database = openHelper.getWritableDatabase();\n }", "public void open() {\n this.database = openHelper.getWritableDatabase();\n }", "protected void open() throws TzException {\n synchronized (dbLock) {\n if (!isOpen()) {\n getDb();\n open = true;\n return;\n }\n }\n }", "private static void readDatabase(String path) {\n try {\n FileInputStream fileIn = new FileInputStream(path + \"/database.ser\");\n ObjectInputStream inStream = new ObjectInputStream(fileIn);\n database = (Database) inStream.readObject();\n inStream.close();\n fileIn.close();\n } catch (IOException i) {\n i.printStackTrace();\n } catch (ClassNotFoundException c) {\n c.printStackTrace();\n }\n }", "private void copyDataBase() throws IOException\r\n\t{\r\n\t\t// Open your local db as the input stream\r\n\t\tInputStream myInput = myContext.getAssets().open(DB_NAME);\r\n\r\n\t\t// Path to the just created empty db\r\n\t\tString outFileName = DB_PATH + DB_NAME;\r\n\r\n\t\t// Open the empty db as the output stream\r\n\t\tOutputStream myOutput = new FileOutputStream(outFileName);\r\n\r\n\t\t// transfer bytes from the inputfile to the outputfile\r\n\t\tbyte[] buffer = new byte[1024];\r\n\t\tint length;\r\n\t\twhile ((length = myInput.read(buffer)) > 0)\r\n\t\t{\r\n\t\t\tmyOutput.write(buffer, 0, length);\r\n\t\t}\r\n\r\n\t\t// Close the streams\r\n\t\tmyOutput.flush();\r\n\t\tmyOutput.close();\r\n\t\tmyInput.close();\r\n\r\n\t}", "private void copyDataBase() throws IOException{\n\n //Open your local db as the input stream\n InputStream myInput = myContext.getAssets().open(DB_NAME);\n\n // Path to the just created empty db\n String outFileName = DB_PATH + DB_NAME;\n\n //Open the empty db as the output stream\n OutputStream myOutput = new FileOutputStream(outFileName);\n\n //transfer bytes from the inputfile to the outputfile\n byte[] buffer = new byte[1024];\n int length;\n while ((length = myInput.read(buffer))>0){\n myOutput.write(buffer, 0, length);\n }\n\n //Close the streams\n myOutput.flush();\n myOutput.close();\n myInput.close();\n\n }", "private void copyDataBase() throws IOException{\n\n //Open your local db as the input stream\n InputStream myInput = myContext.getAssets().open(DB_NAME);\n\n // Path to the just created empty db\n String outFileName = DB_PATH + DB_NAME;\n\n //Open the empty db as the output stream\n OutputStream myOutput = new FileOutputStream(outFileName);\n\n //transfer bytes from the inputfile to the outputfile\n byte[] buffer = new byte[1024];\n int length;\n while ((length = myInput.read(buffer))>0){\n myOutput.write(buffer, 0, length);\n }\n\n //Close the streams\n myOutput.flush();\n myOutput.close();\n myInput.close();\n\n }", "public DataBase open(){\n myDB = new MyHelper(ourContext);\n myDataBase = myDB.getWritableDatabase();\n return this;\n }", "public void copyDataBase() throws IOException {\n\n // Open your local db as the input stream\n InputStream myInput = ApplicationContextProvider.getContext().getAssets().open(DATABASE_NAME);\n\n // Path to the just created empty db\n String outFileName = DB_PATH + DATABASE_NAME;\n\n // Open the empty db as the output stream\n OutputStream myOutput = new FileOutputStream(outFileName);\n\n // transfer bytes from the inputfile to the outputfile\n byte[] buffer = new byte[1024];\n int length;\n while ((length = myInput.read(buffer)) > 0) {\n myOutput.write(buffer, 0, length);\n }\n\n // Close the streams\n myOutput.flush();\n myOutput.close();\n myInput.close();\n }", "private void copyDataBase() throws IOException {\n InputStream myInput = myContext.getAssets().open(\"db/\" + DB_NAME);\n\n // Path to the just created empty db\n String outFileName = DB_PATH + DB_NAME;\n\n // Open the empty db as the output stream\n OutputStream myOutput = new FileOutputStream(outFileName);\n\n // transfer bytes from the inputfile to the outputfile\n byte[] buffer = new byte[1024];\n int length;\n while ((length = myInput.read(buffer)) > 0) {\n myOutput.write(buffer, 0, length);\n }\n\n // Close the streams\n myOutput.flush();\n myOutput.close();\n myInput.close();\n }", "public void open() {\n\t\tbanco =BancoHelper.getWritableDatabase();\n\t}", "private void openDB() {\n\t\tmyDb = new DBAdapter(this);\n\t\t// open the DB\n\t\tmyDb.open();\n\t\t\n\t\t//populate the list from the database\n\t\tpopulateListViewFromDB();\n\t}", "public int maDBOpen(String path)\n \t{\n \t\ttry\n \t\t{\n \t\t\tMoDatabase database = MoDatabase.create(path);\n \t\t\t++mDatabaseCounter;\n \t\t\taddDatabase(mDatabaseCounter, database);\n \t\t\treturn mDatabaseCounter;\n \t\t}\n \t\tcatch (SQLiteException ex)\n \t\t{\n \t\t\tlogStackTrace(ex);\n \t\t\treturn MA_DB_ERROR;\n \t\t}\n \t}", "private void copyDatabase() throws IOException {\n // Open your local database as the input stream\n InputStream inputStream = mContext.getAssets().open(DB_NAME);\n try {\n // Path to the newly created empty database\n String outFileName = DB_PATH + DB_NAME;\n OutputStream outputStream = new FileOutputStream(outFileName);\n try {\n // Transfer bytes from input file to output file\n byte[] buffer = new byte[1024];\n int len;\n while ((len = inputStream.read(buffer)) > 0) {\n outputStream.write(buffer, 0, len);\n }\n outputStream.flush();\n } finally {\n outputStream.close();\n }\n } finally {\n inputStream.close();\n }\n }", "private void copyDataBase() throws IOException {\n InputStream myInput = myContext.getAssets().open(DATABASE_NAME);\n\n // Path to the just created empty db\n String outFileName = DB_PATH + DATABASE_NAME;\n\n //Open the empty db as the output stream\n OutputStream myOutput = new FileOutputStream(outFileName);\n\n //transfer bytes from the inputfile to the outputfile\n byte[] buffer = new byte[1024];\n int length;\n while ((length = myInput.read(buffer))>0){\n myOutput.write(buffer, 0, length);\n }\n\n //Close the streams\n myOutput.flush();\n myOutput.close();\n myInput.close();\n\n }", "public File getOutputDb();", "private void copyDataBase()\r\n throws IOException\r\n {\r\n // Open your local db as the input stream\r\n InputStream myInput\r\n = myContext.getAssets()\r\n .open(DATABASE_NAME);\r\n\r\n // Path to the just created empty db\r\n String outFileName = DB_PATH;\r\n\r\n // Open the empty db as the output stream\r\n OutputStream myOutput\r\n = new FileOutputStream(outFileName);\r\n\r\n // transfer bytes from the\r\n // inputfile to the outputfile\r\n byte[] buffer = new byte[1024];\r\n int length;\r\n while ((length = myInput.read(buffer)) > 0) {\r\n myOutput.write(buffer, 0, length);\r\n }\r\n\r\n // Close the streams\r\n myOutput.flush();\r\n myOutput.close();\r\n myInput.close();\r\n }", "private void copyDataBase() throws IOException {\n\n //Open your local db as the input stream\n InputStream myInput = context.getAssets().open(DATABASE_NAME);\n\n // Path to the just created empty db\n String outFileName = DATABASE_PATH + DATABASE_NAME;\n\n //Open the empty db as the output stream\n OutputStream myOutput = null;\n myOutput = new FileOutputStream(outFileName);\n\n //transfer bytes from the inputfile to the outputfile\n byte[] buffer = new byte[1024];\n int length;\n while ((length = myInput.read(buffer)) > 0) {\n myOutput.write(buffer, 0, length);\n }\n\n //Close the streams\n myOutput.flush();\n myOutput.close();\n myInput.close();\n\n }", "public Connection openConnection() throws DataAccessException {\n try {\n //The Structure for this Connection is driver:language:path\n //The path assumes you start in the root of your project unless given a non-relative path\n final String CONNECTION_URL = \"jdbc:sqlite:myfamilymap.sqlite\";\n\n // Open a database connection to the file given in the path\n conn = DriverManager.getConnection(CONNECTION_URL);\n\n // Start a transaction\n conn.setAutoCommit(false);\n } catch (SQLException e) {\n e.printStackTrace();\n throw new DataAccessException(\"Unable to open connection to database\");\n }\n\n return conn;\n }", "private void openDatabase() {\r\n if ( connect != null )\r\n return;\r\n\r\n try {\r\n // Setup the connection with the DB\r\n String host = System.getenv(\"DTF_TEST_DB_HOST\");\r\n String user = System.getenv(\"DTF_TEST_DB_USER\");\r\n String password = System.getenv(\"DTF_TEST_DB_PASSWORD\");\r\n read_only = true;\r\n if (user != null && password != null) {\r\n read_only = false;\r\n }\r\n if ( user == null || password == null ) {\r\n user = \"guest\";\r\n password = \"\";\r\n }\r\n Class.forName(\"com.mysql.jdbc.Driver\"); // required at run time only for .getConnection(): mysql-connector-java-5.1.35.jar\r\n connect = DriverManager.getConnection(\"jdbc:mysql://\"+host+\"/qa_portal?user=\"+user+\"&password=\"+password);\r\n } catch ( Exception e ) {\r\n System.err.println( \"ERROR: DescribedTemplateCore.openDatabase() could not open database connection, \" + e.getMessage() );\r\n }\r\n }", "public SQLiteDatabase openDatabase() {\n synchronized (mLock) {\n Log.d(\"Opening database.\");\n File path = mContext.getDatabasePath(DatabaseOpenHelper.NAME);\n //Check if database exists and if not copy from assests folder\n if (!path.exists()) {\n try {\n mOpenHelper = new DatabaseOpenHelper(mContext);\n mOpenHelper.getWritableDatabase();\n\n copyDataBase();\n }\n catch (IOException e) {\n Log.e(\"Could not copy dictionary.\", e);\n }\n }\n if (mOpenHelper == null) {\n mOpenHelper = new DatabaseOpenHelper(mContext);\n }\n return mOpenHelper.getWritableDatabase();\n }\n }", "private void openStore()\n throws Exception {\n\n dbStore = Utils.openStore(master, Utils.DB_NAME);\n primaryIndex = \n dbStore.getPrimaryIndex(Integer.class, RepTestData.class);\n }", "private void copyDataBase() throws IOException {\n //Open a stream for reading from our ready-made database\n //The stream source is located in the assets\n InputStream externalDbStream = context.getAssets().open(DB_NAME);\n\n //Path to the created empty database on your Android device\n String outFileName = DB_PATH + DB_NAME;\n\n //Now create a stream for writing the database byte by byte\n OutputStream localDbStream = new FileOutputStream(outFileName);\n\n //Copying the database\n byte[] buffer = new byte[1024];\n int bytesRead;\n while ((bytesRead = externalDbStream.read(buffer)) > 0) {\n localDbStream.write(buffer, 0, bytesRead);\n }\n //Don’t forget to close the streams\n localDbStream.close();\n externalDbStream.close();\n }", "protected void open () {\n\t\tif (this.container==null)\n\t\t\ttry {\n\t\t\t\tmigrateOnDemand();\n\t\t\t\topenFiles();\n\t\t\t\tthis.blockSize = metaData.readInt();\n\t\t\t\tthis.size = metaData.readInt();\n\t\t\t}\n\t\t\tcatch (IOException ie) {\n\t\t\t\tthrow new WrappingRuntimeException(ie);\n\t\t\t}\n\t}", "private void copyDatabaseToDevice() throws IOException {\n try {\n InputStream input = context.getAssets().open(DB_NAME);\n String outputName = DB_PATH + DB_NAME;\n OutputStream output = new FileOutputStream(outputName);\n\n byte[] buff = new byte[1024];\n int length = input.read(buff);\n\n while(length >0){\n output.write(buff, 0, length);\n length = input.read(buff);\n }\n\n output.flush();\n output.close();\n input.close();\n } catch (Exception e) {\n e.printStackTrace();\n }\n\n }", "public SqlFileParser(InputStream stream) {\n this.reader = new BufferedReader(new InputStreamReader(stream));\n }", "private void copyDataBase() throws IOException\n {\n \tInputStream myInput = myContext.getAssets().open(DB_NAME);\n \n \t// Path to the just created empty db\n \tString outFileName = DB_PATH + DB_NAME;\n \n \t//Open the empty db as the output stream\n \tOutputStream myOutput = new FileOutputStream(outFileName);\n \n \t//transfer bytes from the inputfile to the outputfile\n \tbyte[] buffer = new byte[1024];\n \tint length;\n \twhile ((length = myInput.read(buffer))>0){\n \t\tmyOutput.write(buffer, 0, length);\n \t}\n \n \t//Close the streams\n \tmyOutput.flush();\n \tmyOutput.close();\n \tmyInput.close();\n \t\n \tLog.d(\"COPY\", \"DONE\");\n \n }", "private void copyDataBase() throws IOException\n {\n \tInputStream myInput = myContext.getAssets().open(DB_NAME);\n \n \t// Path to the just created empty db\n \tString outFileName = DB_PATH + DB_NAME;\n \n \t//Open the empty db as the output stream\n \tOutputStream myOutput = new FileOutputStream(outFileName);\n \n \t//transfer bytes from the inputfile to the outputfile\n \tbyte[] buffer = new byte[1024];\n \tint length;\n \twhile ((length = myInput.read(buffer))>0){\n \t\tmyOutput.write(buffer, 0, length);\n \t}\n \n \t//Close the streams\n \tmyOutput.flush();\n \tmyOutput.close();\n \tmyInput.close();\n \t\n \tLog.d(\"COPY\", \"DONE\");\n \n }", "public void openDatabase(@NonNull Context context){\n if (databaseClosed)\n {\n NoteDatabaseHelper dbHelper = new NoteDatabaseHelper(context, Util.DATABASE_NAME, null, Util.DATABASE_VERSION);\n noteDatabase = dbHelper.getWritableDatabase();\n databaseClosed = false;\n } else if (noteDatabase.isReadOnly())\n {\n //the database is open, but in the wrong mode (i.e. readonly, and not writeable),\n // so it needs to be closed, and reopened in writable mode.\n closeDatabase();\n openDatabase(context);\n }\n }", "private void copyDataBase() throws IOException {\n\n\t\tInputStream myInput = rssContext.getAssets().open(DATABASE_NAME);\n\t\tString outFileName = DATABASE_PATH + DATABASE_NAME;\n\t\tOutputStream myOutput = new FileOutputStream(outFileName);\n\t\tbyte[] buffer = new byte[1024];\n\t\tint length;\n\t\twhile ((length = myInput.read(buffer)) > 0) {\n\t\t\tmyOutput.write(buffer, 0, length);\n\t\t}\n\t\tmyOutput.flush();\n\t\tmyOutput.close();\n\t\tmyInput.close();\n\t}", "public SqlScanner (InputStream input)\n {\n mInputStream = new BufferedInputStream(input);\n }", "public void open() throws SQLException {\n\t\t \n\t\t mDatabase = mDbHelper.getWritableDatabase();\n\t\t mDatabase = mDbHelper.getWritableDatabase();\n\n\t\t //refreshCompanies();\n\t }", "private void copyDBFromAssets() throws IOException\n {\n InputStream dbInput = null;\n Log.e(\"Openassets\",\"arghh\");\n OutputStream dbOutput = null;\n Log.e(\"Openassets\",\"arghh\");\n String dbFileName = DB_PATH +DB_NAME;\n try\n {\n Log.e(\"Openassets\",\"arghh\");\n dbInput = appContext.getAssets().open(DB_NAME);\n dbOutput = new FileOutputStream(dbFileName);\n //transfer bytes from db Input to the db Output\n byte[] buffer = new byte[1024];\n int length;\n while ((length = dbInput.read(buffer))>0)\n {\n dbOutput.write(buffer, 0, length);\n }\n //close the stream\n dbOutput.flush();\n dbOutput.close();\n dbInput.close();\n }catch(IOException e)\n {\n throw new Error(\"Problems copying DB\");\n }\n }", "@Override\n\tprotected SQLiteDatabase openWritableDb() {\n\t\treturn super.openWritableDb();\n\t}", "public static void openDatabase() {\n\t\ttry {\n\t\t\tClass.forName(\"org.postgresql.Driver\");\n\n\t\t\t/* change the name and password here */\n\t\t\tc = DriverManager.getConnection(\n\t\t\t\t\t\"jdbc:postgresql://localhost:5432/testdata\", \"postgres\",\n\t\t\t\t\t\" \");\n\n\t\t\tlogger.info(\"Opened database successfully\");\n\t\t\tc.setAutoCommit(false);\n\t\t\tstatus = OPEN_SUCCESS;\n\n\t\t} catch (Exception e) {\n\t\t\tstatus = OPEN_FAILED;\n\t\t\tlogger.warn(e.getClass().getName() + \": \" + e.getMessage());\n\t\t\tSystem.exit(0);\n\t\t}\n\t}", "private void copyDatabase() throws IOException {\n\n AssetManager assetManager = mContext.getAssets();\n InputStream myInput = assetManager.open(DATABASE_NAME);\n\n getReadableDatabase();\n File mDbFile = mContext.getDatabasePath(DATABASE_NAME);\n// File mDbFile = new File(\"/data/data/\" + PACKAGE + \"/databases/\"+DATABASE_NAME);\n OutputStream myOutput = new FileOutputStream(mDbFile);\n\n //transfer bytes from the inputfile to the outputfile\n byte[] buffer = new byte[1024];\n int length;\n\n while ((length = myInput.read(buffer)) > 0) {\n myOutput.write(buffer, 0, length);\n }\n\n //Close the streams\n myOutput.flush();\n myOutput.close();\n myInput.close();\n\n }", "public CommonStorage open() {\r\n ++accessNb;\r\n getDatabase(); // To trigger the possible database setup if it has not been yet done\r\n return this;\r\n }", "public static Connection getConnection() {\n if(connection == null) {\n Statement statement = null;\n try {\n Class.forName(\"org.sqlite.JDBC\");\n connection = DriverManager.getConnection(\"jdbc:sqlite::memory:\");\n \n statement = connection.createStatement();\n \n BufferedReader input = new BufferedReader(new FileReader(\"db/schema.sql\"));\n String contents;\n String sql = \"\";\n while((contents = input.readLine()) != null) {\n sql += contents;\n }\n input.close();\n \n statement.executeUpdate(sql);\n }\n catch (Exception e) \n { \n e.printStackTrace(); \n }\n finally {\n try {\n statement.close();\n }\n catch (Exception e) \n { \n e.printStackTrace(); \n }\n }\n }\n return connection;\n }", "public void open(MigrateContext ctx) {\n\t}", "public void open() {\n if (mDB == null || !mDB.isOpen()) {\n Log.d(this.getClass().getName(), \"open new DB connection\");\n mDB = mDBHelper.getWritableDatabase();\n }\n }", "public void open() throws SQLException {\n database = helperAngkot.getWritableDatabase();\n }", "public DBinterface open() throws SQLException {\r\n db = helper.getWritableDatabase();\r\n return this;\r\n }", "public void openDB() {\n\n\t\t// Connect to the database\n\t\tString url = \"jdbc:mysql://localhost:2000/X__367_2020?user=X__367&password=X__367\";\n\t\t\n\t\ttry {\n\t\t\tconn = DriverManager.getConnection(url);\n\t\t} catch (SQLException e) {\n\t\t\tSystem.out.println(\"using url:\"+url);\n\t\t\tSystem.out.println(\"problem connecting to MariaDB: \"+ e.getMessage());\t\t\t\n\t\t\t//e.printStackTrace();\n\t\t}\n\n\t}", "public SQLiteDatabase openDatabaseSafe() {\n SQLiteDatabase db = null;\n try {\n db = SQLiteDatabase.openDatabase(DB_PATH, null, SQLiteDatabase.OPEN_READONLY);\n } catch(SQLiteException e){\n Log.i(TAG, \"Error: could not open database.\", e);\n }\n return db;\n }", "@Override\r\n\t\t\tpublic void run() {\n\t\t\t\tsuper.run();\r\n\t\t\t\tFile file=new File(getFilesDir(),dbname);\r\n\t\t\t\tif(file.exists()&& file.length()>0){\r\n\t\t\t\t\tSystem.out.println(\"数据库已经存在\");\r\n\t\t\t\t\treturn;\r\n\t\t\t\t}\r\n\t\t\t\ttry {\r\n\t\t\t\t\tInputStream is=getAssets().open(dbname);\r\n\t\t\t\t\tFileOutputStream fos=openFileOutput(dbname, MODE_PRIVATE);\r\n\t\t\t\t\tbyte[] buffer=new byte[1024];\r\n\t\t\t\t\tint len=0;\r\n\t\t\t\t\twhile ((len=is.read(buffer))!=-1) {\r\n\t\t\t\t\t\tfos.write(buffer,0,len);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tis.close();\r\n\t\t\t\t\tfos.close();\r\n\t\t\t\t} catch (IOException e) {\r\n\t\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t}\r\n\t\t\t}", "public int openReadableDB() {\n int statusCode = OPEN_SUCCESS;\n\n try {\n db = dbHelper.getReadableDatabase();\n }\n catch (SQLiteException dbReadableException) {\n statusCode = OPEN_FAIL;\n // Log the exception\n }\n\n return statusCode;\n }", "public void open() throws SQLException {\n\t\tdatabase = dbHelper.getWritableDatabase();\n\t}", "private void copyDataBase() throws IOException{\n \tLog.d(\"We're Here\", \"Copy Database\");\n \t//Open your local db as the input stream\n \tInputStream myInput = myContext.getAssets().open(DB_NAME);\n \tLog.d(\"We're Here\", \"SQLite db opened)\");\n \n \t// Path to the just created empty db\n \tString outFileName = DB_PATH + DB_NAME;\n \n \t//Open the empty db as the output stream\n \tOutputStream myOutput = new FileOutputStream(outFileName);\n \tLog.d(\"We're Here\", \"Output Stream Obtained)\");\n \n \t//transfer bytes from the inputfile to the outputfile\n \tbyte[] buffer = new byte[1024];\n \tint length;\n \twhile ((length = myInput.read(buffer))>0){\n \t\tmyOutput.write(buffer, 0, length);\n \t}\n \tLog.d(\"We're Here\", \"Copy Database Successful)\");\n \t//Close the streams\n \tmyOutput.flush();\n \tmyOutput.close();\n \tmyInput.close(); \t\n }", "public void open() throws SQLException {\n database = helper.getWritableDatabase();\n }", "public void open() throws SQLException {\r\n this.database = dbhelper.getWritableDatabase();\r\n }", "private SQLiteDatabase openConnection() {\n\n sqlLiteHelper = new SQLLiteHelper(DatabaeServiceContext);\n return sqlLiteHelper.getWritableDatabase();\n\n }", "protected abstract InputStream getTableInputStream() throws IOException;", "private void openConnection() throws IOException {\n String path = \"D:/MSSQL-DB.txt\";\n file = new File(path);\n bufferedWriter = new BufferedWriter(new FileWriter(file, true));\n }", "public void copyDB(InputStream inputStream, OutputStream outputStream)\n\t\t\tthrows IOException\n\t{\n\t\tbyte[] buffer = new byte[1024];\n\t\tint length;\n\t\twhile ((length = inputStream.read(buffer)) > 0)\n\t\t{\n\t\t\toutputStream.write(buffer, 0, length);\n\t\t}\n\t\tinputStream.close();\n\t\toutputStream.close();\n\t}", "private void open() throws SQLiteException {\n\n database = dbHelper.getWritableDatabase();\n }", "public DaoSession openWritableDb() {\n isInitOk();\n SQLiteDatabase db = openHelper.getWritableDatabase();\n DaoMaster daoMaster = new DaoMaster(db);\n DaoSession daoSession = daoMaster.newSession();\n return daoSession;\n }", "InputStream openStream() throws IOException;", "public void open() throws SQLException {\n\t\t// creates or opens a database\n\t\tdatabase = dbHelper.getWritableDatabase();\n//\t\tdbHelper.onUpgrade(database, 1, 1); // Use this statement to reset database\n\t}", "protected void openStream ()\n {\n stream = Util.stream (entry, \"Holder.java\");\n }", "private static void openDBIfClosed(Context context) {\n if (mMetaDb == null || !mMetaDb.isOpen()) {\n openDB(context);\n }\n }", "public SimpleDatabase executeSqlFile(String name) {\n // possibly trim .sql extension\n if (name.toLowerCase().endsWith(\".sql\")) {\n name = name.substring(0, name.length() - 4);\n }\n SQLiteDatabase db = context.openOrCreateDatabase(name);\n int id = context.getResourceId(name, \"raw\");\n return executeSqlFile(db, id);\n }", "private void openDB()\r\n \t{\n \t\tif ( lootDB != null )\r\n \t\t\treturn;\r\n \t\t\r\n \t\ttry\r\n \t\t{\r\n \t\t\tlootDB = SQLiteDatabase.openDatabase( DB_PATH, null, SQLiteDatabase.OPEN_READWRITE );\r\n \t\t\tif ( lootDB.needUpgrade( DB_VERSION ) )\r\n \t\t\t\tif ( !this.upgradeDB( DB_VERSION ) )\r\n \t\t\t\t\tlootDB = null;\r\n \t\t}\r\n \t\t// catch SQLiteException if the database doesn't exist, then create it\r\n \t\tcatch (SQLiteException sqle)\r\n \t\t{\r\n \t\t\ttry\r\n \t\t\t{\r\n \t\t\t\tlootDB = SQLiteDatabase.openOrCreateDatabase( DB_PATH, null);\r\n \t\t\t\tif ( !createDB(lootDB) )\r\n \t\t\t\t\tlootDB = null;\r\n \t\t\t}\r\n \t\t\t// something went wrong creating the database\r\n \t\t\tcatch ( SQLiteException e )\r\n \t\t\t{\r\n \t\t\t\tlootDB = null;\r\n \t\t\t}\r\n \t\t}\r\n \t\t\r\n \t\t// throw an exception if we've made it through the try/catch block\r\n \t\t// and the database is still not opened\r\n \t\tif ( lootDB == null )\r\n \t\t{\r\n \t\t\tthrow new SQLException( \"Database could not be opened\" );\r\n \t\t}\r\n \t}", "public void openForInput (DataDictionary dict) \n throws IOException {\n \n // If this is markdown, then convert it to HTML before going any farther\n if (context.isMarkdown()) {\n if (inFile == null && inURL != null) {\n mdReader = new MetaMarkdownReader(inURL, \n MetaMarkdownReader.MARKDOWN_TYPE);\n }\n else\n if (inFile != null) {\n mdReader = new MetaMarkdownReader(inFile, \n MetaMarkdownReader.MARKDOWN_TYPE);\n }\n else\n if (textLineReader != null) {\n mdReader = new MetaMarkdownReader(textLineReader, \n MetaMarkdownReader.MARKDOWN_TYPE);\n }\n if (mdReader != null) {\n mdReader.setMetadataAsMarkdown(metadataAsMarkdown);\n mdReader.openForInput();\n inFile = null;\n inURL = null;\n textLineReader = new StringLineReader(mdReader.getHTML());\n mdReader.close();\n mdReader = null;\n }\n }\n \n if (inFile == null && inURL != null) {\n HttpURLConnection.setFollowRedirects(true);\n inConnect = inURL.openConnection();\n if (inConnect.getClass().getName().endsWith(\"HttpURLConnection\")) {\n HttpURLConnection httpConnect = (HttpURLConnection)inConnect;\n httpConnect.setInstanceFollowRedirects(true);\n httpConnect.setConnectTimeout(0);\n }\n inConnect.connect();\n inStream = inConnect.getInputStream();\n streamReader = new InputStreamReader(inStream, \"UTF-8\");\n reader = new BufferedReader(streamReader);\n Logger.getShared().recordEvent(\n LogEvent.NORMAL,\n \"HTMLFile Open for input URL \" + inURL.toString()\n + \" with encoding \" + streamReader.getEncoding(),\n false);\n } \n else\n if (inFile != null) {\n streamReader = new FileReader(inFile);\n reader = new BufferedReader(streamReader);\n }\n else\n if (textLineReader != null) {\n textLineReader.open();\n reader = null;\n }\n \n this.dict = dict;\n dataRec = new DataRecord();\n recDef = new RecordDefinition(this.dict);\n openWithRule();\n recordNumber = 0;\n atEnd = false;\n }", "public Connection openConnection(){\n try {\n c = DriverManager.getConnection(\"jdbc:sqlite:LIB.db\");\n s = c.createStatement();\n\n System.out.println(\"Database connection open\");\n return c;\n }catch (SQLException e) {\n System.err.println(\"Opening connection failed: \" + e.getMessage());\n }\n return null;\n }", "private InputStream openContentStream(String selectedTableName, String fileName, Template template) {\n\t\t\n\t\tProjectUtils projectUtils = new ProjectUtils();\n\t\tIProject proj = projectUtils.getProject(selection);\n\t\t\n\t\t\n\t\tUtils utils = new Utils();\n\t\t\n\t\tutils.getSourceFolder(proj);\n\t\t\n\t\t\n\t\t\n Map<String, Object> mapRoot = new HashMap<String, Object>();\n mapRoot.put(\"package\", \"br.pacote.kkk\");\n mapRoot.put(\"classname\", fileName);\n mapRoot.put(\"tablename\", selectedTableName.substring(0, 1).toUpperCase() + selectedTableName.substring(1).toLowerCase());\n \n \n\t\t\n\t\t\n\t\tParseTemplate parseTemplate = new ParseTemplate();\n\t\tString sourceCode = null;\n\t\ttry {\n\t\t\tsourceCode = parseTemplate.loadTemplateFromFile(utils.PluginPath()+\"/templates\", template.getTemplatefile(), mapRoot);\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\t\treturn new ByteArrayInputStream(sourceCode.getBytes());\n\t}", "public void copyDataBase() throws IOException{\n try {\n InputStream myInput = context.getAssets().open(DB_NAME);\n String outputFileName = DB_PATH + DB_NAME;\n OutputStream myOutput = new FileOutputStream(outputFileName);\n\n byte[] buffer = new byte[1024];\n int length;\n\n while((length = myInput.read(buffer))>0){\n myOutput.write(buffer, 0, length);\n }\n\n myOutput.flush();\n myOutput.close();\n myInput.close();\n } catch (Exception e) {\n Log.e(\"tle99 - copyDatabase\", e.getMessage());\n }\n\n }", "public static void main(String[] args) throws IOException {\n\t\tString url = \"jdbc:sqlite:/Users/andrew/Documents/Java/Projects/gl-flowergarden-web/flowergarden.db\";\n\t\tSystem.out.println(url);\n\t\ttry(Connection conn = DriverManager.getConnection(url)) {\n\t\t\tStatement st = conn.createStatement();\n\t\t\tResultSet rs = st.executeQuery(\"select * from flower\");\n\t\t\twhile (rs.next()) {\n\t\t\t\tSystem.out.println(rs.getString(2));\n\t\t\t}\n\t\t} catch (SQLException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\n\t}", "public void copyDataBase() throws IOException {\n InputStream assetInput = context.getAssets().open(ZIP_DB_NAME);\r\n Log.i(LOG_TAG, \"opened zip_db\");\r\n ZipInputStream zipIn = new ZipInputStream(assetInput);\r\n\r\n ZipEntry entry = zipIn.getNextEntry();\r\n\r\n entry.getName();\r\n\r\n // path to the just created empty database\r\n String DBFileName = DB_PATH + DB_NAME;\r\n\r\n OutputStream DBOutput = new FileOutputStream(DBFileName);\r\n\r\n byte[] buffer = new byte[1024];\r\n\r\n int length;\r\n\r\n while ((length = zipIn.read(buffer)) > 0) {\r\n DBOutput.write(buffer, 0, length);\r\n Log.i(LOG_TAG, \"zipread\" + length);\r\n }\r\n Log.i(LOG_TAG, \"read end\");\r\n // close the streams\r\n DBOutput.flush();\r\n DBOutput.close();\r\n\r\n zipIn.close();\r\n assetInput.close();\r\n }", "private void openDatabase() {\r\n SearchHelper = new DBHelper(this);\r\n }", "private void copyDataBase() throws IOException {\n InputStream myInput = this.getAssets().open(\"nes.sqlite\");\n // Path to the just created empty db\n\n String outFileName = getApplicationInfo().dataDir + \"/databases/\" + \"nes.sqlite\";\n //String outFileName = \"/data/data/\" +getApplicationContext().getPackageName() + \"/databases/\" + \"nes.sqlite\";\n // Open the empty db as the output stream\n OutputStream myOutput = new FileOutputStream(outFileName);\n // transfer bytes from the inputfile to the outputfile\n byte[] buffer = new byte[1024];\n int length;\n while ((length = myInput.read(buffer)) > 0) {\n myOutput.write(buffer, 0, length);\n\n }\n // Close the streams\n myOutput.flush();\n myOutput.close();\n myInput.close();\n //Toast toast = Toast.makeText(getApplicationContext(),\n // \"Creating nes database\",\n // Toast.LENGTH_SHORT);\n //toast.show();\n }", "public synchronized SQLiteDatabase open() {\n\n mOpenCounter++;\n\n if(mOpenCounter == 1) {\n // Opening new database\n mDatabase = mDatabaseHelper.getWritableDatabase();\n }\n return mDatabase;\n }", "public void open() throws SQLException {\n database = dbHelper.getWritableDatabase();\n }", "public void open() throws SQLException {\n database = dbHelper.getWritableDatabase();\n }", "public void open() throws SQLException {\n database = dbHelper.getWritableDatabase();\n }", "public TrucksDB open() throws SQLException {\n mDbHelper = new DatabaseHelper(mCtx);\n mDb = mDbHelper.getWritableDatabase();\n return this;\n }", "public void OpenDB() {\n\t\tString JDriver = \"com.microsoft.sqlserver.jdbc.SQLServerDriver\";// 数据库驱动\n\t\tSystem.out.println(\"数据库驱动成功\");\n\t\tString connectDB = \"jdbc:sqlserver://localhost:1433;DatabaseName=bookstoreDB\";// 数据库连接\n\t\ttry {\n\t\t\tClass.forName(JDriver);// 加载数据库引擎,返回给定字符串名的类\n\t\t} catch (ClassNotFoundException e) {// e.printStackTrace();\n\t\t\tSystem.out.println(\"加载数据库引擎失败\");\n\t\t\tSystem.exit(0);\n\t\t}\n\t\ttry {\n\t\t\tconDB = DriverManager.getConnection(connectDB, \"sa\", \"123456\");// 连接数据库对象\n\t\t\tSystem.out.println(\"连接数据库成功\");\n\t\t\tstaDB = conDB.createStatement();\n\t\t} // 创建SQL命令对象\n\t\tcatch (SQLException e) {\n\t\t\te.printStackTrace();\n\t\t\tSystem.out.println(\"数据库连接错误\");\n\t\t\tSystem.exit(0);\n\t\t}\n\t}", "public void database() throws IOException\n {\n \tFile file =new File(\"data.txt\");\n\t if(!file.exists())\n\t {\n\t \tSystem.out.println(\"File 'data.txt' does not exit\");\n\t System.out.println(file.createNewFile());\n\t file.createNewFile();\n\t databaseFileWrite(file);//call the databaseFileRead() method, to initialize data from ArrayList and write data into data.txt\n\t }\n\t else\n\t {\n\t \tdatabaseFileRead();//call the databaseFileRead() method, to load data directly from data.txt\n\t }\n }", "private void openStreams() {\n\t\ttry {\n\t\t\t// mostramos un log\n\t\t\tthis.getLogger().debug(\"Opening streams..\");\n\t\t\t// abrimos el stream de salida\n\t\t\tthis.setOutputStream(new ObjectOutputStream(this.getConnection().getOutputStream()));\n\t\t\t// abrimos el stream de entrada\n\t\t\tthis.setInputStream(new ObjectInputStream(this.getConnection().getInputStream()));\n\t\t} catch (final IOException e) {}\n\t}", "private static void initializeDatabase() {\n\t\tArrayList<String> data = DatabaseHandler.readDatabase(DATABASE_NAME);\n\t\tAbstractSerializer serializer = new CineplexSerializer();\n\t\trecords = serializer.deserialize(data);\n\t}", "private void copyDataBase() throws IOException {\n\t\tInputStream mInput = mContext.getAssets().open(DATABASE_NAME);\r\n\t\tString outFileName = DATABASE_PATH + DATABASE_NAME;\r\n\t\tOutputStream mOutput = new FileOutputStream(outFileName);\r\n\r\n\t\t// transferer donnees de la db\r\n\t\tbyte[] buffer = new byte[1024];\r\n\t\tint length;\r\n\t\twhile ((length = mInput.read(buffer)) > 0) {\r\n\t\t\tmOutput.write(buffer, 0, length);\r\n\t\t}\r\n\t\t// fermeture\r\n\t\tmOutput.flush();\r\n\t\tmOutput.close();\r\n\t\tmInput.close();\r\n\t}", "private SQLiteDatabase openDatabase(String name){\n\n SQLiteDatabase result = null;\n\n try{\n result = SQLiteDatabase.openDatabase(name, null, 0);\n this.isActive = true;\n }\n catch(Exception e){\n // result = this.createDatabase(name);\n }\n\n return result;\n\n }" ]
[ "0.6653542", "0.6627006", "0.6245373", "0.61839867", "0.6142275", "0.6101584", "0.60835016", "0.6078054", "0.6069067", "0.6023752", "0.59847206", "0.5955093", "0.5949633", "0.59181404", "0.5912812", "0.5895137", "0.5891108", "0.5891108", "0.5891108", "0.5891108", "0.5891108", "0.5835954", "0.5823449", "0.58147544", "0.57932097", "0.57932097", "0.5791003", "0.5749906", "0.5747978", "0.5740925", "0.5738633", "0.57280844", "0.5722233", "0.57146424", "0.57023484", "0.5693988", "0.5678366", "0.56409323", "0.5623063", "0.5601181", "0.55856645", "0.55547386", "0.55460906", "0.5544624", "0.5542964", "0.5530258", "0.5530258", "0.55150354", "0.55071145", "0.5496565", "0.5489629", "0.5485269", "0.54826915", "0.5453666", "0.5447459", "0.54406995", "0.54384696", "0.5437415", "0.5431465", "0.542399", "0.5409788", "0.540677", "0.5391564", "0.5389617", "0.53876805", "0.53825414", "0.53785485", "0.5363889", "0.53607637", "0.5348748", "0.534369", "0.5338186", "0.5325773", "0.53146815", "0.5310647", "0.5302901", "0.5301197", "0.52914953", "0.52871794", "0.5277845", "0.5275912", "0.5257615", "0.5257307", "0.5241377", "0.52406025", "0.52358663", "0.5231532", "0.52283466", "0.52240735", "0.5219418", "0.52189314", "0.52189314", "0.52189314", "0.52152383", "0.5208806", "0.5208151", "0.52057076", "0.5204199", "0.5204102", "0.51949763" ]
0.5230739
87
/ Name : sqlSelect Params : tablename and list of colums to be retrieved Desc : Return 0 or more rows in the HashMap array with hash map containing columns & values
public HashMap<String, String>[] sqlSelect(String sTable, String hCols[], HashMap<String, String> hWhere) { Log.i("DBHelper:sqlSelect", "=> Start"); String sColsSelect = ""; String sColsWhere = " "; int i = 0; SQLiteDatabase db = this.getWritableDatabase(); for (i = 0; i < hCols.length; i++) { sColsSelect = sColsSelect + hCols[i] + ", "; } for (Entry<String, String> e : hWhere.entrySet()) { String field = e.getKey(); String value = e.getValue(); sColsWhere = sColsWhere + field + " = " + value + " and "; } String sqlQuery = "SELECT " + sColsSelect + "1 FROM " + sTable + " WHERE " + sColsWhere + " 1=1 "; Log.i("DBHelper:sqlSelect", sqlQuery); Cursor c = db.rawQuery(sqlQuery, null); int nRows = 0; HashMap<String, String>[] hResult = new HashMap[c.getCount()]; Log.i("DBHelper:sqlSelect", "Total Rows : " + c.getCount()); if (c.moveToFirst()) { hResult[0] = new HashMap<String, String>(); for (i = 0; i < hCols.length; i++) { hResult[0].put(hCols[i], c.getString(i)); Log.i("DBHelper:sqlSelect", c.getString(i)); } } nRows++; while (c.moveToNext()) { hResult[nRows] = new HashMap<String, String>(); for (i = 0; i < hCols.length; i++) { hResult[nRows].put(hCols[i], c.getString(i)); Log.i("DBHelper:sqlSelect", c.getString(i)); } nRows++; } Log.i("DBHelper:sqlSelect", "Total records " + hResult.length); Log.i("DBHelper:sqlSelect", "<= End"); return hResult; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Select({\"<script>\",\n \"SELECT\",\n \"<foreach collection='columnNames' index='index' item='item' separator=','>\",\n \" ${item}\",\n \"</foreach>\",\n \"FROM ${tableName}\",\n \"WHERE ${primaryKeyName} = #{primaryKeyValue}\",\n \"</script>\"})\n Map selectByPrimaryKey(@Param(\"tableName\") String tableName, @Param(\"columnNames\") List<String> columnNames,\n @Param(\"primaryKeyName\") String primaryKeyName,\n @Param(\"primaryKeyValue\") Object primaryKeyValue);", "List<Map<String,Object>> executeSelectQuery(String query) {\n\n\t\t// preparing the list for the retrieved statements in the database\n\t\tList<Map<String, Object>> statementsList = new ArrayList<>();\n\n\t\ttry {\n\t\t\tStatement statement = connection.createStatement();\n\t\t\tstatement.setQueryTimeout(30); // set timeout to 30 sec.\n\n\t\t\t// the ResultSet represents a table of data retrieved in the database\n\t\t\tResultSet rs = statement.executeQuery(query);\n\n\t\t\t// the ResultSetMetaData represents all the metadata of the ResultSet\n\t\t\tResultSetMetaData rsmd = rs.getMetaData();\n\t\t\tint columnsNumber = rsmd.getColumnCount();\n\n\t\t\twhile (rs.next()) {\n\n\t\t\t\tMap<String, Object> statementMap = new HashMap<>();\n\n\t\t\t\tfor (int i = 1; i <= columnsNumber; i++) {\n\n\t\t\t\t\tint columnType = rsmd.getColumnType(i);\n\n\t\t\t\t\tswitch (columnType) {\n\t\t\t\t\t\tcase Types.VARCHAR:\n\t\t\t\t\t\t\tstatementMap.put(rsmd.getColumnLabel(i), rs.getString(i));\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase Types.NULL:\n\t\t\t\t\t\t\tstatementMap.put(rsmd.getColumnLabel(i), null);\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase Types.CHAR:\n\t\t\t\t\t\t\tstatementMap.put(rsmd.getColumnLabel(i), rs.getString(i));\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase Types.TIMESTAMP:\n\t\t\t\t\t\t\tstatementMap.put(rsmd.getColumnLabel(i), rs.getTimestamp(i));\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase Types.DOUBLE:\n\t\t\t\t\t\t\tstatementMap.put(rsmd.getColumnLabel(i), rs.getDouble(i));\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase Types.INTEGER:\n\t\t\t\t\t\t\tstatementMap.put(rsmd.getColumnLabel(i), rs.getString(i));\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase Types.SMALLINT:\n\t\t\t\t\t\t\tstatementMap.put(rsmd.getColumnLabel(i), rs.getInt(i));\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase Types.DECIMAL:\n\t\t\t\t\t\t\tstatementMap.put(rsmd.getColumnLabel(i), rs.getBigDecimal(i));\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tdefault:\n\t\t\t\t\t\t\tstatementMap.put(rsmd.getColumnLabel(i), rs.getString(i));\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// adding the Map to the statementsList\n\t\t\t\tstatementsList.add(statementMap);\n\t\t\t}\n\t\t}\n\t\tcatch (SQLException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\n\t\t// in the end, we return the populated statementsList\n\t\treturn statementsList;\n\t}", "public List<Map<String, Object>> query(String sql, Object[] parameters) throws SQLException {\n PreparedStatement statement = null;\n\n try {\n statement = conn.prepareStatement(sql);\n\n if(parameters != null) {\n for(int i = 0; i < parameters.length; i++) {\n statement.setObject(i + 1, parameters[i]);\n }\n }\n\n List<Map<String, Object>> rows = new ArrayList<Map<String, Object>>();\n ResultSet rs = statement.executeQuery();\n ResultSetMetaData md = rs.getMetaData();\n while (rs.next()) {\n Map<String, Object> row = new HashMap<String, Object>();\n\n for (int i = 0; i < md.getColumnCount(); i++) {\n row.put(md.getColumnName(i + 1), rs.getObject(i + 1));\n }\n rows.add(row);\n }\n return rows;\n\n }\n finally {\n if (statement != null) {\n statement.close();\n }\n }\n }", "private List<Map<String, Object>> prepareQueryResult(final ResultSet resultSet) throws SQLException {\n\n List<Map<String, Object>> result = new ArrayList<>();\n\n ResultSetMetaData metaData = resultSet.getMetaData();\n int count = metaData.getColumnCount();\n List<String> cols = new ArrayList<>(count);\n for (int i = 1; i <= count; i++) {\n cols.add(metaData.getColumnName(i));\n }\n\n boolean hasNext = resultSet.next();\n\n while (hasNext) {\n\n Map<String, Object> map = new LinkedHashMap<>();\n for (String col : cols) {\n Object value = resultSet.getObject(col);\n map.put(col, value);\n\n logger.debug(\"col:\" + col + \" value:\" + value);\n }\n result.add(map);\n\n hasNext = resultSet.next();\n }\n\n return result;\n\n }", "DataFrame<R,C> select(Iterable<R> rowKeys, Iterable<C> colKeys);", "@Override\r\n\tpublic Collection selectKeyColumnsWithWhere(String columnNames, String where, Connection con) {\n\t\treturn null;\r\n\t}", "public ArrayList<HashMap<String,Object>> select(String sql,String collectionName) {\n return processQueryResult(executeSelectQuery(sql),collectionName);\n }", "private HashMap<String, String> getHashMapfromResultSetRow(ResultSet resultset)\n/* */ {\n/* 1406 */ return getHashMapfromResultSetRow(resultset, new ArrayList());\n/* */ }", "public <T> int select(final String sqlQuery, final Map<String, Object> param) throws Exception;", "public static Object[][] getDataFromDb(String sql){\n\t\tfinal String JDBC_DRIVER = PreAndPost.config.getProperty(\"DB_Pkg\"); \r\n\t\tfinal String DB_URL = PreAndPost.config.getProperty(\"DB_Url\");\r\n\r\n\t\t// Database credentials\r\n\t\tfinal String USER = PreAndPost.config.getProperty(\"DB_User\");\r\n\t\tfinal String PASS = PreAndPost.config.getProperty(\"DB_Pwd\");\r\n\r\n\t\tConnection conn = null;\r\n\t\tStatement stmt = null;\r\n\r\n\t\tObject[][] data = null;\r\n\r\n\t\ttry{\r\n\r\n\t\t\t//STEP 2: Register JDBC driver\r\n\t\t\tClass.forName(JDBC_DRIVER);\r\n\r\n\t\t\t//STEP 3: Open a connection\r\n\t\t\tconn = DriverManager.getConnection(DB_URL,USER,PASS);\r\n\r\n\t\t\t//STEP 4: Execute a query\r\n\t\t\tstmt = conn.createStatement();\r\n\r\n\t\t\tString count = \"Select count(*) from (\"+sql+\") AS T\";\r\n\t\t\tResultSet rs = stmt.executeQuery(count);\r\n\t\t\trs.next();\r\n\t\t\tint rowCount = rs.getInt(1);\r\n\r\n\t\t\t// Now run the query\r\n\t\t\trs = stmt.executeQuery(sql);\r\n\t\t\tResultSetMetaData rsmd=rs.getMetaData();\r\n\r\n\t\t\t// get the column count\r\n\t\t\tint columnCount = rsmd.getColumnCount();\r\n\t\t\t\r\n\t\t\tdata = new Object[rowCount][columnCount]; // assign to the data provider array\r\n\t\t\tint i = 0;\r\n\t\t\t\r\n\t\t\t//STEP 5: Extract data from result set\r\n\t\t\twhile(rs.next()){\r\n\r\n\t\t\t\tfor (int j = 1; j <= columnCount; j++) {\r\n\t\t\t\t\tswitch (rsmd.getColumnType(j)) {\r\n\t\t\t\t\tcase Types.VARCHAR:\r\n\t\t\t\t\t\tdata[i][j-1] = rs.getString(j);\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase Types.NULL:\r\n\t\t\t\t\t\tdata[i][j-1] = \"\";\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase Types.CHAR:\r\n\t\t\t\t\t\tdata[i][j-1] = rs.getString(j);\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase Types.TIMESTAMP:\r\n\t\t\t\t\t\tdata[i][j-1] = rs.getDate(j);\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase Types.DOUBLE:\r\n\t\t\t\t\t\tdata[i][j-1] = rs.getDouble(j);\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase Types.INTEGER:\r\n\t\t\t\t\t\tdata[i][j-1] = rs.getInt(j);\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase Types.SMALLINT:\r\n\t\t\t\t\t\tdata[i][j-1] = rs.getInt(j);\r\n\t\t\t\t\t\tbreak;\r\n\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\ti++;\r\n\t\t\t}\r\n\t\t\t//STEP 6: Clean-up environment\r\n\t\t\trs.close();\r\n\t\t\tstmt.close();\r\n\t\t\tconn.close();\r\n\r\n\t\t}catch(SQLException se){\r\n\r\n\t\t\t//Handle errors for JDBC\r\n\t\t\tse.printStackTrace();\r\n\r\n\t\t}catch(Exception e){\r\n\r\n\t\t\t//Handle errors for Class.forName\r\n\t\t\te.printStackTrace();\r\n\r\n\t\t}finally{\r\n\r\n\t\t\ttry{\r\n\t\t\t\tif(stmt!=null)\r\n\t\t\t\t\tstmt.close();\r\n\t\t\t}catch(SQLException se){\r\n\t\t\t\tse.printStackTrace();\r\n\t\t\t}\r\n\r\n\t\t\ttry{\r\n\t\t\t\tif(conn!=null)\r\n\t\t\t\t\tconn.close();\r\n\t\t\t}catch(SQLException se){\r\n\t\t\t\tse.printStackTrace();\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn data;\r\n\r\n\r\n\t}", "List<MorePracticeClass> selectQueryNotProMng(HashMap map, RowBounds rowBounds);", "public ResultSet selectData(String sql) throws java.sql.SQLException {\n\t\treturn selectData(sql, -1);\n\t}", "public Map<String, String> dataretrivefromemployeetable() throws SQLException, ClassNotFoundException {\n\t\tClass.forName(driver);\r\n\t\t\r\n\t\t//Connection with database\r\n\t\tcon = DriverManager.getConnection(url,username,password);\r\n\t\t\r\n\t\t//create statment \t\t\r\n\t\tstm = con.createStatement();\r\n\t\t\r\n\t\t//execution of sql query and save resultset\r\n\t\trs = stm.executeQuery(mssqlstmt);\r\n\t\t\r\n\t\t//initialize map object that would be returned\r\n\t\tdata = new HashMap<>();\r\n\r\n\t\twhile (rs.next()) {\r\n\t\t\tString username = rs.getString(\"username\");\r\n\t\t\tString password = rs.getString(\"password\");\r\n\t\t\tdata.put(username, password);\r\n\t\t}\r\n\t\t\r\n\t\t//resultset closing\r\n\t\trs.close();\r\n\t\t//statement closing\r\n\t\tstm.close();\r\n\t\t//closing connection\r\n\t\tcon.close();\r\n\t\t\r\n/*\t\tdata.put(\"parveen1\", \"123\");\r\n\t\tdata.put(\"parveen2\", \"123\");\r\n\t\tdata.put(\"parveen3\", \"123\");\r\n*/\t\t\r\n\t\treturn data;\r\n\t}", "@Test\n public void metaDataExample1() throws SQLException {\n Connection connection = DriverManager.getConnection(dbUrl, dbUsername, dbPassword);\n // 2. Create statement\n Statement statement = connection.createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.CONCUR_READ_ONLY);\n // Run sql query and get the result in resultSet object\n String sqlQuery= \"Select * From departments\";\n //String sqlQuery= \"Select first_name, last_name, salary From employees\";\n ResultSet resultSet = statement.executeQuery(sqlQuery);\n\n // we use resultSet metadata to get information about the tables\n // get the resultSet object metadata\n ResultSetMetaData rsMetadata = resultSet.getMetaData();\n\n // List for keeping all rows as a map\n List<Map<String, Object>> queryData = new ArrayList<>();\n\n // while(resultSet.next()) helps to iterate through columns\n while (resultSet.next()) {\n // key(columns) will be string but value can be any type of data. That's why we choose <String, Object>\n Map<String, Object> row = new HashMap<>(); // creating empty Map\n // number of columns\n int colCount = rsMetadata.getColumnCount();\n // for loop helps to iterate through columns\n for (int i = 1; i <= colCount; i++) {\n row.put(rsMetadata.getColumnName(i), resultSet.getObject(i));\n }\n\n queryData.add(row); // adding a Map to the List of Maps\n }\n\n // Printing the rows\n for (Map<String, Object> row: queryData) {\n System.out.println(row.toString());\n\n }\n\n\n\n\n // close all connections\n resultSet.close();\n statement.close();\n connection.close();\n }", "@Override\r\n\tpublic Collection selectKeyColumns(String columnNames, Connection con) {\n\t\treturn null;\r\n\t}", "public List<Map<String, Object>> searchDBTableDate(String condition) {\n log.info(new SimpleDateFormat(\"yyyy/MM/dd HH:mm:ss\").format(new Date()) + \"search db table data\");\n// TrafferCurrentDB();\n List<Map<String, Object>> list = queryMap(condition);\n if (StringUtils.isEmpty(list)) {\n throw new SQLException(SQLError, SQLError);\n }\n if (list.size() == 0) {\n List<String> tableNameList = (List<String>) session.getAttribute(\"list\");\n String DBName = (String) session.getAttribute(\"dbName\");\n tableNameList.forEach(\n tableName -> {\n if (condition.contains(tableName)) {\n queryMap(\n \"SELECT column_name FROM information_schema.columns WHERE table_name='\" + dbNameTrim(tableName) + \"' And table_schema='\" + dbNameTrim(DBName) + \"'\").forEach(\n stringObjectMap -> {\n if (!list.contains(stringObjectMap)) {\n list.add(stringObjectMap);\n }\n }\n );\n }\n }\n );\n\n }\n return list;\n }", "private void selectValuesIncidentTicketTables(Connection conn) {\n\n\tPreparedStatement pst = null;\n\tString selectIncidentTicketQuery = \"Select id, inapuserid,inappostid,issue FROM incidentticket WHERE assignedTechnicianid = ?\";\n\n\ttry {\n\n\t\n\t\t\tpst = conn.prepareStatement(selectIncidentTicketQuery);\n\t\t\tpst.setInt(1,567 );\n\t\t\t\n\t\t\tResultSet r = pst.executeQuery();\n\n\t\t\twhile (r.next()) {\n\n\t\t\t\tint id = r.getInt(\"id\");\n\t\t\t\tint inapuserid = r.getInt(\"inapuserid\");\n\t\t\t\tint inappostid = r.getInt(\"inappostid\");\n\t\t\t\tString issue = r.getString(\"issue\");\n\n\t\t\t\tSystem.out.println(\"id- \" + id);\n\t\t\t\tSystem.out.println(\"inapuserid- \" + inapuserid);\n\t\t\t\tSystem.out.println(\"inappostid- \" + inappostid);\n\t\t\t\tSystem.out.println(\"issue- \" + issue);\n\n\t\t\t}\n\t\tSystem.out.println(\"\\n\\nRecords selected from Incident Ticket Table Successfully\\n\");\n\t\t//System.out.println(\"Abhinav\");\n\t} catch (SQLException e) {\n\t\tSystem.out.println(\"\\n-----Please Check Error Below for selecting values from Incident Ticket Table--------\\n\");\n\t\te.printStackTrace();\n\t}\n\n}", "@Test\n public void selectAllDeletedColumns() {\n String[] retArray = {\n \"3,30000.0,null,30000\", \"4,4.0,4,null\",\n };\n\n String[] columnNames = {\"root.sg1.d1.s1\", \"root.sg1.d1.s2\", \"root.sg1.d1.s3\"};\n\n try (Connection connection = EnvFactory.getEnv().getConnection();\n Statement statement = connection.createStatement();\n ResultSet resultSet =\n statement.executeQuery(\"select s1, s2, s3 from root.sg1.d1 where time <= 4\")) {\n\n ResultSetMetaData resultSetMetaData = resultSet.getMetaData();\n Map<String, Integer> map = new HashMap<>();\n for (int i = 1; i <= resultSetMetaData.getColumnCount(); i++) {\n map.put(resultSetMetaData.getColumnName(i), i);\n }\n assertEquals(columnNames.length + 1, resultSetMetaData.getColumnCount());\n int cnt = 0;\n while (resultSet.next()) {\n StringBuilder builder = new StringBuilder();\n builder.append(resultSet.getString(1));\n for (String columnName : columnNames) {\n int index = map.get(columnName);\n builder.append(\",\").append(resultSet.getString(index));\n }\n assertEquals(retArray[cnt], builder.toString());\n cnt++;\n }\n assertEquals(retArray.length, cnt);\n } catch (SQLException e) {\n e.printStackTrace();\n fail(e.getMessage());\n }\n }", "@Override\r\n public List<Map<String, Object>> findAllRecords(String tableName, int upperLimit) throws SQLException {\r\n List<Map<String, Object>> records = new ArrayList();\r\n String sqlQuery = (upperLimit > 0) ? \"SELECT * FROM \" + tableName + \" LIMIT \" + upperLimit : \"SELECT * FROM \" + tableName;\r\n if (connection != null) {\r\n\r\n Statement sqlStatement = connection.createStatement();\r\n ResultSet rs = sqlStatement.executeQuery(sqlQuery);\r\n ResultSetMetaData rsmd = rs.getMetaData();\r\n int columnCount = rsmd.getColumnCount();\r\n while (rs.next()) {\r\n Map<String, Object> record = new HashMap();\r\n for (int i = 1; i <= columnCount; i++) {\r\n record.put(rsmd.getColumnName(i), rs.getObject(i));\r\n }\r\n records.add(record);\r\n }\r\n } else {\r\n System.out.println(\"No connection could be established\");\r\n }\r\n return records;\r\n }", "public List<Map<String, Object>> query(long tableID, String key)\r\n\t{\n\t\treturn null;\r\n\t}", "public ExitQuestionsMap[] findByDynamicSelect(String sql, Object[] sqlParams) throws ExitQuestionsMapDaoException {\n\t\t// declare variables\n\t\tfinal boolean isConnSupplied = (userConn != null);\n\t\tConnection conn = null;\n\t\tPreparedStatement stmt = null;\n\t\tResultSet rs = null;\n\t\ttry{\n\t\t\t// get the user-specified connection or get a connection from the ResourceManager\n\t\t\tconn = isConnSupplied ? userConn : ResourceManager.getConnection();\n\t\t\t// construct the SQL statement\n\t\t\tfinal String SQL = sql;\n\t\t\tif (logger.isDebugEnabled()){\n\t\t\t\tlogger.debug(\"Executing \" + SQL);\n\t\t\t}\n\t\t\t// prepare statement\n\t\t\tstmt = conn.prepareStatement(SQL);\n\t\t\tstmt.setMaxRows(maxRows);\n\t\t\t// bind parameters\n\t\t\tfor (int i = 0; sqlParams != null && i < sqlParams.length; i++){\n\t\t\t\tstmt.setObject(i + 1, sqlParams[i]);\n\t\t\t}\n\t\t\trs = stmt.executeQuery();\n\t\t\t// fetch the results\n\t\t\treturn fetchMultiResults(rs);\n\t\t} catch (Exception _e){\n\t\t\tlogger.error(\"Exception: \" + _e.getMessage(), _e);\n\t\t\tthrow new ExitQuestionsMapDaoException(\"Exception: \" + _e.getMessage(), _e);\n\t\t} finally{\n\t\t\tResourceManager.close(rs);\n\t\t\tResourceManager.close(stmt);\n\t\t\tif (!isConnSupplied){\n\t\t\t\tResourceManager.close(conn);\n\t\t\t}\n\t\t}\n\t}", "public <T> List<T> select(final String sqlQuery, final Class<T> clzz, final Map<String, Object> param) throws Exception;", "private QueryResult mapResultSet(ResultSet rs) throws SQLException {\n QueryResult results = new QueryResult();\n\n ResultSetMetaData metadata = rs.getMetaData();\n\n int columnCount = metadata.getColumnCount();\n for (int i = 0; i < columnCount; i++) {\n results.addColumnName(metadata.getColumnLabel(i + 1), i);\n }\n\n List<QueryResultRow> rows = new ArrayList<QueryResultRow>();\n while (rs.next()) {\n Object[] columnValues = new Object[columnCount];\n for (int i = 1; i <= columnCount; i++) {\n columnValues[i - 1] = rs.getObject(i);\n\n }\n rows.add(new QueryResultRow(columnValues));\n }\n results.setRows(rows.toArray(new QueryResultRow[] {}));\n return results;\n }", "public ResultSet selecionar(String tabela);", "public void selectValuesFromTable(Connection conn) {\n\t// select queries\n\n\t\n\tthis.selectValuesIncidentTicketTables(conn);\n\n\n\t\n}", "public ResultSet getAll(String tableName)\n {\n\n String selectStr;\n ResultSet rs=null;\n\n try{\n\n selectStr=\"SELECT * FROM \"+tableName;\n rs = stmt.executeQuery(selectStr);\n\n\n\n\n\n }catch(Exception e){\n System.out.println(\"Error occurred in searchLogin\");\n }\n\n return rs;\n }", "public abstract Map<String, Integer> getColumnTypes(String tableName);", "@Override\r\n\tpublic Map<String, Object> readAll() {\n\t\tsimpleJdbcCall = new SimpleJdbcCall(jdbcTemplate).withCatalogName(\"PKG_ESTADO_CIVIL\")\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t .withProcedureName(\"PR_LIS_ESTADO_CIVIL\")\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t .declareParameters(new SqlOutParameter(\"CUR_ESTADO_CIVIL\", OracleTypes.CURSOR,\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t new ColumnMapRowMapper()));\r\n\t\treturn simpleJdbcCall.execute();\r\n\t}", "private static void selectRecordsFromDbUserTable() throws SQLException {\n\n\t\tConnection dbConnection = null;\n\t\tStatement statement = null;\n\n\t\tString selectTableSQL = \"SELECT * from spelers\";\n\n\t\ttry {\n\t\t\tdbConnection = getDBConnection();\n\t\t\tstatement = dbConnection.createStatement();\n\n\t\t\tSystem.out.println(selectTableSQL);\n\n\t\t\t// execute select SQL stetement\n\t\t\tResultSet rs = statement.executeQuery(selectTableSQL);\n\n\t\t\twhile (rs.next()) {\n \n String naam = rs.getString(\"naam\");\n\t\t\t\tint punten = rs.getInt(\"punten\");\n \n System.out.println(\"naam : \" + naam);\n\t\t\t\tSystem.out.println(\"punten : \" + punten);\n\t\t\t\t\n\t\t\t}\n\n\t\t} catch (SQLException e) {\n\n\t\t\tSystem.out.println(e.getMessage());\n\n\t\t} finally {\n\n\t\t\tif (statement != null) {\n\t\t\t\tstatement.close();\n\t\t\t}\n\n\t\t\tif (dbConnection != null) {\n\t\t\t\tdbConnection.close();\n\t\t\t}\n\n\t\t}\n\n\t}", "@Override\r\n\tpublic DeptBean[] findByDynamicSelect(String sql, Object[] sqlParams)\r\n\t\t\tthrows SQLException {\n\t\tList<Map<String, Object>> resultList = new ArrayList<Map<String,Object>>();\r\n\t\tdeptConn = this.getConnection();\r\n\t\tresultList = this.executeQuery(deptConn, sql, sqlParams);\r\n\t\tif (deptConn != null) {\r\n\t\t\tthis.closeConnection(deptConn);\r\n\t\t}\r\n\t\treturn MapToObject(resultList);\r\n\t}", "public static List<JSONObject> getFormattedResultSet(ResultSet rs){\r\n \r\n List<JSONObject> resList = new ArrayList<>();\r\n \r\n try{\r\n \r\n //getColumn names\r\n ResultSetMetaData rsMeta = rs.getMetaData();\r\n int columnCount = rsMeta.getColumnCount();\r\n List<String> columnNames = new ArrayList<>();\r\n //Loop to get all column names\r\n for(int i = 1; i <= columnCount; i++){\r\n //Adding all retrieved column name to List Object\r\n columnNames.add(rsMeta.getColumnName(i).toUpperCase());\r\n }\r\n \r\n while(rs.next()){\r\n // Convert all object to JSON object \r\n JSONObject obj = new JSONObject();\r\n for(int i = 1; i <= columnCount; i++){\r\n String key = columnNames.get(i - 1);\r\n String value = rs.getString(i);\r\n obj.put(key, value);\r\n }\r\n resList.add(obj);\r\n }\r\n \r\n } catch(SQLException | JSONException ex){\r\n \r\n System.out.println(ex);\r\n \r\n } finally{\r\n \r\n try{\r\n \r\n rs.close();\r\n \r\n }catch(SQLException e){\r\n \r\n System.out.println(e.getMessage());\r\n \r\n }\r\n }\r\n return resList;\r\n }", "public String[][] getData(String stmt, int numOfFields) {\n String[][] result = new String[0][];\n try {\n Statement stmnt = connection.createStatement();\n result = new String[100][100];\n ResultSet rs = stmnt.executeQuery(stmt);\n int row = 0;\n while (rs.next()) {\n for (int i = 1; i <= numOfFields; i++) {\n\n result[row][i - 1] = rs.getString(i);\n\n } //for\n row++;\n } //while\n } //try\n catch (SQLException sqlex) {\n System.out.println(sqlex.getMessage());\n } //catch\n return result;\n }", "private HashMap<String, String> getHashMapfromResultSetRow(ResultSet resultset, ArrayList arraylist)\n/* */ {\n/* 1417 */ HashMap<String, String> hashmap = new HashMap();\n/* 1418 */ if (arraylist == null)\n/* */ {\n/* 1420 */ arraylist = new ArrayList();\n/* */ }\n/* */ try\n/* */ {\n/* 1424 */ ResultSetMetaData resultsetmetadata = resultset.getMetaData();\n/* 1425 */ int i = resultsetmetadata.getColumnCount();\n/* 1426 */ for (int j = 1; j <= i; j++)\n/* */ {\n/* 1428 */ if (!arraylist.contains(resultset.getString(j)))\n/* */ {\n/* 1430 */ hashmap.put(resultsetmetadata.getColumnName(j), resultset.getString(j));\n/* */ }\n/* */ }\n/* */ }\n/* */ catch (Exception exception)\n/* */ {\n/* 1436 */ exception.printStackTrace();\n/* */ }\n/* 1438 */ return hashmap;\n/* */ }", "public ArrayList<String> selectCommand(String query, String[] wantedColumn){\n String record = null;\n ArrayList<String> records=new ArrayList<>( );\n try (Connection conn = this.connect();\n Statement stmt = conn.createStatement();\n ResultSet rs = stmt.executeQuery(query)){\n // loop through the result set\n while (rs.next()) {\n record=\"\";\n for (int i = 0; i <wantedColumn.length ; i++) {\n record+=rs.getString( wantedColumn[i] ) + \"\\t\";\n }\n records.add(record);\n }\n } catch (SQLException e) {\n System.out.println(e.getMessage());\n }\n return records;\n }", "public String[][] selectExec(String sql, String searchTerm) {\n\t\ttry {\n\t\t\tPreparedStatement prpstmt = null;\n\t\t\tResultSet rset;\n\t\t\tprpstmt = conn.prepareStatement(sql);\n\t\t\tif (searchTerm != \"\") {\n\t\t\t\tprpstmt.setString(1, searchTerm);\n\t\t\t\trset = prpstmt.executeQuery();\n\t\t\t} else {\n\t\t\t\t// is search term is null\n\t\t\t\tjava.sql.Statement st = conn.createStatement();\n\t\t\t\trset = st.executeQuery(sql);\n\n\t\t\t}\n\n\t\t\tif (rset.first()) {\n\t\t\t\t// there's stuff to do\n\t\t\t\tResultSetMetaData rsmd = rset.getMetaData();\n\t\t\t\tint rowcount = 0;\n\t\t\t\t// getting column count\n\t\t\t\tint colcount = rsmd.getColumnCount();\n\t\t\t\t// counting row\n\t\t\t\tif (rset.last()) {\n\t\t\t\t\trowcount = rset.getRow();\n\n\t\t\t\t\trset.beforeFirst(); // not rs.first() because the rs.next() below will move on, missing the first\n\t\t\t\t\t\t\t\t\t\t// element\n\t\t\t\t}\n\t\t\t\tString[][] rows = new String[rowcount][colcount];\n\t\t\t\tint i = 0;\n\t\t\t\twhile (rset.next()) {\n\t\t\t\t\tfor (int j = 0; j < colcount; j++) {\n\t\t\t\t\t\trows[i][j] = rset.getString(j + 1);\n\t\t\t\t\t}\n\n\t\t\t\t\ti++;\n\t\t\t\t}\n\n\t\t\t\trset.close();\n\t\t\t\tprpstmt.close();\n\n\t\t\t\treturn rows;\n\t\t\t} else {\n\t\t\t\t// rs was empty\n\t\t\t\tString[][] rows = new String[0][0];\n\t\t\t\treturn rows;\n\t\t\t}\n\n\t\t} catch (Exception e) {\n\t\t\tSystem.out.println(\"選択処理時に例外が発生しました。/Exception occured when processing select.\" + e);\n\t\t}\n\t\tString[][] rows = new String[0][0];\n\t\treturn rows;\n\n\t}", "@Override\n\tpublic Map queryForMap(String sql) {\n\t\treturn this.baseDaoSupport.queryForMap(sql);\n\t}", "private Object [] getFilterVals()\n throws java.sql.SQLException\n {\n Object [] ret = new Object[m_cols.length];\n\n for (int i = 0; i < m_cols.length; i++)\n {\n ret[i] = m_rs.getString((String)m_cols[i]);\n }\n return ret;\n }", "public Object[][] Consulta(String Comsql) {\n Object Datos[][] = null;\n try {\n PreparedStatement pstm = con.prepareStatement(Comsql);\n /* declarando ResulSet que va a contener el resultado de la ejecucion del Query */\n ResultSet rs = pstm.executeQuery();\n /*se ubica en el ultimo registro, para saber cuantos ahi */\n rs.last();\n /*para saber el numero de filas y columnas del ResulSet */\n ResultSetMetaData rsmd = rs.getMetaData();\n /*aqui muestra la cantidad de filas y colmnas ahi */\n int numCols = rsmd.getColumnCount();\n int numFils = rs.getRow();\n /*cojemos nuestro objeto datos y le damos formato, eso es igual a numero de filas y numero de columnas */\n Datos = new Object[numFils][numCols];\n /* nos ubicamos antes de la primera fila */\n rs.beforeFirst();\n\n /*j= filas\n i= columnas\n */\n int j = 0;\n /*recorremos los datos del RS\n */\n while (rs.next()) {\n /*i siempre se inicializa en cero; la condicion va hasta que i sea menor que e numcol; y aumenta de 1 en 1 */\n for (int i = 0; i < numCols; i++) {\n /*aqui le asignamos valor a nuestro arreglo */\n Datos[j][i] = rs.getObject(i + 1);\n }\n j++;\n }\n pstm.close();\n rs.close();\n } catch (Exception e) {\n System.out.println(\"Error : \" + e.getMessage());\n }\n return Datos;\n }", "public Ruta[] findByDynamicSelect(String sql, Object[] sqlParams) throws RutaDaoException;", "public Cliente[] findByDynamicSelect(String sql, Object[] sqlParams) throws ClienteDaoException;", "List<Column> getQueryColumns();", "Object executeSelectQuery(String sql) { return null;}", "public List<Integer> selectRangeWherePar(byte[][] selectCols, byte[] whereCol, long value1, long value2, ResultSet result){\n List<Integer> oidList = new ArrayList<Integer>();\n \n //assuming the where col is in type LONG\n boolean[] access = new boolean[keyForLong.length];\n int whereIndex = -1;\n \n for(int i = 0; i < keyForLong.length; i++){\n if(keyForLong[i].equals( new String(whereCol) + separator + \"LONG\" )) whereIndex = i;\n \n access[i] = false;\n for(int j = 0; j < selectCols.length; j++){\n if(keyForLong[i].equals( new String(selectCols[j]) + separator + \"LONG\" )){\n access[i] = true;\n break;\n }\n }\n }\n \n int numOfFields = keyForLong.length;\n for(int i = 0; i < numObject; i++){\n //first check if this object meet the where condition\n long value = longValues[i*numOfFields + whereIndex];\n if( (value >= value1) && (value <= value2)){\n //this object meets condition\n int oid=objectIds[i];\n oidList.add(oid);\n \n //select fields in the select clause\n for(int j = 0; j < access.length; j++){\n if(access[j]){\n String key = keyForLong[j];\n if(j == whereIndex){\n result.addLong(key, oid, value);\n continue;\n }\n long longnum = longValues[i*numOfFields + j];\n if(longnum != UNDEFINED)\n result.addLong(key, oid, longnum);\n }\n }\n }\n }\n \n if(oidList.size() > 0){\n //if this partition also has other data types, also select those based on oidList\n if(keyForString.length != 0)\n selectConditionString(oidList, selectCols, result);\n if(keyForDouble.length != 0)\n selectConditionDouble(oidList, selectCols, result);\n if(keyForBool.length != 0)\n selectConditionBool(oidList, selectCols, result);\n }\n return oidList;\n }", "public static Result<Map<String, String>> getUsers(Connection c){\n PreparedStatement pstmt;\n ResultSet rst;\n Map<String, String> maps=new HashMap<String,String>(); //Maps\n try {\n pstmt = c.prepareStatement(getUserStatement);\n rst=pstmt.executeQuery();\n while(rst.next()){\n String name=rst.getString(\"name\").trim();\n String username=rst.getString(\"username\").trim();\n System.out.println(name+\",\"+username);\n System.out.println(rst.getRow());\n maps.put(username,name);\n }\n\n /* condition to check if the map/databse is empty*/\n if(!maps.isEmpty()){\n return Result.success(maps);\n }\n else{\n return Result.failure(\"There are no user for this table\");\n }\n }\n catch (SQLException e) {\n return Result.fatal(\"Unknown error\");\n }\n }", "public ArrayList<HashMap<String, String>> retrieve(String tableName, String colName, long value) {\n //GET Qualifiing Rows from DB\n select(tableName, colName, String.valueOf(value), false);\n \n return this.processRetrieve();\n }", "SELECT createSELECT();", "List<Map<String, Object>> getTableValuesWithHeaders(TableParameters tableParameters);", "List<Map<String, Object>> getTableValuesWithHeaders();", "public Map<String, ColumnMetaData> getColumns();", "public abstract ResultSet readTable(String tableName, String [] columns)\n throws SQLException;", "private List<Map<String, String>> getValues(String select, String where,\n\t String tableName, String uri) throws MediatorException {\n\t// prepare query; replace relevant object name with the uri\n\tString newQuery = where;\n\tnewQuery = newQuery.replaceAll(\"\\\\?o_\" + tableName + \" \", \"<\" + uri\n\t\t+ \"> \");\n\t// System.out.println(\"newq=\" + newQuery);\n\n\treturn JenaUtil.executeQueryExtractValues(model, select + newQuery);\n }", "@Override\n public List<DataDict> select(String condt)\n {\n List<DataDict> ddictList = null;\n ddictList = new LinkedList<DataDict>();\n try\n {\n String sql = \"select dict_id, dict_parent_id, dict_index , dict_name , dict_value from data_dict \";\n condt.trim();\n if (!condt.isEmpty())\n sql += \" where \" + condt;\n\n DBUtil db = new DBUtil();\n if (!db.openConnection())\n {\n System.out.print(\"fail to connect database\");\n return null;\n }\n ResultSet rst = db.execQuery(sql);\n\n if (rst != null)\n {\n while (rst.next())\n {\n DataDict ddict = new DataDict();\n ddict.setId(rst.getInt(\"dict_id\"));\n ddict.setSuperId(rst.getInt(\"dict_parent_id\"));\n ddict.setIndex(rst.getInt(\"dict_index\"));\n ddict.setName(rst.getString(\"dict_name\"));\n ddict.setValue(rst.getString(\"dict_value\"));\n ddictList.add(ddict);\n }\n }\n db.close(rst);\n db.close();\n }\n catch (Exception e)\n {\n e.printStackTrace();\n }\n finally\n {\n\n }\n\n return ddictList;\n }", "public List listMapBySql(String sql) throws Exception {\n\t\treturn null;\r\n\t}", "List<List<Object>> getTableValues(TableParameters tableParameters);", "@Override\n\tpublic ArrayList select(String... args) throws SQLException {\n\t\treturn null;\n\t}", "public void selectFromTable(String tableName){\n //SQL query\n String query = \"SELECT * FROM \" + tableName;\n\n try {\n //connection\n stmt = con.createStatement();\n //execute query\n rs = stmt.executeQuery(query);\n System.out.println(\"\\nid\\t\\tmyName\\t\\taddress\\n____________________________________\");\n\n //get data\n while (rs.next()){\n int id = rs.getInt(1); //returns the id / first column\n String myName = rs.getString(\"myName\"); //returns my name\n String address = rs.getString(\"address\"); //returns my name\n System.out.println(id + \"\\t\\t\" + myName + \"\\t\\t\" + address);\n }\n }\n catch (SQLException ex){\n System.out.println(\"\\n--Query did not execute--\");\n ex.printStackTrace();\n }\n }", "public ArrayList<HashMap<String, String>> retrieve(String tableName, String colName, String value) {\n //GET Qualifiing Rows from DB\n select(tableName, colName, value, true);\n\n return this.processRetrieve();\n }", "public List listMapBySql(String sql, int pageNum, int pageSize)\r\n\t\t\tthrows Exception {\n\t\treturn null;\r\n\t}", "@Override\r\n\tpublic String[] getData(String[] sql) {\n\t\treturn null;\r\n\t}", "@Override\n\tpublic Map<String, Object> readAll() {\n\t\tsimpleJdbcCall = new SimpleJdbcCall(jdbcTemplate)\n\t\t\t\t.withCatalogName(\"PKG_ALM_CRUD_PRODUNIDADMED\")\n\t\t\t\t.withProcedureName(\"PA_MAT_PRODUNIDADMED_LIS\")\t\n\t\t\t\t.declareParameters(new SqlOutParameter(\"uni\", OracleTypes\n\t\t\t\t.CURSOR, new ColumnMapRowMapper()));\n\t\treturn simpleJdbcCall.execute();\n\t}", "public List<Map<String,Object>> ejecutarQuery(String sql){\n return this.jdbcTemplate.queryForList(sql);\n }", "protected abstract List<Object> getParamValues(SqlKeyWord sqlKeyWord, Object dbEntity, TableInfo tableInfo, Map<String, Object> params) throws Exception;", "@Override\n\tpublic Map<String, String[]> loadColumnMetas(String databaseName) throws SQLException {\n\t\tString sql=\"select utc.*,UCC.comments from user_tab_columns utc\\n\" + \n\t\t\t\t\"left join user_col_comments ucc on UCC.table_name=UTC.table_name and UCC.column_name=UTC.column_name\";\n\t\tMap<String, String[]> ret=new HashMap<>();\n\t\t try(PreparedStatement preparedStatement= connection.prepareStatement(sql);\n\t \t\tResultSet resultSet=preparedStatement.executeQuery();){\n\t\t\twhile(resultSet.next()) {\n\t\t\t\tString tableName=resultSet.getString(\"TABLE_NAME\")\n\t\t\t\t\t\t,columnName=resultSet.getString(\"COLUMN_NAME\")\n\t\t\t\t\t\t,dataLength=resultSet.getString(\"DATA_LENGTH\")\n\t\t ,nullable=resultSet.getString(\"NULLABLE\")\n\t\t ,comments=resultSet.getString(\"COMMENTS\")\n\t\t\t\t\t\t;\n\t\t\t\tString key=tableName+\":\"+columnName;\n\t\t\t\tret.put(key, new String[] {dataLength,nullable,comments});\n\t\t\t\t\n\t\t\t}\n\t }\n\t\t\n\t\treturn ret;\n\t}", "public void selectFromTable(){\n //SQL query\n String query = \"SELECT fNavn, eNavn, konto_Navn, konto_Reg, konto_ID, konto_Saldo FROM person JOIN konti ON Person_ID = fk_Person_ID\";\n\n try {\n //connection\n stmt = con.createStatement();\n //execute query\n rs = stmt.executeQuery(query);\n System.out.println(\"\\nFornavn: \\t\\tEfternavn: \\t\\tKonto: \\t\\tReg.nr: \\t\\tKontonr.: \\t\\tSaldo: \\n____________________________________\");\n\n //get data\n while (rs.next()){\n String fNavn = rs.getString(\"fNavn\"); //returns fornavn\n String eNavn = rs.getString(\"eNavn\"); //returns efternavn\n String kontoNavn = rs.getString(\"konto_Navn\"); //returns kontonavn\n int kontoReg = rs.getInt(\"konto_Reg\"); //returns kontoreg\n double kontoID = rs.getDouble(\"konto_ID\"); //returns kontoID\n double kontoSaldo = rs.getDouble(\"konto_Saldo\"); //returns kontoSaldo\n System.out.println(fNavn + \"\\t\\t\" + eNavn + \"\\t\\t\" + kontoNavn + \"\\t\\t\" + kontoReg + \"\\t\\t\" + kontoID + \"\\t\\t\" + kontoSaldo);\n }\n }\n catch (SQLException ex){\n System.out.println(\"\\n--Query did not execute--\");\n ex.printStackTrace();\n }\n\n\n }", "public ArrayList<HashMap<String, String>> retrieve(String tableName) {\n\n //GET Qualifiing Rows from DB\n select(tableName);\n\n return this.processRetrieve();\n }", "String queryInformation(String tableName,String queryname){\n Connection con = GetDBConnection.connectDB(\"booklibrarymanager\",\"root\",\"HanDong85\");\n String tar;\n if(tableName.equals(\"authorinformation\"))\n tar = \"author\";\n else if(tableName.equals(\"classificationinformation\"))\n tar = \"classification\";\n else tar = \"press\";\n String sql = \"select \" + tar + \"Id\" + \" from \" + tableName + \" where \";\n if(tableName.equals(\"authorinformation\"))\n sql += \"authorName = ?;\";\n else if(tableName.equals(\"classificationinformation\"))\n sql += \"classifcationName = ?;\";\n else sql += \"pressName = ?;\";\n System.out.println(sql);\n PreparedStatement preSQL;\n try{\n preSQL = con.prepareStatement(sql);\n preSQL.setString(1,queryname);\n ResultSet rs = preSQL.executeQuery();\n rs.beforeFirst();\n if(rs.next()){\n String ans = rs.getString(1);\n GetDBConnection.closeCon(con);\n return ans;\n }\n else{\n GetDBConnection.closeCon(con);\n return ERROR_TIP;\n }\n }\n catch (SQLException e){\n GetDBConnection.closeCon(con);\n return ERROR_TIP;\n }\n }", "public Items[] findByDynamicSelect(String sql, Object[] sqlParams) throws ItemsDaoException;", "protected abstract Object mapRow(ResultSet rs) throws SQLException;", "public ResultSet doQuery(String sql, Object[] params) throws SQLException {\r\n\t\t\r\n\t/*\tSystem.out.println(\"doQuery_sql: \" + sql);\r\n\t\tfor (int i = 0 ;i< params.length; i++)\r\n\t\t\tSystem.out.println(\"param: \" + params[i]);\t\r\n\t\t\r\n\t\t*/\r\n\t\tif (dbConnection == null)\r\n\t\t\treturn null;\r\n\t\toutstmt = dbConnection.prepareStatement(sql);\r\n\t\t// stuff parameters in\r\n\t\tfor (int i=0; i<params.length; i++){\r\n\t\t\toutstmt.setObject(i + 1,params[i]);\r\n\t\t}\r\n\t\t\r\n\t\tif (outstmt == null){\r\n\t\t\treturn null;\r\n\t\t}\r\n\t\t// return a collection that can be iterated on\r\n\t\tif (outstmt.execute()){\r\n\t\t\t//return stmt.getResultSet();\r\n\t\t\toutrs = outstmt.getResultSet();\r\n\t\t}\r\n\t\telse\r\n\t\t\treturn null;\r\n\t\treturn outrs;\r\n\t}", "@Override\n\tpublic Map<String, Object> selectPage(String whereSql, int currentPage, int pageSize) throws Exception {\n\t\treturn null;\n\t}", "public static void parseQueryString(String queryString) {\n\n System.out.println(\"STUB: Calling parseQueryString(String s) to process queries\");\n System.out.println(\"Parsing the string:\\\"\" + queryString + \"\\\"\");\n queryString = queryString.toLowerCase();\n String colName = queryString.substring(0,queryString.indexOf(\"from\")+5).trim();\n String colNames[] = removeWhiteSpacesInArray(colName.split(\" \"));\n ArrayList<String> queryStringList = new ArrayList<String>(Arrays.asList(colNames));\n queryStringList.remove(\"select\");\n queryStringList.remove(\"from\");\n String condition = \"\";\n String keyValueCond[] = new String[]{};\n String tableName = \"\";\n if(queryString.contains(\"where\")) {\n tableName = queryString.substring(queryString.indexOf(\"from\") + 5, queryString.indexOf(\"where\")).trim();\n condition = queryString.substring(queryString.indexOf(\"where\")+6, queryString.length()).trim();\n keyValueCond = removeWhiteSpacesInArray(condition.split(\" \"));\n }else\n tableName = queryString.substring(queryString.indexOf(\"from\")+5).trim();\n try {\n Table table = new Table(tableName.concat(\".tbl\"));\n int noOfRecords = table.page.getNoOfRecords();\n long pos = table.page.getStartofContent();\n TreeMap<String, String> colOrder = columnOrdinalHelper.getColumnsInOrdinalPositionOrder(tableName);\n int recordLength = Integer.parseInt(recordLengthHelper.getProperties(tableName.concat(\".\").concat(Constant.recordLength)));\n if(keyValueCond.length>0){\n\n }else{\n Iterator it = colOrder.entrySet().iterator();\n while (it.hasNext()){\n Map.Entry<String, String> entryPair = (Map.Entry<String, String>) it.next();\n// ReadResult<Object> readResult = table.page.readIntasByte(pos);\n// System.out.println(readResult.getT());\n ReadResult<Object> readResult = RecordFormat.readRecordFormat(columnTypeHelper.getProperties(entryPair.getValue()),table,pos);\n System.out.println(\"RESULT COLUMN NAME : \"+entryPair.getValue()+\" Value : \"+readResult.getT());\n\n }\n\n }\n\n\n\n } catch (FileNotFoundException e) {\n e.printStackTrace();\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n }", "private List<String> queryGSMetaData(String querySQL, List<String> columnNames) throws SQLException\n {\n // try with auto-closing statement resource\n try (Statement statement = this.createStatement())\n {\n statement.execute(querySQL);\n\n // handle the case where the result set is not what is expected\n // try with auto-closing resultset resource\n try (ResultSet rs = statement.getResultSet())\n {\n if (rs != null && rs.next())\n {\n List<String> columnValues = new ArrayList<>();\n for (String columnName : columnNames)\n {\n columnValues.add(rs.getString(columnName));\n }\n return columnValues;\n }\n else\n {\n // returned no results or an error\n throw new SQLException(\n errorResourceBundleManager.getLocalizedMessage(\n ErrorCode.BAD_RESPONSE.getMessageCode().toString()));\n }\n }\n }\n }", "private HashMap<String, ArrayList<String>> getAllTableContentsWhere(String table, String where,\r\n String whereValue) {\r\n HashMap<String, ArrayList<String>> contents = new HashMap<String, ArrayList<String>>();\r\n // Get the records associated with the table and conditions\r\n Cursor allRecords = sqlExecutor.selectRecords(table, where, whereValue);\r\n if (allRecords == null) {\r\n return new HashMap<>();\r\n }\r\n // For each column, add a key to contents with the column name\r\n for (int i = 0; i < allRecords.getColumnCount(); i++) {\r\n contents.put(allRecords.getColumnName(i), new ArrayList<String>());\r\n }\r\n // add all row values to the ArrayList mapped to each column\r\n for (int i = 0; i < allRecords.getCount(); i++) {\r\n for (int e = 0; e < allRecords.getColumnCount(); e++) {\r\n contents.get(allRecords.getColumnName(e)).add(allRecords.getString(e));\r\n }\r\n // Move to next row\r\n allRecords.moveToNext();\r\n }\r\n return contents;\r\n }", "public List<List<String>> select(String sqlStatement, List<String> columns, boolean verbose) throws Exception {\n List<List<String>> result = new ArrayList<>();\n List<String> buffer = new ArrayList<>();\n\n /* STEP 3: Execute a query */\n stmt = conn.createStatement();\n ResultSet rs = stmt.executeQuery(sqlStatement);\n if (verbose)\n System.out.println(sqlStatement);\n\n /* STEP 4: Extract data from result set */\n while (rs.next()) {\n /* Retrieve by column name */\n for (String column : columns) {\n buffer.add(rs.getString(column));\n }\n result.add(new ArrayList<>(buffer));\n buffer.clear();\n }\n /* STEP 5: Clean-up environment */\n rs.close();\n return result;\n }", "public ArrayList<byte[]> queryData(String tablename, String schema){\n ArrayList<byte[]> res = new ArrayList<byte[]>();\n\n ResultSet resultSet = session.execute(\"SELECT * FROM \" + tablename);\n for (Row row : resultSet) {\n ByteBuffer data = row.getBytes(schema);\n res.add(data.array());\n }\n return res;\n }", "public Usuario[] findByDynamicSelect(String sql, Object[] sqlParams) throws SQLException;", "public Object getResult(ResultSet rs, String columnName) throws SQLException;", "public static Vector selectWhere(String sql,Connection con) {\n\t\t\tint j = 0;\r\n\t PreparedStatement stmt = null;\r\n\t Vector<CurrencySplitConfig> splitCs = new Vector<CurrencySplitConfig>();\r\n\t String sql1 = SELECTFROMWhere + sql;\r\n\t \r\n\t \r\n\t\t try {\r\n\t\t\t con.setAutoCommit(false);\r\n\t\t\t stmt = dsSQL.newPreparedStatement(con, sql1);\r\n\t \r\n\t ResultSet rs = stmt.executeQuery();\r\n\t while(rs.next()) {\r\n\t\t \t\r\n\t \t CurrencySplitConfig splitConfig = new CurrencySplitConfig();\r\n\t \t splitConfig.setId(rs.getInt(1));\r\n\t \t splitConfig.setCurrencyPair(rs.getString(2));\r\n\t \t splitConfig.setCurrencyToSplit(rs.getString(3));\r\n\t \t \r\n\t \t splitConfig.setBookid(rs.getInt(4));\r\n\t \t splitConfig.setFirstCurrencySplit(rs.getString(5));\r\n\t \t \r\n\t \t splitConfig.setSecondCurrencySPlit(rs.getString(6));\r\n\t \t splitConfig.setFirstSpotBook(rs.getInt(7));\r\n\t \t splitConfig.setSecondSpotBook(rs.getInt(8));\r\n\t \t splitCs.add(splitConfig);\r\n\t }commonUTIL.display(\"CurrencySplitConfigSQL\",\" select \" + sql1);\r\n\t return splitCs;\r\n\t\t } catch (Exception e) {\r\n\t\t\t commonUTIL.displayError(\"CurrencySplitConfigSQL\",\"select \" + sql ,e);\r\n\t\t\t return splitCs;\r\n\t \r\n\t }\r\n\t finally {\r\n\t try {\r\n\t\t\t\tstmt.close();\r\n\t\t\t} catch (SQLException e) {\r\n\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\tcommonUTIL.displayError(\"CurrencySplitConfigSQL\",\"select \" + sql ,e);\r\n\t\t\t}\r\n\t \r\n\t \r\n\t }\r\n\t\t}", "@Select({\n \"select\",\n \"`cate_id`, `cate_name`\",\n \"from `category`\",\n \"where `cate_id` = #{cateId,jdbcType=INTEGER}\"\n })\n @ResultMap(\"BaseResultMap\")\n Category selectByPrimaryKey(Integer cateId);", "@SuppressWarnings(\"unchecked\")\r\n\tpublic Object[][] executeSQLQuery(String sQLQuery) {\n\t\tObject[][] ob = null; \t\r\n\t\t Session session = MdbHibernateUtils.getSession();\r\n\t Transaction t = session.beginTransaction();{\r\n\t try {\r\n\t //** 生成主键对象 *// \r\n\t\t\tQuery q=session.createSQLQuery(sQLQuery);\t \r\n\t\t\t\t \r\n\t\t\tq.setFirstResult(0);\r\n\t\t\tq.setMaxResults(1000);\t\t\t\r\n\t\t List<Object[]> list=q.list();\r\n\t\t \r\n\t\t //JOptionPane.showMessageDialog(null,list.size()); \r\n\t\t //JOptionPane.showMessageDialog(null,list.get(0).length); \r\n\t\t if(list.size()==0)\r\n\t\t {\r\n\t\t \treturn ob;\r\n\t\t }\r\n\t\t ob=new Object[list.size()][list.get(0).length];\r\n\t\t for(int i=0;i<list.size();i++){\r\n\t\t\t // ob1=new Object[list.get(0).length];\r\n\t\t\t \r\n\t\t for(int j=0;j<list.get(i).length;j++)\r\n\t\t {\r\n\t\t \t//System.out.println(j);\r\n\t\t \t ob[i][j]=(list.get(i))[j];\r\n\t\t }\r\n\t\t \t\r\n\t\t }\t\t \r\n\t t.commit();\t \r\n\t } catch (HibernateException e1) {\r\n\t e1.printStackTrace();\r\n\t t.rollback();\r\n\t } finally {\r\n\t \t MdbHibernateUtils.closeSession(session);\r\n\t } \r\n\t\t\r\n\t}\r\n\t return ob;\r\n }", "public DatiBancari[] findByDynamicSelect(String sql, Object[] sqlParams) throws DatiBancariDaoException;", "public ArrayList<int[]> queryData(String tablename, String[] schema){\n ArrayList<int[]> res = new ArrayList<int[]>();\n\n ResultSet resultSet = session.execute(\"SELECT * FROM \" + tablename);\n for (Row row : resultSet) {\n int[] data = new int[schema.length];\n int j = 0;\n for (String s : schema) {\n data[j] = Integer.parseInt(s);\n }\n res.add(data);\n }\n return res;\n }", "private void select(String tableName, String colName, String value,\n boolean usePar) {\n String query;\n \n if (usePar == true){\n // Parenthesis will surrond the value making it a string\n query = \"SELECT * FROM \" + tableName + \" WHERE \" + colName + \" = \\'\" + value + \"\\'\";\n }\n else{\n // Parenthesis will not surround the value\n query = \"SELECT * FROM \" + tableName + \" WHERE \" + colName + \" = \" + value;\n }\n \n this.executeSelect(query);\n }", "public ResultSet fetchSelectAllParkLots() {\r\n\t\ttry {\r\n\t\t\t/**\r\n\t\t\t*\tTo create connection to the DataBase\r\n\t\t\t*/\r\n\t\t\tnew DbConnection();\r\n\t\t\t/**\r\n\t\t\t*\tStore the table data in ResultSet rs and then return it\r\n\t\t\t*/\r\n\t\t\trs = stmt.executeQuery(SELECT_ALL_PARKLOT_QUERY);\r\n\t\t} catch(SQLException SqlExcep) {\r\n\t\t\tSqlExcep.printStackTrace();\r\n\t\t} catch(ClassNotFoundException cnfExecp) {\r\n\t\t\tcnfExecp.printStackTrace();\r\n\t\t} finally {\r\n\t\t\t/*try {\r\n\t\t\t\tcloseDbConnection();\r\n\t\t\t} catch(SQLException SqlExcep) {\r\n\t\t\t\tSqlExcep.printStackTrace();\r\n\t\t\t}*/\r\n\t\t}\r\n\t\treturn rs;\r\n\t}", "public LuaObject getcolnames() throws SQLException\n {\n L.newTable();\n LuaObject table = L.getLuaObject(-1);\n \n ResultSetMetaData md = rs.getMetaData();\n \n for (int i = 1; i <= md.getColumnCount(); i++)\n {\n String name = md.getColumnName(i);\n \n L.pushNumber(i);\n L.pushString(name);\n L.setTable(-3);\n }\n L.pop(1);\n \n return table;\n }", "protected ListMap<Integer, CD4Details> makeResultsMapFromSQL(String sql, Map<String, Object> substitutions) {\n\t\tList<Object> data = Context.getService(MohCoreService.class).executeSqlQuery(sql, substitutions);\n\t\treturn makeResultsMap(data);\n\t}", "public String[][] selectData(String table, String whereClause) {\n\t\tSQLiteDatabase db = getWritableDatabase();\n\t\tString[][] selectedData = null;\n\t\ttry {\n\t\t\tCursor cur = db.rawQuery(\"Select * From \"+table + \" \"+whereClause, null);\n\t\t\tif(cur !=null) {\n\t\t\t\tif(cur.getCount() != 0) {\n\t\t\t\t\tcur.moveToFirst();\n\t\t\t\t\tselectedData = new String[cur.getCount()][cur.getColumnCount()];\n\t\t\t\t\tfor(int i = 0; i < selectedData.length - 1; i++) {\n\t\t\t\t\t\tcur.moveToNext();\n\t\t\t\t\t\tfor(int j = 0; j < selectedData[i].length - 1; j++) {\n\t\t\t\t\t\t\tselectedData[i][j] = cur.getString(j);\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} catch(Exception e) {\n\t\t\te.printStackTrace();\n\t\t} finally {\n\t\t\tif(db != null) {\n\t\t\t\tdb.close();\n\t\t\t}\n\t\t}\n\t\treturn selectedData;\n\t}", "public ExitQuestionsMap[] findByDynamicWhere(String sql, Object[] sqlParams) throws ExitQuestionsMapDaoException {\n\t\t// declare variables\n\t\tfinal boolean isConnSupplied = (userConn != null);\n\t\tConnection conn = null;\n\t\tPreparedStatement stmt = null;\n\t\tResultSet rs = null;\n\t\ttry{\n\t\t\t// get the user-specified connection or get a connection from the ResourceManager\n\t\t\tconn = isConnSupplied ? userConn : ResourceManager.getConnection();\n\t\t\t// construct the SQL statement\n\t\t\tfinal String SQL = SQL_SELECT + \" WHERE \" + sql;\n\t\t\tif (logger.isDebugEnabled()){\n\t\t\t\tlogger.debug(\"Executing \" + SQL);\n\t\t\t}\n\t\t\t// prepare statement\n\t\t\tstmt = conn.prepareStatement(SQL);\n\t\t\tstmt.setMaxRows(maxRows);\n\t\t\t// bind parameters\n\t\t\tfor (int i = 0; sqlParams != null && i < sqlParams.length; i++){\n\t\t\t\tstmt.setObject(i + 1, sqlParams[i]);\n\t\t\t}\n\t\t\trs = stmt.executeQuery();\n\t\t\t// fetch the results\n\t\t\treturn fetchMultiResults(rs);\n\t\t} catch (Exception _e){\n\t\t\tlogger.error(\"Exception: \" + _e.getMessage(), _e);\n\t\t\tthrow new ExitQuestionsMapDaoException(\"Exception: \" + _e.getMessage(), _e);\n\t\t} finally{\n\t\t\tResourceManager.close(rs);\n\t\t\tResourceManager.close(stmt);\n\t\t\tif (!isConnSupplied){\n\t\t\t\tResourceManager.close(conn);\n\t\t\t}\n\t\t}\n\t}", "public static List<JSONObject> getJSONObject(String SQL){\r\n\r\n //final String SQL = \"select * from articles\";\r\n Connection con = null;\r\n PreparedStatement pst = null;\r\n ResultSet rs = null;\r\n \r\n try{\r\n\r\n con = getConnection();\r\n pst = con.prepareStatement(SQL);\r\n rs = pst.executeQuery();\r\n\r\n }catch(SQLException ex){\r\n\r\n System.out.println(\"Error:\" + ex.getMessage());\r\n\r\n }\r\n\r\n List<JSONObject> resList = JsonService.getFormattedResultSet(rs);\r\n return resList;\r\n\r\n }", "public Faq[] findByDynamicSelect(String sql, Object[] sqlParams) throws FaqDaoException;", "protected String getLoadSql(String table,\r\n Class type,\r\n OrderedMap mapping,\r\n String whereClause) throws DataLayerException {\r\n StringBuffer sql = new StringBuffer(\"select \");\r\n PropertyDescriptor[] pds = null;\r\n boolean isaMap = false;\r\n \r\n try {\r\n isaMap = DatabaseDriver.isaMap(type); \r\n if (! isaMap) {\r\n // POJO\r\n pds = BeanUtils.getPropertyDescriptors(type, mapping);\r\n if (pds == null || pds.length == 0) {\r\n if (type == null) {\r\n throw new DataLayerException(\r\n \"Error creating Insert SQL. Bean Discriptors are missing. Type is NULL.\");\r\n } else {\r\n throw new DataLayerException(\r\n \"Error creating Insert SQL. Bean Discriptors are missing. Type = \"\r\n + type.getName());\r\n } \r\n }\r\n boolean first = true;\r\n for (int i = 0; i < pds.length; i++) {\r\n if (!first)\r\n sql.append(\", \");\r\n else\r\n first = false;\r\n sql.append(pds[i].getName());\r\n }\r\n } else {\r\n // Map\r\n boolean first = true;\r\n Iterator it = mapping.iterator();\r\n log.debug(\"Selecting columns:\");\r\n while (it.hasNext()) {\r\n Field field = (Field)it.next();\r\n if (StringUtils.isNullOrEmpty(field.getPattern())) {\r\n log.debug(\" \" + field.getName());\r\n if (! first)\r\n sql.append(\", \");\r\n else\r\n first = false;\r\n sql.append(field.getName());\r\n } \r\n }\r\n }\r\n\r\n sql.append(\" from \");\r\n sql.append(table);\r\n sql.append(\" \");\r\n sql.append(whereClause);\r\n return sql.toString();\r\n } catch (java.lang.Exception e) {\r\n throw new DataLayerException(\"Unable to generate SQL to load data from the database.\",\r\n e);\r\n }\r\n }", "@Override\n\tpublic List<Object[]> handle(ResultSet arg0) throws SQLException {\n\t\tList<Object[]> result = new ArrayList<Object[]>();\n\t\tresult.clear();\n\t\tResultSetMetaData rsmd = arg0.getMetaData();\n\t\tObject[] paraNames = new Object[rsmd.getColumnCount()];\n\t\tfor (int i = 0; i < paraNames.length; i++) {\n\t\t\tparaNames[i] = rsmd.getColumnName(i+1);\n\t\t}\n\t\tresult.add(paraNames);\n\t\twhile (arg0.next()) {\n\t\t\tObject[] values = new Object[paraNames.length];\n\t\t\tfor (int i = 0; i < values.length; i++) {\n\t\t\t\tvalues[i] = arg0.getObject((String)paraNames[i]);\n\t\t\t}\n\t\t\tresult.add(values);\n\t\t}\n\t\t\n\t\t\n\t\treturn result;\n\t}", "ZhuangbeiInfo selectByPrimaryKeySelective(@Param(\"id\") Integer id, @Param(\"selective\") ZhuangbeiInfo.Column ... selective);", "public String[] search(String tableName, String[] keyValue) {\r\n List<String> retVal = new ArrayList<String>();\r\n Connection con = null;\r\n Statement stmt = null;\r\n try {\r\n con = ConnectionManager.getInstance().getConnection(databaseName);\r\n stmt = con.createStatement();\r\n TableObject table = _create(tableName);\r\n if (table != null) {\r\n StringBuffer whereClause = new StringBuffer();\r\n for (int i = 0; i < keyValue.length; i++) {\r\n String[] kV = keyValue[i].split(\"=\");\r\n if (whereClause.length() < 1) {\r\n whereClause.append(\" AND \");\r\n }\r\n int multi = kV[1].indexOf(\",\");\r\n boolean isChar = false;\r\n TableField field = table.fields.get(kV[0]);\r\n isChar = field.fieldType.startsWith(\"VARCHAR\");\r\n if(multi < 0){\r\n if(isChar){\r\n whereClause.append( kV[0] + \" LIKE '%\" + kV[1] + \"%' \");\r\n }else{\r\n field.setValue(kV[1]);\r\n whereClause.append(kV[0] + \" = \" + convertValue(field));\r\n }\r\n }else{\r\n whereClause.append(kV[0] + \" in (\" + kV[0] + \") \");\r\n }\r\n }\r\n String searchQry = \"SELECT \" + table.key + \" FROM \" + tableName + \" WHERE \" + whereClause.toString();\r\n ResultSet rs = stmt.executeQuery(searchQry);\r\n while (rs.next()) {\r\n String keyVal = rs.getString(1);\r\n retVal.add(retrieve(tableName, keyVal));\r\n }\r\n }\r\n\r\n } catch (Exception e) {\r\n Logger.getLogger(Converter.class.getName()).log(Level.SEVERE, null, e);\r\n } finally {\r\n if (stmt != null) {\r\n try {\r\n stmt.close();\r\n } catch (Exception e) {\r\n Logger.getLogger(Converter.class.getName()).log(Level.SEVERE, null, e);\r\n }\r\n }\r\n if (con != null) {\r\n try {\r\n //con.close();\r\n } catch (Exception e) {\r\n Logger.getLogger(Converter.class.getName()).log(Level.SEVERE, null, e);\r\n }\r\n }\r\n }\r\n return (String[])retVal.toArray();\r\n }", "public Cursor getCursorWithRows() {\n Cursor cursor = new SimpleCursor(Query.QueryResult.newBuilder()\n .addFields(Query.Field.newBuilder().setName(\"col1\").setType(Query.Type.INT8).build())\n .addFields(Query.Field.newBuilder().setName(\"col2\").setType(Query.Type.UINT8).build())\n .addFields(Query.Field.newBuilder().setName(\"col3\").setType(Query.Type.INT16).build())\n .addFields(Query.Field.newBuilder().setName(\"col4\").setType(Query.Type.UINT16).build())\n .addFields(Query.Field.newBuilder().setName(\"col5\").setType(Query.Type.INT24).build())\n .addFields(Query.Field.newBuilder().setName(\"col6\").setType(Query.Type.UINT24).build())\n .addFields(Query.Field.newBuilder().setName(\"col7\").setType(Query.Type.INT32).build())\n .addFields(Query.Field.newBuilder().setName(\"col8\").setType(Query.Type.UINT32).build())\n .addFields(Query.Field.newBuilder().setName(\"col9\").setType(Query.Type.INT64).build())\n .addFields(Query.Field.newBuilder().setName(\"col10\").setType(Query.Type.UINT64).build())\n .addFields(\n Query.Field.newBuilder().setName(\"col11\").setType(Query.Type.FLOAT32).build())\n .addFields(\n Query.Field.newBuilder().setName(\"col12\").setType(Query.Type.FLOAT64).build())\n .addFields(\n Query.Field.newBuilder().setName(\"col13\").setType(Query.Type.TIMESTAMP).build())\n .addFields(Query.Field.newBuilder().setName(\"col14\").setType(Query.Type.DATE).build())\n .addFields(Query.Field.newBuilder().setName(\"col15\").setType(Query.Type.TIME).build())\n .addFields(\n Query.Field.newBuilder().setName(\"col16\").setType(Query.Type.DATETIME).build())\n .addFields(Query.Field.newBuilder().setName(\"col17\").setType(Query.Type.YEAR).build())\n .addFields(\n Query.Field.newBuilder().setName(\"col18\").setType(Query.Type.DECIMAL).build())\n .addFields(Query.Field.newBuilder().setName(\"col19\").setType(Query.Type.TEXT).build())\n .addFields(Query.Field.newBuilder().setName(\"col20\").setType(Query.Type.BLOB).build())\n .addFields(\n Query.Field.newBuilder().setName(\"col21\").setType(Query.Type.VARCHAR).build())\n .addFields(\n Query.Field.newBuilder().setName(\"col22\").setType(Query.Type.VARBINARY).build())\n .addFields(Query.Field.newBuilder().setName(\"col23\").setType(Query.Type.CHAR).build())\n .addFields(Query.Field.newBuilder().setName(\"col24\").setType(Query.Type.BINARY).build())\n .addFields(Query.Field.newBuilder().setName(\"col25\").setType(Query.Type.BIT).build())\n .addFields(Query.Field.newBuilder().setName(\"col26\").setType(Query.Type.ENUM).build())\n .addFields(Query.Field.newBuilder().setName(\"col27\").setType(Query.Type.SET).build())\n .addRows(Query.Row.newBuilder().addLengths(\"-50\".length()).addLengths(\"50\".length())\n .addLengths(\"-23000\".length()).addLengths(\"23000\".length())\n .addLengths(\"-100\".length()).addLengths(\"100\".length()).addLengths(\"-100\".length())\n .addLengths(\"100\".length()).addLengths(\"-1000\".length()).addLengths(\"1000\".length())\n .addLengths(\"24.52\".length()).addLengths(\"100.43\".length())\n .addLengths(\"2016-02-06 14:15:16\".length()).addLengths(\"2016-02-06\".length())\n .addLengths(\"12:34:56\".length()).addLengths(\"2016-02-06 14:15:16\".length())\n .addLengths(\"2016\".length()).addLengths(\"1234.56789\".length())\n .addLengths(\"HELLO TDS TEAM\".length()).addLengths(\"HELLO TDS TEAM\".length())\n .addLengths(\"HELLO TDS TEAM\".length()).addLengths(\"HELLO TDS TEAM\".length())\n .addLengths(\"N\".length()).addLengths(\"HELLO TDS TEAM\".length())\n .addLengths(\"1\".length()).addLengths(\"val123\".length())\n .addLengths(\"val123\".length()).setValues(ByteString\n .copyFromUtf8(\"-5050-2300023000-100100-100100-1000100024.52100.432016-02-06 \" +\n \"14:15:162016-02-0612:34:562016-02-06 14:15:1620161234.56789HELLO TDS TEAMHELLO TDS TEAMHELLO\"\n +\n \" TDS TEAMHELLO TDS TEAMNHELLO TDS TEAM1val123val123\"))).build());\n return cursor;\n }", "public String get2dQuery() throws SQLException {\r\n String temp = \"\";\r\n String utemp = \"\";\r\n String sqlstr = \"\";\r\n String temp1 = \"\";\r\n String in_qry = \"\";\r\n\r\n int nocol = 0;\r\n\r\n Connection con = null;\r\n CallableStatement st = null;\r\n ResultSet rs = null;\r\n ProgenConnection pg = null;\r\n// pg = new ProgenConnection();\r\n nonViewByList = new ArrayList();\r\n nonViewByListRT = new ArrayList();\r\n\r\n\r\n sqlstr = this.headerQuery;\r\n nonViewbyColumnList = null;\r\n try {\r\n\r\n con = getConnection(this.elementIdForConn);\r\n st = con.prepareCall(sqlstr);\r\n rs = st.executeQuery();\r\n\r\n\r\n\r\n\r\n int i = 1;\r\n\r\n while (rs.next()) {\r\n temp = rs.getString(1).replace(\"'\", \"''\");\r\n /*\r\n * if (temp.length()>=30) temp1= temp.substring(1,20) +\"..\"\r\n * +temp.substring(temp.length()-5,temp.length()-1); else\r\n temp1=temp;\r\n */\r\n temp1 = \"A\" + i;\r\n i++;\r\n\r\n //temp1= temp1.replace(\" & \",\"\");\r\n\r\n if (nonViewbyColumnList == null) {\r\n nonViewbyColumnList = temp;\r\n } else {\r\n nonViewbyColumnList += \",\" + temp;\r\n }\r\n nonViewByList.add(temp1);\r\n nonViewByListRT.add(temp1);\r\n nonViewByMap.put(temp1, temp);\r\n if (this.summReq.equalsIgnoreCase(\"COUNTDISTINCT\")) {\r\n utemp = utemp + \" , nvl( count (distinct ( Case when \" + headerViewByCol + \" = '\" + temp + \"' then \" + this.measureName + \" else null end )) ,0) \\\"\" + temp1 + \"\\\" \";\r\n } else {\r\n utemp = utemp + \" , nvl(\" + this.summReq + \"( Case when \" + headerViewByCol + \" = '\" + temp + \"' then \" + this.measureName + \" else null end ) ,0) \\\"\" + temp1 + \"\\\" \";\r\n }\r\n\r\n nocol = nocol + 1;\r\n }\r\n } catch (SQLException e) {\r\n logger.error(\"Exception:\", e);\r\n } finally {\r\n if (rs != null) {\r\n rs.close();\r\n }\r\n if (st != null) {\r\n st.close();\r\n }\r\n if (con != null) {\r\n con.close();\r\n }\r\n }\r\n\r\n temp = \"\";\r\n sqlstr = \"\";\r\n //nonViewByListRT.add(\"r_total\");\r\n //nonViewByMap.put(\"r_total\", \"Total\");\r\n\r\n\r\n\r\n\r\n {\r\n in_qry = \"\";\r\n in_qry = in_qry + \" select \" + viewByCol + \" \";\r\n in_qry = in_qry + utemp + \" \";\r\n //in_qry = in_qry + utemp + \" , nvl(\" + this.summReq + \" ( \" + this.measureName + \" ),0 ) \\\"r_total\\\" \";\r\n in_qry = in_qry + this.fromTables;\r\n in_qry = in_qry + this.whereClause;\r\n in_qry = in_qry + \"group by \" + viewByColGroup + \" , \" + orderByColGroup + \" \";\r\n if (this.summReq.equalsIgnoreCase(\"COUNTDISTINCT\")) {\r\n in_qry = in_qry + \" having nvl(ABS( count(distinct ( \" + this.measureName + \" ) )),0 ) >0 \";\r\n } else {\r\n in_qry = in_qry + \" having nvl(ABS(\" + this.summReq + \" ( \" + this.measureName + \" ) ),0 ) >0 \";\r\n }\r\n if (defaultSortedColumn != null && !\"\".equalsIgnoreCase(defaultSortedColumn)) {\r\n if (!defaultSortedColumn.equalsIgnoreCase(\"Time\")) {\r\n //in_qry = in_qry + \"order by \" + orderByColGroup + \" \";\r\n in_qry = in_qry + \"order by \" + defaultSortedColumn + \" \";\r\n }\r\n } else {\r\n in_qry = in_qry + \"order by \" + orderByColGroup + \" \";\r\n //in_qry = in_qry + \"order by \" + \"A_\" + defaultSortedColumn + \" \";\r\n }\r\n\r\n //in_qry = in_qry + \"order by \" + orderByColGroup + \" \";\r\n\r\n\r\n sqlstr = in_qry;\r\n\r\n }\r\n return sqlstr;\r\n }", "public ResultSet getResultSetFromGivenQuery(Connection connection, String selectQuery) throws SQLException {\n\t\t stmt = connection.createStatement (ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.CONCUR_READ_ONLY);\n\t\t resultSet = stmt.executeQuery (selectQuery); \n\n\t\treturn resultSet;\n\t}", "public static JSONArray query(String sql, Connection conn) throws Exception\r\n\t{\n\t\tStatement st=null;\r\n\t\ttry {\r\n\t\t\tSystem.out.println(\"SQL to execute : \"+sql);\r\n\t\t\tst = conn.createStatement();\r\n\t\t\tResultSet rs=st.executeQuery(sql);\r\n\t\t\t\r\n\t\t\treturn resultToJson(rs);\r\n\t\t} catch (Exception e) {\r\n\t\t\te.printStackTrace();\r\n\r\n\t\t\tthrow new Exception(e.getMessage());\r\n\t\t}\r\n\t\tfinally\r\n\t\t{\r\n\t\t\tif ( st != null)\r\n\t\t\t\tst.close();\r\n//\t\t\tconn.close();\r\n\t\t}\r\n\t}", "public static ResultSet getData(String tableName) throws SQLException, ClassNotFoundException {\n Connection connection = OracleConnector.getConnection();\n Statement statement = connection.createStatement();\n String query = \"SELECT * FROM \" + tableName;\n\n return statement.executeQuery(query);\n }", "List<ReportPair> getParameterValues(String hsql);" ]
[ "0.65408707", "0.63828987", "0.6352846", "0.6295555", "0.62664926", "0.6090925", "0.6079106", "0.606163", "0.5990623", "0.59111905", "0.58930176", "0.5875889", "0.58714145", "0.5849658", "0.584651", "0.58182955", "0.58139056", "0.57940257", "0.57733405", "0.57448596", "0.57157356", "0.5664339", "0.5642902", "0.56409955", "0.5636738", "0.5629247", "0.5622806", "0.5607184", "0.55797267", "0.55793184", "0.5560297", "0.5546876", "0.5542784", "0.55309254", "0.5519636", "0.55132794", "0.5495086", "0.54902923", "0.54829514", "0.5478375", "0.54746675", "0.54694414", "0.5464896", "0.5453309", "0.5452074", "0.54484665", "0.54460233", "0.544515", "0.54426974", "0.5438935", "0.54374975", "0.5433395", "0.54311794", "0.5429843", "0.5425834", "0.5411402", "0.5398244", "0.53924453", "0.5385078", "0.5376343", "0.5367426", "0.5360646", "0.53440243", "0.5340288", "0.53389955", "0.532859", "0.53283113", "0.5319548", "0.53131175", "0.53062344", "0.53046703", "0.5304483", "0.53006923", "0.5297626", "0.52956396", "0.5290476", "0.5287952", "0.5286307", "0.5276317", "0.5274965", "0.5273093", "0.526503", "0.52561826", "0.52560616", "0.52548224", "0.52495456", "0.5247606", "0.52421105", "0.5240642", "0.52381605", "0.52337414", "0.5226384", "0.5222081", "0.5215267", "0.52148736", "0.5214257", "0.52101344", "0.52055997", "0.5203109", "0.51974505" ]
0.7347453
0
TODO Autogenerated method stub
@Override public void onUpgrade(SQLiteDatabase arg0, int arg1, int arg2) { }
{ "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
Instantiates a new Change scene event.
public ChangeSceneEvent(String param) { super(SCENE_CHANGE_EVENT_TYPE); this.param = param; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected void changeScene(ActionEvent event,String fxmlPage) throws IOException {\n\t\tParent root = FXMLLoader.load(getClass().getResource(fxmlPage));\n\t\tScene scene = new Scene(root);\n\t\tStage stage = (Stage)((Node)event.getSource()).getScene().getWindow();\n\t\tstage.setScene(scene);\n\t}", "public void setScene(final Scene newScene) {\n }", "protected void changeScene(MouseEvent event,String fxmlPage) throws IOException {\n\t\tParent root = FXMLLoader.load(getClass().getResource(fxmlPage));\n\t\tScene scene = new Scene(root);\n\t\tStage stage = (Stage)((Node)event.getSource()).getScene().getWindow();\n\t\tstage.setScene(scene);\n\t}", "protected void changeScene(ActionEvent event,Parent root) throws IOException {\n\t\tScene scene = new Scene(root);\n\t\tStage stage = (Stage)((Node)event.getSource()).getScene().getWindow();\n\t\tstage.setScene(scene);\n\t}", "public void switchScene(javafx.event.ActionEvent event) throws IOException {\n //clicking this button will go to main menu with all the command for the application.\n setscence(event,\"Main Menu.fxml\");\n\n\n }", "public void setNewScene() {\n switch (game.getCurrentRoomId()) {\n case 14:\n WizardOfTreldan.setFinishScene();\n break;\n\n }\n }", "protected void changeScene(MouseEvent event,Parent root) throws IOException {\n\t\tScene scene = new Scene(root);\n\t\tStage stage = (Stage)((Node)event.getSource()).getScene().getWindow();\n\t\tstage.setScene(scene);\n\t}", "public void changeScenes(ActionEvent event, String viewName, String title) throws IOException\r\n {\r\n //load the .fxml file\r\n FXMLLoader loader = new FXMLLoader();\r\n loader.setLocation(getClass().getResource(viewName));\r\n Parent parent = loader.load();\r\n \r\n //create the scene\r\n Scene scene = new Scene(parent);\r\n \r\n //get the stage (window) from the event passed in\r\n Stage stage = (Stage)((Node)event.getSource()).getScene().getWindow();\r\n \r\n stage.setTitle(title);\r\n stage.setScene(scene);\r\n stage.show();\r\n }", "public void backToStartScene(ActionEvent event) throws IOException {\r\n Parent startView = FXMLLoader.load(Main.class.getResource(\"fxml/StartScene.fxml\"));\r\n Scene startViewScene = new Scene(startView);\r\n\r\n // This line gets the Stage information (no Stage is passed in)\r\n Stage window = (Stage) ((Node)event.getSource()).getScene().getWindow();\r\n\r\n window.setScene(startViewScene);\r\n window.show();\r\n }", "public void setScene(Scene scene){\n this.scene = scene;\n }", "public void createScene();", "private void changeSceneTo(Parent node) {\n\t\tfinal Scene scene = new Scene(node);\n\t\tstage.setScene(scene);\n\t}", "void createScene(){\n\t\tmainScene = new Scene(mainPane);\r\n\t\t\r\n\t\t//If keyEvent is not focussed on a node on the scene, you can attach\r\n\t\t//a keyEvent to a scene to be consumed by the screen itself.\r\n\t\tCloser closer = new Closer();\r\n\t\tmainScene.setOnKeyPressed(closer);\r\n\t}", "public void sceneManage(String address, ActionEvent event) throws IOException {\n stage = (Stage) ((Button) event.getSource()).getScene().getWindow();\n scene = FXMLLoader.load(getClass().getResource(address));\n stage.setScene(new Scene(scene));\n stage.show();\n }", "public void sceneManage(String address, ActionEvent event) throws IOException {\n stage = (Stage) ((Button) event.getSource()).getScene().getWindow();\n scene = FXMLLoader.load(getClass().getResource(address));\n stage.setScene(new Scene(scene));\n stage.show();\n }", "public void changeScenes(ActionEvent event, String viewName, String title, \r\n Employee employee, ControllerInterface controllerInterface ) throws IOException\r\n {\r\n //load the .fxml file\r\n FXMLLoader loader = new FXMLLoader();\r\n loader.setLocation(getClass().getResource(viewName));\r\n Parent parent = loader.load();\r\n \r\n Scene scene = new Scene(parent);\r\n \r\n //access the controller class and preload the employee\r\n controllerInterface = loader.getController();\r\n controllerInterface.preloadData(employee);\r\n \r\n //get the stage (window) from the event passed in\r\n Stage stage = (Stage)((Node)event.getSource()).getScene().getWindow();\r\n \r\n stage.setTitle(title);\r\n stage.setScene(scene);\r\n stage.show();\r\n }", "public void handleNewGameEvent(ActionEvent event) {\n\t\tgame.startNewGame();\n\t}", "@Override\n\t\t\tpublic void changed(ChangeEvent event, Actor actor) {\n\t\t\t\tgame.setScreen(new MainMenuScreen(game));\n\t\t\t}", "public void setScene(String scene) {\n\t\tthis.scene = scene;\n\t}", "@Override\n public void changed(ChangeEvent event, Actor actor) {\n game.changeScreen(RPGMain.DEBUG);\n }", "@Override\n public void changed(ChangeEvent event, Actor actor) {\n game.changeScreen(RPGMain.DEBUG);\n }", "@Override\npublic void populateScene() {\n\t\n}", "public void changeView(ActionEvent e) {\n\t\ttry {\n\t\t\t/* Loads the secondary FXML Scene */\n\t\t\tParent root = FXMLLoader.load(getClass().getResource(\"/FXML/MainFXML.fxml\"));\n\t\t\tSystem.out.println(\"MainFXML.fxml has loaded successfully.\");\n\t\t\tScene scene = new Scene(root);\n\t\t\t// Capture the original stage\n\t\t\tStage window = (Stage) ((Node)e.getSource()).getScene().getWindow();\n\t\t\twindow.setScene(scene);\n\t\t\twindow.show();\n\t\t\tSystem.out.println(\"View has been changed successfully.\");\n\t\t} catch (IOException e1) {\n\t\t\tSystem.err.println(\"Error! IOException. (This should never happen)\");\n\t\t\te1.printStackTrace();\n\t\t}\n\t}", "@Override\n public void changed(ChangeEvent event, Actor actor) {\n game.setScreen(gameScreen);\n }", "@FXML\n private void goToAddEvent(ActionEvent event){\n SceneManager.navigate(SceneName.ADDEVENT);\n }", "public Scene getPrimaryScene() {\n VBox myBox = new VBox(15);\r\n myBox.setAlignment(Pos.CENTER);\r\n\r\n // Creating an Image object and something to hold the image (ImageViewer)\r\n // so we can view it later\r\n Image image = new Image(imageNames[0], 400, 400, true, true);\r\n ImageView imView = new ImageView(image);\r\n\r\n // Creating buttons\r\n Button myButton = new Button(\"Click to Change Memes\");\r\n Button sceneButton = new Button(\"Click to Leave\");\r\n\r\n // Setting what the change meme button will do when someone presses it\r\n myButton.setOnAction(e -> {\r\n Random rand = new Random();\r\n int randInt = rand.nextInt(imageNames.length);\r\n imView.setImage(new Image(imageNames[randInt], 400, 400, true, true));\r\n });\r\n // Alternative way to write above code using an anonymous inner class\r\n // myButton.setOnAction(new EventHandler<Event>() {\r\n // public void handle(Event e) {\r\n // Random rand = new Random();\r\n // int randInt = rand.nextInt(imageNames.length);\r\n // imView.setImage(new Image(imageNames[randInt], 400, 400, true, true));\r\n // }\r\n // })\r\n\r\n // Setting what the leave button will do\r\n sceneButton.setOnAction(e -> {\r\n Scene secondaryScene = getSecondaryScene();\r\n primaryStage.setScene(secondaryScene);\r\n primaryStage.show();\r\n });\r\n\r\n // Adding our ImageViewer and Buttons onto the VBox\r\n myBox.getChildren().addAll(imView, myButton, sceneButton);\r\n // Actually instantiating the scene with the VBox containing everything\r\n Scene primaryScene = new Scene(myBox, 450, 450);\r\n // Returning the scene\r\n return primaryScene;\r\n }", "public Scene() {}", "public Scene(String name) {\r\n\t\tthis.name = name;\r\n\t}", "public void switchScene(IsScene newScene) {\n\n window.setScene(newScene.createAndReturnScene());\n scenesSeen.push(newScene);\n currentScene = newScene;\n }", "private void changeScene(String scene){\n switch (scene) {\n case \"Passwords\" -> {\n this.addNewScene.setVisible(false);\n this.generateScene.setVisible(false);\n this.passwordsScene.setVisible(true);\n }\n case \"Add New\" -> {\n this.generateScene.setVisible(false);\n this.passwordsScene.setVisible(false);\n this.addNewScene.setVisible(true);\n }\n case \"Generate\" -> {\n this.generateScene.setVisible(true);\n this.passwordsScene.setVisible(false);\n this.addNewScene.setVisible(true);\n }\n }\n }", "@FXML\n public void ClientScene(ActionEvent event) throws IOException\n {\n Parent clientViewParent = FXMLLoader.load(getClass().getResource(\"connection.fxml\")); //load \"connection.fxml\"\n Scene clientViewScene = new Scene(clientViewParent);\n \n Stage window = (Stage)((Node)event.getSource()).getScene().getWindow(); //take stage from the event\n \n window.setTitle(\"Client chat\");\n window.setScene(clientViewScene);\n window.show();\n }", "protected void checkForChange()\n {\n double changeRatio = _sceneChangeListener.check();\n _sceneChangeValueSlot.setValue(changeRatio);\n\n /*\n * if the ratio exceeds threshold, and hasn't already, set the flag\n */\n if (_resetTimedEvent == null && changeRatio >= getSceneChangeThreshold())\n {\n _sceneChangeFlagSlot.setValue(Boolean.TRUE);\n\n /*\n * queue up the reset. We want to reset the scene-changed flag after\n * visual onset duration.\n */\n double now = ACTRRuntime.getRuntime().getClock(_model).getTime();\n double resetTime = _visualModule.getVisualMemory().getNewFINSTOnsetDuration();\n _resetTimedEvent = new AbstractTimedEvent(now, now + resetTime) {\n @Override\n public void fire(double currentTime)\n {\n super.fire(currentTime);\n clearFlag();\n }\n\n @Override\n public void abort()\n {\n super.abort();\n clearFlag();\n }\n };\n\n // queue it up\n _model.getTimedEventQueue().enqueue(_resetTimedEvent);\n }\n }", "public void newClubEvent() {\n \n // Capture current category selection, if any\n String selectedTags = \"\";\n TagsNode tags = (TagsNode)tagsTree.getLastSelectedPathComponent();\n if (tags != null) {\n selectedTags = tags.getTagsAsString();\n } \n \n boolean modOK = modIfChanged();\n \n if (modOK) {\n position = new ClubEventPositioned();\n position.setIndex (clubEventList.size());\n localPath = \"\";\n display();\n clubEventPanel1.getStatusTextSelector().setText (selectedTags);\n }\n }", "@Override\r\n\tpublic void handle(ActionEvent event) {\n\t\ttry {\r\n\t\t\tParent root = FXMLLoader.load(getClass().getResource(\"Roomless\"));\r\n\t\t\tMain.stage.setScene (new Scene(root, 700, 500));\r\n\t\t\tMain.stage.show();\r\n\t\t} catch (Exception exception) {\r\n\t\t\texception.printStackTrace();\r\n\t\t}\r\n\t}", "@FXML\r\n public void moveToMainScene(ActionEvent event) throws IOException {\r\n isRunning = false;\r\n cv.changeScene(\"/start/start.fxml\", event);\r\n }", "public void setScene(Node scene) {\r\n\t\tthis.scene = scene;\r\n\t}", "@Override\n\tpublic void onShow(Scene previousScene) {\n\t}", "public static Scene createManagerScene(Scene oldScene) {\r\n\t\t\r\n\t\t//TODO: Update the label to provide clear instructions\r\n\t\tLabel instr = new Label(\"Select a manager action:\");\r\n\t\t\r\n\t\t//TODO: Add the buttons for each action available to managers\r\n\t\tButton summary = new Button(\"Summary Report\");\r\n\t\tButton previous = new Button(Interface.USER_SELECT);\r\n\t\t\r\n\t\t//Setting margins on buttons' top and bottom\r\n\t\tVBox.setMargin(summary, new Insets(5, 0, 5, 0));\r\n\t\tVBox.setMargin(previous, new Insets(5, 0, 5, 0));\r\n\t\t\r\n\t\tsummary.setOnAction(e -> ManagerScenes.createSummaryReport());\r\n\t\tprevious.setOnAction(e -> Interface.setWindowScene(oldScene));\r\n\t\t\r\n\t\t//TODO: Change this to a better looking layout\r\n\t\tVBox root = new VBox();\r\n\t\troot.setAlignment(Pos.BASELINE_CENTER);\r\n\t\troot.getChildren().addAll(instr, summary, previous);\r\n\t\t\r\n\t\treturn (new Scene(root, Interface.HEIGHT, Interface.WIDTH));\r\n\t\t\r\n\t}", "@Override\n\t\t\tpublic void changed(ChangeEvent event, Actor actor) {\n\t\t\t\tbuttonSound.play((game.setting.sfxVol()*(game.setting.masterVol()/100))/100);\n\t\t\t\t//screen.getActions().makeArt(typeSelBox.getSelectedIndex(), subjectSelBox.getSelectedIndex());\n\t\t\t\t\n\t\t\t\t// Call player actor to make art\n\t\t\t\tGameScreen screen = (GameScreen)game.getScreen();\n\t\t\t\t\n\t\t\t\t// If you can make art, make art\n\t\t\t\tif(screen.getActions().canMakeArt(typeSelBox.getSelectedIndex()))\t\n\t\t\t\t\tscreen.getPlayer().makeArt(typeSelBox.getSelectedIndex(), subjectSelBox.getSelectedIndex());\n\n\t\t\t\tclosePopups();\n\t\t\t}", "@Override\n public void handle(ActionEvent event) \n {\n // Call the changeLAbels method with parameter of 1.\n selection = 1;\n changeLabels(selection);\n\n // Set the scene to the user input form\n primaryStage.setScene(sceneForm);\n }", "@FXML\n public void ServerScene(ActionEvent event) throws IOException\n {\n Parent clientViewParent = FXMLLoader.load(getClass().getResource(\"server.fxml\")); //load \"server.fxml\"\n Scene clientViewScene = new Scene(clientViewParent);\n \n Stage window = (Stage)((Node)event.getSource()).getScene().getWindow(); //take stage from the event\n \n window.setTitle(\"Server chat\");\n window.setScene(clientViewScene);\n window.show();\n }", "void chang_scene_method(String FXML_Name) {\n try {\n AnchorPane pane = FXMLLoader.load(getClass().getResource(FXML_Name));\n anchorPane.getChildren().setAll(pane);\n } catch (IOException e) {\n JOptionPane.showMessageDialog(null, \"Error: \" + e);\n }\n }", "@FXML\n final void btnNewGamePress() {\n new Thread(() -> sceneHandler.setActiveScene(GameScene.GAME_TYPE_SELECT)).start();\n }", "@Override\n\tpublic void onShowScene() {\n\t\t\n\t}", "public void goToAddPartScene(ActionEvent event) throws IOException {\n Parent addPartParent = FXMLLoader.load(getClass().getResource(\"AddPart.fxml\"));\n Scene addPartScene = new Scene(addPartParent);\n\n Stage window = (Stage) ((Node)event.getSource()).getScene().getWindow();\n\n window.setScene(addPartScene);\n window.show();\n }", "public void setJBJScene(ActionEvent e) throws IOException {\n //System.out.println(\"Creating the scene for tic tac toe\");\n\n game = new JellyBeanJar(); // Create instance of JellyBeanJar\n //System.out.println(\"Class: \" + game.getClass().toString());\n\n // Get instance of the loader class\n FXMLLoader loader = new FXMLLoader(getClass().getResource(\"/FXML/JellyBeanJarFXML.fxml\"));\n Parent gameroot = loader.load(); // Load view into parent\n myctr = loader.getController();\n gameroot.getStylesheets().add(\"Styles/jelly-bean-jar.css\"); // Set style\n\n pScore = cScore = min = 0;\n max = 1000;\n\n myctr.setMinMaxLabel();\n\n root.getScene().setRoot(gameroot);\n }", "public void goToModifyPartScene(ActionEvent event) throws IOException {\n\n if(partTableView.getSelectionModel().isEmpty())\n {\n alert.setAlertType(Alert.AlertType.ERROR);\n alert.setContentText(\"Please make sure you've added a Part and selected the Part you want to modify.\");\n alert.show();\n } else {\n int i = partTableView.getSelectionModel().getFocusedIndex();\n setFocusedIndex(i);\n Parent addPartParent = FXMLLoader.load(getClass().getResource(\"ModifyPart.fxml\"));\n Scene modifyPartScene = new Scene(addPartParent);\n\n Stage window = (Stage) ((Node)event.getSource()).getScene().getWindow();\n\n window.setScene(modifyPartScene);\n window.show();\n }\n\n\n }", "@FXML\r\n private void logO(ActionEvent e) throws IOException {\r\n Scene ownerLog = new Scene(FXMLLoader.load(getClass().getResource(\"../sample/Owner/OwnerLog.fxml\")));\r\n Main.ps.setScene(ownerLog);\r\n }", "public void changeScene(final View view) {\n try {\n Parent viewHierarchy = loadHierarchy(view.getFXMLPath());\n Scene scene = new Scene(viewHierarchy);\n currStage.setScene(scene);\n currStage.show();\n\n } catch (Exception e) {\n System.err.print(\"\");\n }\n }", "@Override\r\n\tpublic void createScene() {\n\t\tthis.setBackground(new Background(255, 255, 255));\r\n\t\tsLogo = new Sprite(BaseActivity.WIDTH / 2, BaseActivity.HEIGHT / 2, logoRegion.getWidth() * 1.23f, logoRegion.getHeight() * 1.23f, logoRegion, engine.getVertexBufferObjectManager());\r\n\t\tthis.attachChild(sLogo);\r\n\t\tSystem.out.println(\"stufff\");\r\n\t\t\r\n\t\tengine.registerUpdateHandler(new TimerHandler(0.2f, new ITimerCallback() \r\n\t {\r\n\t public void onTimePassed(final TimerHandler pTimerHandler) \r\n\t {\r\n\t System.out.println(\"stuff1\");\r\n\t engine.unregisterUpdateHandler(pTimerHandler);\r\n\t PlayScene play = new PlayScene(engine, activity, camera);\r\n\t play.createScene();\r\n\t engine.setScene(play);\r\n\t Resources.getInstance().music.setLooping(true);\r\n\t \t\tResources.getInstance().music.play();\r\n\t play.start();\r\n\t }\r\n\t }));\r\n\t}", "public void handle(ActionEvent arg0) {\n\t\t\t\t\n\t\t\t\tGameStage game = new GameStage();\n\t\t\t\tmainStage.setScene(game.getScene());\n\t\t\t\tmainStage.setTitle(\"Pacman 1.0\");\n//\t\t\t\tmainStage.setScene(mainGame.getScene());\n\t\t\t}", "@Override\n protected void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n setContentView(R.layout.activity_main);\n\n arFragment = (ArFragment) getSupportFragmentManager().findFragmentById(R.id.sceneform_ux_fragment);\n\n setUpModel();\n\n bear = findViewById(R.id.bear);\n cat = findViewById(R.id.cat);\n koala = findViewById(R.id.koala);\n lion = findViewById(R.id.lion);\n\n setArrayView();\n\n setClickListener();\n\n arFragment.setOnTapArPlaneListener(new BaseArFragment.OnTapArPlaneListener() {\n @Override\n public void onTapPlane(HitResult hitResult, Plane plane, MotionEvent motionEvent) {\n if (selected == 1){\n Anchor anchor = hitResult.createAnchor();\n AnchorNode anchorNode = new AnchorNode(anchor);\n anchorNode.setParent(arFragment.getArSceneView().getScene());\n\n createModel(anchorNode, selected);\n }\n }\n });\n\n\n }", "public void startGameEventHandler(ActionEvent e) throws IOException {\n appWindow=(Stage)((Node)e.getSource()).getScene().getWindow();\n// appWindow.setScene(gameLevelScene);\n// appWindow.show();\n\n playLevel(1,0,null);\n }", "public void setHomeScene(Scene scene) {\r\n scene1 = scene;\r\n }", "public void setRPSScene(ActionEvent e) throws IOException {\n //System.out.println(\"Creating the scene for rock paper scissors\");\n\n game = new RockPaperScissors(); // Create instance of RockPaperScissors\n //System.out.println(\"Class: \" + game.getClass().toString());\n\n // Get instance of the loader class\n FXMLLoader loader = new FXMLLoader(getClass().getResource(\"/FXML/RockPaperScissorsFXML.fxml\"));\n Parent gameroot = loader.load(); // Load view into parent\n myctr = loader.getController();\n gameroot.getStylesheets().add(\"/Styles/rock-paper-scissors.css\"); // Set style\n\n pScore = cScore = 0; // Reset components\n\n root.getScene().setRoot(gameroot); // Update scene graph\n }", "@Override\r\n\tpublic void onPopulateScene(Scene pScene,\r\n\t\t\tOnPopulateSceneCallback pOnPopulateSceneCallback) throws Exception {\r\n\t\t\r\n\t\t// We will create a timer-handler to handle the duration\r\n\t\t// in which the splash screen is shown\r\n\t\tmEngine.registerUpdateHandler(new TimerHandler(4, new ITimerCallback(){\r\n\t\t\r\n\t\t// Override ITimerCallback's 'onTimePassed' method to allow\r\n\t\t// us to control what happens after the timer duration ends\r\n\t\t@Override\r\n\t\tpublic void onTimePassed(TimerHandler pTimerHandler) {\r\n\t\t\t// When 4 seconds is up, switch to our menu scene\r\n\t\t\tmEngine.setScene(mMenuScene);\r\n\t\t\t}\r\n\t\t}));\r\n\r\n\t\tpOnPopulateSceneCallback.onPopulateSceneFinished();\t\r\n\t}", "@Override\n\t\t\t\t\tpublic void handle(ActionEvent event) {\n\t\t\t\t\t\tint eventSelection = eventOptions.getSelectionModel().getSelectedIndex();\n\t\t\t\t\t\tString description = new String(descriptionField.getText());\n\t\t\t\t\t\tdouble priceFactor = Double.parseDouble(priceFactorField.getText());\n\n\t\t\t\t\t\tif (eventSelection == 0) {\n\t\t\t\t\t\t\tConcert selection = new Concert(description, priceFactor);\n\t\t\t\t\t\t\tevents.add(selection);\n\t\t\t\t\t\t\tcounter++;\n\t\t\t\t\t\t\tmessage.setText(\"Concert event created.\\n\");\n\t\t\t\t\t\t} else if (eventSelection == 1) {\n\t\t\t\t\t\t\tPlay selection = new Play(description, priceFactor);\n\t\t\t\t\t\t\tevents.add(selection);\n\t\t\t\t\t\t\tcounter++;\n\t\t\t\t\t\t\tmessage.setText(\"Play event created.\\n\");\n\t\t\t\t\t\t} else if (eventSelection == 2) {\n\t\t\t\t\t\t\tMeeting selection = new Meeting(description, priceFactor);\n\t\t\t\t\t\t\tevents.add(selection);\n\t\t\t\t\t\t\tcounter++;\n\t\t\t\t\t\t\tmessage.setText(\"Meeting event created.\\n\");\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tmessage.setText(\"Please choose Concert, Play, or Meeting from the Event Options list.\\n\");\n\t\t\t\t\t\t}\n\t\t\t\t\t\tprimaryStage.setTitle(\"Events\");\n\t\t\t\t\t\tprimaryStage.setScene(scene);\n\t\t\t\t\t}", "public void goToAddProductScene(ActionEvent event) throws IOException {\n Parent addProductParent = FXMLLoader.load(getClass().getResource(\"AddProduct.fxml\"));\n Scene addProductScene = new Scene(addProductParent);\n\n Stage window = (Stage) ((Node)event.getSource()).getScene().getWindow();\n\n window.setScene(addProductScene);\n window.show();\n }", "private void setTheScene()\n {\n board.setLocalRotation(Quaternion.IDENTITY);\n board.rotate(-FastMath.HALF_PI, -FastMath.HALF_PI, 0);\n board.setLocalTranslation(0, 0, -3);\n\n cam.setLocation(new Vector3f(0, 0, 10));\n cam.lookAt(Vector3f.ZERO, Vector3f.UNIT_Y);\n }", "private void changeScene(URL sceneFXML, Object controllerObject) {\n\t\ttry {\n\t\t\tUtilMethods.changeScene(sceneFXML, controller.getStage(), controllerObject);\n\t\t\tcontroller.getStage().setResizable(false);\n\t\t\tcontroller.getStage().setMaximized(false);\n\n\t\t} catch (Exception e) {\n\t\t\tLOGGER.error(\"Error al modifcar la ventana de JavaFX: {}\", e);\n\t\t}\n\t}", "@Override\n protected Scene onCreateScene() {\n this.getWindowManager().getDefaultDisplay().getMetrics(metrics);\n this.mEngine.registerUpdateHandler(new FPSLogger());\n inventoryEntity.attachChild(new Rectangle(0,0,125,780,new VertexBufferObjectManager()));\n viennaPracticeScene.attachChild(inventoryEntity);\n\n final Entity doorEntity = new Entity(50,270,100,100);\n Rectangle r = new Rectangle(0,0,120,300,new VertexBufferObjectManager());\n r.setSkewY(-20);\n r.setColor(Color.BLACK);\n doorEntity.attachChild(r);\n viennaPracticeScene.attachChild(doorEntity);\n\n final Entity beethovenEntity = new Entity(CAMERA_WIDTH/2,CAMERA_HEIGHT/2);\n beethovenEntity.attachChild(beethovenSprite);\n viennaPracticeScene.attachChild(beethovenEntity);\n\n final Text beethovenSpeech = new Text(0, 70, this.font, \"...Alas!\\nI, the great Beethoven, have broken my strings!\", this.getVertexBufferObjectManager());\n beethovenSpeech.setWidth(850);\n beethovenSpeech.setAutoWrap(AutoWrap.NONE);\n beethovenSpeech.setHorizontalAlign(HorizontalAlign.CENTER);\n\n guitarStringSprite.setColor(Color.WHITE);\n guitarStringSprite.setOnClickListener(new ButtonSprite.OnClickListener() {\n @Override\n public void onClick(ButtonSprite pButtonSprite, float pTouchAreaLocalX, float pTouchAreaLocalY) {\n toggleColor();\n ViennaPracticeActivity.this.game.handleItemClick(new GuitarStrings(player));\n }\n });\n viennaPracticeScene.registerTouchArea(guitarStringSprite);\n\n beethovenSprite.setOnClickListener(new ButtonSprite.OnClickListener() {\n @Override\n public void onClick(ButtonSprite pButtonSprite, float pTouchAreaLocalX, float pTouchAreaLocalY) {\n beethovenEntity.attachChild(beethovenSpeech);\n Timer timer = new Timer();\n Long delayTime = (long) (30 * 100);\n timer.schedule(new TimerTask() {\n @Override\n public void run() {\n beethovenEntity.detachChild(beethovenSpeech);\n }\n }, delayTime);\n }\n });\n viennaPracticeScene.registerTouchArea(beethovenSprite);\n\n viennaPracticeScene.setOnSceneTouchListener(new IOnSceneTouchListener() {\n @Override\n public boolean onSceneTouchEvent(Scene pScene, TouchEvent pSceneTouchEvent) {\n float xCoordinate = pSceneTouchEvent.getX();\n float yCoordinate = pSceneTouchEvent.getY();\n if (pSceneTouchEvent.isActionDown() && pSceneTouchEvent.getX() < 70) {\n Intent startIntent = new Intent(ViennaPracticeActivity.this.getApplication(), ViennaStreetActivity.class);\n startIntent.putExtra(\"game\", game);\n ViennaPracticeActivity.this.startActivity(startIntent);\n ViennaPracticeActivity.this.finish();\n ViennaPracticeActivity.this.game.switchToScene(jlstanford.bsu.edu.game.Scene.VIENNA_STREET);\n } else if (pSceneTouchEvent.isActionDown() && ((xCoordinate < 335 && xCoordinate > 263) && (yCoordinate < 284 && yCoordinate > 124))) {\n player = ViennaPracticeActivity.this.game.getPlayer();\n ViennaPracticeActivity.this.game.handleItemClick(new GuitarStrings(player));\n ViennaPracticeActivity.this.toastOnUiThread(\"Got Guitar Strings!\");\n loadInventoryItems();\n } else {\n }\n return false;\n }\n });\n\n loadInventoryItems();\n final Sprite spriteBG = new Sprite(405,240,CAMERA_WIDTH,CAMERA_HEIGHT,this.backgroundTiledTextureRegion,this.getVertexBufferObjectManager());\n SpriteBackground bg = new SpriteBackground(spriteBG);\n viennaPracticeScene.setBackground(bg);\n\n return viennaPracticeScene;\n }", "@FXML\n public void MainWindowScene(ActionEvent e) {\n try {\n Parent root = FXMLLoader.load(getClass().getResource(\"MainWindow.fxml\"));\n Main.mainWindow.setScene(new Scene(root));\n } catch (IOException el) {\n el.printStackTrace();\n }\n }", "@FXML\r\n\tprivate void newVersion(ActionEvent event) {\r\n\t\tupdateAsset(AssetOperation.NEW_VERSION);\r\n\t}", "private void addEvent() {\n String name = selectString(\"What is the name of this event?\");\n ReferenceFrame frame = selectFrame(\"Which frame would you like to define the event in?\");\n double time = selectDouble(\"When does the event occur (in seconds)?\");\n double x = selectDouble(\"Where does the event occur (in light-seconds)?\");\n world.addEvent(new Event(name, time, x, frame));\n System.out.println(\"Event added!\");\n }", "public void createGenesisEvent() {\n handleNewEvent(buildEvent(null, null));\n }", "private void loadMainAdminScene(javafx.event.ActionEvent event) throws Exception {\n stageManager.switchScene(FxmlView.ADMIN);\n }", "@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tfireSwitchSceneEvent(new SwitchSceneEvent(this, new DiningRoomScene(player)));\n\t\t\t}", "public Render(Scene scene1) {\n scene = scene1;\n }", "public void setScene(Scene scene) {\n scene.getWindow().setOnCloseRequest((WindowEvent event) -> {\n if (timer != null) {\n timer.cancel();\n }\n });\n }", "public void Stage(ActionEvent actionEvent) {\n this.stage = (Stage) ((Node) actionEvent.getSource()).getScene().getWindow();\n this.Scene();\n }", "public void onAdd2Scene() {\n\t\tAnimation src = getSourceAnimation();\n\t\tif( src != null ) {\n\t\t\tadd2Scene(src, getSourceAnimation().actFrame);\n\t\t\tlog.info(\" adding frame from {}\", vm.cutInfo);\n\t\t}\n\t\t\n\t}", "public void level3Button(ActionEvent event) throws IOException {\r\n\t\tParent lv3View = FXMLLoader.load(getClass().getResource(\"Level3Scene.fxml\"));\r\n\t\tScene lv3ViewScene = new Scene(lv3View);\r\n\t\tStage window = (Stage)((Node)event.getSource()).getScene().getWindow();\r\n\t\twindow.setScene(lv3ViewScene);\r\n\t\twindow.show();\r\n\r\n\r\n\t}", "@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tfireSwitchSceneEvent(new SwitchSceneEvent(this, new DungeonRoomScene(player)));\n\t\t\t}", "public void actionPerformed(ActionEvent e) {\n \t\t\t\tscreen.setScene(new CreateAccount(screen));\n \t\t\t}", "void onNewEvent(Event event);", "@FXML\r\n private void logC(ActionEvent e) throws IOException {\r\n Scene customerLog = new Scene(FXMLLoader.load(getClass().getResource(\"../sample/Customer/CurrentBooking.fxml\")));\r\n Main.ps.setScene(customerLog);\r\n }", "public void goToModifyProductScene(ActionEvent event) throws IOException {\n\n if(productTableView.getSelectionModel().isEmpty())\n {\n alert.setAlertType(Alert.AlertType.ERROR);\n alert.setContentText(\"Please make sure you've added a Product and selected the Product you want to modify.\");\n alert.show();\n } else {\n int i = productTableView.getSelectionModel().getFocusedIndex();\n setFocusedIndex(i);\n Parent addProductParent = FXMLLoader.load(getClass().getResource(\"ModifyProduct.fxml\"));\n Scene modifyProductScene = new Scene(addProductParent);\n\n Stage window = (Stage) ((Node)event.getSource()).getScene().getWindow();\n\n window.setScene(modifyProductScene);\n window.show();\n }\n\n\n }", "public void mainMenu(ActionEvent e) throws IOException {\n FXMLLoader loader = new FXMLLoader(getClass().getResource(\"/FXML/SelectGameFXML.fxml\"));\n Parent root = loader.load();\n gameroot.getScene().setRoot(root);\n }", "protected void newGameClicked(ActionEvent e) {\n startNewGame();\n }", "@FXML\n public void onMouseClickedNewMap(ActionEvent event) {\n try {\n Parent root = FXMLLoader.load(getClass().getResource(\"/App_Risk_Game/src/main/java/View/createMap.fxml\"));\n Scene scene = new Scene(root);\n Stage stage = new Stage();\n stage.setScene(scene);\n stage.show();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }", "@Override\n public void handle(ActionEvent event) \n {\n // Call the changeLabels method with parameter of 2.\n selection = 3;\n changeLabels(selection);\n\n // Set the scene to the user input form\n primaryStage.setScene(sceneForm);\n }", "public void createNewButtonClicked(){\n loadNewScene(apptStackPane, \"Create_New_Appointment.fxml\");\n }", "private void initScene() {\n scene = new idx3d_Scene() {\n\n @Override\n public boolean isAdjusting() {\n return super.isAdjusting() || isAnimating() || isInStartedPlayer() || AbstractCube7Idx3D.this.isAdjusting();\n }\n\n @Override\n public void prepareForRendering() {\n validateAlphaBeta();\n validateScaleFactor();\n validateCube();\n validateStickersImage();\n validateAttributes(); // must be done after validateStickersImage!\n super.prepareForRendering();\n }\n @Override\n\t\tpublic /*final*/ void rotate(float dx, float dy, float dz) {\n super.rotate(dx, dy, dz);\n fireStateChanged();\n }\n };\n scene.setBackgroundColor(0xffffff);\n\n scaleTransform = new idx3d_Group();\n scaleTransform.scale(0.018f);\n\n for (int i = 0; i < locationTransforms.length; i++) {\n scaleTransform.addChild(locationTransforms[i]);\n }\n alphaBetaTransform = new idx3d_Group();\n alphaBetaTransform.addChild(scaleTransform);\n scene.addChild(alphaBetaTransform);\n\n scene.addCamera(\"Front\", idx3d_Camera.FRONT());\n scene.camera(\"Front\").setPos(0, 0, -4.9f);\n scene.camera(\"Front\").setFov(40f);\n\n scene.addCamera(\"Rear\", idx3d_Camera.FRONT());\n scene.camera(\"Rear\").setPos(0, 0, 4.9f);\n scene.camera(\"Rear\").setFov(40f);\n scene.camera(\"Rear\").roll((float) Math.PI);\n\n //scene.environment.ambient = 0x0;\n //scene.environment.ambient = 0xcccccc;\n scene.environment.ambient = 0x777777;\n //scene.addLight(\"Light1\",new idx3d_Light(new idx3d_Vector(0.2f,-0.5f,1f),0x888888,144,120));\n //scene.addLight(\"Light1\",new idx3d_Light(new idx3d_Vector(1f,-1f,1f),0x888888,144,120));\n // scene.addLight(\"Light2\",new idx3d_Light(new idx3d_Vector(1f,1f,1f),0x222222,100,40));\n //scene.addLight(\"Light2\",new idx3d_Light(new idx3d_Vector(-1f,1f,1f),0x222222,100,40));\n // scene.addLight(\"Light3\",new idx3d_Light(new idx3d_Vector(-1f,2f,1f),0x444444,200,120));\n scene.addLight(\"KeyLight\", new idx3d_Light(new idx3d_Vector(1f, -1f, 1f), 0xffffff, 0xffffff, 100, 100));\n scene.addLight(\"FillLightRight\", new idx3d_Light(new idx3d_Vector(-1f, 0f, 1f), 0x888888, 50, 50));\n scene.addLight(\"FillLightDown\", new idx3d_Light(new idx3d_Vector(0f, 1f, 1f), 0x666666, 50, 50));\n\n if (sharedLightmap == null) {\n sharedLightmap = scene.getLightmap();\n } else {\n scene.setLightmap(sharedLightmap);\n }\n }", "@Override\n public void changed(ChangeEvent event, Actor actor) {\n game.setScreen(new OptionsScreen(game));\n }", "@Override\n public void handle(ActionEvent event) \n {\n // Call the changeLabels method with parameter of 2.\n selection = 2;\n changeLabels(selection);\n\n // Set the scene to the user input form\n primaryStage.setScene(sceneForm);\n }", "public CutsceneLayer(CutsceneEventProvider cutsceneEventProvider) {\n\t\tthis.cutsceneEventProvider = cutsceneEventProvider;\n\t}", "@Override\n\t\t\tpublic void changed(ChangeEvent event, Actor actor) {\n\t\t\t}", "@Override\n\t\t\tpublic void changed(ChangeEvent event, Actor actor) {\n\t\t\t}", "@Override\n\t\t\tpublic void changed(ChangeEvent event, Actor actor) {\n\t\t\t}", "@Override\n\t\t\tpublic void changed(ChangeEvent event, Actor actor) {\n\t\t\t}", "@Override\n public void handle(ActionEvent t) \n {stage.setScene(GenerateReport(stage));}", "@FXML\n void startGame(ActionEvent event) {\n logic.viewUpdated();\n }", "@Override\r\n\tpublic SceneBase getInitialScene() {\n\t\treturn new SceneTest();\r\n\t}", "@Override\n public void handle(ActionEvent event) \n {\n if(userRole == 1) {stage.setScene(ReporterPage(stage));}\n else if(userRole == 2) {stage.setScene(DeveloperPage(stage));}\n else if(userRole == 3) {stage.setScene(ReviewerPage(stage));}\n else if(userRole == 4) {stage.setScene(TriagerPage(stage));} \n }", "public void setSceneName(String sceneName) {\n this.sceneName = sceneName;\n }", "protected void buildScene() {\n Geometry cube1 = buildCube(ColorRGBA.Red);\n cube1.setLocalTranslation(-1f, 0f, 0f);\n Geometry cube2 = buildCube(ColorRGBA.Green);\n cube2.setLocalTranslation(0f, 0f, 0f);\n Geometry cube3 = buildCube(ColorRGBA.Blue);\n cube3.setLocalTranslation(1f, 0f, 0f);\n\n Geometry cube4 = buildCube(ColorRGBA.randomColor());\n cube4.setLocalTranslation(-0.5f, 1f, 0f);\n Geometry cube5 = buildCube(ColorRGBA.randomColor());\n cube5.setLocalTranslation(0.5f, 1f, 0f);\n\n rootNode.attachChild(cube1);\n rootNode.attachChild(cube2);\n rootNode.attachChild(cube3);\n rootNode.attachChild(cube4);\n rootNode.attachChild(cube5);\n }", "void registerScene(Scene scene) {\n scene.setOnKeyPressed(event -> {\n switch (event.getCode()) {\n case UP:\n player.move(UP);\n break;\n case LEFT:\n player.move(LEFT);\n break;\n case DOWN:\n player.move(DOWN);\n break;\n case RIGHT:\n player.move(RIGHT);\n break;\n case T:\n player.look(UP.add(LEFT));\n break;\n case Y:\n player.look(UP);\n break;\n case U:\n player.look(UP.add(RIGHT));\n break;\n case F:\n player.look(LEFT);\n break;\n case G:\n player.look(ORIGIN);\n break;\n case H:\n player.look(RIGHT);\n break;\n case C:\n player.look(DOWN.add(LEFT));\n break;\n case V:\n player.look(DOWN);\n break;\n case B:\n player.look(DOWN.add(RIGHT));\n break;\n case EQUALS:\n worldRenderer.zoomIn();\n break;\n case MINUS:\n worldRenderer.zoomOut();\n break;\n case Q:\n case ESCAPE:\n System.exit(0);\n break;\n case Z:\n player.selectPreviousItem();\n break;\n case X:\n player.selectNextItem();\n break;\n case ENTER:\n player.useItem();\n default:\n break;\n }\n });\n }", "@Override\n\t\t\t\tpublic void handle(ActionEvent event) {\n\t\t\t\t\tMenuWindow menu = new MenuWindow();\n\t\t\t\t\tmenu.UserMenuStage(stage);\n\t\t\t\t}", "public void startScene()\r\n\t{\r\n\t\tthis.start();\r\n\t}", "private void createEvents() {\n\t}" ]
[ "0.6519344", "0.6476011", "0.642505", "0.6407698", "0.6324729", "0.6189128", "0.6182313", "0.6087657", "0.6011621", "0.59749997", "0.5882414", "0.58730525", "0.5830461", "0.5809143", "0.5809143", "0.5769819", "0.57413495", "0.5732499", "0.57291555", "0.5670995", "0.5670995", "0.56660455", "0.5661326", "0.56595063", "0.5655674", "0.56555307", "0.56505483", "0.5641476", "0.5628937", "0.5626899", "0.5611293", "0.561092", "0.56005675", "0.55959785", "0.55952644", "0.5539213", "0.5531302", "0.5529167", "0.55158705", "0.5508787", "0.5506879", "0.55017155", "0.5482818", "0.5470194", "0.5469864", "0.54493743", "0.54431844", "0.544011", "0.5439522", "0.54262614", "0.5425454", "0.54216045", "0.54193014", "0.54155976", "0.541546", "0.54153806", "0.5414185", "0.5391934", "0.5381042", "0.5378733", "0.53777665", "0.537653", "0.53742516", "0.5356728", "0.5353308", "0.5324939", "0.5321733", "0.5318617", "0.5318123", "0.531309", "0.53114533", "0.5310989", "0.53103775", "0.5300018", "0.52951103", "0.5293538", "0.5290369", "0.5282642", "0.5272532", "0.5268368", "0.526221", "0.5244147", "0.52433175", "0.5237043", "0.52335906", "0.5231773", "0.5230592", "0.5230592", "0.5230592", "0.5230592", "0.52291", "0.5225921", "0.5220205", "0.5218476", "0.52166694", "0.52160496", "0.5213421", "0.5209412", "0.5205864", "0.52046186" ]
0.6927367
0
Creates file with given name, at given path and fills it with given text
public static void outputFile(String name, String path, List<String> txt) { String pathb = Constants.path + "/" + path; File folder = new File(pathb); if (!folder.exists()) { folder.mkdirs(); } try { File bin = new File(pathb, "bin.inf"); boolean binex = false; boolean recount = false; int count = -1; if (!bin.exists()) { bin.createNewFile(); } else { binex = true; FileReader fr = new FileReader(bin); BufferedReader br = new BufferedReader(fr); count = Integer.parseInt(br.readLine()); br.close(); } for (int i = count; i >= -1; i--) { File file = new File(pathb, addBefoPnt(name, "_" + i)); if (file.exists()) { file.renameTo(new File(pathb, addBefoPnt(name, "_" + (i + 1)))); } else if (i == -1) { file = new File(pathb, addBefoPnt(name, "_latest")); if (file.exists()) { file.renameTo(new File(pathb, addBefoPnt(name, "_" + (i + 1)))); } } else recount = true; } File file = new File(pathb, addBefoPnt(name, "_" + (count + 1))); if (file.exists()) { recount = true; } file = new File(pathb, addBefoPnt(name, "_latest")); file.createNewFile(); FileWriter ffr = new FileWriter(file); BufferedWriter fbr = new BufferedWriter(ffr); for (String s : txt) { fbr.write(s + "\n"); } fbr.flush(); fbr.close(); if (!binex) { // -1 for latest int cnt = -1; File f = new File(pathb, name + "_" + 0); while (f.exists()) { cnt += 1; f = new File(pathb, addBefoPnt(name, "_" + (cnt + 1))); } FileWriter fr = new FileWriter(bin); BufferedWriter br = new BufferedWriter(fr); br.write(cnt + ""); br.flush(); br.close(); } else { FileWriter fr = new FileWriter(bin); BufferedWriter br = new BufferedWriter(fr); bin.delete(); bin.createNewFile(); if (!recount) br.write(count + 1 + ""); else { count = -1; File f = new File(pathb, addBefoPnt(name, "_" + 0)); while (f.exists()) { count += 1; f = new File(pathb, addBefoPnt(name, "_" + (count + 1))); } br.write(count + ""); } br.flush(); br.close(); } } catch (IOException e) { e.printStackTrace(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void writeText(FsPath path, String text);", "public void writeFile(String path, String name, String content)\n\t\t\tthrows Exception {\n\n\t\ttry {\n\t\t\tString ruta = path + File.separator + name;\n\n\t\t\t// Create file\n\t\t\tFileWriter fstream = new FileWriter(ruta);\n\t\t\tBufferedWriter out = new BufferedWriter(fstream);\n\t\t\tout.write(content);\n\t\t\t// Close the output stream\n\t\t\tout.close();\n\t\t} catch (Exception e) {\n\t\t\tlogger.error(\"Error escribiendo fichero\", e);\n\t\t}\n\n\t}", "private void createFile(String fileName, String content) throws IOException {\n File file = new File(fileName);\n if (!file.exists()) {\n file.createNewFile();\n }\n FileWriter fileWriter = new FileWriter(fileName, false);\n fileWriter.append(content);\n fileWriter.close();\n }", "static void createNewFile(String path) \n\t\t{\n\t\tLinkedList<String> defaultData = new LinkedList<String>();\n\t\tdefaultData.add(\"1,Frank,West,98,95,87,78,77,80\");\n\t\tdefaultData.add(\"2,Dianne,Greene,78,94,88,87,95,92\");\n\t\tdefaultData.add(\"3,Doug,Lei,78,94,88,87,95,92\");\n\t\tdefaultData.add(\"4,James,Hewlett,69,92,74,77,89,91\");\n\t\tdefaultData.add(\"5,Aroha,Wright,97,92,87,83,82,92\");\n\t\t\n\t\ttry \n\t\t{\n\t\t\tPrintWriter newFile = new PrintWriter(path, \"UTF-8\"); // Create .txt file in given path\n\t\t\t\n\t\t\tfor (String s : defaultData) \n\t\t\t{\n\t\t\t\tnewFile.println(s); // Write To file\n\t\t\t}\n\t\t\t\n\t\t\tnewFile.close(); // Close File\n\t\t\t\n\t\t} catch (FileNotFoundException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\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\tSystem.out.println(\"studentData.txt Created Successfully!\");\n\t\t\n\t}", "public static void writeToFile(String path, String text) throws IOException {\n Charset charSet = Charset.forName(\"US-ASCII\");\n BufferedWriter writer = new BufferedWriter(new FileWriter(path));\n writer.write(text,0,text.length());\n writer.close();\n }", "int createFile(String pFileNamePath, String pContent, String pPath, String pRoot, boolean pOverride) throws RemoteException;", "private void fileModify(String text) throws IOException {\n text += \"\\n\";\n try {\n File filePath;\n filePath = Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_DOCUMENTS);\n if (!filePath.exists()) {\n if (filePath.mkdir()) ; //directory is created;\n }\n\n fileOutputStream = new FileOutputStream(file);\n fileOutputStream.write(text.getBytes());\n\n } catch (Exception e) {\n e.printStackTrace();\n } finally {\n fileOutputStream.flush();\n try {\n fileOutputStream.close();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n }", "public static void writeTextFile(String path, String content) throws IOException{\r\n FileWriter fw = new FileWriter(path, true);\r\n BufferedWriter bw = new BufferedWriter(fw);\r\n bw.write(content);\r\n bw.close();\r\n fw.close();\r\n }", "public static void writeTextToFile(String fileName,String text){\r\n File file=new File(fileName);\r\n log.fine(\"Writing to file: \"+fileName);\r\n try { if (!file.exists()){\r\n file.createNewFile();\r\n }\r\n PrintWriter out=new PrintWriter(file.getAbsoluteFile());\r\n try {\r\n out.print(text);\r\n }finally {\r\n out.close();\r\n }\r\n }catch (IOException e){\r\n throw new RuntimeException(e);\r\n }\r\n }", "private static void createTestFile(String path) throws IOException {\n\t\tFile file = new File(path);\n\t\tFileWriter writer = new FileWriter(file);\n\t\twriter.write(\"Jenkins Test : \"+new Date() + \" ==> Writing : \" + Math.random());\n\t\twriter.flush();\n\t\twriter.close();\n\t}", "public static void createFile(String path) {\n try {\n Scanner scanner = new Scanner(System.in);\n System.out.println(\"Enter the file name :\");\n String filepath = path+\"/\"+scanner.next();\n File newFile = new File(filepath);\n newFile.createNewFile();\n System.out.println(\"File is Created Successfully\");\n\n } catch (Exception ex) {\n System.out.println(ex.getMessage());\n }\n }", "@Override\n public File createFile(String path) throws IOException {\n String pathStr=path+fileSeparator+\"Mail.json\";\n File file = new File(pathStr);\n file.createNewFile();\n return file;\n }", "void createFile()\n {\n //Check if file already exists\n try {\n File myObj = new File(\"src/main/java/ex45/exercise45_output.txt\");\n if (myObj.createNewFile()) {\n System.out.println(\"File created: \" + myObj.getName());// created\n } else {\n System.out.println(\"File already exists.\"); //exists\n }\n //Error check\n } catch (IOException e) {\n System.out.println(\"An error occurred.\");\n e.printStackTrace();\n }\n }", "public static void writeString(String path, String content) {\n //Open file\n Path jPath = Paths.get(path);\n\n //Create file if necessary\n if (!Files.exists(jPath, LinkOption.NOFOLLOW_LINKS)) {\n try {\n Files.createFile(jPath);\n } catch (IOException ex) {\n System.out.print(ex);\n System.exit(1);\n }\n }\n\n //Error if not writable\n if (!Files.isWritable(jPath)) {\n System.out.println(\"File \" + jPath + \" could not be written!\");\n System.exit(1);\n }\n //Write lines\n try {\n Files.write(jPath, content.getBytes(Charset.forName(\"UTF-8\")));\n } catch (IOException ex) {\n System.out.println(ex);\n }\n }", "public static void createFile(String name)\n {\n file = new File(name);\n try\n {\n if(file.exists())\n {\n file.delete();\n file.createNewFile();\n }else file.createNewFile();\n \n fileWriter = new FileWriter(file);\n fileWriter.append(\"Generation, \");\n fileWriter.append(\"Fitness, \");\n fileWriter.append(\"Average\\n\");\n \n }catch (IOException e) \n {\n System.out.println(e);\n }\n \n }", "public void write(String filename, String text) {\n\n try (FileWriter writer = new FileWriter(filename)) {\n writer.write(text);\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n }", "public static void FileWrite(String path, String content) {\n\t\tFile file = new File(path);\n\t\ttry {\n\t\t\tFileOutputStream fop = new FileOutputStream(file);\n\t\t\t// if file doesn't exists, then create it\n\t\t\tif (!file.exists()) {\n\t\t\t\tfile.createNewFile();\n\t\t\t}\n\t\t\t// get the content in bytes\n\t\t\tbyte[] contentInBytes = content.getBytes();\n\t\t\tfop.write(contentInBytes);\n\t\t\tfop.flush();\n\t\t\tfop.close();\n\t\t\tSystem.out.println(\"Content :\\\"\" + content\n\t\t\t\t\t+ \"\\\" is written in File: \" + path);\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "private void writeFile(String path, String contents) throws IOException {\n File file = new File(dir, path);\n\n try (FileWriter writer = new FileWriter(file)) {\n writer.write(contents);\n }\n }", "public void addToFile(String pathName, String message) throws IOException{\n FileOutputStream fos = new FileOutputStream(pathName, true);\n message = \"\\n\" + message;\n fos.write(message.getBytes());\n fos.close();\n\n }", "public void writeToTextFile(String fileName, String content) throws IOException {\n \tFiles.write(Paths.get(fileName), content.getBytes(), StandardOpenOption.CREATE);\n \t}", "public static void main(String[] args) {\n\t\tFile file = new File(\"test/a.txt\");\r\n\t\tFileUtil.createFile(file);\r\n\t\t/*if(! file.exists()){\r\n\t\t\ttry {\r\n\t\t\t\tSystem.out.println(file.getAbsolutePath());\r\n\t\t\t\tfile.createNewFile();\r\n\t\t\t} catch (IOException e) {\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t}\r\n\t\t}\r\n\t\t*/\r\n\t}", "public static void createFile(String file) throws FileNotFoundException {\n\t\tif(!file.contains(\".txt\")) {\n\t\t\tthrow new IllegalArgumentException(\"Wrong format\"); \n\t\t}\n\t\tPrintWriter pw = new PrintWriter(file);\n\t\tpw.close();\n\n\t}", "private void createFile(PonsFileFactory ponsFileFactory, Profile profile){\n moveX(profile);\n ponsFileFactory.setProfile(profile);\n String text = ponsFileFactory.createPonsFile();\n String profileName = profile.getName();\n WriteFile.write(text,pathTextField.getText() + \"/\" + profileName.substring(0,profileName.indexOf(\".\")));\n }", "public static void save(String text, String fileName) {\n //check the directory has been created\n File dir = new File(path);\n if(!dir.exists()){\n boolean success = dir.mkdir();\n if(! success){\n Log.e(\"walter's tag\", \"In Saver.java, setup() failed to create directory\");\n return;\n }\n }\n\n //save the text file in the directory\n File file = new File(path + \"/\" + fileName);\n Save(file, text);\n }", "public static void appendString(String path, String content) {\n //Open file\n Path jPath = Paths.get(path);\n\n //Create file if necessary\n if (!Files.exists(jPath, LinkOption.NOFOLLOW_LINKS)) {\n try {\n Files.createFile(jPath);\n } catch (IOException ex) {\n System.out.print(ex);\n System.exit(1);\n }\n }\n\n //Error if not writable\n if (!Files.isWritable(jPath)) {\n System.out.println(\"File \" + jPath + \" could not be written!\");\n System.exit(1);\n }\n //Write lines\n try {\n FileWriter fw = new FileWriter(path, true);\n fw.write(content);//appends the string to the file\n fw.close();\n } catch (IOException ex) {\n System.out.println(ex);\n }\n }", "public static void checkTextFile(String dir){\n java.nio.file.Path checkFilePath = java.nio.file.Paths.get(dir+\"/data/duke.txt\");\n boolean fileExists = java.nio.file.Files.exists(checkFilePath);\n //text file not exists, create one\n if(!fileExists) {\n try {\n File dukeFile = new File(dir+\"/data/duke.txt\");\n dukeFile.createNewFile();\n } catch (IOException e) {\n System.out.println(\"An error occurred while creating file.\");\n e.printStackTrace();\n }\n }\n }", "@Test\n public void testCreateTextFile() {\n System.out.println(\"createTextFile to existing dest Path\");\n String destPath = folder.toString()+fSeparator+\"Texts\"+fSeparator;\n String text = \"qweqweqwewqeqw\";\n String fileName = \"test\";\n FilesDao instance = new FilesDao();\n boolean expResult = true;\n boolean result = instance.createTextFile(destPath, text, fileName);\n assertEquals(\"Some message\",expResult, result);\n }", "public static void CreateFile (String filename) {\r\n\t\t try {\r\n\t\t File myObj = new File(filename + \".txt\");\r\n\t\t if (myObj.createNewFile()) {\r\n\t\t System.out.println(\"File created: \" + myObj.getName());\r\n\t\t } else {\r\n\t\t System.out.println(\"File already exists.\");\r\n\t\t }\r\n\t\t } catch (IOException e) {\r\n\t\t System.out.println(\"An error occurred.\");\r\n\t\t e.printStackTrace();\r\n\t\t }\r\n\t\t }", "public void saveFile(File file, String text) {\r\n\t\t\r\n\t\tif (file==null){\r\n\t\t\treturn;\t\r\n\t\t}\r\n\r\n\t\ttry (BufferedWriter bw = new BufferedWriter(new FileWriter(file))) {\r\n\r\n\t\t\tbw.write(text);\r\n\r\n\t\t} catch (IOException e) {\r\n\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\r\n\t}", "public void appendFile(String path, String content) throws Exception {\n\n\t\ttry {\n\n\t\t\t// Create file\n\t\t\tFileWriter fstream = new FileWriter(path, true);\n\t\t\tBufferedWriter out = new BufferedWriter(fstream);\n\t\t\tout.append('\\n');\n\t\t\tout.append(content);\n\t\t\t// Close the output stream\n\t\t\tout.close();\n\t\t} catch (Exception e) {\n\t\t\tlogger.error(\"Error escribiendo fichero\", e);\n\t\t}\n\n\t}", "@SuppressWarnings(\"unused\")\r\n\tprivate static File createFile(String path) {\r\n\t\t\r\n\t\t// open the file\r\n\t\tFile currentFile = new File(path);\r\n\t\t\r\n\t\t\r\n\t\t// check if it is a valid file\r\n\t\tif (currentFile == null) {\r\n\t\t\tSystem.out.println(\"Could not create the file\");\r\n\t\t\tthrow new NullPointerException();\r\n\t\t}\r\n\r\n\t\t// hopefully things went perfect\r\n\t\treturn currentFile;\r\n\r\n\t}", "public void createFile(String name, String type) {\n\n final String fileName = name;\n\n final String fileType = type;\n\n // create new contents resource\n Drive.DriveApi.newDriveContents(mGoogleApiClient)\n .setResultCallback(new ResultCallback<DriveApi.DriveContentsResult>() {\n @Override\n public void onResult(DriveApi.DriveContentsResult result) {\n\n if (!result.getStatus().isSuccess()) {\n\n return;\n }\n\n final DriveContents driveContents = result.getDriveContents();\n\n // Perform I/O off the UI thread.\n new Thread() {\n\n @Override\n public void run() {\n\n if (mCRUDapi != null) {\n // write content to DriveContents\n mCRUDapi.onCreateFile(driveContents.getOutputStream());\n }\n\n createFile(fileName, fileType, driveContents);\n }\n }.start();\n\n\n }\n });\n }", "public void writeFile(String content){\n\t\tFile file = new File(filePath);\n\t\t\n\t\tBufferedWriter bw = null;\n\t\t\n\t\ttry{\n\t\t\tif (!file.exists())\n\t\t\t\tfile.createNewFile();\n\t\t\t\n\t\t\tbw = new BufferedWriter(new FileWriter(file));\n\t\t\tbw.write(content);\n\t\t}\n\t\tcatch (Exception oops){\n\t\t\tSystem.err.print(\"There was an error writing the file \"+oops.getStackTrace());\n\t\t}\n\t\tfinally{\n\t\t\ttry{\n\t\t\t\tbw.close();\n\t\t\t}\t\n\t\t\tcatch(IOException oops){\n\t\t\t\tSystem.err.print(\"There was an error closing the write buffer \"+oops.getStackTrace());\n\t\t\t}\n\t\t}\n\t}", "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 static void modifytext (String name) throws IOException {\n // Copy the contents of the input file and put it into the new file\n File inputF = new File(\"src/main/java/ex45/\"+ name +\".txt\");\n Path dest = inputF.toPath();\n Path src = Paths.get(\"src/main/java/ex45/exercise45_input.txt\");\n Files.copy(src, dest);\n\n // This process will replace the word 'utilize' with the word 'use'\n String utilize = new String(Files.readAllBytes(dest));\n Charset charset = StandardCharsets.UTF_8;\n utilize = utilize.replaceAll(\"utilize\", \"use\");\n Files.write(dest, utilize.getBytes(charset));\n\n System.out.print(\"Your file has been created.\");\n }", "private void createScheduleFile() {\n try {\n File scheduleFile = new File(filePath, \"schedule.txt\");\n// FileWriter fw = new FileWriter(scheduleFile);\n\n OutputStreamWriter osw = new OutputStreamWriter(new FileOutputStream(scheduleFile), StandardCharsets.UTF_8);\n osw.write(\"SCHEDULE:\\n\" + schedule);\n osw.close();\n\n System.out.println(\"schedule.txt successfully created.\");\n\n } catch (IOException e) {\n e.printStackTrace();\n }\n }", "public File createFile(final String path) {\n return new com.good.gd.file.File(path);\n }", "public void writeFile(String Path, String File_name, String Content) {\n\t\tFile f1 = new File( Path + \"/\" + File_name);\n\t try {\n\t // отрываем поток для записи\n\t BufferedWriter bw = new BufferedWriter(new FileWriter(f1));\n\t // пишем данные\n\t bw.write(Content);\n\t // закрываем поток\n\t bw.close();\n\t Log.d(LOG_TAG, \"Файл записан\");\n\t } catch (FileNotFoundException e) {\n\t e.printStackTrace();\n\t } catch (IOException e) {\n\t e.printStackTrace();\n\t }\n\t }", "public void createFile(String fname) {\n\t\tprintMsg(\"running createFiles() in \\\"\" + this.getClass().getName() + \"\\\" class.\");\n\t\t\n\t\t// Check if the scratch directory exists, create it if it doesn't\n\t\tPath rootpath = Paths.get(theRootPath);\n\t\tcreateScratchDirectory(rootpath);\n\n\t\t// Check if the file name is null or empty, if it is, use default name\n\t\tPath filepath = null;\n\t\tif(fname == null || fname.isEmpty()) {\n\t\t\tfilepath = Paths.get(rootpath + System.getProperty(\"file.separator\") + theFilename);\n\t\t} else {\n\t\t\tfilepath = Paths.get(rootpath + System.getProperty(\"file.separator\") + fname);\n\t\t}\n\t\t\n\t\t// Create file\n\t\ttry {\n\t\t\t// If file exists already, don't override it.\n\t\t\tif(!Files.exists(filepath)) {\n\t\t\t\tFiles.createFile(filepath);\n\t\t\t}\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "protected void openWriteFile(Path filePath, String s) throws IOException{\n\t\tBufferedWriter writer = Files.newBufferedWriter(filePath, ENCODING);\n\t\twriter.write(s, 0, s.length());\n\t\twriter.close();\n\t}", "public static void writeFile(final String contents, final String name) {\n writeFile(contents, name, false);\n }", "String createTempFile(String text,String filename) {\r\n\t\tString tmpDirectory = Configuration.getConfiguration().getMpdTmpSubDir();\r\n\t\tif(!tmpDirectory.endsWith(java.io.File.separator)) {\r\n\t\t\ttmpDirectory += java.io.File.separator;\r\n\t\t}\r\n\t\tconvert(text,Configuration.getConfiguration().getMpdFileDirectory(),tmpDirectory+filename);\r\n\t\t\r\n\t\treturn tmpDirectory+filename;\r\n\t}", "public void writeFile(String text, String writePath)\r\n\t{\r\n\t\t//Use a filewriter but change it to a buffered writer. Open writing on the file provided by writePath\r\n\t\ttry (BufferedWriter writer = new BufferedWriter(new FileWriter(writePath)))\r\n\t\t{\r\n\t\t\t// Write given text to file\r\n\t\t\twriter.write(text);\t\r\n\t\t} \r\n\t\tcatch (IOException except)\r\n\t\t{\r\n\t\t\texcept.printStackTrace();\r\n\t\t}\r\n\r\n\t}", "void createNewScriptFile(String scriptContent) {\n String fileName = prop.getProperty(\"FileName\");\n try {\n // Assume default encoding.\n FileWriter fileWriter = new FileWriter(fileName);\n // Always wrap FileWriter in BufferedWriter.\n BufferedWriter bufferedWriter = new BufferedWriter(fileWriter);\n // Note that write() does not automatically append a newline character.\n bufferedWriter.write(scriptContent);\n // Always close files.\n bufferedWriter.close();\n } catch (IOException ex) {\n System.out.println(\"Error writing to file '\" + fileName + \"'\");\n }\n }", "public static void fileWriter(String path, String fileName, Object printLine) throws NumberFormatException, IOException {\n // Create File:\n\t\t\t\tFile f = new File(path + File.separator + fileName);\t\t\t\t \n\t\t\t // Write or add a String line into File:\t\n\t\t\t FileWriter fw = new FileWriter(f,true);\n\t\t\t PrintWriter pw = new PrintWriter(fw);\n\t\t\t pw.println(printLine);\n\t\t\t pw.close();\n\t\t\t}", "static void writeFile(String path , String data) throws IOException{\n\t\tFileOutputStream fo = new FileOutputStream(path,true);\n\t\tfo.write(data.getBytes());\n\t\tfo.close();\n\t\tSystem.out.println(\"Done...\");\n\t}", "public static void createSimpleFile( final Configuration conf, final Path file, String data ) throws IOException\r\n\t{\r\n\t\tFSDataOutputStream out = null;\r\n\t\ttry {\r\n\t\t\tout = file.getFileSystem(conf).create(file);\r\n\t\t\tout.write(data.getBytes(\"UTF-8\"));\r\n\t\t} finally {\r\n\t\t\tif (out!=null) {\r\n\t\t\t\tout.close();\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public void createFile() throws IOException {\n String newName = input.getText();\n File user = new File(\"SaveData\\\\UserData\\\\\" + newName + \".txt\");\n\n if (user.exists() && !user.isDirectory()) {\n input.setStyle(\"-fx-border-color: red\");\n }\n if (user.exists() && !user.isDirectory() || newName.isEmpty()) {\n input.setStyle(\"-fx-border-color: red\");\n ERROR_AUDIO.play(Double.parseDouble(getInitData().get(\"SFXVol\")));\n\n }\n else {\n input.setStyle(\"-fx-border-color: default\");\n playerList.getItems().addAll(newName);\n PrintWriter newUser = new PrintWriter(new FileWriter(\"SaveData\\\\UserData\\\\\" + newName + \".txt\"));\n newUser.write(\"0 0 0 0 icon0 car\");\n newUser.close();\n MAIN_MENU_AUDIO.play(Double.parseDouble(getInitData().get(\"SFXVol\")));\n }\n }", "public static void writeLineToFile(String filePath, String text) throws IOException {\n\t\t\n\t\t// Create the writer\n\t\tPrintWriter out = new PrintWriter(new BufferedWriter(new FileWriter(filePath, true)));\n\t\t\n\t\t// Write a line to the file\n\t\tout.println(text);\n\t\tout.close();\n\t}", "public static void write(String path, String content) {\n\t\ttry {\n\t\t\tFile file = new File(path);\n\t\t\t// If file doesn't exists, then create it\n\t\t\tif (!file.exists()) {\n\t\t\t\tfile.createNewFile();\n\t\t\t}\n\t\t\tFileWriter fw = new FileWriter(file.getAbsoluteFile());\n\t\t\tBufferedWriter bw = new BufferedWriter(fw);\n\t\t\t// Write in file\n\t\t\tbw.write(content);\n\t\t\t// Close connection\n\t\t\tbw.close();\n\t\t} catch (Exception e) {\n\t\t\tSystem.out.println(e);\n\t\t}\n\t}", "public static void appendFile(final String contents, final String name) {\n writeFile(contents, name, true);\n }", "public static void fillFileWithString(IFile file, String content)\n throws CoreException {\n \tfinal boolean[] done=new boolean[]{false};\n \tIProgressMonitor monitor=new IProgressMonitor() {\n\t\t\t\n\t\t\t@Override\n\t\t\tpublic void worked(int work) {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\t@Override\n\t\t\tpublic void subTask(String name) {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\t@Override\n\t\t\tpublic void setTaskName(String name) {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\t@Override\n\t\t\tpublic void setCanceled(boolean value) {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\t@Override\n\t\t\tpublic boolean isCanceled() {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\t\n\t\t\t@Override\n\t\t\tpublic void internalWorked(double work) {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\t@Override\n\t\t\tpublic void done() {\n\t\t\t\tdone[0]=true;\n\t\t\t}\n\t\t\t\n\t\t\t@Override\n\t\t\tpublic void beginTask(String name, int totalWork) {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\t\n\t\t\t}\n\t\t};\n \tByteArrayInputStream stream = new ByteArrayInputStream(content.getBytes());\n \tif (file.exists()) {\n file.setContents(stream, 0, monitor);\n } else {\n file.create(stream, true, monitor);\n }\n \twhile(!done[0]){\n \t\tsleep(.1);\n \t}\n }", "public void writeToFile(StringBuilder text)throws IOException{\n\n Path filePath = Paths.get(\"index.txt\");\n if (!Files.exists(filePath)) {\n \t Files.createFile(filePath);\n \t}\n \tFiles.write(filePath, text.toString().getBytes(), StandardOpenOption.APPEND);\n }", "public void createFiles() {\r\n try {\r\n FileWriter file = new FileWriter(registerNumber + \".txt\");\r\n file.write(\"Name : \" + name + \"\\n\");\r\n file.write(\"Surname : \" + surname + \"\\n\");\r\n file.write(\"Registration Number : \" + registerNumber + \"\\n\");\r\n file.write(\"Position : \" + position + \"\\n\");\r\n file.write(\"Year of Start : \" + yearOfStart + \"\\n\");\r\n file.write(\"Total Salary : \" + Math.round(totalSalary) + \".00 TL\" +\"\\n\");\r\n file.close();\r\n }\r\n catch(IOException e) {\r\n e.printStackTrace();\r\n }\r\n }", "static void writeFile(String path, String content)\n\t\t\tthrows FileNotFoundException, UnsupportedEncodingException {\n\t\tPrintWriter writer = new PrintWriter(path, \"UTF-8\");\n\t\twriter.println(content);\n\t\twriter.close();\n\t}", "public void createFile (String filePath){\n try{\n File newFile = new File(filePath);\n if(newFile.createNewFile()){\n System.out.println(\"File created: \"+newFile.getName());\n } else {\n System.out.println(\"File already exists.\");\n }\n } catch (IOException e) {\n System.out.println(\"An error occurred.\");\n e.printStackTrace();\n }\n }", "public void saveFileAs(String text) {\r\n\r\n\t\tFile tempFile;\r\n\t\ttempFile = fileChooser.showSaveDialog(fileChooserDialog);\r\n\t\tsaveFile(tempFile, text);\r\n\t\t\r\n\t\r\n\t\t\r\n\t}", "public static void main(String[] args) throws IOException {\n\t\t\r\n File file = new File(\"C:\\\\Users\\\\balaji\\\\Desktop\\\\commons\\\\commons-io-2.6\\\\text file\\\\text1.txt\");\r\n\t\t\r\n\t\tFileUtils.write(file, \"Learning is Growing\", \"UTF-8\", false);\r\n\r\n\r\n\t}", "public static void writeText(File file, String text) {\r\n\t\ttry{\r\n\t\t\tSystem.out.println(text);\r\n\t\t\tFileWriter FW = new FileWriter(file);\r\n\t\t\tBufferedWriter BW = new BufferedWriter(FW);\r\n\t\t\tBW.write(text);\r\n\t\t\tBW.close();\r\n\t\t} catch (IOException e){\r\n\t\t\tSystem.out.println(\"error writing text\");\r\n\t\t}\r\n\t}", "public void geraArquivoAjudaTextual(String caminho, String nomeArquivo, String texto) {\r\n\t\ttry {\r\n\t\t\tarquivoTexto = new File(caminho + \"\\\\\" + nomeArquivo);\r\n\t\t\tFileWriter fw = new FileWriter(arquivoTexto);\r\n\t\t\tPrintWriter pw = new PrintWriter(fw);\r\n\t\t\tpw.write(texto);\r\n\t\t\tfw.close();\r\n\t\t} catch (IOException e) {\r\n\t\t}\r\n\t}", "public static void writeNewMintGame(File appdir, String name, String content) {\n boolean successful;\n File presaved = new File(appdir + \"\\\\\" + name + \".txt\");\n try (FileWriter presavedwr = new FileWriter(presaved)) {\n successful = presaved.createNewFile();\n presavedwr.write(content);\n } catch (IOException e) {\n e.printStackTrace();\n }\n }", "public static void writeToFile(String text, String fileName) {\r\n\t\t// Get the file reference\r\n\t\tif (null != text && null != fileName) {\r\n\t\t\tSystem.out.println(\"Writing to file....\"+FILEPATH+ \"\\\\\" + fileName + \".txt\");\r\n\t\t\tPath path = Paths.get(FILEPATH+\"\\\\\" + fileName + \".txt\");\r\n\t\t\ttext = text.replaceAll(NEWLINE+\",\", \"\\r\\n\");\r\n\t\t\ttry (BufferedWriter writer = Files.newBufferedWriter(path)) {\r\n\t\t\t\twriter.write(text);\r\n\t\t\t} catch (IOException e) {\r\n\t\t\t\tSystem.out.println(\"Unable to generate the output file!\" + e.getMessage());\r\n\t\t\t}catch (Exception e) {\r\n\t\t\t\tSystem.out.println(\"Unable to generate the output file!\" + e.getMessage());\r\n\t\t\t}\r\n\t\t\tSystem.out.println(\"File generated path: \"+FILEPATH +\"\\\\\"+ fileName + \".txt\");\r\n\t\t}\r\n\t}", "public static void addArquivo(String texto, String nomeArquivo){\n\t\ttry {\n\t\t\tboolean logExiste = false;\n\t\t\tFile file = new File(nomeArquivo);\n\t\t\tlogExiste = file.exists();\n\t\t\t\n\t\t\tFileWriter fw = new FileWriter(nomeArquivo, true);\n\t\t\tBufferedWriter bw = new BufferedWriter(fw);\n\t\t\t\n\t\t\tif (logExiste)\n\t\t\t\tbw.append(\"\\n\" + texto);\n\t\t\telse\n\t\t\t\tbw.write(texto);\n\t\t\t\n\t\t\t\n\t\t\tbw.close();\n\t\t\t\n\t\t\t}\n\t\t\tcatch (IOException e){\n\t\t\t\te.printStackTrace();\n\t\t\t\tSystem.out.println(\"Impossivel gravar no arquivo\");\n\t\t\t}\n\t}", "public static void enterNewTXTFile(String input, String id, String newName, String newHandle, String newTime, String newTweet)\n {\n try {\n String str = Integer.parseInt(id)+ \" \" +newName+ \" \" +newHandle+ \" \" +newTime+ \" \" +newTweet+ \" \";\n writer = new BufferedWriter(new FileWriter(input, true)); // continue to write to existing output file\n writer.write(str);\n writer.newLine();\n writer.close();\n \n } catch (Exception e) { System.out.println(e); }\n }", "public static void writeFile(String msg){\n\t\ttry { \n File f1 = new File(\"/Users/snehithraj/eclipse-workspace/ThreePhaseCommit/src/ServerDB.txt\");\n if(!f1.exists()) {\n f1.createNewFile();\n } \n FileWriter fileWriter = new FileWriter(f1.getName(),true);\n BufferedWriter bw = new BufferedWriter(fileWriter);\n bw.write(msg);\n bw.close();\n } catch(IOException e){\n e.printStackTrace();\n }\n }", "public void createFile(File file) throws IOException {\n if (!file.exists()) {\n file.createNewFile();\n }\n }", "public static void write(String path, String message) {\r\n\t\t\r\n\t\t// open the file\r\n\t\tFile file = new File(path);\r\n\t\t\r\n\t\t\r\n\t\t// if the file does not exist try to create one\r\n\t\tif (!file.exists())\r\n\t\t\tfile = createFile(path);\r\n\t\t\r\n\t\t\r\n\t\t// write to the file\r\n\t\ttry {\r\n\t\t\t// open stream\r\n\t\t\tFileWriter fWrite = new FileWriter(file);\r\n\t\t\tBufferedWriter bufferedWriter = new BufferedWriter(fWrite);\r\n\t\t\t\r\n\t\t\t// write new lines if any was found\r\n\t\t\tfor (String i : message.split(\"(\\n)+\")) {\r\n\t\t\t\tbufferedWriter.write(i);\r\n\t\t\t\tbufferedWriter.newLine();\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t// close anything was opened\r\n\t\t\tbufferedWriter.close();\r\n\t\t\tfWrite.close();\r\n\r\n\t\t} catch (Exception e) {\r\n\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t}", "private void saveTextToFile(String content, File file) {\n try {\n PrintWriter writer;\n writer = new PrintWriter(file);\n writer.println(content);\n writer.close();\n } catch (IOException ex) {\n Logger.getLogger(Main.class.getName()).log(Level.SEVERE, null, ex);\n }\n }", "FileContent createFileContent();", "public void saveFile(String path, String data) throws IOException {\n\n FileWriter writer = new FileWriter(getFile(path));\n writer.write(data);\n writer.flush();\n }", "public void writeFileContents(String filename, String contents) {\n }", "public static void makeNewFile(File root, String name) {\n File directory = new File(root, name);\n try {\n if (!directory.createNewFile()) {\n throw new IOException(\"Could not create \" + name + \", file already exists\");\n }\n } catch (IOException e) {\n throw new UncheckedIOException(\"Failed to create file: \" + name, e);\n }\n }", "public static void rewriteFile(String name, String path, List<String> txt)\n\t{\n\t\tString pathb = Constants.path + \"/\" + path;\n\n\t\tFile folder = new File(pathb);\n\t\tif (!folder.exists())\n\t\t{\n\t\t\tfolder.mkdirs();\n\t\t}\n\t\ttry\n\t\t{\n\t\t\tFile file = new File(pathb, name);\n\t\t\tif (!file.exists())\n\t\t\t\tfile.createNewFile();\n\n\t\t\tFileWriter ffr = new FileWriter(file);\n\t\t\tBufferedWriter fbr = new BufferedWriter(ffr);\n\n\t\t\tfor (String s : txt)\n\t\t\t{\n\t\t\t\tfbr.write(s + \"\\n\");\n\t\t\t}\n\n\t\t\tfbr.flush();\n\t\t\tfbr.close();\n\n\t\t}\n\t\tcatch (IOException e)\n\t\t{\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public static File saveFile(String name, String data) {\n if (name == null) {\n name = \"\";\n }\n String fullyQualifiedName = name;\n\n // if filename is not absolute use current path as base dir\n if (!new File(fullyQualifiedName).isAbsolute()) {\n fullyQualifiedName = Paths.get(\"\").toAbsolutePath() + \"/\" + name;\n }\n try {\n // create subdirs (if there any)\n if (fullyQualifiedName.contains(\"/\")) {\n File f = new File(fullyQualifiedName.substring(0, fullyQualifiedName.lastIndexOf(\"/\")));\n f.mkdirs();\n }\n File file = new File(fullyQualifiedName);\n file.createNewFile();\n FileUtils.write(file, data, \"UTF-8\");\n log.info(\"Wrote: {}\", file.getAbsolutePath());\n return file;\n } catch (IOException e) {\n log.error(\"Could not create file {}\", name, e);\n return null;\n }\n }", "public static void writeFile(final File f, final String content) throws IOException {\n final FileOutputStream o = new FileOutputStream(f);\n o.write(content.getBytes());\n o.close();\n }", "public EnigmaFile() throws Exception\n {\n\n String path = Main.class.getClassLoader().getResource(\"filein.txt\").getPath();\n File currentDirectory=new File(path);\n finstream = new FileInputStream(currentDirectory);\n\n\n String pathToWrite = path.replaceFirst(\"filein.txt\",\"fileout.txt\");\n File outputFile = new File(pathToWrite);\n br = new BufferedReader(new InputStreamReader(finstream));\n outputFile.createNewFile();\n FileWriter fileWrite = new FileWriter(outputFile.getAbsoluteFile());\n writer = new BufferedWriter(fileWrite);\n\n\n }", "public static void init(){\n Path path = FileDirectoryUtil.getPath(\"src\", \"fileIO\", \"test.txt\");\n FileDirectoryUtil.tryCreateDirectory(path);\n\n // Try to create the file\n path = Paths.get(path.toAbsolutePath().toString(), \"test.txt\");\n FileDirectoryUtil.tryCreateFile(path);\n\n // Print out the final location of the file\n System.out.println(path.toAbsolutePath());\n\n // Try to write to the file\n IOUtil.tryWriteToFile(getContent(), path);\n\n // Try to print the content of the file\n IOUtil.tryPrintContents(path);\n\n }", "public static void writeTextFile(File file, String content) throws IOException {\n BufferedWriter bw = new BufferedWriter(new FileWriter(file));\n bw.write(content, 0, content.length());\n bw.flush();\n bw.close();\n }", "public static void main(String[] args) throws IOException {\n\r\n\t\tString FileLoc = \"UsingPath.txt\";\r\n\t\tString content = \"Content of this file is written using Path class in Java\";\r\n\t\t\r\n\t\t//Using Path class, getting file location\r\n\t\tPath getFile = Paths.get(FileLoc);\r\n\t\t\r\n\t\t//Using Files function getting the content of file as bytes and writing to file\r\n\t\tFiles.write(getFile, content.getBytes());\r\n\t\t\r\n\t\t\r\n\t}", "public static void writeFile(String text) throws IOException {\n\t\tWriter out = null;\n\t\ttry {\n\t\t\tout = new BufferedWriter(\n\t\t\t\t\tnew OutputStreamWriter(new FileOutputStream(\"toTranslate.txt\"), StandardCharsets.UTF_8));\n\t\t} catch (FileNotFoundException e1) {\n\t\t\tLOGGER.log(Level.WARNING, \"FileNotFoundException\", e1);\n\t\t\t;\n\t\t}\n\t\ttry {\n\t\t\tif (out != null)\n\t\t\t\tout.write(text);\n\t\t\telse\n\t\t\t\tSystem.out.println();\n\t\t} catch (IOException e) {\n\t\t\tLOGGER.log(Level.WARNING, \"IOException\", e);\n\t\t\t;\n\t\t} finally {\n\t\t\ttry {\n\t\t\t\tif (out != null)\n\t\t\t\t\tout.close();\n\t\t\t} catch (IOException e) {\n\t\t\t\tLOGGER.log(Level.WARNING, \"IOException\", e);\n\t\t\t\tThread.currentThread().interrupt();\n\t\t\t}\n\t\t}\n\t}", "public static void save(String text) {\n File file = new File(path + \"/savedFile.txt\");\n\n Save(file, text);\n }", "private static void dosyaYazici(String text)\n {\n File log = new File(\"log.txt\");\n try\n {\n if (!log.exists())\n {\n log.createNewFile();\n }\n FileWriter fileWriter = new FileWriter(log,true);\n BufferedWriter bufferedWriter = new BufferedWriter(fileWriter);\n bufferedWriter.append(text+\"\\n\");\n bufferedWriter.close();\n //System.out.print(\"TEST\");\n }\n catch (IOException e)\n {\n System.out.print(\"DOSYA HATASI!\");\n e.printStackTrace();\n }\n\n }", "public ActionScriptBuilder createFile(String filecontents, String filepath){\n\t\treturn createFile(filecontents,filepath,true);\n\t}", "public static void main(String[] args) throws IOException {\n\t\t\n\t\tFile f = new File(\"c:\\\\Ranjan\", \"ranjan1.txt\");\n\t\tf.createNewFile();\n\t\t\n\t\tSystem.out.println(f.getPath());\n\t\tSystem.out.println(f);\n\t}", "private void createFile() {\n if (mDriveServiceHelper != null) {\n Log.d(\"error\", \"Creating a file.\");\n\n mDriveServiceHelper.createFile()\n .addOnSuccessListener(fileId -> readFile(fileId))\n .addOnFailureListener(exception ->\n Log.e(\"error\", \"Couldn't create file.\", exception));\n }\n }", "public static void writeStringToFile(String content, File file) throws IOException {\n if(StringUtil.isNullOrBlank(content) || file == null) {\n return;\n }\n if(!file.exists() && !file.createNewFile() || file.isDirectory() || !file.canWrite()) {\n return;\n }\n\n FileOutputStream fos = null;\n try {\n fos = new FileOutputStream(file);\n fos.write(content.getBytes());\n } finally {\n if(fos != null) {\n fos.close();\n }\n }\n }", "public static void writeData(String data, String path) throws IOException {\n try {\n Files.write(data, new File(path), Charsets.UTF_8);\n } catch (IOException ex) {\n LoggerFactory.getLogger(Resources.class).error(\"Unable to write file to \" + path + \".\", ex);\n throw ex;\n }\n }", "public TextFile(String text, String name, String nameForReporting, String parent, String mimeType, long lastModified)\n\t{\n init(text, name, nameForReporting, parent, mimeType, lastModified);\n\t}", "public String putFileFromString(String path, String content){\n Path targetPath = Paths.get( path );\n final StreamDataBodyPart filePart;\n try {\n filePart = new StreamDataBodyPart(\n targetPath.getFileName().toString(), \n new ByteArrayInputStream( content.getBytes( \"UTF-8\" ) ) );\n filePart.setName( \"file\" );\n } catch(UnsupportedEncodingException ex) {\n throw new RuntimeException( \"Bad input for string content\", ex );\n }\n\n final FormDataMultiPart multipart = (FormDataMultiPart) new FormDataMultiPart()\n .bodyPart( filePart );\n\n return target.path( targetPath.getParent().toString() ).request().\n post( Entity.entity( multipart, multipart.getMediaType() ), String.class );\n }", "static void initContacts(){\n String directory = \"contacts\";\n String filename = \"contacts.txt\";\n Path contactsDirectory= Paths.get(directory);\n Path contactsFile = Paths.get(directory, filename);\n try {\n if (Files.notExists(contactsDirectory)) {\n Files.createDirectories((contactsDirectory));\n System.out.println(\"Created directory\");\n }\n if (!Files.exists(contactsFile)) {\n Files.createFile(contactsFile);\n System.out.println(\"Created file\");\n }\n } catch(IOException ioe){\n ioe.printStackTrace();\n }\n }", "private static void writeFileOnClient(FileStore.Client client) throws SystemException, TException, IOException {\n String fileName = \"sample.txt\";\n\n String content = \"Content\";\n\n try {\n\n RFile rFile = new RFile();\n RFileMetadata rFileMetaData = new RFileMetadata();\n\n rFileMetaData.setFilename(fileName);\n rFileMetaData.setFilenameIsSet(true);\n\n rFile.setMeta(rFileMetaData);\n rFile.setMetaIsSet(true);\n\n rFile.setContent(content);\n rFile.setContentIsSet(true);\n\n client.writeFile(rFile);\n\n } catch (TException x) {\n throw x;\n }\n }", "public static void createFile(File source) {\n try {\n if (!source.createNewFile()) {\n throw new IOException();\n }\n } catch (IOException e) {\n throw new RuntimeException(\"Failed to create file: \" + source.getAbsolutePath(), e);\n }\n }", "public static void writeFile(String p_name, String p_encoding,\n String p_content)\n throws IOException\n {\n\n BufferedWriter out = new BufferedWriter(new OutputStreamWriter(\n new FileOutputStream(p_name), p_encoding));\n\n out.write(p_content);\n\n out.close();\n }", "String createPermanentFile(String text) {\r\n\t\t// create a filename based on the hash code of the text\r\n\t\tint hashCode = text.hashCode();\r\n\t\tString fileName = hashCode+\".mp3\";\r\n\t\tlog.config(\"createPermanentFile for text \"+text+\" filename=\"+fileName);\r\n\t\tFile file = new File(Configuration.getConfiguration().getMpdFileDirectory(),fileName);\r\n\t\t\r\n\t\t// if a file with this text does not already exist => create it\r\n\t\tif(!file.exists()) {\r\n\t\t\tlog.fine(\"file does not exist - need to convert\");\r\n\t\t\tconvert(text,Configuration.getConfiguration().getMpdFileDirectory(),fileName);\r\n\t\t}\r\n\t\t\r\n\t\t// return the filename\r\n\t\treturn fileName;\r\n\t}", "public void createFile(File file) {\n\t\tif (file.exists())\n\t\t\treturn;\n\t\ttry {\n\t\t\tfile.createNewFile();\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public ActionScriptBuilder createFile(String filecontents,String filepath,boolean overwrite,String delimeter){\n\t\tline(\"createfile until \"+delimeter);\n\t\tlines(Arrays.asList(filecontents.split(\"\\n\")));\n\t\tline(delimeter);\n\t\tmove(\"__createfile\",filepath,overwrite);\n\t\treturn this;\n\t}", "public void setText(String txt)\n {\n fileName.setText(txt);\n }", "public static void saveDocument(String path, String textToWrite, Configuration c){\n File f = new File(path);\n Writer out = null;\n try{\n if(f.exists()){\n //JOptionPane.showMessageDialog(null, \"You have overwritten the previous file. This message should be better prepared.\");\n if(!c.getOverWriteAll()){\n String[] options = new String[] {\"Rewrite all\", \"Yes\", \"No\"};\n int response = JOptionPane.showOptionDialog(null, \"The file \"+f.getName()+\" already exists. Do you want to overwrite it?\", \"Existing File!\",JOptionPane.DEFAULT_OPTION, JOptionPane.INFORMATION_MESSAGE,null, options, options[0]);\n //0 -> yes to all. 1 -> Yes. 2-> No\n if(response == 0)c.setOverwriteAll(true); \n if(response == 2)return; //else we continue rewriting the file.\n }\n }\n else{\n f.createNewFile();\n }\n out = new BufferedWriter(new OutputStreamWriter(new FileOutputStream(f), \"UTF-8\"));\n out.write(textToWrite);\n out.close();\n }catch(IOException e){\n System.err.println(\"Error while creating the file \"+e.getMessage()+\"\\n\"+f.getAbsolutePath());\n } \n \n }", "public static void createFile(String fileString) {\n\t\tPath filePath = Paths.get(fileString);\n\t\t// this will only happen if the file is not there\n\t\tif (Files.notExists(filePath)) {\n\t\t\ttry {\n\t\t\t\tFiles.createFile(filePath);\n\t\t\t\tSystem.out.println(\"Your file was cerated successfully\");\n\t\t\t} catch (IOException e) {\n\t\t\t\tSystem.out.println(\"Something went wrong with file creation \");\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\t}", "public TextFile(String filepath) {\n try {\n toFile = new File(filepath);\n if(toFile == null) {\n System.err.println(filepath + \" could not be created\");\n return;\n }\n writer = new BufferedWriter(new FileWriter(toFile));\n } catch (IOException ex) {\n ex.printStackTrace();\n }\n \n }" ]
[ "0.71888775", "0.6764961", "0.6722402", "0.6691577", "0.6672433", "0.6548442", "0.652405", "0.6499527", "0.6400736", "0.63903487", "0.6345442", "0.6285875", "0.62704074", "0.62287724", "0.6220511", "0.6205108", "0.6164314", "0.6154901", "0.6126859", "0.61099327", "0.6058569", "0.6048263", "0.6040226", "0.60316986", "0.6023257", "0.6003642", "0.59621567", "0.59580564", "0.59499276", "0.59368455", "0.5930731", "0.59230584", "0.5918728", "0.5912691", "0.5904377", "0.58874774", "0.5878249", "0.58770204", "0.5873118", "0.5873107", "0.58601326", "0.5852819", "0.58195275", "0.5794703", "0.5790272", "0.5790258", "0.5788941", "0.5777201", "0.5774202", "0.5765873", "0.57503027", "0.5746034", "0.57406247", "0.5738949", "0.5737245", "0.5734446", "0.57314926", "0.57156146", "0.5703043", "0.56966054", "0.5695277", "0.5693428", "0.56932324", "0.569279", "0.56691927", "0.566634", "0.56253135", "0.5614886", "0.5614185", "0.56103903", "0.56082106", "0.56070817", "0.5606565", "0.55918336", "0.5589154", "0.55797946", "0.55764383", "0.55658066", "0.5559853", "0.5553021", "0.55499464", "0.55447906", "0.5536966", "0.5536403", "0.5534771", "0.55226856", "0.5522495", "0.551527", "0.5513299", "0.5493887", "0.5483121", "0.54723907", "0.5470643", "0.5467157", "0.546626", "0.5462793", "0.545208", "0.5440303", "0.54341084", "0.54318863" ]
0.5525449
85
Creates file with given name, at given path and fills it with given text
public static void rewriteFile(String name, String path, List<String> txt) { String pathb = Constants.path + "/" + path; File folder = new File(pathb); if (!folder.exists()) { folder.mkdirs(); } try { File file = new File(pathb, name); if (!file.exists()) file.createNewFile(); FileWriter ffr = new FileWriter(file); BufferedWriter fbr = new BufferedWriter(ffr); for (String s : txt) { fbr.write(s + "\n"); } fbr.flush(); fbr.close(); } catch (IOException e) { e.printStackTrace(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void writeText(FsPath path, String text);", "public void writeFile(String path, String name, String content)\n\t\t\tthrows Exception {\n\n\t\ttry {\n\t\t\tString ruta = path + File.separator + name;\n\n\t\t\t// Create file\n\t\t\tFileWriter fstream = new FileWriter(ruta);\n\t\t\tBufferedWriter out = new BufferedWriter(fstream);\n\t\t\tout.write(content);\n\t\t\t// Close the output stream\n\t\t\tout.close();\n\t\t} catch (Exception e) {\n\t\t\tlogger.error(\"Error escribiendo fichero\", e);\n\t\t}\n\n\t}", "private void createFile(String fileName, String content) throws IOException {\n File file = new File(fileName);\n if (!file.exists()) {\n file.createNewFile();\n }\n FileWriter fileWriter = new FileWriter(fileName, false);\n fileWriter.append(content);\n fileWriter.close();\n }", "static void createNewFile(String path) \n\t\t{\n\t\tLinkedList<String> defaultData = new LinkedList<String>();\n\t\tdefaultData.add(\"1,Frank,West,98,95,87,78,77,80\");\n\t\tdefaultData.add(\"2,Dianne,Greene,78,94,88,87,95,92\");\n\t\tdefaultData.add(\"3,Doug,Lei,78,94,88,87,95,92\");\n\t\tdefaultData.add(\"4,James,Hewlett,69,92,74,77,89,91\");\n\t\tdefaultData.add(\"5,Aroha,Wright,97,92,87,83,82,92\");\n\t\t\n\t\ttry \n\t\t{\n\t\t\tPrintWriter newFile = new PrintWriter(path, \"UTF-8\"); // Create .txt file in given path\n\t\t\t\n\t\t\tfor (String s : defaultData) \n\t\t\t{\n\t\t\t\tnewFile.println(s); // Write To file\n\t\t\t}\n\t\t\t\n\t\t\tnewFile.close(); // Close File\n\t\t\t\n\t\t} catch (FileNotFoundException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\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\tSystem.out.println(\"studentData.txt Created Successfully!\");\n\t\t\n\t}", "public static void writeToFile(String path, String text) throws IOException {\n Charset charSet = Charset.forName(\"US-ASCII\");\n BufferedWriter writer = new BufferedWriter(new FileWriter(path));\n writer.write(text,0,text.length());\n writer.close();\n }", "int createFile(String pFileNamePath, String pContent, String pPath, String pRoot, boolean pOverride) throws RemoteException;", "private void fileModify(String text) throws IOException {\n text += \"\\n\";\n try {\n File filePath;\n filePath = Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_DOCUMENTS);\n if (!filePath.exists()) {\n if (filePath.mkdir()) ; //directory is created;\n }\n\n fileOutputStream = new FileOutputStream(file);\n fileOutputStream.write(text.getBytes());\n\n } catch (Exception e) {\n e.printStackTrace();\n } finally {\n fileOutputStream.flush();\n try {\n fileOutputStream.close();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n }", "public static void writeTextFile(String path, String content) throws IOException{\r\n FileWriter fw = new FileWriter(path, true);\r\n BufferedWriter bw = new BufferedWriter(fw);\r\n bw.write(content);\r\n bw.close();\r\n fw.close();\r\n }", "public static void writeTextToFile(String fileName,String text){\r\n File file=new File(fileName);\r\n log.fine(\"Writing to file: \"+fileName);\r\n try { if (!file.exists()){\r\n file.createNewFile();\r\n }\r\n PrintWriter out=new PrintWriter(file.getAbsoluteFile());\r\n try {\r\n out.print(text);\r\n }finally {\r\n out.close();\r\n }\r\n }catch (IOException e){\r\n throw new RuntimeException(e);\r\n }\r\n }", "private static void createTestFile(String path) throws IOException {\n\t\tFile file = new File(path);\n\t\tFileWriter writer = new FileWriter(file);\n\t\twriter.write(\"Jenkins Test : \"+new Date() + \" ==> Writing : \" + Math.random());\n\t\twriter.flush();\n\t\twriter.close();\n\t}", "public static void createFile(String path) {\n try {\n Scanner scanner = new Scanner(System.in);\n System.out.println(\"Enter the file name :\");\n String filepath = path+\"/\"+scanner.next();\n File newFile = new File(filepath);\n newFile.createNewFile();\n System.out.println(\"File is Created Successfully\");\n\n } catch (Exception ex) {\n System.out.println(ex.getMessage());\n }\n }", "@Override\n public File createFile(String path) throws IOException {\n String pathStr=path+fileSeparator+\"Mail.json\";\n File file = new File(pathStr);\n file.createNewFile();\n return file;\n }", "void createFile()\n {\n //Check if file already exists\n try {\n File myObj = new File(\"src/main/java/ex45/exercise45_output.txt\");\n if (myObj.createNewFile()) {\n System.out.println(\"File created: \" + myObj.getName());// created\n } else {\n System.out.println(\"File already exists.\"); //exists\n }\n //Error check\n } catch (IOException e) {\n System.out.println(\"An error occurred.\");\n e.printStackTrace();\n }\n }", "public static void writeString(String path, String content) {\n //Open file\n Path jPath = Paths.get(path);\n\n //Create file if necessary\n if (!Files.exists(jPath, LinkOption.NOFOLLOW_LINKS)) {\n try {\n Files.createFile(jPath);\n } catch (IOException ex) {\n System.out.print(ex);\n System.exit(1);\n }\n }\n\n //Error if not writable\n if (!Files.isWritable(jPath)) {\n System.out.println(\"File \" + jPath + \" could not be written!\");\n System.exit(1);\n }\n //Write lines\n try {\n Files.write(jPath, content.getBytes(Charset.forName(\"UTF-8\")));\n } catch (IOException ex) {\n System.out.println(ex);\n }\n }", "public static void createFile(String name)\n {\n file = new File(name);\n try\n {\n if(file.exists())\n {\n file.delete();\n file.createNewFile();\n }else file.createNewFile();\n \n fileWriter = new FileWriter(file);\n fileWriter.append(\"Generation, \");\n fileWriter.append(\"Fitness, \");\n fileWriter.append(\"Average\\n\");\n \n }catch (IOException e) \n {\n System.out.println(e);\n }\n \n }", "public void write(String filename, String text) {\n\n try (FileWriter writer = new FileWriter(filename)) {\n writer.write(text);\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n }", "public static void FileWrite(String path, String content) {\n\t\tFile file = new File(path);\n\t\ttry {\n\t\t\tFileOutputStream fop = new FileOutputStream(file);\n\t\t\t// if file doesn't exists, then create it\n\t\t\tif (!file.exists()) {\n\t\t\t\tfile.createNewFile();\n\t\t\t}\n\t\t\t// get the content in bytes\n\t\t\tbyte[] contentInBytes = content.getBytes();\n\t\t\tfop.write(contentInBytes);\n\t\t\tfop.flush();\n\t\t\tfop.close();\n\t\t\tSystem.out.println(\"Content :\\\"\" + content\n\t\t\t\t\t+ \"\\\" is written in File: \" + path);\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "private void writeFile(String path, String contents) throws IOException {\n File file = new File(dir, path);\n\n try (FileWriter writer = new FileWriter(file)) {\n writer.write(contents);\n }\n }", "public void addToFile(String pathName, String message) throws IOException{\n FileOutputStream fos = new FileOutputStream(pathName, true);\n message = \"\\n\" + message;\n fos.write(message.getBytes());\n fos.close();\n\n }", "public void writeToTextFile(String fileName, String content) throws IOException {\n \tFiles.write(Paths.get(fileName), content.getBytes(), StandardOpenOption.CREATE);\n \t}", "public static void main(String[] args) {\n\t\tFile file = new File(\"test/a.txt\");\r\n\t\tFileUtil.createFile(file);\r\n\t\t/*if(! file.exists()){\r\n\t\t\ttry {\r\n\t\t\t\tSystem.out.println(file.getAbsolutePath());\r\n\t\t\t\tfile.createNewFile();\r\n\t\t\t} catch (IOException e) {\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t}\r\n\t\t}\r\n\t\t*/\r\n\t}", "public static void createFile(String file) throws FileNotFoundException {\n\t\tif(!file.contains(\".txt\")) {\n\t\t\tthrow new IllegalArgumentException(\"Wrong format\"); \n\t\t}\n\t\tPrintWriter pw = new PrintWriter(file);\n\t\tpw.close();\n\n\t}", "private void createFile(PonsFileFactory ponsFileFactory, Profile profile){\n moveX(profile);\n ponsFileFactory.setProfile(profile);\n String text = ponsFileFactory.createPonsFile();\n String profileName = profile.getName();\n WriteFile.write(text,pathTextField.getText() + \"/\" + profileName.substring(0,profileName.indexOf(\".\")));\n }", "public static void save(String text, String fileName) {\n //check the directory has been created\n File dir = new File(path);\n if(!dir.exists()){\n boolean success = dir.mkdir();\n if(! success){\n Log.e(\"walter's tag\", \"In Saver.java, setup() failed to create directory\");\n return;\n }\n }\n\n //save the text file in the directory\n File file = new File(path + \"/\" + fileName);\n Save(file, text);\n }", "public static void appendString(String path, String content) {\n //Open file\n Path jPath = Paths.get(path);\n\n //Create file if necessary\n if (!Files.exists(jPath, LinkOption.NOFOLLOW_LINKS)) {\n try {\n Files.createFile(jPath);\n } catch (IOException ex) {\n System.out.print(ex);\n System.exit(1);\n }\n }\n\n //Error if not writable\n if (!Files.isWritable(jPath)) {\n System.out.println(\"File \" + jPath + \" could not be written!\");\n System.exit(1);\n }\n //Write lines\n try {\n FileWriter fw = new FileWriter(path, true);\n fw.write(content);//appends the string to the file\n fw.close();\n } catch (IOException ex) {\n System.out.println(ex);\n }\n }", "public static void checkTextFile(String dir){\n java.nio.file.Path checkFilePath = java.nio.file.Paths.get(dir+\"/data/duke.txt\");\n boolean fileExists = java.nio.file.Files.exists(checkFilePath);\n //text file not exists, create one\n if(!fileExists) {\n try {\n File dukeFile = new File(dir+\"/data/duke.txt\");\n dukeFile.createNewFile();\n } catch (IOException e) {\n System.out.println(\"An error occurred while creating file.\");\n e.printStackTrace();\n }\n }\n }", "@Test\n public void testCreateTextFile() {\n System.out.println(\"createTextFile to existing dest Path\");\n String destPath = folder.toString()+fSeparator+\"Texts\"+fSeparator;\n String text = \"qweqweqwewqeqw\";\n String fileName = \"test\";\n FilesDao instance = new FilesDao();\n boolean expResult = true;\n boolean result = instance.createTextFile(destPath, text, fileName);\n assertEquals(\"Some message\",expResult, result);\n }", "public static void CreateFile (String filename) {\r\n\t\t try {\r\n\t\t File myObj = new File(filename + \".txt\");\r\n\t\t if (myObj.createNewFile()) {\r\n\t\t System.out.println(\"File created: \" + myObj.getName());\r\n\t\t } else {\r\n\t\t System.out.println(\"File already exists.\");\r\n\t\t }\r\n\t\t } catch (IOException e) {\r\n\t\t System.out.println(\"An error occurred.\");\r\n\t\t e.printStackTrace();\r\n\t\t }\r\n\t\t }", "public void saveFile(File file, String text) {\r\n\t\t\r\n\t\tif (file==null){\r\n\t\t\treturn;\t\r\n\t\t}\r\n\r\n\t\ttry (BufferedWriter bw = new BufferedWriter(new FileWriter(file))) {\r\n\r\n\t\t\tbw.write(text);\r\n\r\n\t\t} catch (IOException e) {\r\n\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\r\n\t}", "public void appendFile(String path, String content) throws Exception {\n\n\t\ttry {\n\n\t\t\t// Create file\n\t\t\tFileWriter fstream = new FileWriter(path, true);\n\t\t\tBufferedWriter out = new BufferedWriter(fstream);\n\t\t\tout.append('\\n');\n\t\t\tout.append(content);\n\t\t\t// Close the output stream\n\t\t\tout.close();\n\t\t} catch (Exception e) {\n\t\t\tlogger.error(\"Error escribiendo fichero\", e);\n\t\t}\n\n\t}", "@SuppressWarnings(\"unused\")\r\n\tprivate static File createFile(String path) {\r\n\t\t\r\n\t\t// open the file\r\n\t\tFile currentFile = new File(path);\r\n\t\t\r\n\t\t\r\n\t\t// check if it is a valid file\r\n\t\tif (currentFile == null) {\r\n\t\t\tSystem.out.println(\"Could not create the file\");\r\n\t\t\tthrow new NullPointerException();\r\n\t\t}\r\n\r\n\t\t// hopefully things went perfect\r\n\t\treturn currentFile;\r\n\r\n\t}", "public void createFile(String name, String type) {\n\n final String fileName = name;\n\n final String fileType = type;\n\n // create new contents resource\n Drive.DriveApi.newDriveContents(mGoogleApiClient)\n .setResultCallback(new ResultCallback<DriveApi.DriveContentsResult>() {\n @Override\n public void onResult(DriveApi.DriveContentsResult result) {\n\n if (!result.getStatus().isSuccess()) {\n\n return;\n }\n\n final DriveContents driveContents = result.getDriveContents();\n\n // Perform I/O off the UI thread.\n new Thread() {\n\n @Override\n public void run() {\n\n if (mCRUDapi != null) {\n // write content to DriveContents\n mCRUDapi.onCreateFile(driveContents.getOutputStream());\n }\n\n createFile(fileName, fileType, driveContents);\n }\n }.start();\n\n\n }\n });\n }", "public void writeFile(String content){\n\t\tFile file = new File(filePath);\n\t\t\n\t\tBufferedWriter bw = null;\n\t\t\n\t\ttry{\n\t\t\tif (!file.exists())\n\t\t\t\tfile.createNewFile();\n\t\t\t\n\t\t\tbw = new BufferedWriter(new FileWriter(file));\n\t\t\tbw.write(content);\n\t\t}\n\t\tcatch (Exception oops){\n\t\t\tSystem.err.print(\"There was an error writing the file \"+oops.getStackTrace());\n\t\t}\n\t\tfinally{\n\t\t\ttry{\n\t\t\t\tbw.close();\n\t\t\t}\t\n\t\t\tcatch(IOException oops){\n\t\t\t\tSystem.err.print(\"There was an error closing the write buffer \"+oops.getStackTrace());\n\t\t\t}\n\t\t}\n\t}", "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 static void modifytext (String name) throws IOException {\n // Copy the contents of the input file and put it into the new file\n File inputF = new File(\"src/main/java/ex45/\"+ name +\".txt\");\n Path dest = inputF.toPath();\n Path src = Paths.get(\"src/main/java/ex45/exercise45_input.txt\");\n Files.copy(src, dest);\n\n // This process will replace the word 'utilize' with the word 'use'\n String utilize = new String(Files.readAllBytes(dest));\n Charset charset = StandardCharsets.UTF_8;\n utilize = utilize.replaceAll(\"utilize\", \"use\");\n Files.write(dest, utilize.getBytes(charset));\n\n System.out.print(\"Your file has been created.\");\n }", "private void createScheduleFile() {\n try {\n File scheduleFile = new File(filePath, \"schedule.txt\");\n// FileWriter fw = new FileWriter(scheduleFile);\n\n OutputStreamWriter osw = new OutputStreamWriter(new FileOutputStream(scheduleFile), StandardCharsets.UTF_8);\n osw.write(\"SCHEDULE:\\n\" + schedule);\n osw.close();\n\n System.out.println(\"schedule.txt successfully created.\");\n\n } catch (IOException e) {\n e.printStackTrace();\n }\n }", "public void writeFile(String Path, String File_name, String Content) {\n\t\tFile f1 = new File( Path + \"/\" + File_name);\n\t try {\n\t // отрываем поток для записи\n\t BufferedWriter bw = new BufferedWriter(new FileWriter(f1));\n\t // пишем данные\n\t bw.write(Content);\n\t // закрываем поток\n\t bw.close();\n\t Log.d(LOG_TAG, \"Файл записан\");\n\t } catch (FileNotFoundException e) {\n\t e.printStackTrace();\n\t } catch (IOException e) {\n\t e.printStackTrace();\n\t }\n\t }", "public File createFile(final String path) {\n return new com.good.gd.file.File(path);\n }", "protected void openWriteFile(Path filePath, String s) throws IOException{\n\t\tBufferedWriter writer = Files.newBufferedWriter(filePath, ENCODING);\n\t\twriter.write(s, 0, s.length());\n\t\twriter.close();\n\t}", "public void createFile(String fname) {\n\t\tprintMsg(\"running createFiles() in \\\"\" + this.getClass().getName() + \"\\\" class.\");\n\t\t\n\t\t// Check if the scratch directory exists, create it if it doesn't\n\t\tPath rootpath = Paths.get(theRootPath);\n\t\tcreateScratchDirectory(rootpath);\n\n\t\t// Check if the file name is null or empty, if it is, use default name\n\t\tPath filepath = null;\n\t\tif(fname == null || fname.isEmpty()) {\n\t\t\tfilepath = Paths.get(rootpath + System.getProperty(\"file.separator\") + theFilename);\n\t\t} else {\n\t\t\tfilepath = Paths.get(rootpath + System.getProperty(\"file.separator\") + fname);\n\t\t}\n\t\t\n\t\t// Create file\n\t\ttry {\n\t\t\t// If file exists already, don't override it.\n\t\t\tif(!Files.exists(filepath)) {\n\t\t\t\tFiles.createFile(filepath);\n\t\t\t}\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public static void writeFile(final String contents, final String name) {\n writeFile(contents, name, false);\n }", "String createTempFile(String text,String filename) {\r\n\t\tString tmpDirectory = Configuration.getConfiguration().getMpdTmpSubDir();\r\n\t\tif(!tmpDirectory.endsWith(java.io.File.separator)) {\r\n\t\t\ttmpDirectory += java.io.File.separator;\r\n\t\t}\r\n\t\tconvert(text,Configuration.getConfiguration().getMpdFileDirectory(),tmpDirectory+filename);\r\n\t\t\r\n\t\treturn tmpDirectory+filename;\r\n\t}", "public void writeFile(String text, String writePath)\r\n\t{\r\n\t\t//Use a filewriter but change it to a buffered writer. Open writing on the file provided by writePath\r\n\t\ttry (BufferedWriter writer = new BufferedWriter(new FileWriter(writePath)))\r\n\t\t{\r\n\t\t\t// Write given text to file\r\n\t\t\twriter.write(text);\t\r\n\t\t} \r\n\t\tcatch (IOException except)\r\n\t\t{\r\n\t\t\texcept.printStackTrace();\r\n\t\t}\r\n\r\n\t}", "void createNewScriptFile(String scriptContent) {\n String fileName = prop.getProperty(\"FileName\");\n try {\n // Assume default encoding.\n FileWriter fileWriter = new FileWriter(fileName);\n // Always wrap FileWriter in BufferedWriter.\n BufferedWriter bufferedWriter = new BufferedWriter(fileWriter);\n // Note that write() does not automatically append a newline character.\n bufferedWriter.write(scriptContent);\n // Always close files.\n bufferedWriter.close();\n } catch (IOException ex) {\n System.out.println(\"Error writing to file '\" + fileName + \"'\");\n }\n }", "static void writeFile(String path , String data) throws IOException{\n\t\tFileOutputStream fo = new FileOutputStream(path,true);\n\t\tfo.write(data.getBytes());\n\t\tfo.close();\n\t\tSystem.out.println(\"Done...\");\n\t}", "public static void fileWriter(String path, String fileName, Object printLine) throws NumberFormatException, IOException {\n // Create File:\n\t\t\t\tFile f = new File(path + File.separator + fileName);\t\t\t\t \n\t\t\t // Write or add a String line into File:\t\n\t\t\t FileWriter fw = new FileWriter(f,true);\n\t\t\t PrintWriter pw = new PrintWriter(fw);\n\t\t\t pw.println(printLine);\n\t\t\t pw.close();\n\t\t\t}", "public static void createSimpleFile( final Configuration conf, final Path file, String data ) throws IOException\r\n\t{\r\n\t\tFSDataOutputStream out = null;\r\n\t\ttry {\r\n\t\t\tout = file.getFileSystem(conf).create(file);\r\n\t\t\tout.write(data.getBytes(\"UTF-8\"));\r\n\t\t} finally {\r\n\t\t\tif (out!=null) {\r\n\t\t\t\tout.close();\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public void createFile() throws IOException {\n String newName = input.getText();\n File user = new File(\"SaveData\\\\UserData\\\\\" + newName + \".txt\");\n\n if (user.exists() && !user.isDirectory()) {\n input.setStyle(\"-fx-border-color: red\");\n }\n if (user.exists() && !user.isDirectory() || newName.isEmpty()) {\n input.setStyle(\"-fx-border-color: red\");\n ERROR_AUDIO.play(Double.parseDouble(getInitData().get(\"SFXVol\")));\n\n }\n else {\n input.setStyle(\"-fx-border-color: default\");\n playerList.getItems().addAll(newName);\n PrintWriter newUser = new PrintWriter(new FileWriter(\"SaveData\\\\UserData\\\\\" + newName + \".txt\"));\n newUser.write(\"0 0 0 0 icon0 car\");\n newUser.close();\n MAIN_MENU_AUDIO.play(Double.parseDouble(getInitData().get(\"SFXVol\")));\n }\n }", "public static void writeLineToFile(String filePath, String text) throws IOException {\n\t\t\n\t\t// Create the writer\n\t\tPrintWriter out = new PrintWriter(new BufferedWriter(new FileWriter(filePath, true)));\n\t\t\n\t\t// Write a line to the file\n\t\tout.println(text);\n\t\tout.close();\n\t}", "public static void write(String path, String content) {\n\t\ttry {\n\t\t\tFile file = new File(path);\n\t\t\t// If file doesn't exists, then create it\n\t\t\tif (!file.exists()) {\n\t\t\t\tfile.createNewFile();\n\t\t\t}\n\t\t\tFileWriter fw = new FileWriter(file.getAbsoluteFile());\n\t\t\tBufferedWriter bw = new BufferedWriter(fw);\n\t\t\t// Write in file\n\t\t\tbw.write(content);\n\t\t\t// Close connection\n\t\t\tbw.close();\n\t\t} catch (Exception e) {\n\t\t\tSystem.out.println(e);\n\t\t}\n\t}", "public static void appendFile(final String contents, final String name) {\n writeFile(contents, name, true);\n }", "public static void fillFileWithString(IFile file, String content)\n throws CoreException {\n \tfinal boolean[] done=new boolean[]{false};\n \tIProgressMonitor monitor=new IProgressMonitor() {\n\t\t\t\n\t\t\t@Override\n\t\t\tpublic void worked(int work) {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\t@Override\n\t\t\tpublic void subTask(String name) {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\t@Override\n\t\t\tpublic void setTaskName(String name) {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\t@Override\n\t\t\tpublic void setCanceled(boolean value) {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\t@Override\n\t\t\tpublic boolean isCanceled() {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\t\n\t\t\t@Override\n\t\t\tpublic void internalWorked(double work) {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\t@Override\n\t\t\tpublic void done() {\n\t\t\t\tdone[0]=true;\n\t\t\t}\n\t\t\t\n\t\t\t@Override\n\t\t\tpublic void beginTask(String name, int totalWork) {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\t\n\t\t\t}\n\t\t};\n \tByteArrayInputStream stream = new ByteArrayInputStream(content.getBytes());\n \tif (file.exists()) {\n file.setContents(stream, 0, monitor);\n } else {\n file.create(stream, true, monitor);\n }\n \twhile(!done[0]){\n \t\tsleep(.1);\n \t}\n }", "public void writeToFile(StringBuilder text)throws IOException{\n\n Path filePath = Paths.get(\"index.txt\");\n if (!Files.exists(filePath)) {\n \t Files.createFile(filePath);\n \t}\n \tFiles.write(filePath, text.toString().getBytes(), StandardOpenOption.APPEND);\n }", "static void writeFile(String path, String content)\n\t\t\tthrows FileNotFoundException, UnsupportedEncodingException {\n\t\tPrintWriter writer = new PrintWriter(path, \"UTF-8\");\n\t\twriter.println(content);\n\t\twriter.close();\n\t}", "public void createFiles() {\r\n try {\r\n FileWriter file = new FileWriter(registerNumber + \".txt\");\r\n file.write(\"Name : \" + name + \"\\n\");\r\n file.write(\"Surname : \" + surname + \"\\n\");\r\n file.write(\"Registration Number : \" + registerNumber + \"\\n\");\r\n file.write(\"Position : \" + position + \"\\n\");\r\n file.write(\"Year of Start : \" + yearOfStart + \"\\n\");\r\n file.write(\"Total Salary : \" + Math.round(totalSalary) + \".00 TL\" +\"\\n\");\r\n file.close();\r\n }\r\n catch(IOException e) {\r\n e.printStackTrace();\r\n }\r\n }", "public void createFile (String filePath){\n try{\n File newFile = new File(filePath);\n if(newFile.createNewFile()){\n System.out.println(\"File created: \"+newFile.getName());\n } else {\n System.out.println(\"File already exists.\");\n }\n } catch (IOException e) {\n System.out.println(\"An error occurred.\");\n e.printStackTrace();\n }\n }", "public void saveFileAs(String text) {\r\n\r\n\t\tFile tempFile;\r\n\t\ttempFile = fileChooser.showSaveDialog(fileChooserDialog);\r\n\t\tsaveFile(tempFile, text);\r\n\t\t\r\n\t\r\n\t\t\r\n\t}", "public static void main(String[] args) throws IOException {\n\t\t\r\n File file = new File(\"C:\\\\Users\\\\balaji\\\\Desktop\\\\commons\\\\commons-io-2.6\\\\text file\\\\text1.txt\");\r\n\t\t\r\n\t\tFileUtils.write(file, \"Learning is Growing\", \"UTF-8\", false);\r\n\r\n\r\n\t}", "public static void writeText(File file, String text) {\r\n\t\ttry{\r\n\t\t\tSystem.out.println(text);\r\n\t\t\tFileWriter FW = new FileWriter(file);\r\n\t\t\tBufferedWriter BW = new BufferedWriter(FW);\r\n\t\t\tBW.write(text);\r\n\t\t\tBW.close();\r\n\t\t} catch (IOException e){\r\n\t\t\tSystem.out.println(\"error writing text\");\r\n\t\t}\r\n\t}", "public void geraArquivoAjudaTextual(String caminho, String nomeArquivo, String texto) {\r\n\t\ttry {\r\n\t\t\tarquivoTexto = new File(caminho + \"\\\\\" + nomeArquivo);\r\n\t\t\tFileWriter fw = new FileWriter(arquivoTexto);\r\n\t\t\tPrintWriter pw = new PrintWriter(fw);\r\n\t\t\tpw.write(texto);\r\n\t\t\tfw.close();\r\n\t\t} catch (IOException e) {\r\n\t\t}\r\n\t}", "public static void writeNewMintGame(File appdir, String name, String content) {\n boolean successful;\n File presaved = new File(appdir + \"\\\\\" + name + \".txt\");\n try (FileWriter presavedwr = new FileWriter(presaved)) {\n successful = presaved.createNewFile();\n presavedwr.write(content);\n } catch (IOException e) {\n e.printStackTrace();\n }\n }", "public static void addArquivo(String texto, String nomeArquivo){\n\t\ttry {\n\t\t\tboolean logExiste = false;\n\t\t\tFile file = new File(nomeArquivo);\n\t\t\tlogExiste = file.exists();\n\t\t\t\n\t\t\tFileWriter fw = new FileWriter(nomeArquivo, true);\n\t\t\tBufferedWriter bw = new BufferedWriter(fw);\n\t\t\t\n\t\t\tif (logExiste)\n\t\t\t\tbw.append(\"\\n\" + texto);\n\t\t\telse\n\t\t\t\tbw.write(texto);\n\t\t\t\n\t\t\t\n\t\t\tbw.close();\n\t\t\t\n\t\t\t}\n\t\t\tcatch (IOException e){\n\t\t\t\te.printStackTrace();\n\t\t\t\tSystem.out.println(\"Impossivel gravar no arquivo\");\n\t\t\t}\n\t}", "public static void enterNewTXTFile(String input, String id, String newName, String newHandle, String newTime, String newTweet)\n {\n try {\n String str = Integer.parseInt(id)+ \" \" +newName+ \" \" +newHandle+ \" \" +newTime+ \" \" +newTweet+ \" \";\n writer = new BufferedWriter(new FileWriter(input, true)); // continue to write to existing output file\n writer.write(str);\n writer.newLine();\n writer.close();\n \n } catch (Exception e) { System.out.println(e); }\n }", "public static void writeToFile(String text, String fileName) {\r\n\t\t// Get the file reference\r\n\t\tif (null != text && null != fileName) {\r\n\t\t\tSystem.out.println(\"Writing to file....\"+FILEPATH+ \"\\\\\" + fileName + \".txt\");\r\n\t\t\tPath path = Paths.get(FILEPATH+\"\\\\\" + fileName + \".txt\");\r\n\t\t\ttext = text.replaceAll(NEWLINE+\",\", \"\\r\\n\");\r\n\t\t\ttry (BufferedWriter writer = Files.newBufferedWriter(path)) {\r\n\t\t\t\twriter.write(text);\r\n\t\t\t} catch (IOException e) {\r\n\t\t\t\tSystem.out.println(\"Unable to generate the output file!\" + e.getMessage());\r\n\t\t\t}catch (Exception e) {\r\n\t\t\t\tSystem.out.println(\"Unable to generate the output file!\" + e.getMessage());\r\n\t\t\t}\r\n\t\t\tSystem.out.println(\"File generated path: \"+FILEPATH +\"\\\\\"+ fileName + \".txt\");\r\n\t\t}\r\n\t}", "public static void writeFile(String msg){\n\t\ttry { \n File f1 = new File(\"/Users/snehithraj/eclipse-workspace/ThreePhaseCommit/src/ServerDB.txt\");\n if(!f1.exists()) {\n f1.createNewFile();\n } \n FileWriter fileWriter = new FileWriter(f1.getName(),true);\n BufferedWriter bw = new BufferedWriter(fileWriter);\n bw.write(msg);\n bw.close();\n } catch(IOException e){\n e.printStackTrace();\n }\n }", "public void createFile(File file) throws IOException {\n if (!file.exists()) {\n file.createNewFile();\n }\n }", "public static void write(String path, String message) {\r\n\t\t\r\n\t\t// open the file\r\n\t\tFile file = new File(path);\r\n\t\t\r\n\t\t\r\n\t\t// if the file does not exist try to create one\r\n\t\tif (!file.exists())\r\n\t\t\tfile = createFile(path);\r\n\t\t\r\n\t\t\r\n\t\t// write to the file\r\n\t\ttry {\r\n\t\t\t// open stream\r\n\t\t\tFileWriter fWrite = new FileWriter(file);\r\n\t\t\tBufferedWriter bufferedWriter = new BufferedWriter(fWrite);\r\n\t\t\t\r\n\t\t\t// write new lines if any was found\r\n\t\t\tfor (String i : message.split(\"(\\n)+\")) {\r\n\t\t\t\tbufferedWriter.write(i);\r\n\t\t\t\tbufferedWriter.newLine();\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t// close anything was opened\r\n\t\t\tbufferedWriter.close();\r\n\t\t\tfWrite.close();\r\n\r\n\t\t} catch (Exception e) {\r\n\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t}", "private void saveTextToFile(String content, File file) {\n try {\n PrintWriter writer;\n writer = new PrintWriter(file);\n writer.println(content);\n writer.close();\n } catch (IOException ex) {\n Logger.getLogger(Main.class.getName()).log(Level.SEVERE, null, ex);\n }\n }", "FileContent createFileContent();", "public void saveFile(String path, String data) throws IOException {\n\n FileWriter writer = new FileWriter(getFile(path));\n writer.write(data);\n writer.flush();\n }", "public void writeFileContents(String filename, String contents) {\n }", "public static void makeNewFile(File root, String name) {\n File directory = new File(root, name);\n try {\n if (!directory.createNewFile()) {\n throw new IOException(\"Could not create \" + name + \", file already exists\");\n }\n } catch (IOException e) {\n throw new UncheckedIOException(\"Failed to create file: \" + name, e);\n }\n }", "public static void writeFile(final File f, final String content) throws IOException {\n final FileOutputStream o = new FileOutputStream(f);\n o.write(content.getBytes());\n o.close();\n }", "public static File saveFile(String name, String data) {\n if (name == null) {\n name = \"\";\n }\n String fullyQualifiedName = name;\n\n // if filename is not absolute use current path as base dir\n if (!new File(fullyQualifiedName).isAbsolute()) {\n fullyQualifiedName = Paths.get(\"\").toAbsolutePath() + \"/\" + name;\n }\n try {\n // create subdirs (if there any)\n if (fullyQualifiedName.contains(\"/\")) {\n File f = new File(fullyQualifiedName.substring(0, fullyQualifiedName.lastIndexOf(\"/\")));\n f.mkdirs();\n }\n File file = new File(fullyQualifiedName);\n file.createNewFile();\n FileUtils.write(file, data, \"UTF-8\");\n log.info(\"Wrote: {}\", file.getAbsolutePath());\n return file;\n } catch (IOException e) {\n log.error(\"Could not create file {}\", name, e);\n return null;\n }\n }", "public EnigmaFile() throws Exception\n {\n\n String path = Main.class.getClassLoader().getResource(\"filein.txt\").getPath();\n File currentDirectory=new File(path);\n finstream = new FileInputStream(currentDirectory);\n\n\n String pathToWrite = path.replaceFirst(\"filein.txt\",\"fileout.txt\");\n File outputFile = new File(pathToWrite);\n br = new BufferedReader(new InputStreamReader(finstream));\n outputFile.createNewFile();\n FileWriter fileWrite = new FileWriter(outputFile.getAbsoluteFile());\n writer = new BufferedWriter(fileWrite);\n\n\n }", "public static void init(){\n Path path = FileDirectoryUtil.getPath(\"src\", \"fileIO\", \"test.txt\");\n FileDirectoryUtil.tryCreateDirectory(path);\n\n // Try to create the file\n path = Paths.get(path.toAbsolutePath().toString(), \"test.txt\");\n FileDirectoryUtil.tryCreateFile(path);\n\n // Print out the final location of the file\n System.out.println(path.toAbsolutePath());\n\n // Try to write to the file\n IOUtil.tryWriteToFile(getContent(), path);\n\n // Try to print the content of the file\n IOUtil.tryPrintContents(path);\n\n }", "public static void writeTextFile(File file, String content) throws IOException {\n BufferedWriter bw = new BufferedWriter(new FileWriter(file));\n bw.write(content, 0, content.length());\n bw.flush();\n bw.close();\n }", "public static void main(String[] args) throws IOException {\n\r\n\t\tString FileLoc = \"UsingPath.txt\";\r\n\t\tString content = \"Content of this file is written using Path class in Java\";\r\n\t\t\r\n\t\t//Using Path class, getting file location\r\n\t\tPath getFile = Paths.get(FileLoc);\r\n\t\t\r\n\t\t//Using Files function getting the content of file as bytes and writing to file\r\n\t\tFiles.write(getFile, content.getBytes());\r\n\t\t\r\n\t\t\r\n\t}", "public static void writeFile(String text) throws IOException {\n\t\tWriter out = null;\n\t\ttry {\n\t\t\tout = new BufferedWriter(\n\t\t\t\t\tnew OutputStreamWriter(new FileOutputStream(\"toTranslate.txt\"), StandardCharsets.UTF_8));\n\t\t} catch (FileNotFoundException e1) {\n\t\t\tLOGGER.log(Level.WARNING, \"FileNotFoundException\", e1);\n\t\t\t;\n\t\t}\n\t\ttry {\n\t\t\tif (out != null)\n\t\t\t\tout.write(text);\n\t\t\telse\n\t\t\t\tSystem.out.println();\n\t\t} catch (IOException e) {\n\t\t\tLOGGER.log(Level.WARNING, \"IOException\", e);\n\t\t\t;\n\t\t} finally {\n\t\t\ttry {\n\t\t\t\tif (out != null)\n\t\t\t\t\tout.close();\n\t\t\t} catch (IOException e) {\n\t\t\t\tLOGGER.log(Level.WARNING, \"IOException\", e);\n\t\t\t\tThread.currentThread().interrupt();\n\t\t\t}\n\t\t}\n\t}", "public static void save(String text) {\n File file = new File(path + \"/savedFile.txt\");\n\n Save(file, text);\n }", "private static void dosyaYazici(String text)\n {\n File log = new File(\"log.txt\");\n try\n {\n if (!log.exists())\n {\n log.createNewFile();\n }\n FileWriter fileWriter = new FileWriter(log,true);\n BufferedWriter bufferedWriter = new BufferedWriter(fileWriter);\n bufferedWriter.append(text+\"\\n\");\n bufferedWriter.close();\n //System.out.print(\"TEST\");\n }\n catch (IOException e)\n {\n System.out.print(\"DOSYA HATASI!\");\n e.printStackTrace();\n }\n\n }", "public ActionScriptBuilder createFile(String filecontents, String filepath){\n\t\treturn createFile(filecontents,filepath,true);\n\t}", "public static void main(String[] args) throws IOException {\n\t\t\n\t\tFile f = new File(\"c:\\\\Ranjan\", \"ranjan1.txt\");\n\t\tf.createNewFile();\n\t\t\n\t\tSystem.out.println(f.getPath());\n\t\tSystem.out.println(f);\n\t}", "private void createFile() {\n if (mDriveServiceHelper != null) {\n Log.d(\"error\", \"Creating a file.\");\n\n mDriveServiceHelper.createFile()\n .addOnSuccessListener(fileId -> readFile(fileId))\n .addOnFailureListener(exception ->\n Log.e(\"error\", \"Couldn't create file.\", exception));\n }\n }", "public static void outputFile(String name, String path, List<String> txt)\n\t{\n\t\tString pathb = Constants.path + \"/\" + path;\n\n\t\tFile folder = new File(pathb);\n\t\tif (!folder.exists())\n\t\t{\n\t\t\tfolder.mkdirs();\n\t\t}\n\t\ttry\n\t\t{\n\t\t\tFile bin = new File(pathb, \"bin.inf\");\n\n\t\t\tboolean binex = false;\n\t\t\tboolean recount = false;\n\t\t\tint count = -1;\n\t\t\tif (!bin.exists())\n\t\t\t{\n\t\t\t\tbin.createNewFile();\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tbinex = true;\n\t\t\t\tFileReader fr = new FileReader(bin);\n\t\t\t\tBufferedReader br = new BufferedReader(fr);\n\n\t\t\t\tcount = Integer.parseInt(br.readLine());\n\t\t\t\tbr.close();\n\t\t\t}\n\n\t\t\tfor (int i = count; i >= -1; i--)\n\t\t\t{\n\t\t\t\tFile file = new File(pathb, addBefoPnt(name, \"_\" + i));\n\t\t\t\tif (file.exists())\n\t\t\t\t{\n\t\t\t\t\tfile.renameTo(new File(pathb, addBefoPnt(name, \"_\" + (i + 1))));\n\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t\tif (i == -1)\n\t\t\t\t\t{\n\t\t\t\t\t\tfile = new File(pathb, addBefoPnt(name, \"_latest\"));\n\t\t\t\t\t\tif (file.exists())\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tfile.renameTo(new File(pathb, addBefoPnt(name, \"_\" + (i + 1))));\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t\trecount = true;\n\t\t\t}\n\n\t\t\tFile file = new File(pathb, addBefoPnt(name, \"_\" + (count + 1)));\n\n\t\t\tif (file.exists())\n\t\t\t{\n\t\t\t\trecount = true;\n\t\t\t}\n\n\t\t\tfile = new File(pathb, addBefoPnt(name, \"_latest\"));\n\t\t\tfile.createNewFile();\n\n\t\t\tFileWriter ffr = new FileWriter(file);\n\t\t\tBufferedWriter fbr = new BufferedWriter(ffr);\n\n\t\t\tfor (String s : txt)\n\t\t\t{\n\t\t\t\tfbr.write(s + \"\\n\");\n\t\t\t}\n\n\t\t\tfbr.flush();\n\t\t\tfbr.close();\n\t\t\tif (!binex)\n\t\t\t{\n\t\t\t\t// -1 for latest\n\t\t\t\tint cnt = -1;\n\t\t\t\tFile f = new File(pathb, name + \"_\" + 0);\n\t\t\t\twhile (f.exists())\n\t\t\t\t{\n\t\t\t\t\tcnt += 1;\n\t\t\t\t\tf = new File(pathb, addBefoPnt(name, \"_\" + (cnt + 1)));\n\t\t\t\t}\n\t\t\t\tFileWriter fr = new FileWriter(bin);\n\t\t\t\tBufferedWriter br = new BufferedWriter(fr);\n\n\t\t\t\tbr.write(cnt + \"\");\n\t\t\t\tbr.flush();\n\t\t\t\tbr.close();\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tFileWriter fr = new FileWriter(bin);\n\t\t\t\tBufferedWriter br = new BufferedWriter(fr);\n\n\t\t\t\tbin.delete();\n\t\t\t\tbin.createNewFile();\n\n\t\t\t\tif (!recount)\n\t\t\t\t\tbr.write(count + 1 + \"\");\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tcount = -1;\n\t\t\t\t\tFile f = new File(pathb, addBefoPnt(name, \"_\" + 0));\n\t\t\t\t\twhile (f.exists())\n\t\t\t\t\t{\n\t\t\t\t\t\tcount += 1;\n\t\t\t\t\t\tf = new File(pathb, addBefoPnt(name, \"_\" + (count + 1)));\n\t\t\t\t\t}\n\t\t\t\t\tbr.write(count + \"\");\n\t\t\t\t}\n\n\t\t\t\tbr.flush();\n\t\t\t\tbr.close();\n\t\t\t}\n\n\t\t}\n\t\tcatch (IOException e)\n\t\t{\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public static void writeData(String data, String path) throws IOException {\n try {\n Files.write(data, new File(path), Charsets.UTF_8);\n } catch (IOException ex) {\n LoggerFactory.getLogger(Resources.class).error(\"Unable to write file to \" + path + \".\", ex);\n throw ex;\n }\n }", "public static void writeStringToFile(String content, File file) throws IOException {\n if(StringUtil.isNullOrBlank(content) || file == null) {\n return;\n }\n if(!file.exists() && !file.createNewFile() || file.isDirectory() || !file.canWrite()) {\n return;\n }\n\n FileOutputStream fos = null;\n try {\n fos = new FileOutputStream(file);\n fos.write(content.getBytes());\n } finally {\n if(fos != null) {\n fos.close();\n }\n }\n }", "public TextFile(String text, String name, String nameForReporting, String parent, String mimeType, long lastModified)\n\t{\n init(text, name, nameForReporting, parent, mimeType, lastModified);\n\t}", "public String putFileFromString(String path, String content){\n Path targetPath = Paths.get( path );\n final StreamDataBodyPart filePart;\n try {\n filePart = new StreamDataBodyPart(\n targetPath.getFileName().toString(), \n new ByteArrayInputStream( content.getBytes( \"UTF-8\" ) ) );\n filePart.setName( \"file\" );\n } catch(UnsupportedEncodingException ex) {\n throw new RuntimeException( \"Bad input for string content\", ex );\n }\n\n final FormDataMultiPart multipart = (FormDataMultiPart) new FormDataMultiPart()\n .bodyPart( filePart );\n\n return target.path( targetPath.getParent().toString() ).request().\n post( Entity.entity( multipart, multipart.getMediaType() ), String.class );\n }", "static void initContacts(){\n String directory = \"contacts\";\n String filename = \"contacts.txt\";\n Path contactsDirectory= Paths.get(directory);\n Path contactsFile = Paths.get(directory, filename);\n try {\n if (Files.notExists(contactsDirectory)) {\n Files.createDirectories((contactsDirectory));\n System.out.println(\"Created directory\");\n }\n if (!Files.exists(contactsFile)) {\n Files.createFile(contactsFile);\n System.out.println(\"Created file\");\n }\n } catch(IOException ioe){\n ioe.printStackTrace();\n }\n }", "private static void writeFileOnClient(FileStore.Client client) throws SystemException, TException, IOException {\n String fileName = \"sample.txt\";\n\n String content = \"Content\";\n\n try {\n\n RFile rFile = new RFile();\n RFileMetadata rFileMetaData = new RFileMetadata();\n\n rFileMetaData.setFilename(fileName);\n rFileMetaData.setFilenameIsSet(true);\n\n rFile.setMeta(rFileMetaData);\n rFile.setMetaIsSet(true);\n\n rFile.setContent(content);\n rFile.setContentIsSet(true);\n\n client.writeFile(rFile);\n\n } catch (TException x) {\n throw x;\n }\n }", "public static void writeFile(String p_name, String p_encoding,\n String p_content)\n throws IOException\n {\n\n BufferedWriter out = new BufferedWriter(new OutputStreamWriter(\n new FileOutputStream(p_name), p_encoding));\n\n out.write(p_content);\n\n out.close();\n }", "public static void createFile(File source) {\n try {\n if (!source.createNewFile()) {\n throw new IOException();\n }\n } catch (IOException e) {\n throw new RuntimeException(\"Failed to create file: \" + source.getAbsolutePath(), e);\n }\n }", "String createPermanentFile(String text) {\r\n\t\t// create a filename based on the hash code of the text\r\n\t\tint hashCode = text.hashCode();\r\n\t\tString fileName = hashCode+\".mp3\";\r\n\t\tlog.config(\"createPermanentFile for text \"+text+\" filename=\"+fileName);\r\n\t\tFile file = new File(Configuration.getConfiguration().getMpdFileDirectory(),fileName);\r\n\t\t\r\n\t\t// if a file with this text does not already exist => create it\r\n\t\tif(!file.exists()) {\r\n\t\t\tlog.fine(\"file does not exist - need to convert\");\r\n\t\t\tconvert(text,Configuration.getConfiguration().getMpdFileDirectory(),fileName);\r\n\t\t}\r\n\t\t\r\n\t\t// return the filename\r\n\t\treturn fileName;\r\n\t}", "public void createFile(File file) {\n\t\tif (file.exists())\n\t\t\treturn;\n\t\ttry {\n\t\t\tfile.createNewFile();\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public ActionScriptBuilder createFile(String filecontents,String filepath,boolean overwrite,String delimeter){\n\t\tline(\"createfile until \"+delimeter);\n\t\tlines(Arrays.asList(filecontents.split(\"\\n\")));\n\t\tline(delimeter);\n\t\tmove(\"__createfile\",filepath,overwrite);\n\t\treturn this;\n\t}", "public void setText(String txt)\n {\n fileName.setText(txt);\n }", "public static void saveDocument(String path, String textToWrite, Configuration c){\n File f = new File(path);\n Writer out = null;\n try{\n if(f.exists()){\n //JOptionPane.showMessageDialog(null, \"You have overwritten the previous file. This message should be better prepared.\");\n if(!c.getOverWriteAll()){\n String[] options = new String[] {\"Rewrite all\", \"Yes\", \"No\"};\n int response = JOptionPane.showOptionDialog(null, \"The file \"+f.getName()+\" already exists. Do you want to overwrite it?\", \"Existing File!\",JOptionPane.DEFAULT_OPTION, JOptionPane.INFORMATION_MESSAGE,null, options, options[0]);\n //0 -> yes to all. 1 -> Yes. 2-> No\n if(response == 0)c.setOverwriteAll(true); \n if(response == 2)return; //else we continue rewriting the file.\n }\n }\n else{\n f.createNewFile();\n }\n out = new BufferedWriter(new OutputStreamWriter(new FileOutputStream(f), \"UTF-8\"));\n out.write(textToWrite);\n out.close();\n }catch(IOException e){\n System.err.println(\"Error while creating the file \"+e.getMessage()+\"\\n\"+f.getAbsolutePath());\n } \n \n }", "public void textFile(String path){\n\t\tBufferedReader br;\r\n\t\ttry {\r\n\t\t\tbr = new BufferedReader(new InputStreamReader(\r\n\t\t\t\t\tnew FileInputStream(path),Charset.forName(\"gbk\")));\r\n\t\t} catch (FileNotFoundException e) {\r\n\t\t\tthrow new IllegalArgumentException(e);\r\n\t\t}\r\n\t\tLineBufferReader myReader=new LineBufferReader(br);\r\n\t}", "public static void createFile(String fileString) {\n\t\tPath filePath = Paths.get(fileString);\n\t\t// this will only happen if the file is not there\n\t\tif (Files.notExists(filePath)) {\n\t\t\ttry {\n\t\t\t\tFiles.createFile(filePath);\n\t\t\t\tSystem.out.println(\"Your file was cerated successfully\");\n\t\t\t} catch (IOException e) {\n\t\t\t\tSystem.out.println(\"Something went wrong with file creation \");\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\t}" ]
[ "0.7190296", "0.67657495", "0.6720805", "0.66905355", "0.6672956", "0.65468955", "0.6525531", "0.650099", "0.639984", "0.6389891", "0.63443065", "0.6284416", "0.626783", "0.62309676", "0.62182736", "0.6204815", "0.616591", "0.6156325", "0.61283326", "0.6110893", "0.6056178", "0.6046137", "0.60374886", "0.6030011", "0.6025323", "0.6003332", "0.5960924", "0.59549123", "0.5949634", "0.593846", "0.5929084", "0.59214026", "0.59200406", "0.5911492", "0.59061277", "0.5885543", "0.58786345", "0.5876527", "0.58744085", "0.5871529", "0.58612233", "0.5850812", "0.5819436", "0.57942545", "0.5791152", "0.57906425", "0.5788222", "0.5775795", "0.57750887", "0.5767292", "0.57520306", "0.5747475", "0.5740996", "0.5739199", "0.5736147", "0.5732578", "0.57306886", "0.5715959", "0.57032573", "0.5696933", "0.5695054", "0.5692662", "0.5692489", "0.5692293", "0.5669711", "0.5663984", "0.56270546", "0.56153345", "0.56131107", "0.561134", "0.5609992", "0.5604589", "0.5590415", "0.5590404", "0.55800444", "0.5576403", "0.5567217", "0.55604386", "0.5553331", "0.55489695", "0.5545102", "0.5536128", "0.5534356", "0.5533683", "0.5524984", "0.55238587", "0.5523565", "0.5515333", "0.5514233", "0.5492784", "0.54832435", "0.5472162", "0.5469617", "0.5465403", "0.5463848", "0.5461985", "0.5452754", "0.5441346", "0.54338384", "0.5432555" ]
0.56068
71
Appearance app = new Appearance(); app.setAttribute(CommonAttributes.LINE_SHADER + "." + CommonAttributes.PICKABLE, false); app.setAttribute(CommonAttributes.POINT_SHADER + "." + CommonAttributes.PICKABLE, false); app.setAttribute(CommonAttributes.POLYGON_SHADER + "." + CommonAttributes.PICKABLE, false); auxComponent.setAppearance(app);
private void initAuxComponent() { auxComponent.setPickable(false); auxComponent.addChild(unitDiscComponent); auxComponent.addChild(circlesComponent); auxComponent.addChild(hyperboloidComponent); auxComponent.addChild(paraboloidComponent); auxComponent.addChild(poincareGeodesicsComponent); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void init() {\n glEnable( GL_BLEND );\n glBlendFunc( GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA );\n glEnable( GL_LINE_SMOOTH );\n glEnable( GL_POINT_SMOOTH );\n }", "public void addPolyGon() {\n abstractEditor.drawNewShape(new ESurfaceDT());\n }", "@Override\n protected void beforeDraw(UI ui, PGraphics pg) {\n pointLight(0, 0, 40, model.cx, model.cy, LengthUnit.FOOT.toMillimetres(-20L));\n pointLight(0, 0, 50, model.cx, model.yMax + LengthUnit.FOOT.toMillimetres(10L), model.cz);\n pointLight(0, 0, 20, model.cx, model.yMin - LengthUnit.FOOT.toMillimetres(10L), model.cz);\n //hint(ENABLE_DEPTH_TEST);\n }", "public void drawNonEssentialComponents(){\n\t\t\n\t}", "private void HabVue(Feature feat)\n {\n StyleMap styleMap = feat.createAndAddStyleMap();\n\n //Create the style for normal edge.\n Pair pNormal = styleMap.createAndAddPair();\n Style normalStyle = pNormal.createAndSetStyle();\n pNormal.setKey(StyleState.NORMAL);\n\n LineStyle normalLineStyle =\n normalStyle.createAndSetLineStyle();\n normalLineStyle.setColor(\"YELLOW\");\n normalLineStyle.setWidth(2);\n\n\n //Create the style for highlighted edge.\n Pair pHighlight = styleMap.createAndAddPair();\n Style highlightStyle = pHighlight.createAndSetStyle();\n pHighlight.setKey(StyleState.HIGHLIGHT);\n\n LineStyle highlightLineStyle =\n highlightStyle.createAndSetLineStyle();\n highlightLineStyle.setColor(\"WHITE\");\n \n highlightLineStyle.setWidth(1);\n\n }", "public void previewOglRender();", "VisualizationAttribute createVisualizationAttribute();", "private void activeDrawEffects() {\n }", "public interface FlatGeometry {\r\n}", "@Override\r\n public void simpleUpdate(float tpf) {\r\n// if (firstload == true) {\r\n// MainGUI.Splash.setVisible(false);\r\n// MainGUI.mjf.setVisible(true);\r\n// }\r\n light1.setDirection(\r\n new Vector3f(\r\n cam.getDirection().x,\r\n cam.getDirection().y,\r\n cam.getDirection().z));\r\n\r\n if (GUI.shapeList.isEmpty()) {\r\n rootNode.detachAllChildren();\r\n drawAxis();\r\n }\r\n if(GUI.ShapeStack.getSelectedValue() == null && !GUI.shapeList.isEmpty())\r\n {\r\n rootNode.detachAllChildren();\r\n drawAxis();\r\n for(int ii = 0 ; ii < GUI.shapeList.size(); ii++)\r\n {\r\n Shape s = GUI.shapeList.get(ii);\r\n Geometry g = s.generateGraphics();\r\n Material m = new Material(assetManager,\r\n \"Common/MatDefs/Light/Lighting.j3md\");\r\n\r\n m.setBoolean(\"UseMaterialColors\", true);\r\n m.setColor(\"Diffuse\", ColorRGBA.LightGray);\r\n m.setColor(\"Specular\", ColorRGBA.LightGray);\r\n m.setFloat(\"Shininess\", 128); // [0,128]\r\n\r\n g.setMaterial(m);\r\n rootNode.attachChild(g); \r\n }\r\n }\r\n// com.jme3.scene.shape.Box boxMesh = new com.jme3.scene.shape.Box((float) 10 / 2, (float) 10 / 2, (float) 10 / 2);\r\n// Geometry boxGeo = new Geometry(\"Shiny rock\", boxMesh);\r\n// boxGeo.setLocalTranslation((float) 0, (float) 0, (float) 0);\r\n// TangentBinormalGenerator.generate(boxMesh);\r\n// Geometry g = boxGeo;\r\n// Material m = new Material(assetManager,\r\n// \"Common/MatDefs/Light/Lighting.j3md\");\r\n//\r\n// m.setBoolean(\"UseMaterialColors\", true);\r\n// m.setColor(\"Diffuse\", ColorRGBA.LightGray);\r\n// m.setColor(\"Specular\", ColorRGBA.LightGray);\r\n// m.setFloat(\"Shininess\", 128); // [0,128]\r\n//\r\n// g.setMaterial(m);\r\n// rootNode.attachChild(g);\r\n\r\n// if (MainGUI.ShapeJList.getSelectedValue() != null) {\r\n// rootNode.detachAllChildren();\r\n// drawAxis();\r\n// for (int i = 0; i < MainGUI.allShapes.size(); i++) {\r\n// Shape s = MainGUI.allShapes.get(i);\r\n// Geometry g = s.draw();\r\n// Material m = new Material(assetManager,\r\n// \"Common/MatDefs/Light/Lighting.j3md\");\r\n//\r\n// m.setBoolean(\"UseMaterialColors\", true);\r\n// m.setColor(\"Diffuse\", ColorRGBA.LightGray);\r\n// m.setColor(\"Specular\", ColorRGBA.LightGray);\r\n// m.setFloat(\"Shininess\", 128f); // [0,128]\r\n//\r\n// if (i == MainGUI.ShapeJList.getSelectedIndex()) {\r\n// m = new Material(assetManager,\r\n// \"Common/MatDefs/Light/Lighting.j3md\");\r\n//\r\n// m.setBoolean(\"UseMaterialColors\", true);\r\n// m.setColor(\"Diffuse\", ColorRGBA.Orange);\r\n// m.setColor(\"Specular\", ColorRGBA.Orange);\r\n// m.setFloat(\"Shininess\", 128f); // [0,128]\r\n//\r\n// }\r\n// g.setMaterial(m);\r\n// rootNode.attachChild(g);\r\n//\r\n// }\r\n// }\r\n// if (!MainGUI.allShapes.isEmpty() && MainGUI.ShapeJList.getSelectedValue() == null) {\r\n// rootNode.detachAllChildren();\r\n// drawAxis();\r\n// for (int i = 0; i < MainGUI.allShapes.size(); i++) {\r\n// Shape s = MainGUI.allShapes.get(i);\r\n// Geometry g = s.draw();\r\n// Material m = new Material(assetManager,\r\n// \"Common/MatDefs/Light/Lighting.j3md\");\r\n//\r\n// m.setBoolean(\"UseMaterialColors\", true);\r\n// m.setColor(\"Diffuse\", ColorRGBA.LightGray);\r\n// m.setColor(\"Specular\", ColorRGBA.LightGray);\r\n// m.setFloat(\"Shininess\", 128); // [0,128]\r\n//\r\n// g.setMaterial(m);\r\n// rootNode.attachChild(g);\r\n// }\r\n// }\r\n firstload = false;\r\n }", "@Override\n \t\t\t\tpublic void doCreatePointLight() {\n \n \t\t\t\t}", "private static void addShaped()\n {}", "public abstract void addComponent(DrawingComponent component);", "public void interface1(){\n noStroke();\n fill(10,100);//light gray\n rect(0,60,600,590);\n fill(220);//gray\n noStroke();\n beginShape();\n vertex(365,40);\n vertex(600,40);\n vertex(600,80);\n vertex(365,80);\n vertex(345,60);\n endShape(CLOSE);\n fill(19,70,100,100);//dark blue\n rect(0,110,600,215);\n rect(0,380,600,215);\n}", "public GraphicLayer() {\r\n super();\r\n }", "@Override\n protected void afterDraw(UI ui, PGraphics pg) {\n noLights();\n hint(DISABLE_DEPTH_TEST);\n }", "public void setUsePrimitivePaint(boolean usePrimitivePaint) {\n/* 75 */ this.usePrimitivePaint = usePrimitivePaint;\n/* */ }", "public void pickModels(GLAutoDrawable drawable, Igra igra, IntBuffer selectBuffer, int xCursor, int yCursor, GLU glu) {\n GL2 gl = drawable.getGL().getGL2();\n\n igra.startPicking(drawable, selectBuffer);\n igra.palettePicking(drawable, glu, xCursor, yCursor);\n\n gl.glPushName(Promenljive.SPHERE_ID);\n p.paletteSphere(drawable);\n gl.glPopName();\n\n gl.glPushName(Promenljive.CUBOID_ID);\n p.paletteCuboid(drawable);\n gl.glPopName();\n\n gl.glPushName(Promenljive.CYLINDER_ID);\n p.paletteCylinder(drawable);\n gl.glPopName();\n\n gl.glPushName(Promenljive.TETRAHEDRON_ID);\n p.paletteTetrahedron(drawable);\n gl.glPopName();\n\n gl.glPushName(Promenljive.CUBE_ID);\n p.paletteCube(drawable);\n gl.glPopName();\n\n gl.glPushName(Promenljive.CONE_ID);\n p.paletteCone(drawable);\n gl.glPopName();\n\n gl.glPushName(Promenljive.RECTANGULAR_PYRAMID_ID);\n p.paletteRectangularPyramid(drawable);\n gl.glPopName();\n\n gl.glPushName(Promenljive.PENTAGON_PYRAMID_ID);\n p.palettePentagonPyramid(drawable);\n gl.glPopName();\n\n gl.glPushName(Promenljive.HEXAGON_PYRAMID_ID);\n p.paletteHexagonPyramid(drawable);\n gl.glPopName();\n\n gl.glPushMatrix();\n\n\n\n gl.glRotated(pr.currentAngleOfRotationX, 1, 0, 0);\n gl.glRotated(pr.currentAngleOfRotationY, 0, 1, 0);\n\n gl.glPushName(Promenljive.LEFT_ID);\n drawLeft(drawable);\n gl.glPopName();\n\n gl.glPushName(Promenljive.LEFT_TWO_ID);\n drawLeftTwo(drawable);\n gl.glPopName();\n\n gl.glPushName(Promenljive.RIGHT_ID);\n drawRight(drawable);\n gl.glPopName();\n\n gl.glPushName(Promenljive.TOP_ID);\n drawTop(drawable);\n gl.glPopName();\n\n gl.glPushName(Promenljive.TOP_TWO_ID);\n drawTopTwo(drawable);\n gl.glPopName();\n\n gl.glPushName(Promenljive.BOTTOM_ID);\n drawBottom(drawable);\n gl.glPopName();\n\n gl.glPushName(Promenljive.BOTTOM_TWO_ID);\n drawBottomTwo(drawable);\n gl.glPopName();\n\n gl.glPushName(Promenljive.FRONT_ID);\n drawFront(drawable);\n gl.glPopName();\n\n gl.glPushName(Promenljive.BACK_ID);\n drawBack(drawable);\n gl.glPopName();\n\n\n gl.glPopMatrix();\n gl.glPopMatrix();\n igra.endPicking(drawable, selectBuffer);\n }", "public J3DAttribute () {}", "public void init(GLAutoDrawable drawable) {\n koparka = new Koparka();\n scena = new Scena();\n GL gl = drawable.getGL();\n System.err.println(\"INIT GL IS: \" + gl.getClass().getName());\n\n // Enable VSync\n gl.setSwapInterval(1);\n\n // Setup the drawing area and shading mode\n gl.glClearColor(0.0f, 0.0f, 0.0f, 0.0f);\n gl.glShadeModel(GL.GL_SMOOTH); \ngl.glEnable(GL.GL_CULL_FACE);// try setting this to GL_FLAT and see what happens.\n//wartości składowe oświetlenia i koordynaty źródła światła\n\n\n//(czwarty parametr określa odległość źródła:\n//0.0f-nieskończona; 1.0f-określona przez pozostałe parametry)\ngl.glEnable(GL.GL_LIGHTING); //uaktywnienie oświetlenia\n//ustawienie parametrów źródła światła nr. 0\ngl.glLightfv(GL.GL_LIGHT0,GL.GL_AMBIENT,ambientLight,0); //swiatło otaczające\ngl.glLightfv(GL.GL_LIGHT0,GL.GL_DIFFUSE,diffuseLight,0); //światło rozproszone\ngl.glLightfv(GL.GL_LIGHT0,GL.GL_SPECULAR,specular,0); //światło odbite\ngl.glLightfv(GL.GL_LIGHT0,GL.GL_POSITION,lightPos,0);\ngl.glLightfv( GL.GL_LIGHT0, GL.GL_SPOT_DIRECTION, direction ,0);\ngl.glLightf( GL.GL_LIGHT0, GL.GL_SPOT_EXPONENT, 1.0f );\ngl.glLightf( GL.GL_LIGHT0, GL.GL_SPOT_CUTOFF, 1.0f);//pozycja światła\ngl.glEnable(GL.GL_LIGHT0);\n\ngl.glLightfv(GL.GL_LIGHT1,GL.GL_AMBIENT,ambientLight,0); //swiatło otaczające\ngl.glLightfv(GL.GL_LIGHT1,GL.GL_DIFFUSE,diffuseLight,0); //światło rozproszone\ngl.glLightfv(GL.GL_LIGHT1,GL.GL_SPECULAR,specular,0); //światło odbite\ngl.glLightfv(GL.GL_LIGHT1,GL.GL_POSITION,lightPos2,0); //pozycja światła\ngl.glEnable(GL.GL_LIGHT1);//uaktywnienie źródła światła nr. 0\ngl.glEnable(GL.GL_COLOR_MATERIAL); //uaktywnienie śledzenia kolorów\n//kolory będą ustalane za pomocą glColor\ngl.glColorMaterial(GL.GL_FRONT, GL.GL_AMBIENT_AND_DIFFUSE);\n//Ustawienie jasności i odblaskowości obiektów\nfloat specref[] = { 1.0f, 1.0f, 1.0f, 1.0f }; //parametry odblaskowo?ci\n gl.glMaterialfv(GL.GL_FRONT, GL.GL_SPECULAR,specref,0);\n \n gl.glMateriali(GL.GL_FRONT,GL.GL_SHININESS,128);\n gl.glEnable(GL.GL_DEPTH_TEST);\n try\n {\n \n image1=ImageIO.read(getClass().getResourceAsStream(\"/bok.jpg\"));\n image2=ImageIO.read(getClass().getResourceAsStream(\"/niebo.jpg\"));\n image3=ImageIO.read(getClass().getResourceAsStream(\"/trawa.jpg\"));\n \n }\n catch (Exception ex)\n {\n return;\n }\n t1 = TextureIO.newTexture(image1, false);\nt2 = TextureIO.newTexture(image2, false);\nt3 = TextureIO.newTexture(image3, false);\ngl.glTexEnvi(GL.GL_TEXTURE_ENV, GL.GL_TEXTURE_ENV_MODE,\n GL.GL_BLEND | GL.GL_MODULATE);\ngl.glEnable(GL.GL_TEXTURE_2D);\ngl.glTexParameteri(GL.GL_TEXTURE_2D, GL.GL_TEXTURE_WRAP_S, GL.GL_REPEAT);\ngl.glTexParameteri(GL.GL_TEXTURE_2D, GL.GL_TEXTURE_WRAP_T, GL.GL_REPEAT);\ngl.glTexParameteri(GL.GL_TEXTURE_2D, GL.GL_TEXTURE_MAG_FILTER, GL.GL_NEAREST);\ngl.glTexParameteri(GL.GL_TEXTURE_2D, GL.GL_TEXTURE_MIN_FILTER, GL.GL_NEAREST);\ngl.glBindTexture(GL.GL_TEXTURE_2D, t1.getTextureObject());\n\n }", "public void set_as_bezier() {\n surface_type = 1;\n }", "@Override\n public void render(Renderable renderable)\n {\n context.setBlending(false, GL20.GL_SRC_ALPHA, GL20.GL_ONE_MINUS_SRC_ALPHA);\n context.setCullFace(GL20.GL_BACK);\n context.setDepthTest(GL20.GL_LEQUAL, 0.0f, 50.0f);\n context.setDepthMask(true);\n super.render(renderable);\n }", "public PencilTool() {\n super();\n myPencil = new Path2D.Double(); \n }", "public interface RenderMesh extends NvDisposeable{\n\n void initlize(MeshParams params);\n\n void draw();\n\n public static class MeshParams{\n public int posAttribLoc;\n public int norAttribLoc;\n public int texAttribLoc;\n public int tanAttribLoc = -1; // tangent attribution is diabled default.\n }\n}", "private void setGeometry() {\n GeometryDescriptor geomDesc = featureSource.getSchema().getGeometryDescriptor();\n geometryAttributeName = geomDesc.getLocalName();\n\n Class<?> clazz = geomDesc.getType().getBinding();\n\n if (Polygon.class.isAssignableFrom(clazz) || MultiPolygon.class.isAssignableFrom(clazz)) {\n geometryType = GeomType.POLYGON;\n\n } else if (LineString.class.isAssignableFrom(clazz)\n || MultiLineString.class.isAssignableFrom(clazz)) {\n\n geometryType = GeomType.LINE;\n\n } else {\n geometryType = GeomType.POINT;\n }\n}", "void drawMyPoint(double x, double y, MapContent map, String nombre) { \n// SimpleFeatureTypeBuilder builder = new SimpleFeatureTypeBuilder();\n// builder.setName(\"MyFeatureType\");\n// builder.setCRS( DefaultGeographicCRS.WGS84 ); // set crs \n// builder.add(\"location\", Point.class); // add geometry\n//\n// // build the type\n// SimpleFeatureType TYPE = builder.buildFeatureType();\n//\n// // create features using the type defined\n// SimpleFeatureBuilder featureBuilder = new SimpleFeatureBuilder(TYPE);\n// org.locationtech.jts.geom.GeometryFactory geometryFactory = JTSFactoryFinder.getGeometryFactory();\n// org.locationtech.jts.geom.Point point = geometryFactory.createPoint(new Coordinate(x, y));\n// //\n// \n// //\n// featureBuilder.add(point);\n// SimpleFeature feature = featureBuilder.buildFeature(\"FeaturePoint\");\n// DefaultFeatureCollection featureCollection = new DefaultFeatureCollection(\"internal\", TYPE);\n// featureCollection.add(feature); // Add feature 1, 2, 3, etc\n//\n// Style style = SLD.createPointStyle(\"Star\", Color.BLUE, Color.BLUE, 0.3f, 200);\n// Layer layer = new FeatureLayer(featureCollection, style);\n// layer.setTitle(\"NewPointLayer\");\n// map.addLayer(layer);\n// //mapFrame.getMapPane().repaint();// MapPane.repaint();\n//}\n\tSimpleFeatureTypeBuilder builder = new SimpleFeatureTypeBuilder();\n builder.setName(\"MyFeatureType\"); // \n builder.setCRS( DefaultGeographicCRS.WGS84 ); // set crs // Definimos las caracteristicas de tipo del punto q vamos a crear\n builder.add(\"location\", Point.class); // add geometry //\n org.locationtech.jts.geom.GeometryFactory geometryFactory = JTSFactoryFinder.getGeometryFactory(); //objeto q usaremos para crear el punto\n Coordinate coord = new Coordinate( x,y ); //creamos la coordenada con los puntos pasados como parametros\n org.locationtech.jts.geom.Point point = geometryFactory.createPoint(coord); // Creamos el punto geometrico\n\nSimpleFeatureType pointtype = null; //definimos el typo de punto que necesitamos apra agregarlo a la capa del mapa\n try {\n pointtype = DataUtilities.createType(\"POINT\", \"geom:Point,name:String\");\n } catch (SchemaException ex) {\n Logger.getLogger(SelectionLab.class.getName()).log(Level.SEVERE, null, ex);\n }\nSimpleFeatureBuilder featureBuilderPoints = new SimpleFeatureBuilder(pointtype); //creamos el constructor de lo que agregaremos\nDefaultFeatureCollection collectionPoints = new DefaultFeatureCollection(\"internal\", pointtype); //creamos el contenedor donde pondremos lo que agregaremos\n//PointString Point=builder.createPointString(Point);\n//LineString Point = builder.createLineString(Point);\nfeatureBuilderPoints.add(point); //agregamos el punto en el constructor\nSimpleFeature featureLine = featureBuilderPoints.buildFeature(null); \n((DefaultFeatureCollection)collectionPoints).add(featureLine); \nStyle PointStyle = SLD.createPointStyle(\"circle\", Color.RED, Color.RED,(float) 0.5,(float) 10); //definimos el estilo del punto (icono, color contorno, color, opacidad y tamaño)\n//Obserervacion: el dibujo del punto siempre se mantiene del mismo tamaño por mas que se use el zoom\nmap.addLayer(new FeatureLayer(collectionPoints, PointStyle)); //agregamos el punto a la capa\n\nguardarCoordenadas(nombre,x,y);\n}", "public void init(SoState state)\n\n{\n // Set to GL defaults:\n// ivState.ambientColor.copyFrom( getDefaultAmbient());\n// ivState.emissiveColor.copyFrom( getDefaultEmissive());\n// ivState.specularColor.copyFrom( getDefaultSpecular());\n// ivState.shininess = getDefaultShininess();\n// ivState.colorMaterial = false;\n// ivState.blending = false;\n// ivState.lightModel = LightModel.PHONG.getValue();\n \n // Initialize default color storage if not already done\n if (defaultDiffuseColor == null) {\n defaultDiffuseColor = SbColorArray.allocate(1);\n defaultDiffuseColor.get(0).setValue(getDefaultDiffuse());\n defaultTransparency = new float[1];\n defaultTransparency[0] = getDefaultTransparency();\n defaultColorIndices = new int[1];\n defaultColorIndices[0] = getDefaultColorIndex();\n defaultPackedColor = new int[1];\n defaultPackedColor[0] = getDefaultPacked();\n }\n \n //following value will be matched with the default color, must\n //differ from 1 (invalid) and any legitimate nodeid. \n// ivState.diffuseNodeId = 0;\n// ivState.transpNodeId = 0;\n// //zero corresponds to transparency off (default).\n// ivState.stippleNum = 0;\n// ivState.diffuseColors = defaultDiffuseColor;\n// ivState.transparencies = defaultTransparency;\n// ivState.colorIndices = defaultColorIndices;\n// ivState.packedColors = defaultPackedColor;\n//\n// ivState.numDiffuseColors = 1;\n// ivState.numTransparencies = 1;\n// ivState.packed = false;\n// ivState.packedTransparent = false;\n// ivState.transpType = SoGLRenderAction.TransparencyType.SCREEN_DOOR.ordinal(); \n// ivState.cacheLevelSetBits = 0;\n// ivState.cacheLevelSendBits = 0;\n// ivState.overrideBlending = false;\n// \n// ivState.useVertexAttributes = false;\n//\n// ivState.drawArraysCallback = null;\n// ivState.drawElementsCallback = null; \n// ivState.drawArraysCallbackUserData = null;\n// ivState.drawElementsCallbackUserData = null; \n\n coinstate.ambient.copyFrom(getDefaultAmbient());\n coinstate.specular.copyFrom(getDefaultSpecular());\n coinstate.emissive.copyFrom(getDefaultEmissive());\n coinstate.shininess = getDefaultShininess();\n coinstate.blending = /*false*/0;\n coinstate.blend_sfactor = 0;\n coinstate.blend_dfactor = 0;\n coinstate.alpha_blend_sfactor = 0;\n coinstate.alpha_blend_dfactor = 0;\n coinstate.lightmodel = LightModel.PHONG.getValue();\n coinstate.packeddiffuse = false;\n coinstate.numdiffuse = 1;\n coinstate.numtransp = 1;\n coinstate.diffusearray = SbColorArray.copyOf(lazy_defaultdiffuse);\n coinstate.packedarray = IntArrayPtr.copyOf(lazy_defaultpacked);\n coinstate.transparray = FloatArray.copyOf(lazy_defaulttransp);\n coinstate.colorindexarray = IntArrayPtr.copyOf(lazy_defaultindex);\n coinstate.istransparent = false;\n coinstate.transptype = (int)(SoGLRenderAction.TransparencyType.BLEND.getValue());\n coinstate.diffusenodeid = 0;\n coinstate.transpnodeid = 0;\n coinstate.stipplenum = 0;\n coinstate.vertexordering = VertexOrdering.CCW.getValue();\n coinstate.twoside = false ? 1 : 0;\n coinstate.culling = false ? 1 : 0;\n coinstate.flatshading = false ? 1 : 0;\n coinstate.alphatestfunc = 0;\n coinstate.alphatestvalue = 0.5f;\n}", "@Override\n public String getName() {\n return \"Polygons 2D Module\";\n }", "private void initPolylineChartPropsNormol1() {\n\t\tif(polylineData == null) {\n\t\t\tpolylineData = new PolylineData();\n\t\t}\n\n\t\t// -------props-------\n\t\t// axis\n\t\t// grid\n\t\t// cross\n\t\t// polyline color\n\n\t\t// gesture\n\t\tpolylineData.setEnableTouchGesture(true, false, false, false);\n\t\t// display range\n\t\tpolylineData.setEnableShowAll(true);\n\t}", "public static void makeGeometry(AssetManager am) {\n geom = am.loadModel(\"Models/container/container.j3o\");\n mat = new Material(am, \"Common/MatDefs/Misc/Unshaded.j3md\");\n Texture Tex = am.loadTexture(\n \"Textures/Container/Template/texture.png\");\n\n\n Colors.add(am.loadTexture(\n \"Textures/Container/blue.png\"));\n Colors.add(am.loadTexture(\n \"Textures/Container/green.png\"));\n Colors.add(am.loadTexture(\n \"Textures/Container/purple.png\"));\n Colors.add(am.loadTexture(\n \"Textures/Container/red.png\"));\n companyTextures.put(\"UPS\", am.loadTexture(\n \"Textures/Container/UPS.png\"));\n companyTextures.put(\"CocaCola\", am.loadTexture(\n \"Textures/Container/cocacola.png\"));\n companyTextures.put(\"McDonalds\", am.loadTexture(\n \"Textures/Container/mac.png\"));\n\n companyTextures.put(\"Grolsch\", am.loadTexture(\n \"Textures/Container/grolsch.png\"));\n companyTextures.put(\"Heineken\", am.loadTexture(\n \"Textures/Container/heineken.png\"));\n companyTextures.put(\"Nestle\", am.loadTexture(\n \"Textures/Container/nestle.png\"));\n companyTextures.put(\"Shell\", am.loadTexture(\n \"Textures/Container/shell.png\"));\n companyTextures.put(\"DeutschePost\", am.loadTexture(\n \"Textures/Container/post.png\"));\n companyTextures.put(\"PostBank\", am.loadTexture(\n \"Textures/Container/postbank.png\"));\n companyTextures.put(\"Airfrance\", am.loadTexture(\n \"Textures/Container/airfrance.png\"));\n\n companyTextures.put(\"BallastNedam\", am.loadTexture(\n \"Textures/Container/ballastnedam.png\"));\n companyTextures.put(\"Manpower\", am.loadTexture(\n \"Textures/Container/manpower.png\"));\n\n companyTextures.put(\"Lufthansa\", am.loadTexture(\n \"Textures/Container/lufthansa.png\"));\n companyTextures.put(\"Bayer\", am.loadTexture(\n \"Textures/Container/bayer.png\"));\n\n\n companyTextures.put(\"Danone\", am.loadTexture(\n \"Textures/Container/danone.png\"));\n companyTextures.put(\"Ericsson\", am.loadTexture(\n \"Textures/Container/ericsson.png\"));\n\n companyTextures.put(\"Danone\", am.loadTexture(\n \"Textures/Container/danone.png\"));\n companyTextures.put(\"Ericsson\", am.loadTexture(\n \"Textures/Container/ericsson.png\"));\n\n\n companyTextures.put(\"OCE\", am.loadTexture(\n \"Textures/Container/oce.png\"));\n companyTextures.put(\"BeterBed\", am.loadTexture(\n \"Textures/Container/beterbed.png\"));\n\n companyTextures.put(\"TenCate\", am.loadTexture(\n \"Textures/Container/tencate.png\"));\n\n companyTextures.put(\"FederalExpress\", am.loadTexture(\n \"Textures/Container/fedex.png\"));\n companyTextures.put(\"IBM\", am.loadTexture(\n \"Textures/Container/IBM.png\"));\n companyTextures.put(\"KraftFoods\", am.loadTexture(\n \"Textures/Container/kraft.png\"));\n companyTextures.put(\"Hanjin\", am.loadTexture(\n \"Textures/Container/hanjin.png\"));\n companyTextures.put(\"CargoTrans\", am.loadTexture(\n \"Textures/Container/cargotrans.png\"));\n\n\n companyTextures.put(\"Metro\", am.loadTexture(\n \"Textures/Container/metro.png\"));\n companyTextures.put(\"Carrefour\", am.loadTexture(\n \"Textures/Container/carefour.png\"));\n companyTextures.put(\"Amstel\", am.loadTexture(\n \"Textures/Container/amstel.png\"));\n companyTextures.put(\"TransNL\", am.loadTexture(\n \"Textures/Container/transnl.png\"));\n companyTextures.put(\"Gilette\", am.loadTexture(\n \"Textures/Container/gillete.png\"));\n\n\n companyTextures.put(\"WalMart\", am.loadTexture(\n \"Textures/Container/walmart.png\"));\n companyTextures.put(\"Delhaize\", am.loadTexture(\n \"Textures/Container/delhaize.png\"));\n companyTextures.put(\"BASF\", am.loadTexture(\n \"Textures/Container/basf.png\"));\n companyTextures.put(\"SeaTrans\", am.loadTexture(\n \"Textures/Container/seatrans.png\"));\n companyTextures.put(\"DowChemical\", am.loadTexture(\n \"Textures/Container/dow.png\"));\n\n companyTextures.put(\"AXA\", am.loadTexture(\n \"Textures/Container/axe.png\"));\n companyTextures.put(\"LLyod\", am.loadTexture(\n \"Textures/Container/lloyd.png\"));\n \n companyTextures.put(\"GJMW\", am.loadTexture(\n \"Textures/Container/GJMW.png\"));\n companyTextures.put(\"WoodNorge\", am.loadTexture(\n \"Textures/Container/woodnorge.png\"));\n companyTextures.put(\"FlowersNL\", am.loadTexture(\n \"Textures/Container/flowersnl.png\"));\n \n companyTextures.put(\"FruitINT\", am.loadTexture(\n \"Textures/Container/fruitint.png\"));\n companyTextures.put(\"IntTrans\", am.loadTexture(\n \"Textures/Container/inttrans.png\"));\n companyTextures.put(\"MaasHolland\", am.loadTexture(\n \"Textures/Container/maasholland.png\"));\n\n mat.setTexture(\"ColorMap\", Tex);\n r = new Random();\n\n mat.setColor(\"Color\", ColorRGBA.White);\n\n geom.setMaterial(mat);\n }", "public void usa(){\n stroke(1);\n //back guns\n fill(0);\n rect(73,192,4,15);\n rect(224,192,4,15);\n rect(71,207,8,15);\n rect(222,207,8,15);\n rect(66,207,3,15);\n rect(232,207,3,17);\n rect(122,109,4,15);\n rect(175,110,4,15);\n rect(121,120,6,15);\n rect(174,120,6,15);\n rect(116,124,3,15);\n rect(182,124,3,15);\n\n //wings\n fill(1,0,74);//dark blue\n beginShape();\n vertex(14,286);\n vertex(61,236);\n vertex(88,308);\n vertex(51,334);\n vertex(14,313);\n endShape(CLOSE);\n beginShape();\n vertex(286,287);\n vertex(286,312);\n vertex(247,335);\n vertex(212,309);\n vertex(238,238);\n endShape(CLOSE);\n\n fill(200);//white\n beginShape();\n vertex(38,307);\n vertex(74,307);\n vertex(80,314);\n vertex(81,337);\n vertex(68,345);\n vertex(38,327);\n endShape(CLOSE);\n beginShape();\n vertex(219,316);\n vertex(226,308);\n vertex(262,308);\n vertex(262,326);\n vertex(231,345);\n vertex(219,336);\n endShape(CLOSE);\n\n fill(192,0,11);//red\n beginShape();\n vertex(96,191);\n vertex(61,230);\n vertex(60,269);\n vertex(96,312);\n vertex(101,300);\n vertex(100,247);\n vertex(112,232);\n vertex(132,232);\n vertex(131,186);\n endShape(CLOSE);\n beginShape();\n vertex(204,191);\n vertex(240,230);\n vertex(240,270);\n vertex(205,312);\n vertex(200,302);\n vertex(200,248);\n vertex(193,238);\n vertex(185,231);\n vertex(170,230);\n vertex(170,186);\n endShape(CLOSE);\n\n //white\n fill(200);\n beginShape();\n vertex(70,217);\n vertex(74,220);\n vertex(81,210);\n vertex(85,213);\n vertex(75,227);\n vertex(72,229);\n vertex(71,231);\n vertex(73,233);\n vertex(73,268);\n vertex(71,272);\n vertex(76,277);\n vertex(82,274);\n vertex(89,283);\n vertex(90,297);\n vertex(66,272);\n vertex(65,235);\n vertex(68,229);\n vertex(62,228);\n endShape(CLOSE);\n beginShape();\n vertex(228,217);\n vertex(225,218);\n vertex(218,211);\n vertex(215,213);\n vertex(223,227);\n vertex(226,226);\n vertex(230,230);\n vertex(227,233);\n vertex(228,270);\n vertex(229,272);\n vertex(223,276);\n vertex(218,276);\n vertex(210,283);\n vertex(211,296);\n vertex(235,273);\n vertex(234,233);\n vertex(232,228);\n vertex(237,227);\n endShape(CLOSE);\n\n //guns\n //white\n fill(200);\n beginShape();\n vertex(121,301);\n vertex(98,313);\n vertex(102,336);\n vertex(119,342);\n vertex(139,336);\n vertex(141,313);\n endShape(CLOSE);//l\n beginShape();\n vertex(159,312);\n vertex(162,336);\n vertex(180,342);\n vertex(200,336);\n vertex(202,313);\n vertex(180,302);\n endShape(CLOSE);\n\n //black\n fill(0);\n rect(105,315,30,30);\n rect(166,315,30,30);\n quad(105,344,109,355,131,355,135,344);\n quad(166,344,170,355,192,355,196,344);\n //green\n fill(0,0,67);\n rect(103,253,33,62);//l\n rect(164,252,33,62);//r\n //white\n fill(200);\n bezier(103,252,107,230,132,230,136,252);//l\n bezier(164,252,169,230,192,230,197,252);//r\n rect(103,280,33,25);//l\n rect(164,280,33,25);//r\n rect(104,319,33,26,3);//l\n rect(165,319,33,26,3);//r\n rect(115,310,7,28,8);//l\n rect(178,310,7,28,8);//r\n //green\n fill(0,0,67);\n rect(105,284,10,15);\n rect(124,284,10,15);\n rect(167,285,10,15);\n rect(185,284,10,15);\n\n //body-wings\n //green\n fill(0,0,67);//blue\n bezier(107,154,101,162,98,169,98,187);\n bezier(191,153,199,164,202,172,203,187);\n quad(107,154,98,186,98,223,107,224);\n quad(191,153,203,186,202,223,192,223);\n fill(192,0,11);//red\n quad(134,112,108,147,107,239,132,230);\n quad(165,112,192,147,193,239,168,230);\n //black\n fill(0);\n quad(130,122,130,142,111,164,111,147);\n quad(169,122,188,147,188,165,169,144);\n //white\n fill(200);\n beginShape();\n vertex(131,154);\n vertex(129,202);\n vertex(118,202);\n vertex(112,181);\n vertex(110,179);\n vertex(110,171);\n endShape(CLOSE);\n beginShape();\n vertex(170,154);\n vertex(190,172);\n vertex(190,182);\n vertex(188,181);\n vertex(182,201);\n vertex(172,201);\n endShape(CLOSE);\n\n //green\n fill(192,0,11);\n quad(134,193,166,193,154,342,146,342);\n fill(192,0,11);\n quad(142,180,159,180,152,352,148,352);\n //white\n fill(200);\n ellipse(150,374,6,50);\n\n //head\n fill(1,1,75);\n ellipse(149.5f,72,33,25);\n ellipse(149.5f,94,30,170);\n fill(0);\n ellipse(149.5f,94,20,160);\n fill(154,155,84);\n ellipse(149.5f,94,17,77);\n strokeWeight(2);\n line(143,74,158,74);\n line(142,104,158,104);\n strokeWeight(1);\n fill(200);\n bezier(143,15,147,2,153,2,155.5f,15);\n }", "public void addPolyGonHole() {\n try {\n ESurface surface;\n surface = (ESurface) abstractEditor.getSelected();\n if ((surface) != null) {\n abstractEditor.drawNewShape(new ESurfaceHoleDT(\n surface));\n }\n } catch (final Exception e) {\n e.printStackTrace();\n }\n }", "ImageComponent3D() {}", "@Override\r\n\tprotected int getGUILayout()\r\n\t{\n\t\treturn R.layout.tutorial_stereo_rendering;\r\n\t}", "public void init(GLAutoDrawable drawable) {\n\n GL gl = drawable.getGL();\n System.err.println(\"INIT GL IS: \" + gl.getClass().getName());\n gl.setSwapInterval(1);\n\n\n //wartości składowe oświetlenia i koordynaty źródła światła\n float ambientLight[] = { 0.3f, 0.3f, 0.3f, 1.0f };//swiatło otaczające\n float diffuseLight[] = { 0.7f, 0.7f, 0.7f, 1.0f };//światło rozproszone\n float specular[] = { 1.0f, 1.0f, 1.0f, 1.0f}; //światło odbite\n float lightPos[] = { 0.0f, 150.0f, 150.0f, 1.0f };//pozycja światła\n //(czwarty parametr określa odległość źródła:\n //0.0f-nieskończona; 1.0f-określona przez pozostałe parametry)\n gl.glEnable(GL.GL_LIGHTING); //uaktywnienie oświetlenia\n //ustawienie parametrów źródła światła nr. 0\n gl.glLightfv(GL.GL_LIGHT0,GL.GL_AMBIENT,ambientLight,0); //swiatło otaczające\n gl.glLightfv(GL.GL_LIGHT0,GL.GL_DIFFUSE,diffuseLight,0); //światło rozproszone\n gl.glLightfv(GL.GL_LIGHT0,GL.GL_SPECULAR,specular,0); //światło odbite\n gl.glLightfv(GL.GL_LIGHT0,GL.GL_POSITION,lightPos,0); //pozycja światła\n gl.glEnable(GL.GL_LIGHT0); //uaktywnienie źródła światła nr. 0\n gl.glEnable(GL.GL_COLOR_MATERIAL); //uaktywnienie śledzenia kolorów\n //kolory będą ustalane za pomocą glColor\n gl.glColorMaterial(GL.GL_FRONT, GL.GL_AMBIENT_AND_DIFFUSE);\n gl.glEnable(GL.GL_DEPTH_TEST);\n // Setup the drawing area and shading mode\n gl.glClearColor(1.0f, 1.0f, 1.0f, 1.0f);\n gl.glShadeModel(GL.GL_SMOOTH);\n try\n {\n image1 = ImageIO.read(getClass().getResourceAsStream(\"/pokemon.jpg\"));\n image2 = ImageIO.read(getClass().getResourceAsStream(\"/android.jpg\"));\n }\n catch(Exception exc)\n {\n JOptionPane.showMessageDialog(null, exc.toString());\n return;\n }\n\n t1 = TextureIO.newTexture(image1, false);\n t2 = TextureIO.newTexture(image2, false);\n\n gl.glTexEnvi(GL.GL_TEXTURE_ENV, GL.GL_TEXTURE_ENV_MODE, GL.GL_DECAL | GL.GL_MODULATE);\n gl.glEnable(GL.GL_TEXTURE_2D);\n gl.glTexParameteri(GL.GL_TEXTURE_2D, GL.GL_TEXTURE_WRAP_S, GL.GL_REPEAT);\n gl.glTexParameteri(GL.GL_TEXTURE_2D, GL.GL_TEXTURE_WRAP_T, GL.GL_REPEAT);\n gl.glTexParameteri(GL.GL_TEXTURE_2D, GL.GL_TEXTURE_MAG_FILTER, GL.GL_NEAREST);\n gl.glTexParameteri(GL.GL_TEXTURE_2D, GL.GL_TEXTURE_MIN_FILTER, GL.GL_NEAREST);\n gl.glBindTexture(GL.GL_TEXTURE_2D, t1.getTextureObject());\n gl.glTexParameteri(GL.GL_TEXTURE_2D, GL.GL_TEXTURE_WRAP_S, GL.GL_REPEAT);\ngl.glTexParameteri(GL.GL_TEXTURE_2D, GL.GL_TEXTURE_WRAP_T, GL.GL_REPEAT);\n\n\n \n\n }", "Sketch apex();", "private void applyOpenGLStartSettings(){\r\n\t\t//TODO pa.smooth() / pa.noSmooth() ver�ndert auch line_smooth!\r\n\t\t//f�r test ob multisampling lines ohne Line_smooth okay rendered m�ssen\r\n\t\t//sicherheitshalber auch die pa.smoot() etc abgefangen werden und line_smooth immer disabled sein!\r\n\t\t\r\n\t\t//TODO check line drawing and abstractvisible at stencil in this context (line_smooth)\r\n\t\t\r\n\t //TODO \r\n\t\t// - if multisampling enabled dont do line smoothing at all\r\n\t\t// - OR: disable multisampling each time before doing line_smoothing! (better but expensive?) \r\n\t\t// -> info: disabling multisampling isnt possible at runtime..\r\n\r\n\t // - or disable mutisample before drawing with line_smooth!\r\n\t\t//TOOD dont use lines to smooth some objects then (fonts, etc)\r\n\t if (MT4jSettings.getInstance().isOpenGlMode() ){\r\n\t \t\r\n\t \t//////////////////////////////\r\n\t \tthis.loadGL();\r\n\t //////////////////////////\r\n\t \r\n//\t \tGL gl = Tools3D.getGL(this);\r\n\t GLCommon gl = getGLCommon();\r\n\t \t\r\n\t \tlogger.info(\"OpenGL Version: \\\"\" + gl.glGetString(GL.GL_VERSION) + \"\\\"\" + \" - Vendor: \\\"\" + gl.glGetString(GL.GL_VENDOR) + \"\\\"\" + \" - Renderer: \\\"\" + gl.glGetString(GL.GL_RENDERER) + \"\\\"\");\r\n//\t \tlogger.info(\"Shading language version: \\\"\" + gl.glGetString(GL.GL_SHADING_LANGUAGE_VERSION) + \"\\\"\");\r\n\t \tlogger.info(\"Non power of two texture sizes allowed: \\\"\" + Tools3D.supportsNonPowerOfTwoTexture(this) + \"\\\"\");\r\n\t \tlogger.info(\"OpenGL Framebuffer Object Extension available: \\\"\" + GLFBO.isSupported(this) + \"\\\"\");\r\n\t \t\r\n\t\t\t//Set VSyncing on -> to avoid tearing \r\n\t\t\t//-> check if gfx card settings allow apps to set it!\r\n\t\t\t//-> Use with caution! only use with fps rate == monitor Hz!\r\n\t\t\t//and fps never drop below Hz! -> else choppy!\r\n\t\t\t//-> only works with opengl!\r\n\t \tTools3D.setVSyncing(this, MT4jSettings.getInstance().isVerticalSynchronization());\r\n\t\t\tlogger.info(\"Vertical Sync enabled: \\\"\" + MT4jSettings.getInstance().isVerticalSynchronization() + \"\\\"\");\r\n\t \t\r\n\t \tif ( MT4jSettings.getInstance().isMultiSampling()){\r\n\t \t\tgl.glEnable(GL.GL_MULTISAMPLE);\r\n//\t \t\tgl.glDisable(GL.GL_MULTISAMPLE);\r\n\t \t\tlogger.info(\"OpenGL multi-sampling enabled.\");\r\n\t \t}\r\n\t \tgl.glEnable(GL.GL_LINE_SMOOTH);\r\n//\t \tgl.glDisable(GL.GL_LINE_SMOOTH);\r\n\t }\r\n\t}", "public void PRCRender() {\n if(rollOver) {\n object.getStyle().setFillColorFloat(20);\n } else if(dragging) {\n object.getStyle().setFillColorFloat(5);\n } else {\n object.style.setFillColorFloat(100);\n }\n object.render();\n }", "public void\nsetSpecularElt( SbColor color )\n//\n{\n this.coinstate.specular.copyFrom(color);\n}", "public void init(GLAutoDrawable drawable) {\n drawable.setGL(new DebugGL(drawable.getGL())); //Ну может быть зачем-то он тут и нужен...\n\n final GL gl = drawable.getGL(); //Объект со всеми функциями.\n\n gl.glEnable(GL.GL_DEPTH_TEST); //Разрешаем z-буффер.\n gl.glDepthFunc(GL.GL_LEQUAL); //Задаем функцию глубины для z-буффера.\n\n gl.glShadeModel(GL.GL_SMOOTH); //Плавный переход цветов. Нужно чтобы тень красиво плавно переходила.\n gl.glClearColor(0f, 0f, 0.2f, 0f); //Задаем цвет затирания. Ну то-есть у нас это цвет фона.\n\n gl.glHint(GL.GL_PERSPECTIVE_CORRECTION_HINT, GL.GL_NICEST); //Все настройки на максимум.\n gl.glHint(GL.GL_POINT_SMOOTH_HINT, GL.GL_NICEST);\n gl.glHint(GL.GL_LINE_SMOOTH_HINT, GL.GL_NICEST);\n gl.glHint(GL.GL_POLYGON_SMOOTH_HINT, GL.GL_NICEST);\n gl.glHint(GL.GL_TEXTURE_COMPRESSION_HINT, GL.GL_NICEST);\n gl.glHint(GL.GL_FRAGMENT_SHADER_DERIVATIVE_HINT, GL.GL_NICEST);\n gl.glHint(GL.GL_FOG_HINT, GL.GL_NICEST);\n gl.glHint(GL.GL_GENERATE_MIPMAP_HINT, GL.GL_NICEST);\n\n glu = new GLU(); //Глу он и есть глу.\n\n earth = new Earth();\n satellite = new Satellite();\n\n\n animator = new FPSAnimator(this, fps);\n animator.start(); //Создаем и запускаем аниматора.\n }", "protected void init() {\n currentState.bgColor = appliedState.bgColor = gc.getBackground();\n currentState.fgColor = appliedState.fgColor = gc.getForeground();\n currentState.font = appliedState.font = gc.getFont();\n currentState.lineAttributes = gc.getLineAttributes();\n appliedState.lineAttributes = clone(currentState.lineAttributes);\n currentState.graphicHints |= gc.getLineStyle();\n currentState.graphicHints |= gc.getAdvanced() ? ADVANCED_GRAPHICS_MASK\n : 0;\n currentState.graphicHints |= gc.getXORMode() ? XOR_MASK : 0;\n\n appliedState.graphicHints = currentState.graphicHints;\n\n currentState.relativeClip = new RectangleClipping(gc.getClipping());\n currentState.alpha = gc.getAlpha();\n }", "public interface VisualVertex extends GVertex {\n\n\t/**\n\t * Returns the component of this vertex. This is used for rendering and interaction \n\t * with the user.\n\t * \n\t * @return the component of this vertex\n\t */\n\tpublic JComponent getComponent();\n\n\t/**\n\t * Sets this vertex to be focused. This differs from being selected in that multiple\n\t * vertices in a graph can be selected, but only one can be the focused vertex.\n\t * \n\t * @param focused true to focus; false to be marked as not focused\n\t */\n\tpublic void setFocused(boolean focused);\n\n\t/**\n\t * Returns true if this vertex is focused (see {@link #setFocused(boolean)}\n\t * @return true if focused\n\t */\n\tpublic boolean isFocused();\n\n\t/**\n\t * Sets this vertex selected\n\t * \n\t * @param selected true to select this vertex; false to de-select this vertex\n\t */\n\tpublic void setSelected(boolean selected);\n\n\t/**\n\t * Returns true if this vertex is selected\n\t * \n\t * @return true if this vertex is selected \n\t */\n\tpublic boolean isSelected();\n\n\t/**\n\t * Sets this vertex to be hovered\n\t * \n\t * @param hovered true to be marked as hovered; false to be marked as not hovered\n\t */\n\tpublic void setHovered(boolean hovered);\n\n\t/**\n\t * Returns true if this vertex is being hovered by the mouse\n\t * \n\t * @return true if this vertex is being hovered by the mouse\n\t */\n\tpublic boolean isHovered();\n\n\t/**\n\t * Sets the location of this vertex in the view\n\t * \n\t * @param p the location of this vertex in the view\n\t */\n\tpublic void setLocation(Point2D p);\n\n\t/**\n\t * Returns the location of this vertex in the view\n\t * \n\t * @return the location of this vertex in the view\n\t */\n\tpublic Point2D getLocation();\n\n\t/**\n\t * Returns true if the given component of this vertex is grabbable, which means that \n\t * mouse drags on that component will move the vertex. \n\t * \n\t * <P>This is used to differentiate components within a vertex that should receive mouse \n\t * events versus those components that will not be given mouse events.\n\t * \n\t * @param c the component\n\t * @return true if the component is grabbable\n\t */\n\tpublic boolean isGrabbable(Component c);\n\n\t/**\n\t * A dispose method that should be called when a vertex is reclaimed, never again to be \n\t * used in a graph or display\n\t */\n\tpublic void dispose();\n\n//==================================================================================================\n// Rendering Methods (these could be refactored into another object in the future)\n//==================================================================================================\n\n\t/**\n\t * Sets the emphasis value for this vertex. A value of 0 indicates no emphasis.\n\t * \n\t * @param emphasisLevel the emphasis\n\t */\n\tpublic void setEmphasis(double emphasisLevel);\n\n\t/**\n\t * Returns the emphasis value of this vertex. 0 if not emphasized.\n\t * \n\t * @return the emphasis value of this vertex.\n\t */\n\tpublic double getEmphasis();\n\n\t/**\n\t * Set the alpha, which determines how much of the vertex is visible/see through. 0 is \n\t * completely transparent. This attribute allows transitional for animations.\n\t * \n\t * @param alpha the alpha value\n\t */\n\tpublic void setAlpha(double alpha);\n\n\t/**\n\t* Get the alpha, which determines how much of the vertex is visible/see through. 0 is \n\t* completely transparent. This attribute allows transitional for animations.\n\t* \n\t* @return the alpha value\n\t*/\n\tpublic double getAlpha();\n\n}", "public BufferVisualization() {\n initComponents();\n }", "private void DrawBraid(GL gl, float x, float y, float size,\n\t\t\tfloat r, float g, float b) {\n\n float reflected_x=0, reflected_y=0;\n float reflected_vector_angle=0, reflected_image_angle=0, reflected_rotate=0;\n\n // Degeneracy = do not want\n\t\tif (m_length == 0.0f || m_width == 0.0f) {\n\t\t\treturn;\n\t\t}\n\n\t\t////int mct = (int) (1 / this.GetPEngine().m_uniscale);\n\t\t////mct = (mct / 2) / 100 * 100;\n\n //Do the reflection\n if(m_x_reflection==0 && m_y_reflection==0)\n {\n reflected_x=x;\n reflected_y=y;\n reflected_image_angle=m_slope;\n reflected_vector_angle=m_slope;\n reflected_rotate= m_rotate;\n }\n else if(m_x_reflection==1 && m_y_reflection==0)\n {\n reflected_x=x;\n reflected_y=-y;\n reflected_image_angle=90-m_slope;\n reflected_vector_angle=-m_slope;\n reflected_rotate= -m_rotate;\n }\n else if(m_x_reflection==0 && m_y_reflection==1)\n {\n reflected_x=-x;\n reflected_y=y;\n reflected_image_angle=-90-m_slope;\n reflected_vector_angle=180-m_slope;\n reflected_rotate= -m_rotate;\n }\n else if(m_x_reflection==1 && m_y_reflection==1)\n {\n reflected_x=-x;\n reflected_y=-y;\n reflected_image_angle=m_slope-180;\n reflected_vector_angle=m_slope+180;\n reflected_rotate= m_rotate;\n }\n\n\t\tfloat start_image_theta = (float) Math.toRadians(reflected_image_angle);\n \t\tfloat start_vector_theta = (float) Math.toRadians(reflected_vector_angle);\n\t\tfloat rotate_theta = (float) Math.toRadians(reflected_rotate);\n\t\tfloat cur_image_theta = 0f, cur_vector_theta = 0f;\n\t\tdouble image_costheta = 0, vector_costheta = 0;\n\t\tdouble image_sintheta = 0, vector_sintheta = 0;\n\t\tfloat xP = 0f;\n\t\tfloat yP = 0f;\n\t\tfloat xO = 0f, nextXO = 0f;\n\t\tfloat yO = 0f, nextYO = 0f;\n\n\t\t//if (txt == null) {\n\t\t//\ttxt = load(\"img/plaitWhite.png\");\n\t\t//}\n\t\tTextureCoords tc = m_txt.getImageTexCoords();\n\t\txO = nextXO = reflected_x;\n\t\tyO = nextYO = reflected_y;\n xP = m_cx * m_starting_dilation;\n\t\tyP = m_cy * m_starting_dilation;\n //vector\n\t\tcur_vector_theta = start_vector_theta;\n vector_costheta = Math.cos(cur_vector_theta);\n\t\tvector_sintheta = Math.sin(cur_vector_theta);\n //image\n cur_image_theta = start_image_theta;\n\t\timage_costheta = Math.cos(cur_image_theta);\n\t\timage_sintheta = Math.sin(cur_image_theta);\n\t\t\n\t\tfor (int i = 0; i < Iteration; i++) {\t\t\t\n DrawPlait(gl, xO, yO, xP / 2, yP / 2, image_costheta, image_sintheta, tc);\n\t\t\t//vector\n cur_vector_theta += rotate_theta;\n\t\t\tvector_costheta = Math.cos(cur_vector_theta);\n\t\t\tvector_sintheta = Math.sin(cur_vector_theta);\n //image\n\t\t\tcur_image_theta += rotate_theta;\n\t\t\timage_costheta = Math.cos(cur_image_theta);\n\t\t\timage_sintheta = Math.sin(cur_image_theta);\n //next centor position\n\t\t\tnextXO = xO + (float) (xP * m_translate * vector_costheta);\n\t\t\tnextYO = yO + (float) (yP * m_translate * vector_sintheta);\n\t\t\tif (m_vector) {\n\t\t\t\tDrawVector(gl, xO, yO, nextXO, nextYO, xP, cur_vector_theta);\n\t\t\t}\n\t\t\txO = nextXO;\n\t\t\tyO = nextYO;\n\t\t\txP *= m_dilate;\n\t\t\tyP *= m_dilate;\n\t\t}\n\t}", "public void renderCustomEdit(IAttributeTable table)\n throws OculusException;", "@Override\n\tpublic Boolean initTool() {\n\t\tHalfEdgeDataStructure<CPMVertex, CPMEdge, CPMFace> graph = controller.getEditedGraph();\n\t\tdouble scale = 100.0;\n\t\tint n = graph.getNumVertices();\n\t\tint count = 0;\n\t\tfor (CPMVertex v : graph.getVertices()){\n\t\t\tv.setXY(new Point2d(scale * cos(-count * 2*PI/n), scale * sin(-count * 2*PI/n)));\n\t\t\tcount++;\n\t\t}\n\t\t/*\n\t\tfor (CPMVertex v : graph.getVertices())\n\t\t\tv.setXY(new Point2d(scale * rnd.nextDouble(), scale * rnd.nextDouble()));\n\t\t*/\n\t\tcontroller.setEditedGraph(graph);\n\t\treturn false;\n\t}", "public boolean getUsePrimitivePaint() {\n/* 66 */ return this.usePrimitivePaint;\n/* */ }", "@Override\n\tpublic void create() {\n\t\tassets = new AssetManager();\n\t\tspriteBatch = new SpriteBatch();\n\t\tGdx.input.setInputProcessor(this);\n\t\tGdx.input.setCatchMenuKey(true);\n\t\tGdx.input.setCatchBackKey(true);\n\t\tGdx.input.setInputProcessor(this);\n\t\t\n\t\t//WorldRenderer.BLEND_FUN1=GL20.GL_SRC_ALPHA;\n\t\t//WorldRenderer.BLEND_FUN2=GL20.GL_ONE_MINUS_SRC_ALPHA;\n\t\t//WorldRenderer.CLEAR_COLOR.set(0.5f,0.1f,0.2f,1);\n\t\t//UIRenderer.BLEND_FUN1=GL20.GL_SRC_ALPHA;\n\t\t//UIRenderer.BLEND_FUN2=GL20.GL_ONE_MINUS_SRC_ALPHA;\n\t\t\n\t\tspriteBatch.setBlendFunction(GL20.GL_SRC_ALPHA,GL20.GL_ONE);\n\t\tspriteBatch.enableBlending();\n\t\t\n\t\tdefaultShader=SpriteBatch.createDefaultShader();\n\t}", "public interface Drawable {\r\n List<Shape> getGUI();\r\n}", "private void setGeometry() {\n this.setCullHint(Spatial.CullHint.Dynamic);\n this.setLocalTranslation(realPosition);\n //attach geometry to this object\n // mat.setColor(\"Color\", colors[r.nextInt(colors.length)]);\n if (!companyTextures.containsKey(this.company)) {\n mat.setTexture(\"ColorMap\", Colors.get(r.nextInt(Colors.size())));\n } else {\n mat.setTexture(\"ColorMap\", companyTextures.get(this.company));\n }\n geom.setMaterial(mat);\n this.attachChild(geom.clone());\n }", "public void beforeDraw()\n {\n INDirector.setProjection(ProjectionFormat.DirectorProjection2D);\n this.grabber.beforeRender();\n }", "@Override\n public void simpleInitApp() {\n cam.setLocation(new Vector3f(-2.336393f, 11.91392f, -7.139601f));\n cam.setRotation(new Quaternion(0.23602544f, 0.11321983f, -0.027698677f, 0.96473104f));\n\n Material mat = new Material(assetManager,\"Common/MatDefs/Light/Lighting.j3md\");\n mat.setFloat(\"Shininess\", 15f);\n mat.setBoolean(\"UseMaterialColors\", true);\n mat.setColor(\"Ambient\", ColorRGBA.Yellow.mult(0.2f));\n mat.setColor(\"Diffuse\", ColorRGBA.Yellow.mult(0.2f));\n mat.setColor(\"Specular\", ColorRGBA.Yellow.mult(0.8f));\n\n Material matSoil = new Material(assetManager,\"Common/MatDefs/Light/Lighting.j3md\");\n matSoil.setFloat(\"Shininess\", 15f);\n matSoil.setBoolean(\"UseMaterialColors\", true);\n matSoil.setColor(\"Ambient\", ColorRGBA.Gray);\n matSoil.setColor(\"Diffuse\", ColorRGBA.Black);\n matSoil.setColor(\"Specular\", ColorRGBA.Gray);\n\n Spatial teapot = assetManager.loadModel(\"Models/Teapot/Teapot.obj\");\n teapot.setLocalTranslation(0,0,10);\n\n teapot.setMaterial(mat);\n teapot.setShadowMode(ShadowMode.CastAndReceive);\n teapot.setLocalScale(10.0f);\n rootNode.attachChild(teapot);\n\n Geometry soil = new Geometry(\"soil\", new Box(800, 10, 700));\n soil.setLocalTranslation(0, -13, 550);\n soil.setMaterial(matSoil);\n soil.setShadowMode(ShadowMode.CastAndReceive);\n rootNode.attachChild(soil);\n\n DirectionalLight light=new DirectionalLight();\n light.setDirection(new Vector3f(-1, -1, -1).normalizeLocal());\n light.setColor(ColorRGBA.White.mult(1.5f));\n rootNode.addLight(light);\n\n // load sky\n Spatial sky = SkyFactory.createSky(assetManager, \"Textures/Sky/Bright/FullskiesBlueClear03.dds\", SkyFactory.EnvMapType.CubeMap);\n sky.setCullHint(Spatial.CullHint.Never);\n rootNode.attachChild(sky);\n\n FilterPostProcessor fpp = new FilterPostProcessor(assetManager);\n int numSamples = getContext().getSettings().getSamples();\n if (numSamples > 0) {\n fpp.setNumSamples(numSamples);\n }\n pf = new PosterizationFilter();\n fpp.addFilter(pf);\n\n viewPort.addProcessor(fpp);\n initInputs();\n\n }", "boolean usesVisualizationStyles();", "void glEnableVertexAttribArray(int index);", "public Color4 getEffectColorAdd();", "public void visualChange();", "public Surface(){\r\n\t\tsuper(SURFACE_TAG,\"\");\r\n\t\tthis.setRef(\"CG\");\r\n\t}", "public abstract ArrayList<DrawingComponent> getAnnotationList();", "public void init(Map<String, String> attributes) {\r\n\r\n\t\tif (attributes.containsKey(\"p0\"))\r\n\t\t\tp0 = new Vec(attributes.get(\"p0\"));\r\n\t\tif (attributes.containsKey(\"p1\"))\r\n\t\t\tp1 = new Vec(attributes.get(\"p1\"));\r\n\t\tif (attributes.containsKey(\"p2\"))\r\n\t\t\tp2 = new Vec(attributes.get(\"p2\"));\r\n\t\tif (attributes.containsKey(\"p3\"))\r\n\t\t\tp3 = new Vec(attributes.get(\"p3\"));\r\n\r\n\t\tp4 = Vec.add(Vec.add(Vec.sub(p1, p0), Vec.sub(p3, p0)), p0);\r\n\t\tp5 = Vec.add(Vec.add(Vec.sub(p2, p0), Vec.sub(p3, p0)), p0);\r\n\t\tp6 = Vec.add(Vec.add(Vec.sub(p5, p3), Vec.sub(p4, p3)), p3);\r\n\r\n\t\tbase = new Rectangle(p0, p1, p3, attributes);\r\n\t\tfacep0p2p1 = new Rectangle(p0, p2, p1, attributes);\r\n\t\tfacep0p2p3 = new Rectangle(p0, p2, p3, attributes);\r\n\t\tfacep3p4p5 = new Rectangle(p3, p5, p4, attributes);\r\n\t\tfacep4p1p6 = new Rectangle(p4, p1, p6, attributes);\r\n\t\ttop = new Rectangle(p5, p2, p6, attributes);\r\n\r\n\t\tsuper.init(attributes);\r\n\t}", "@Override\r\n public void init(GLAutoDrawable drawable) {\n glu = new GLU();\r\n //Estabelece as coordenadas do SRU (Sistema de Referencia do Universo)\r\n xMin = yMin = zMin = -1;\r\n xMax = yMax = zMax = 1;\r\n tx = ty = rot = 0;\r\n sx = 1;\r\n }", "public static void main( String args[] )\n {\n JFrame f = new JFrame(\"Test for AltAzController\");\n f.setBounds(0,0,200,200);\n AltAzController controller = new AltAzController();\n// controller.setVirtualScreenSize( 2, 2 );\n f.getContentPane().add( controller );\n f.setVisible( true );\n\n\n JFrame window = new JFrame(\"Test for AltAzController\");\n window.setBounds(20,20,500,500);\n ThreeD_JPanel test = new ThreeD_JPanel();\n window.getContentPane().add( test );\n window.setVisible( true );\n\n controller.addControlledPanel( test );\n IThreeD_Object objs[] = new IThreeD_Object[6];\n Vector3D pts[] = new Vector3D[6];\n pts[0] = new Vector3D( -1, 1, 0 );\n pts[1] = new Vector3D( 1, 1, 0 );\n pts[2] = new Vector3D( 1, 1, 1 );\n pts[3] = new Vector3D( 1, 1, 0 );\n pts[4] = new Vector3D( 1, -1, 0 );\n pts[5] = new Vector3D( -1, -1, 0 );\n objs[0] = new Polyline( pts, Color.CYAN );\n\n pts = new Vector3D[2];\n pts[0] = new Vector3D( 0, 0, 0 );\n pts[1] = new Vector3D( 1, 0, 0 );\n objs[1] = new Polyline( pts, Color.RED );\n\n pts = new Vector3D[2];\n pts[0] = new Vector3D( 0, 0, 0 );\n pts[1] = new Vector3D( 0, 1, 0 );\n objs[2] = new Polyline( pts, Color.GREEN );\n\n pts = new Vector3D[2];\n pts[0] = new Vector3D( 0, 0, 0 );\n pts[1] = new Vector3D( 0, 0, 1 );\n objs[3] = new Polyline( pts, Color.BLUE );\n\n Vector3D center = new Vector3D( -1, -1, 1 );\n Vector3D x_vec = new Vector3D( -1, 1, 0 );\n Vector3D y_vec = new Vector3D( 0, 0, 1 );\n float width = 3;\n float height = 2;\n Color[][] colors = { { Color.RED, Color.GREEN, Color.BLUE },\n { Color.YELLOW, Color.CYAN, Color.MAGENTA },\n { Color.ORANGE, Color.GRAY, Color.WHITE } };\n\n ImageRectangle1 im_rect = new ImageRectangle1( center,\n x_vec,\n y_vec,\n width,\n height,\n colors );\n objs[4] = im_rect;\n\n\n center = new Vector3D( 1, 1, 1 );\n y_vec = new Vector3D( 1, 1, 0 );\n x_vec = new Vector3D( 1, -1, 0 );\n width = 2;\n height = 4;\n Color[][] colors_2 = { { Color.RED, Color.GREEN, Color.BLUE },\n { Color.YELLOW, Color.CYAN, Color.MAGENTA } };\n\n ImageRectangle1 im_rect_2 = new ImageRectangle1( center,\n x_vec,\n y_vec,\n width,\n height,\n colors_2 );\n objs[5] = im_rect_2;\n\n\n test.setObjects( \"SAMPLE_OBJECTS\", objs );\n\n controller.apply( true );\n }", "public void render() {\r\n Color geneColor=null;\r\n\r\n if(isChanged) {\r\n this.removeChild(predRect);\r\n predRect = new PPath();\r\n\r\n if(type == SegmentInfo.TYPE_AUTO) predRect.setPathTo(new RoundRectangle2D.Double(startx,0.0,endx - startx,(double)this.PREDICTION_RECT_HEIGHT, 10, 10));\r\n else if(type == SegmentInfo.TYPE_MANUAL) predRect.setPathTo(new RoundRectangle2D.Double(startx,0.0,endx - startx,(double)this.PREDICTION_RECT_HEIGHT, 0, 0));\r\n\r\n if(this.isSelected()) {\r\n if(this.sign < 0) geneColor = this.SELECTED_DOWN_COLOR;\r\n else geneColor = this.SELECTED_UP_COLOR;\r\n }\r\n else {\r\n if(this.sign < 0) geneColor = this.DOWN_COLOR;\r\n else geneColor = this.UP_COLOR;\r\n }\r\n\r\n predRect.setPaint(geneColor);\r\n this.addChild(predRect);\r\n isChanged=false;\r\n }\r\n }", "public void init( GLAutoDrawable drawable ) {\n\tGL2 gl = drawable.getGL().getGL2();\n gl.glClearColor(0.3F, 0.3F, 0.3F, 1.0F);\n gl.glEnable(GL2.GL_DEPTH_TEST);\n\tgl.glCullFace(GL2.GL_BACK);\n\tgl.glEnable(GL2.GL_CULL_FACE);\n\tfloat[] light_position = {-1000.0f, 3000.0f, 1000.0f, 0.0f};\n\tfloat[] sun_light = {1.0f, 1.0f, 0.8f, 1.0f};\n\tgl.glShadeModel(GL2.GL_SMOOTH); //FLAT); //SMOOTH); \n\n\tgl.glLightfv(GLLightingFunc.GL_LIGHT0, GLLightingFunc.GL_POSITION,\n\t\t light_position,0);\n\tgl.glLightfv(GLLightingFunc.GL_LIGHT0, GLLightingFunc.GL_DIFFUSE,\n\t\t sun_light,0);\n gl.glEnable(GL2.GL_LIGHTING); // Enable lighting.\n gl.glEnable(GL2.GL_LIGHT0); // Turn on a light. By default, shines from direction of viewer.\n gl.glEnable(GL2.GL_NORMALIZE); // OpenGL will make all normal vectors into unit normals\n gl.glEnable(GL2.GL_COLOR_MATERIAL); // Material ambient and diffuse colors can be set by glColor*\n\tgl.glMaterialf(GL.GL_FRONT, GLLightingFunc.GL_SHININESS, 64.0f);\n\n\tcreateElevationDisplayList();\n }", "public KmlGeometryFeature(){\r\n }", "@Override\r\n public int getFXLayer()\r\n {\r\n return 3;\r\n }", "public void addPolyLine() {\n abstractEditor.drawNewShape(new ELineDT());\n }", "private final void setGeomAttrTypeToClip( SimpleFeatureType featureType ) {\n\n GeometryDescriptor type = featureType.getDefaultGeometry();\n assert type != null;\n this.geomAttrType = type;\n }", "@Override\n public void create() {\n shapeRenderer = new ShapeRenderer();\n }", "public void syria(){\n stroke(1);\n //back guns\n fill(0);\n rect(73,192,4,15);\n rect(224,192,4,15);\n rect(71,207,8,15);\n rect(222,207,8,15);\n rect(66,207,3,15);\n rect(232,207,3,17);\n rect(122,109,4,15);\n rect(175,110,4,15);\n rect(121,120,6,15);\n rect(174,120,6,15);\n rect(116,124,3,15);\n rect(182,124,3,15);\n\n //wings\n fill(206,17,38);//red\n beginShape();\n vertex(14,286);\n vertex(61,236);\n vertex(88,308);\n vertex(51,334);\n vertex(14,313);\n endShape(CLOSE);\n beginShape();\n vertex(286,287);\n vertex(286,312);\n vertex(247,335);\n vertex(212,309);\n vertex(238,238);\n endShape(CLOSE);\n\n fill(200);//white\n beginShape();\n vertex(38,307);\n vertex(74,307);\n vertex(80,314);\n vertex(81,337);\n vertex(68,345);\n vertex(38,327);\n endShape(CLOSE);\n beginShape();\n vertex(219,316);\n vertex(226,308);\n vertex(262,308);\n vertex(262,326);\n vertex(231,345);\n vertex(219,336);\n endShape(CLOSE);\n\n fill(0);//red\n beginShape();\n vertex(96,191);\n vertex(61,230);\n vertex(60,269);\n vertex(96,312);\n vertex(101,300);\n vertex(100,247);\n vertex(112,232);\n vertex(132,232);\n vertex(131,186);\n endShape(CLOSE);\n beginShape();\n vertex(204,191);\n vertex(240,230);\n vertex(240,270);\n vertex(205,312);\n vertex(200,302);\n vertex(200,248);\n vertex(193,238);\n vertex(185,231);\n vertex(170,230);\n vertex(170,186);\n endShape(CLOSE);\n\n //white\n fill(200);\n beginShape();\n vertex(70,217);\n vertex(74,220);\n vertex(81,210);\n vertex(85,213);\n vertex(75,227);\n vertex(72,229);\n vertex(71,231);\n vertex(73,233);\n vertex(73,268);\n vertex(71,272);\n vertex(76,277);\n vertex(82,274);\n vertex(89,283);\n vertex(90,297);\n vertex(66,272);\n vertex(65,235);\n vertex(68,229);\n vertex(62,228);\n endShape(CLOSE);\n beginShape();\n vertex(228,217);\n vertex(225,218);\n vertex(218,211);\n vertex(215,213);\n vertex(223,227);\n vertex(226,226);\n vertex(230,230);\n vertex(227,233);\n vertex(228,270);\n vertex(229,272);\n vertex(223,276);\n vertex(218,276);\n vertex(210,283);\n vertex(211,296);\n vertex(235,273);\n vertex(234,233);\n vertex(232,228);\n vertex(237,227);\n endShape(CLOSE);\n\n //guns\n //white\n fill(200);\n beginShape();\n vertex(121,301);\n vertex(98,313);\n vertex(102,336);\n vertex(119,342);\n vertex(139,336);\n vertex(141,313);\n endShape(CLOSE);//l\n beginShape();\n vertex(159,312);\n vertex(162,336);\n vertex(180,342);\n vertex(200,336);\n vertex(202,313);\n vertex(180,302);\n endShape(CLOSE);\n\n //black\n fill(0);\n rect(105,315,30,30);\n rect(166,315,30,30);\n quad(105,344,109,355,131,355,135,344);\n quad(166,344,170,355,192,355,196,344);\n //green\n fill(0,122,61);\n rect(103,253,33,62);//l\n rect(164,252,33,62);//r\n //white\n fill(200);\n bezier(103,252,107,230,132,230,136,252);//l\n bezier(164,252,169,230,192,230,197,252);//r\n rect(103,280,33,25);//l\n rect(164,280,33,25);//r\n rect(104,319,33,26,3);//l\n rect(165,319,33,26,3);//r\n rect(115,310,7,28,8);//l\n rect(178,310,7,28,8);//r\n //green\n fill(0,122,61);\n rect(105,284,10,15);\n rect(124,284,10,15);\n rect(167,285,10,15);\n rect(185,284,10,15);\n\n //body-wings\n\n fill(0,122,61);//green\n bezier(107,154,101,162,98,169,98,187);\n bezier(191,153,199,164,202,172,203,187);\n quad(107,154,98,186,98,223,107,224);\n quad(191,153,203,186,202,223,192,223);\n fill(206,17,38);//red\n quad(134,112,108,147,107,239,132,230);\n quad(165,112,192,147,193,239,168,230);\n //black\n fill(0);\n quad(130,122,130,142,111,164,111,147);\n quad(169,122,188,147,188,165,169,144);\n //white\n fill(200);\n beginShape();\n vertex(131,154);\n vertex(129,202);\n vertex(118,202);\n vertex(112,181);\n vertex(110,179);\n vertex(110,171);\n endShape(CLOSE);\n beginShape();\n vertex(170,154);\n vertex(190,172);\n vertex(190,182);\n vertex(188,181);\n vertex(182,201);\n vertex(172,201);\n endShape(CLOSE);\n\n fill(0);\n quad(134,193,166,193,154,342,146,342);\n fill(0);\n quad(142,180,159,180,152,352,148,352);\n //white\n fill(200);\n ellipse(150,374,6,50);\n\n //head\n\n fill(206,17,38);\n ellipse(149.5f,72,33,25);\n ellipse(149.5f,94,30,170);\n fill(0);\n ellipse(149.5f,94,20,160);\n fill(154,155,84);\n ellipse(149.5f,94,17,77);\n strokeWeight(2);\n line(143,74,158,74);\n line(142,104,158,104);\n strokeWeight(1);\n fill(200);\n bezier(143,15,147,2,153,2,155.5f,15);\n}", "@DISPID(1611006028) //= 0x6006004c. The runtime will prefer the VTID if present\n @VTID(103)\n boolean onlyCurrentSolidSetInGeometry();", "public Exo2_Editeurpolylignes() {\n valeur_maximum = 5;\n initComponents();\n Tools.windowsInit(this);\n Tools.setIcone(\"./src/Icones/Icone_Lines.bmp\", this);\n this.setTitle(\"Editeur de poly-Lignes\");\n etat = Etat.Init;\n //rien\n initNombrePoints();\n\n }", "public void draw(){\n\t\tcomponent.draw();\r\n\t}", "int glGetAttribLocation(int program, String name);", "public void russia(){\n stroke(1);\n //back guns\n fill(0);\n rect(73,192,4,15);\n rect(224,192,4,15);\n rect(71,207,8,15);\n rect(222,207,8,15);\n rect(66,207,3,15);\n rect(232,207,3,17);\n rect(122,109,4,15);\n rect(175,110,4,15);\n rect(121,120,6,15);\n rect(174,120,6,15);\n rect(116,124,3,15);\n rect(182,124,3,15);\n\n //wings\n fill(165,0,0);//gray\n beginShape();\n vertex(14,286);\n vertex(61,236);\n vertex(88,308);\n vertex(51,334);\n vertex(14,313);\n endShape(CLOSE);\n beginShape();\n vertex(286,287);\n vertex(286,312);\n vertex(247,335);\n vertex(212,309);\n vertex(238,238);\n endShape(CLOSE);\n\n fill(0);//black\n beginShape();\n vertex(38,307);\n vertex(74,307);\n vertex(80,314);\n vertex(81,337);\n vertex(68,345);\n vertex(38,327);\n endShape(CLOSE);\n beginShape();\n vertex(219,316);\n vertex(226,308);\n vertex(262,308);\n vertex(262,326);\n vertex(231,345);\n vertex(219,336);\n endShape(CLOSE);\n\n fill(18,39,148);//blue\n beginShape();\n vertex(96,191);\n vertex(61,230);\n vertex(60,269);\n vertex(96,312);\n vertex(101,300);\n vertex(100,247);\n vertex(112,232);\n vertex(132,232);\n vertex(131,186);\n endShape(CLOSE);\n beginShape();\n vertex(204,191);\n vertex(240,230);\n vertex(240,270);\n vertex(205,312);\n vertex(200,302);\n vertex(200,248);\n vertex(193,238);\n vertex(185,231);\n vertex(170,230);\n vertex(170,186);\n endShape(CLOSE);\n\n //white\n fill(200);\n beginShape();\n vertex(70,217);\n vertex(74,220);\n vertex(81,210);\n vertex(85,213);\n vertex(75,227);\n vertex(72,229);\n vertex(71,231);\n vertex(73,233);\n vertex(73,268);\n vertex(71,272);\n vertex(76,277);\n vertex(82,274);\n vertex(89,283);\n vertex(90,297);\n vertex(66,272);\n vertex(65,235);\n vertex(68,229);\n vertex(62,228);\n endShape(CLOSE);\n beginShape();\n vertex(228,217);\n vertex(225,218);\n vertex(218,211);\n vertex(215,213);\n vertex(223,227);\n vertex(226,226);\n vertex(230,230);\n vertex(227,233);\n vertex(228,270);\n vertex(229,272);\n vertex(223,276);\n vertex(218,276);\n vertex(210,283);\n vertex(211,296);\n vertex(235,273);\n vertex(234,233);\n vertex(232,228);\n vertex(237,227);\n endShape(CLOSE);\n\n //guns\n //red\n fill(194,24,11);\n beginShape();\n vertex(121,301);\n vertex(98,313);\n vertex(102,336);\n vertex(119,342);\n vertex(139,336);\n vertex(141,313);\n endShape(CLOSE);//l\n beginShape();\n vertex(159,312);\n vertex(162,336);\n vertex(180,342);\n vertex(200,336);\n vertex(202,313);\n vertex(180,302);\n endShape(CLOSE);\n\n //black\n fill(0);\n rect(105,315,30,30);\n rect(166,315,30,30);\n quad(105,344,109,355,131,355,135,344);\n quad(166,344,170,355,192,355,196,344);\n\n rect(103,253,33,62);//l\n rect(164,252,33,62);//r\n //white\n fill(200);\n bezier(103,252,107,230,132,230,136,252);//l\n bezier(164,252,169,230,192,230,197,252);//r\n\n rect(103,280,33,25);//l\n rect(164,280,33,25);//r\n rect(104,319,33,26,3);//l\n rect(165,319,33,26,3);//r\n fill(194,24,11);\n rect(115,310,7,28,8);//l\n rect(178,310,7,28,8);//r\n\n fill(194,24,11);\n rect(105,284,10,15);\n rect(124,284,10,15);\n rect(167,285,10,15);\n rect(185,284,10,15);\n\n //body-wings\n\n fill(0,0,67);//blue\n bezier(107,154,101,162,98,169,98,187);\n bezier(191,153,199,164,202,172,203,187);\n quad(107,154,98,186,98,223,107,224);\n quad(191,153,203,186,202,223,192,223);\n fill(192,0,11);//red\n quad(134,112,108,147,107,239,132,230);\n quad(165,112,192,147,193,239,168,230);\n //black\n fill(0);\n quad(130,122,130,142,111,164,111,147);\n quad(169,122,188,147,188,165,169,144);\n //white\n fill(200);\n beginShape();\n vertex(131,154);\n vertex(129,202);\n vertex(118,202);\n vertex(112,181);\n vertex(110,179);\n vertex(110,171);\n endShape(CLOSE);\n beginShape();\n vertex(170,154);\n vertex(190,172);\n vertex(190,182);\n vertex(188,181);\n vertex(182,201);\n vertex(172,201);\n endShape(CLOSE);\n\n fill(0);\n quad(134,193,166,193,154,342,146,342);\n fill(192,0,11);\n quad(142,180,159,180,152,352,148,352);\n //white\n fill(200);\n ellipse(150,374,6,50);\n\n //head\n fill(160,0,0);\n ellipse(149.5f,72,33,25);\n ellipse(149.5f,94,30,170);\n fill(0);\n ellipse(149.5f,94,20,160);\n fill(154,155,84);\n ellipse(149.5f,94,17,77);\n strokeWeight(2);\n line(143,74,158,74);\n line(142,104,158,104);\n strokeWeight(1);\n fill(200);\n bezier(143,15,147,2,153,2,155.5f,15);\n}", "public void setup(){\n\t\t gl.glEnable(GL.GL_BLEND);\n\t\t gl.glBlendFunc(GL.GL_SRC_ALPHA, GL.GL_ONE_MINUS_SRC_ALPHA);\n\t\t for (int i = 0; i< cubes.length; i++){\n\t\t cubes[i] = this.s.new Cube(\n\t\t \t\tMath.round(p.random(-100, 100)), \n\t\t \t\tMath.round(p.random(-100, 100)), \n\t\t \t\t5,//Math.round(random(-100, 100)),\n\t\t \t\tMath.round(p.random(-10, 10)), \n\t\t \t\t\tMath.round(p.random(-10, 10)), \n\t\t\t\t\tMath.round( p.random(-10, 10))\n\t\t );\n\t\t cubRotation[i]=new Vector3D();\n\t\t cubRotationFactor[i]=new Vector3D();\n\t\t cubRotationFactor[i].x = (float)Math.random()/2f;\n\t\t cubRotationFactor[i].y = (float)Math.random()/2f;\n\t\t cubRotationFactor[i].z = (float)Math.random()/2f;\n\t\t \n\t\t cubColor[i]=new Vector3D();\n\t\t cubColor[i].x = (float)Math.random();\n\t\t cubColor[i].y = (float)Math.random();\n\t\t cubColor[i].z = (float)Math.random();\n\t\t }\n\t\t \n\t\t try {\n\t\t\togl.makeProgram(\n\t\t\t\t\t\t\"glass\",\n\t\t\t\t\t\tnew String[] {},\n\t\t\t\t\t\tnew String[] {\"SpecularColor1\",\"SpecularColor2\",\"SpecularFactor1\",\"SpecularFactor2\",\"LightPosition\"}, //\"GlassColor\",\n\t\t\t\t\t\togl.loadGLSLShaderVObject(\t\"resources/robmunro/perform/ol5/glass_c.vert\" ), \n\t\t\t\t\t\togl.loadGLSLShaderFObject(\t\"resources/robmunro/perform/ol5/glass_c.frag\"\t)\n\t\t\t\t);\n\t\t\t} catch (Exception e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t}", "@Override\n\tpublic void draw3() {\n\n\t}", "public interface Renderable {\n boolean isVisible();\n void scale(Vector3 e);\n void translate(Vector3 e);\n Point3 getOrigin();\n}", "public void render(PApplet core) {\n\n super.render(core);\n\n mContext.crosshair.setTranslation(core.mouseX, core.mouseY);\n mContext.crosshair.render(core);\n\n }", "public void setFace(android.renderscript.Type.CubemapFace r1) {\n /*\n // Can't load method instructions: Load method exception: bogus opcode: 00e5 in method: android.renderscript.AllocationAdapter.setFace(android.renderscript.Type$CubemapFace):void, dex: \n */\n throw new UnsupportedOperationException(\"Method not decompiled: android.renderscript.AllocationAdapter.setFace(android.renderscript.Type$CubemapFace):void\");\n }", "private void initRendering() {\n ring = new Ring(0.3f, 0.7f);\n line = new Line(ImageTargets.screenWidth / 2, ImageTargets.screenHeight / 2);\n state_txt = createObject(68f, state_txt_cx, state_txt_cy, R.drawable.state);\n state_img = createObject(120f, state_img_cx, state_img_cy, R.drawable.open);\n record_txt = createObject(68f, record_txt_cx, record_txt_cy, R.drawable.record_txt);\n record_img = createObject(95f, record_img_cx, record_img_cy, R.drawable.record_img);\n recog_txt = createObject(68f, recog_txt_cx, recog_txt_cy, R.drawable.recog_txt);\n recog_img = createObject(155, recog_img_cx, recog_img_cy, R.drawable.person);\n record_num = createObject(85, record_num_cx, record_num_cy, R.drawable.num);\n\n histogram = createHistogram(85, 275.0f, 1150, 2.0f);\n histogram1 = createHistogram(85, 405, 1150, 2.2f);\n histogram2 = createHistogram(85, 540, 1150, 2.58f);\n histogram3 = createHistogram(85, 675, 1150, 0.9f);\n mRenderer = Renderer.getInstance();\n\n GLES20.glClearColor(0.0f, 0.0f, 0.0f, Vuforia.requiresAlpha() ? 0.0f\n : 1.0f);\n setBgTransparent();\n //初始化纹理\n initTexture(res);\n mActivity.loadingDialogHandler\n .sendEmptyMessage(LoadingDialogHandler.HIDE_LOADING_DIALOG);\n\n }", "private void drawModelElements_Functions_xjal(Panel _panel, Graphics2D _g, boolean _publicOnly)\n/* 244: */ {\n/* 245:326 */ if (!_publicOnly) {\n/* 246:327 */ drawFunction(_panel, _g, 20, 70, 10, 0, \"setImageProvider\");\n/* 247: */ }\n/* 248:329 */ if (!_publicOnly) {\n/* 249:330 */ drawFunction(_panel, _g, 200, 70, 10, 0, \"removeAllAgents\");\n/* 250: */ }\n/* 251:332 */ if (!_publicOnly) {\n/* 252:333 */ drawFunction(_panel, _g, 200, 50, 10, 0, \"removeAgent\");\n/* 253: */ }\n/* 254:335 */ if (!_publicOnly) {\n/* 255:336 */ drawFunction(_panel, _g, 200, 30, 10, 0, \"addAgent\");\n/* 256: */ }\n/* 257:338 */ if (!_publicOnly) {\n/* 258:339 */ drawFunction(_panel, _g, 330, 70, 10, 0, \"removeAllOverlayObj\");\n/* 259: */ }\n/* 260:341 */ if (!_publicOnly) {\n/* 261:342 */ drawFunction(_panel, _g, 330, 50, 10, 0, \"removeOverlayObj\");\n/* 262: */ }\n/* 263:344 */ if (!_publicOnly) {\n/* 264:345 */ drawFunction(_panel, _g, 330, 30, 10, 0, \"addOverlayObj\");\n/* 265: */ }\n/* 266:347 */ if (!_publicOnly) {\n/* 267:348 */ drawFunction(_panel, _g, 20, 100, 10, 0, \"setStaticOverlayVisible\");\n/* 268: */ }\n/* 269:350 */ if (!_publicOnly) {\n/* 270:351 */ drawFunction(_panel, _g, 20, 120, 10, 0, \"setDynamicOverlayVisible\");\n/* 271: */ }\n/* 272:353 */ if (!_publicOnly) {\n/* 273:354 */ drawFunction(_panel, _g, 20, 180, 10, 0, \"zoomToBounds\");\n/* 274: */ }\n/* 275:356 */ if (!_publicOnly) {\n/* 276:357 */ drawFunction(_panel, _g, 20, 160, 10, 0, \"getMapBounds\");\n/* 277: */ }\n/* 278:359 */ if (!_publicOnly) {\n/* 279:360 */ drawFunction(_panel, _g, 200, 130, 10, 0, \"addAgent\");\n/* 280: */ }\n/* 281:362 */ if (!_publicOnly) {\n/* 282:363 */ drawFunction(_panel, _g, 200, 150, 10, 0, \"removeAgent\");\n/* 283: */ }\n/* 284:365 */ if (!_publicOnly) {\n/* 285:366 */ drawFunction(_panel, _g, 200, 170, 10, 0, \"removeAllAgents\");\n/* 286: */ }\n/* 287:368 */ if (!_publicOnly) {\n/* 288:369 */ drawFunction(_panel, _g, 330, 130, 10, 0, \"removeAllOverlayObj\");\n/* 289: */ }\n/* 290:371 */ if (!_publicOnly) {\n/* 291:372 */ drawFunction(_panel, _g, 330, 150, 10, 0, \"removeOverlayObj\");\n/* 292: */ }\n/* 293:374 */ if (!_publicOnly) {\n/* 294:375 */ drawFunction(_panel, _g, 330, 170, 10, 0, \"addOverlayObj\");\n/* 295: */ }\n/* 296: */ }", "@Override\r\n public Shape createShape(RenderContext ctx) {\n float v[] = { -1, -1, 1, 1, -1, 1, 1, 1, 1, -1, 1, 1, // front face\r\n -1, -1, -1, -1, -1, 1, -1, 1, 1, -1, 1, -1, // left face\r\n -1, -1, 1, -1, -1, -1, 1, -1, -1, 1, -1, 1 }; // bottom face\r\n\r\n // The vertex normals\r\n float n[] = { 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1, // front face\r\n -1, 0, 0, -1, 0, 0, -1, 0, 0, -1, 0, 0, // left face\r\n 0, -1, 0, 0, -1, 0, 0, -1, 0, 0, -1, 0 }; // bottom face\r\n\r\n // The vertex colors\r\n float c[] = { 1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, //\r\n 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, //\r\n 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1 };\r\n\r\n // Texture coordinates\r\n float uv[] = { 0, 0, 1, 0, 1, 1, 0, 1, //\r\n 0, 0, 1, 0, 1, 1, 0, 1, //\r\n 0, 0, 1, 0, 1, 1, 0, 1 };\r\n\r\n // The triangles (three vertex indices for each triangle)\r\n int indices[] = { 0, 2, 3, 0, 1, 2, // front face\r\n 4, 6, 7, 4, 5, 6, // left face\r\n 8, 10, 11, 8, 9, 10 }; // bottom face\r\n\r\n // Construct a data structure that stores the vertices, their\r\n // attributes, and the triangle mesh connectivity\r\n VertexData vertexData = ctx.makeVertexData(12);\r\n vertexData.addElement(c, VertexData.Semantic.COLOR, 3);\r\n vertexData.addElement(v, VertexData.Semantic.POSITION, 3);\r\n vertexData.addElement(n, VertexData.Semantic.NORMAL, 3);\r\n vertexData.addElement(uv, VertexData.Semantic.TEXCOORD, 2);\r\n vertexData.addIndices(indices);\r\n\r\n return new jrtr.Shape(vertexData);\r\n }", "@Override\n public void onPolygonClick(Polygon polygon) {\n // Flip the values of the red, green, and blue components of the polygon's color.\n int color = polygon.getStrokeColor() ^ 0x00ffffff;\n polygon.setStrokeColor(color);\n color = polygon.getFillColor() ^ 0x00ffffff;\n polygon.setFillColor(color);\n\n Toast.makeText(this, \"Area type \" + polygon.getTag().toString(), Toast.LENGTH_SHORT).show();\n }", "private void styleMap() {\n String JSON = \"[{\\\"featureType\\\":\\\"poi\\\", \\\"stylers\\\":[{\\\"visibility\\\":\\\"off\\\"}]}]\";\n //mMap.setMapStyle(new MapStyleOptions(JSON));\n }", "@Override\n\tprotected void init() {\n\t\tShaderProgram shaderProgram = new ShaderProgram(\"aufgabe2\");\n\t\tglUseProgram(shaderProgram.getId());\n\t\tfloat [] vertex_data = {\n\t\t\t\t-0.5f,-0.5f,\n\t\t\t\t0.5f,-0.5f,\n\t\t\t\t0.0f,0.5f,\n\t\t};\n\t\tfloat[] frag_data = { 1f, 0f, 0f, 0f, 1f, 0f, 0f, 0f, 1f };\n\t\t// Koordinaten, VAO, VBO, ... hier anlegen und im Grafikspeicher ablegen\n\t\tint vaoId = glGenVertexArrays();\n\t\tglBindVertexArray(vaoId);\n\t\tint vboId = glGenBuffers();\n\t\tglBindBuffer(GL_ARRAY_BUFFER, vboId);\n\t\tglBufferData(GL_ARRAY_BUFFER,vertex_data, GL_STATIC_DRAW);\n\t\tglVertexAttribPointer(0, 2, GL_FLOAT,false, 0, 0);\n\t\tglEnableVertexAttribArray(0);\n\t\tint vboId2 = glGenBuffers();\n\t\tglBindBuffer(GL_ARRAY_BUFFER, vboId2);\n\t\tglBufferData(GL_ARRAY_BUFFER,frag_data, GL_STATIC_DRAW);\n\t\tglVertexAttribPointer(1, 3, GL_FLOAT, false, 0, 0);\n\t\tglEnableVertexAttribArray(1);\n\t}", "@Override\n public void reshape(GLAutoDrawable drawable, int x, int y, int width, int height) {\n GL2 gl = drawable.getGL().getGL2(); // get the OpenGL 2 graphics context\n \n if (height == 0) height = 1; // prevent divide by zero\n float aspect = (float)width / height;\n \n \n gl.glViewport(0, 0, width, height);\n \n gl.glClearDepth(1.0f);\n gl.glEnable(GL.GL_DEPTH_TEST);\n gl.glDepthFunc(GL.GL_LEQUAL);\n gl.glShadeModel(GL.GL_LINE_SMOOTH);\n gl.glHint(GL2.GL_PERSPECTIVE_CORRECTION_HINT, GL.GL_NICEST);\n\n gl.glEnable(GL2.GL_DEPTH_TEST);\n gl.glEnable(GL2.GL_NORMALIZE);\n gl.glEnable(GL2.GL_LIGHTING);\n gl.glEnable(GL2.GL_LIGHT0);\n gl.glEnable(GL2.GL_COLOR_MATERIAL);\n \n gl.glMatrixMode(GL2.GL_PROJECTION); \n gl.glLoadIdentity(); \n glu.gluPerspective(60.0, aspect, 0.1, 1000.0); \n\n float []lightPos={-40,100,40,0};\n float ambient[] = {0.1f, 0.1f, 0.1f,1.0f} ;\n float diffuse[] = {0.5f, 0.5f, 0.5f,1.0f} ;\n float spec[] = {0.0f, 0.0f, 0.0f,1.0f};\n float emiss[] = {0.0f, 0.0f, 0.0f,2.0f}; \n \tgl.glColorMaterial(GL2.GL_FRONT, GL2.GL_AMBIENT_AND_DIFFUSE);\n \tgl.glLightfv(GL2.GL_LIGHT0, GL2.GL_POSITION, lightPos,0);\n \tgl.glLightfv(GL2.GL_LIGHT0, GL2.GL_AMBIENT, ambient,0);\n \tgl.glLightfv(GL2.GL_LIGHT0, GL2.GL_DIFFUSE, diffuse,0);\n \n gl.glMatrixMode(GL2.GL_MODELVIEW);\n gl.glLoadIdentity(); // reset\n OneTriangle.setup(gl, width, height);\n }", "public void Initialize4(SpatialReference sr, Envelope fullextent, GraphicsLayer.RenderingMode mode)\n\t{\n\t\tsetObject(new GraphicsLayer(sr, fullextent, mode));\n\t}", "@Override\r\n protected void drawDebugShape( PhysicsNode physicsNode, Renderer renderer ) {\n\r\n }", "public Visualize() {\n initComponents();\n \n }", "void render(Object rendererTool);", "@Override\n protected void createMesh() {\n rayLight.getScope().add(camera);\n\n light = new PointLight(Color.GAINSBORO);\n light.setTranslateX(-300);\n light.setTranslateY(300);\n light.setTranslateZ(-2000);\n\n light2 = new PointLight(Color.ALICEBLUE);\n light2.setTranslateX(300);\n light2.setTranslateY(-300);\n light2.setTranslateZ(2000);\n\n light3 = new PointLight(Color.SPRINGGREEN);\n light3.setTranslateY(-2000);\n //create a target\n target1 = new Sphere(180);\n target1.setId(\"t1\");\n target1.setDrawMode(DrawMode.LINE);\n target1.setCullFace(CullFace.NONE);\n target1.setTranslateX(500);\n target1.setTranslateY(500);\n target1.setTranslateZ(500);\n target1.setMaterial(red);\n // create another target\n target2 = new Sphere(150);\n target2.setId(\"t2\");\n target2.setDrawMode(DrawMode.LINE);\n target2.setCullFace(CullFace.NONE);\n target2.setTranslateX(-500);\n target2.setTranslateY(-500);\n target2.setTranslateZ(-500);\n target2.setMaterial(blue);\n\n origin = new Box(20, 20, 20);\n origin.setDrawMode(DrawMode.LINE);\n origin.setCullFace(CullFace.NONE);\n \n model = new Group(target1, target2, origin, light, light2, light3, rayLight);\n }", "@Override\r\n public void simpleInitApp(\r\n ) {\n\t flyCam.setMoveSpeed( 20 );\t\t\t// Move a bit faster\r\n\t flyCam.setDragToRotate( true );\t\t// Only use the mouse while it is clicked\r\n\t \r\n \tGeometry aGeometry;\r\n \tMaterial mat_csg;\r\n \tNode aNode = new Node( \"CSGSamples\" );\r\n\r\n mat_csg = new Material( assetManager, \"Common/MatDefs/Misc/ShowNormals.j3md\" );\r\n aGeometry = new Geometry( \"Box2\", new Box( 1, 1, 1 ) );\r\n //aGeometry = new Geometry( \"Cylinder\", new Cylinder( 32, 32, 1.1f, 1.5f, true ) );\r\n aGeometry.setMaterial( mat_csg );\r\n aGeometry.move( -2f, 0f, 0f );\r\n aNode.attachChild( aGeometry );\r\n\r\n //mat_csg = assetManager.loadMaterial( \"Textures/Debug/Wireframe.j3m\" );\r\n //mat_csg = assetManager.loadMaterial( \"Textures/Terrain/BrickWall/BrickWall.j3m\" );\r\n \r\n Material sphereMat = new Material(assetManager, \r\n \"Common/MatDefs/Light/Lighting.j3md\");\r\n sphereMat.setTexture(\"DiffuseMap\", \r\n assetManager.loadTexture(\"Textures/Terrain/Pond/Pond.jpg\"));\r\n sphereMat.setTexture(\"NormalMap\", \r\n assetManager.loadTexture(\"Textures/Terrain/Pond/Pond_normal.png\"));\r\n sphereMat.setBoolean(\"UseMaterialColors\",true); \r\n sphereMat.setColor(\"Diffuse\",ColorRGBA.White);\r\n sphereMat.setColor(\"Specular\",ColorRGBA.White);\r\n sphereMat.setFloat(\"Shininess\", 64f); // [0,128]\r\n\r\n aGeometry = new Geometry( \"Box1\", new Box( 1, 1, 1 ) );\r\n //aGeometry = new Geometry( \"Cylinder\", new Cylinder( 32, 32, 1.1f, 1.5f, true ) );\r\n aGeometry.setMaterial( sphereMat );\r\n aGeometry.move( 2f, 0f, 0f );\r\n aNode.attachChild( aGeometry );\r\n \r\n //mat_csg = assetManager.loadMaterial( \"Textures/Terrain/Rock/Rock.j3m\" );\r\n Light aLight = new AmbientLight();\r\n aLight.setColor( ColorRGBA.White );\r\n aNode.addLight( aLight );\r\n\r\n\r\n/***\r\n\t // Long cylinder that pokes out of the cube\r\n \taGeometry = buildShape( CSGGeometry.CSGOperator.UNION, 2.5f, CSGGeometry.CSGOperator.UNION, false );\r\n \taGeometry.move( 0f, 3, 0f );\r\n \taNode.attachChild( aGeometry );\r\n \t\r\n \taGeometry = buildShape( CSGGeometry.CSGOperator.UNION, 2.5f, CSGGeometry.CSGOperator.DIFFERENCE, false );\r\n \taGeometry.move( 3f, 0f, 0f );\r\n \taNode.attachChild( aGeometry );\r\n \t\r\n \taGeometry = buildShape( CSGGeometry.CSGOperator.UNION, 2.5f, CSGGeometry.CSGOperator.INTERSECTION, false );\r\n \taGeometry.move( 0f, 0f, 3f );\r\n \taNode.attachChild( aGeometry );\r\n \t\r\n \taGeometry = buildShape( CSGGeometry.CSGOperator.UNION, 2.5f, CSGGeometry.CSGOperator.SKIP, false );\r\n \taGeometry.move( -3f, 0f, 0f );\r\n \taNode.attachChild( aGeometry );\r\n \t\r\n \taGeometry = buildShape( CSGGeometry.CSGOperator.SKIP, 2.5f, CSGGeometry.CSGOperator.UNION, false );\r\n \taGeometry.move( 0f, -3f, 0f );\r\n \taNode.attachChild( aGeometry );\r\n \t\r\n \t// Short cylinder that does not span out of the cube\r\n \taGeometry = buildShape( CSGGeometry.CSGOperator.UNION, 1.5f, CSGGeometry.CSGOperator.UNION, true );\r\n \taGeometry.move( 0f, 3f, -8f );\r\n \taNode.attachChild( aGeometry );\r\n \t\r\n \taGeometry = buildShape( CSGGeometry.CSGOperator.UNION, 1.5f, CSGGeometry.CSGOperator.DIFFERENCE, true );\r\n \taGeometry.move( 3f, 0f, -8f );\r\n \taNode.attachChild( aGeometry );\r\n \t\r\n \taGeometry = buildShape( CSGGeometry.CSGOperator.UNION, 1.5f, CSGGeometry.CSGOperator.INTERSECTION, false );\r\n \taGeometry.move( 0f, 0f, -8f );\r\n \taNode.attachChild( aGeometry );\r\n \t\r\n \taGeometry = buildSimpleShape( 0, false );\r\n \taGeometry.move( -3f, -3f, 0f );\r\n \taNode.attachChild( aGeometry );\r\n****/\r\n \t// Preserve the samples\r\n \tFile aFile = new File( \"CSGTestD.xml\" );\r\n \tJmeExporter anExporter = new XMLExporter();\r\n \ttry {\r\n \t\tanExporter.save( aNode, aFile );\r\n \t\tSystem.out.println( \"Export to: \" + aFile.getCanonicalPath() );\r\n \t} catch( Exception ex ) {\r\n \t\tSystem.out.println( \"***Export Failed: \" + ex );\r\n \t}\r\n \t// Display what we have\r\n \trootNode.attachChild( aNode );\r\n }", "protected void mo3286a(AttributeSet attributeSet) {\n float f = -1.0f;\n setAddStatesFromChildren(true);\n setOrientation(0);\n setGravity(17);\n int i = C2262R.drawable.asanpardakht_rounded_white_box_bg;\n String str = TtmlNode.ANONYMOUS_REGION_ID;\n String str2 = TtmlNode.ANONYMOUS_REGION_ID;\n String str3 = TtmlNode.ANONYMOUS_REGION_ID;\n if (attributeSet != null) {\n TypedArray obtainStyledAttributes = getContext().obtainStyledAttributes(attributeSet, C2262R.styleable.asanpardakht_AP);\n i = obtainStyledAttributes.getResourceId(C2262R.styleable.asanpardakht_AP_android_background, C2262R.drawable.asanpardakht_rounded_white_box_bg);\n str = obtainStyledAttributes.getString(C2262R.styleable.asanpardakht_AP_asanpardakht_label);\n str2 = obtainStyledAttributes.getString(C2262R.styleable.asanpardakht_AP_asanpardakht_monthHint);\n str3 = obtainStyledAttributes.getString(C2262R.styleable.asanpardakht_AP_asanpardakht_yearHint);\n f = obtainStyledAttributes.getDimension(C2262R.styleable.asanpardakht_AP_asanpardakht_inputTextSize, -1.0f);\n obtainStyledAttributes.recycle();\n }\n float f2 = f;\n int i2 = i;\n String str4 = str;\n str = str2;\n str2 = str3;\n float f3 = f2;\n if (i2 > 0) {\n setBackgroundResource(i2);\n }\n this.f7350c = (TextView) findViewById(C2262R.id.ap_txt_label);\n this.f7351d = (TextView) findViewById(C2262R.id.ap_txt_separator);\n this.f7348a = (EditText) findViewById(C2262R.id.asanpardakht_edt_card_expiration_month);\n this.f7349b = (EditText) findViewById(C2262R.id.asanpardakht_edt_card_expiration_year);\n this.f7350c.setText(str4);\n this.f7351d.setText(\"/\");\n if (f3 > BitmapDescriptorFactory.HUE_RED) {\n this.f7348a.setTextSize(0, f3);\n this.f7349b.setTextSize(0, f3);\n }\n this.f7348a.setHint(Html.fromHtml(String.format(\"<small>%s</small>\", new Object[]{str})));\n this.f7349b.setHint(Html.fromHtml(String.format(\"<small>%s</small>\", new Object[]{str2})));\n this.f7348a.setNextFocusForwardId(this.f7349b.getId());\n this.f7348a.addTextChangedListener(new C22781(this));\n this.f7349b.addTextChangedListener(new C22792(this));\n setFocusable(true);\n setFocusableInTouchMode(true);\n setOnFocusChangeListener(new C22803(this));\n }", "void setupRender() {\n\t\t_highlightFacilityId = _facilityId;\n\t}", "private void unbindGameTerrain(){\r\n\t\t//Disable the vertex position attribute from VAO\r\n\t\tGL20.glDisableVertexAttribArray(0);\r\n\t\t//Disable the texture coordinate attribute from VAO\r\n\t\tGL20.glDisableVertexAttribArray(1);\r\n\t\t//Disable the normal coordinate attribute from VAO\r\n\t\tGL20.glDisableVertexAttribArray(2);\r\n\t\t//Unbind\r\n\t\tGL30.glBindVertexArray(0);\r\n\t}", "private void initialize() {\n ShaderProgram.pedantic = false;\r\n\r\n shader = CustomShaderLoader.createShader();\r\n if (!shader.isCompiled()) {\r\n System.err.println(shader.getLog());\r\n System.exit(0);\r\n }\r\n if (shader.getLog().length() != 0)\r\n System.out.println(shader.getLog());\r\n }", "public float[] getHitTexCoord();", "private void doBeam(Vector3f start, Vector3f end, Vector3f up, float len, float spanWidth, Vector4f color) {\n boolean useSoftSprites = false;//Ref.glRef.srgbBuffer != null && Ref.glRef.r_softparticles.isTrue();\n CubeTexture tex = null; // depth\n\n Shader sh = Ref.glRef.getShader(\"Poly\");\n Ref.glRef.PushShader(sh);\n sh.setUniform(\"ModelView\", view.viewMatrix);\n sh.setUniform(\"Projection\", view.ProjectionMatrix);\n// if(useSoftSprites) {\n// // use soft particle shader\n// Ref.glRef.PushShader(softSprite);\n// softSprite.setUniform(\"res\", Ref.glRef.GetResolution());\n//\n// // Bind depth from FBO\n// int depth = Ref.glRef.srgbBuffer.getDepthTextureId();\n// tex = new CubeTexture(Ref.glRef.srgbBuffer.getTarget(), depth, null);\n// tex.textureSlot = 1;\n// tex.loaded = true;\n// tex.Bind();\n// }\n\n GL11.glDisable(GL11.GL_CULL_FACE);\n\n GL11.glDepthMask(false); // dont write to depth\n GL11.glBegin(GL11.GL_QUADS);\n {\n // Fancy pants shaders\n Vector3f v = Helper.VectorMA(start, spanWidth, up, null);\n GL20.glVertexAttrib2f(Shader.INDICE_COORDS, 1, 0);\n Helper.col(color);\n GL20.glVertexAttrib3f(Shader.INDICE_POSITION, v.x, v.y, v.z);\n\n Helper.VectorMA(start, -spanWidth, up, v);\n GL20.glVertexAttrib2f(Shader.INDICE_COORDS, 1, 1);\n Helper.col(color);\n GL20.glVertexAttrib3f(Shader.INDICE_POSITION, v.x, v.y, v.z);\n\n \n\n Helper.VectorMA(end, -spanWidth, up, v);\n GL20.glVertexAttrib2f(Shader.INDICE_COORDS, 0, 1);\n Helper.col(color);\n GL20.glVertexAttrib3f(Shader.INDICE_POSITION, v.x, v.y, v.z);\n\n Helper.VectorMA(end, spanWidth, up, v);\n GL20.glVertexAttrib2f(Shader.INDICE_COORDS, 0, 0);\n Helper.col(color);\n GL20.glVertexAttrib3f(Shader.INDICE_POSITION, v.x, v.y, v.z);\n }\n GL11.glEnd();\n GL11.glDepthMask(true);\n\n GL11.glEnable(GL11.GL_CULL_FACE);\n\n if(useSoftSprites) {\n tex.Unbind();\n Ref.glRef.PopShader();\n }\n Ref.glRef.PopShader();\n }", "public void Initialize3(SpatialReference sr, Envelope fullextent)\n\t{\n\t\tsetObject(new GraphicsLayer(sr, fullextent));\n\t}", "public void init () {\n\t\tshaderProgram.addUniform(TEXTURE_UNIFORM_KEY);\n\t\tshaderProgram.addUniform(SCALING_UNIFORM_KEY);\n\t\tshaderProgram.addUniform(TRANSLATION_UNIFORM_KEY);\n\t\tshaderProgram.addUniform(POSITION_UNIFORM_KEY);\n\t}" ]
[ "0.6222561", "0.5928599", "0.5905518", "0.58058465", "0.57774264", "0.5696348", "0.5651869", "0.56414104", "0.5533411", "0.5518116", "0.5485503", "0.54627717", "0.54134125", "0.53989345", "0.539747", "0.5392655", "0.53712034", "0.5368844", "0.53550607", "0.5348903", "0.53420424", "0.5338423", "0.53294045", "0.53209597", "0.5316115", "0.5304183", "0.52980274", "0.52724594", "0.52713585", "0.5270984", "0.526739", "0.52578056", "0.52460176", "0.5229595", "0.52182263", "0.52167696", "0.5208947", "0.5202895", "0.51953316", "0.5193945", "0.51930535", "0.51909304", "0.51776433", "0.5148583", "0.5138844", "0.5134685", "0.51275164", "0.5122157", "0.5119671", "0.5118941", "0.5117582", "0.5117397", "0.5096416", "0.50943035", "0.5094194", "0.5092813", "0.5071362", "0.5063275", "0.50629675", "0.50568426", "0.5054869", "0.5053646", "0.5052488", "0.5047769", "0.5046767", "0.5046497", "0.5045474", "0.5041144", "0.5038106", "0.5032787", "0.50275713", "0.5027179", "0.502461", "0.50157917", "0.5015319", "0.5013624", "0.5010213", "0.5008226", "0.50076425", "0.5005602", "0.50054455", "0.5005161", "0.5001029", "0.49993813", "0.49988526", "0.49979475", "0.4994407", "0.49925947", "0.49917722", "0.49855527", "0.49853015", "0.49844393", "0.49840006", "0.49835283", "0.49739605", "0.49737653", "0.49670848", "0.4966", "0.49645558", "0.49612913" ]
0.51808167
42
Cria um novo Prato
public Prato criaPrato(String nomePrato, String descricaoPrato, double precoPrato) throws CadastroPratoInvalidoException { VerificaPrato.verificaNomePratovazio(nomePrato); VerificaPrato.verificaDescVazio(descricaoPrato); VerificaPrato.verificaPrecoInvalido(precoPrato); return new Prato(nomePrato, descricaoPrato, precoPrato); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Secuencia createSecuencia();", "public void crearPersona(){\r\n persona = new Persona();\r\n persona.setNombre(\"Jose\");\r\n persona.setCedula(12345678);\r\n }", "Motivo create(Motivo motivo);", "public void crearAutomovil(){\r\n automovil = new Vehiculo();\r\n automovil.setMarca(\"BMW\");\r\n automovil.setModelo(2010);\r\n automovil.setPlaca(\"TWS435\");\r\n }", "public abstract Anuncio creaAnuncioTematico();", "Negacion createNegacion();", "Compuesta createCompuesta();", "public void create(){}", "@Override\r\n\tpublic void crearVehiculo() {\n\t\t\r\n\t}", "ProjetoRN createProjetoRN();", "OperacionColeccion createOperacionColeccion();", "public CrearQuedadaVista() {\n }", "public static void creaHidatoAutomaticament()\n {\n ControladorVista.mostraCreacioHidatoAutomatica();\n }", "public abstract Anuncio creaAnuncioIndividualizado();", "public void SalvarNovaPessoa(){\r\n \r\n\t\tpessoaModel.setUsuarioModel(this.usuarioController.GetUsuarioSession());\r\n \r\n\t\t//INFORMANDO QUE O CADASTRO FOI VIA INPUT\r\n\t\tpessoaModel.setOrigemCadastro(\"I\");\r\n \r\n\t\tpessoaRepository.SalvarNovoRegistro(this.pessoaModel);\r\n \r\n\t\tthis.pessoaModel = null;\r\n \r\n\t\tUteis.MensagemInfo(\"Registro cadastrado com sucesso\");\r\n \r\n\t}", "Operacion createOperacion();", "public Produto() {}", "public prueba()\r\n {\r\n }", "public Prova() {}", "void crearNuevaPersona(Persona persona);", "public Perfil create(Perfil perfil);", "public ProductoCreable newInstance(int codigo, String nombre){\r\n \r\n }", "Foco createFoco();", "public void create() {\n\t\t\n\t}", "public creacionempresa() {\n initComponents();\n mostrardatos();\n }", "Documento createDocumento();", "public void crear(Tarea t) {\n t.saveIt();\n }", "public PessoaTest() {\n pessoa.setNome(\"Thiago\");\n pessoa.setSobrenome(\"Cury\"); \n pessoa.setIdade(36); \n }", "@Override\n public Paciente create(Paciente paciente) {\n return this.pacienteRepository.save(paciente);\n }", "Compleja createCompleja();", "public static int criar(Pessoa p) throws Exception\n {\n PreparedStatement stmt = Banco.query(\"INSERT INTO pessoa (nome, telefone, email) VALUES (?, ?, ?)\");\n\n stmt.setString(1, p.getNome());\n stmt.setString(2, p.getTelefone());\n stmt.setString(3, p.getEmail());\n Banco.executar(stmt);\n\n ResultSet rs = Banco.consulta(\"SELECT max(id) FROM pessoa\");\n\n if ( rs != null && rs.next() )\n {\n return rs.getInt(1);\n }\n\n return 0;\n }", "public co\n\t\t.com\n\t\t.telefonica\n\t\t.atiempo\n\t\t.soltec\n\t\t.datos_publicacion\n\t\t.ejb\n\t\t.sb\n\t\t.DatosPublicacionSTLocal create()\n\t\tthrows javax.ejb.CreateException;", "private void crearVista() {\n\t\tVista vista = Vista.getInstancia();\n\t\tvista.addObservador(this);\n\n\t}", "public void create(Pizza pizza){\n pizza.setID(counter++);\n pizzas.add(pizza);\n }", "@Override\n\tpublic void create(Owner owner) {\n\n\t}", "@Override\n public boolean create(Revue objet) {\n return false;\n }", "Para createPara();", "public void crear() {\n con = new Conexion();\n con.setInsertar(\"insert into lenguajes_programacion (nombre, fecha_creacion, estado) values ('\"+this.getNombre()+\"', '\"+this.getFecha_creacion()+\"', 'activo')\");\n }", "Persoana createPersoana(String nume, int varsta) {\n return new Persoana(nume, varsta);\n }", "public Propuestas() {}", "public abstract Anuncio creaAnuncioGeneral();", "@_esCocinero\n public Result crearPaso() {\n Form<Paso> frm = frmFactory.form(Paso.class).bindFromRequest();\n\n // Comprobación de errores\n if (frm.hasErrors()) {\n return status(409, frm.errorsAsJson());\n }\n\n Paso nuevoPaso = frm.get();\n\n // Comprobar autor\n String key = request().getQueryString(\"apikey\");\n if (!SeguridadFunctions.esAutorReceta(nuevoPaso.p_receta.getId(), key))\n return Results.badRequest();\n\n // Checkeamos y guardamos\n if (nuevoPaso.checkAndCreate()) {\n Cachefunctions.vaciarCacheListas(\"pasos\", Paso.numPasos(), cache);\n Cachefunctions.vaciarCacheListas(\"recetas\", Receta.numRecetas(), cache);\n return Results.created();\n } else {\n return Results.badRequest();\n }\n\n }", "public static Pessoa createEntity(EntityManager em) {\n Pessoa pessoa = new Pessoa()\n .nome(DEFAULT_NOME)\n .email(DEFAULT_EMAIL)\n .telefone(DEFAULT_TELEFONE)\n .dataNascimento(DEFAULT_DATA_NASCIMENTO)\n .cadastro(DEFAULT_CADASTRO);\n return pessoa;\n }", "public ControladorPrueba() {\r\n }", "protected void creaPagine() {\n Pagina pag;\n Pannello pan;\n\n try { // prova ad eseguire il codice\n\n /* crea la pagina e aggiunge campi e pannelli */\n pag = this.addPagina(\"generale\");\n\n pan = PannelloFactory.orizzontale(this);\n pan.add(Cam.data);\n pan.add(Cam.importo.get());\n pan.add(Cam.note.get());\n pag.add(pan);\n\n } catch (Exception unErrore) { // intercetta l'errore\n Errore.crea(unErrore);\n }// fine del blocco try-catch\n\n }", "public com.alain.puntocoma.model.Catalogo create(long catalogoId);", "public PlanoSaude create(long plano_id);", "@Override\r\n\tpublic void create() {\n\t\t\r\n\t}", "Obligacion createObligacion();", "public Puntaje() {\n nombre = \"\";\n puntos = 0;\n }", "public void create(Person p) {\n\t\t\n\t}", "public void construirCargo() {\n persona.setCargo(Cargos.SUPERVISOR);\n }", "Klassenstufe createKlassenstufe();", "public void createProbleemWizard() throws InstantiationException,\n\t\t\tIllegalAccessException {\n\n\t\tif (getMelding().getProbleem() != null) {\n\t\t\tmodelRepository.evictObject(getMelding().getProbleem());\n\t\t}\n\t\tprobleem = null;\n\t\tif (\"bord\".equals(probleemType)) {\n\n\t\t\tif (trajectType.endsWith(\"Route\")) {\n\t\t\t\tprobleem = (Probleem) modelRepository.createObject(\n\t\t\t\t\t\t\"RouteBordProbleem\", null);\n\n\t\t\t} else if (trajectType.contains(\"Netwerk\")) {\n\t\t\t\tprobleem = (Probleem) modelRepository.createObject(\n\t\t\t\t\t\t\"NetwerkBordProbleem\", null);\n\n\t\t\t}\n\n\t\t} else if (\"ander\".equals(probleemType)) {\n\n\t\t\tif (trajectType.endsWith(\"Route\")) {\n\t\t\t\tprobleem = (Probleem) modelRepository.createObject(\n\t\t\t\t\t\t\"RouteAnderProbleem\", null);\n\n\t\t\t} else if (trajectType.contains(\"Netwerk\")) {\n\t\t\t\tprobleem = (Probleem) modelRepository.createObject(\n\t\t\t\t\t\t\"NetwerkAnderProbleem\", null);\n\t\t\t}\n\t\t}\n\t\tgetMelding().setProbleem(probleem);\n\t}", "@Override\n\tpublic void create() {\n\n\t}", "public Troco() {\n }", "public void insertar(Proceso p, int tiempo) {\n\t\tif (p == null || tiempo < 0) {\n\t\t\treturn;\n\t\t}\n\t\tProceso nuevo = new Proceso();\n\t\tnuevo.rafaga = p.rafaga;\n\t\tnuevo.id = p.id;\n\t\tnuevo.IdCola = this.IdCola;\n\t\tnuevo.NombreCola = this.NombreCola;\n\t\tnuevo.tllegada = tiempo;\n\t\tnuevo.ColaProviene = p.ColaProviene;\n\n\t\tif (raiz.sig == raiz) {\n\t\t\traiz.sig = nuevo;\n\t\t\tcabeza = nuevo;\n\t\t\tnuevo.sig = raiz;\n\t\t\tnuevo.padre = raiz;\n\t\t\traiz.padre = nuevo;\n\t\t} else {\n\t\t\tProceso aux = raiz.padre;\n\t\t\taux.sig = nuevo;\n\t\t\tnuevo.sig = raiz;\n\t\t\traiz.padre = nuevo;\n\t\t\tnuevo.padre = aux;\n\t\t}\n\t\tthis.numProcesos++;\n\t\tthis.rafagaTotal += nuevo.rafaga;\n\t\tthis.Ordenamiento();\n\t}", "@Override\n void create(Cliente cliente);", "public void crearDisco( ){\r\n boolean parameter = true;\r\n String artista = panelDatos.darArtista( );\r\n String titulo = panelDatos.darTitulo( );\r\n String genero = panelDatos.darGenero( );\r\n String imagen = panelDatos.darImagen( );\r\n\r\n if( ( artista.equals( \"\" ) || titulo.equals( \"\" ) ) || ( genero.equals( \"\" ) || imagen.equals( \"\" ) ) ) {\r\n parameter = false;\r\n JOptionPane.showMessageDialog( this, \"Todos los campos deben ser llenados para crear el disco\" );\r\n }\r\n if( parameter){\r\n boolean ok = principal.crearDisco( titulo, artista, genero, imagen );\r\n if( ok )\r\n dispose( );\r\n }\r\n }", "public Pila () {\n raiz=null; //Instanciar un objeto tipo nodo;\n }", "Long crear(Prestamo prestamo);", "public void createCompte(Compte compte);", "public Persona() { // constructor sin parámetros\r\n\t\t\r\n\t\tthis.nif = \"44882229Y\";\r\n\t\tthis.nombre=\"Anonimo\";\r\n\t\tthis.sexo = 'F';\r\n\t\tthis.fecha = LocalDate.now();\r\n\t\tthis.altura = 180;\r\n\t\tthis.madre = null;\r\n\t\tthis.padre = null;\r\n\t\tcontador++;\r\n\t}", "public Persona() {\n \t\n }", "@Override\n\tpublic void create() {\n\t\t\n\t}", "public Persona newEntity(String nome, String cognome) {\n return newEntity(nome, cognome, \"\", \"\", (Address) null);\n }", "void crearCampania(GestionPrecioDTO campania);", "@Override\n public void crearReloj() {\n Manecilla seg;\n seg = new Manecilla(40,60,0,1,null);\n cronometro = new Reloj(seg);\n }", "@Override\n\tpublic int create(Proveedor r) {\n\t\treturn 0;\n\t}", "public Contato() {\n }", "public TipoPrestamo() {\n\t\tsuper();\n\t}", "public CuentaDeposito() {\n super();\n }", "@BeforeEach\n\tvoid criaNovo()\n\t{\n\t\tcontatoBasico = new Contato(\"Matheus\", \"Gaudencio\", \"123\");\n\t}", "@Test(expected = NullPointerException.class)\n\tpublic void criaContatoSobrenomeNulo() {\n\t\tcontato = new Contato(\"Jardely\", null, \"984653722\");\n\t}", "BeanPedido crearPedido(BeanCrearPedido pedido);", "@Override\n public ComprobanteContable createComprobante(\n Aerolinea a, Boleto boleto, Cliente cliente, String tipo) throws CRUDException {\n Optional op;\n ComprobanteContable comprobante = new ComprobanteContable();\n //ComprobanteContablePK pk = new ComprobanteContablePK();\n //pk.setGestion(DateContable.getPartitionDateInt(DateContable.getDateFormat(boleto.getFechaEmision(), DateContable.LATIN_AMERICA_FORMAT)));\n comprobante.setEstado(ComprobanteContable.EMITIDO);\n //comprobante.setComprobanteContablePK(pk);\n //creamos el concepto\n StringBuilder buff = new StringBuilder();\n\n // DESCRIPCION \n // AEROLINEA/ # Boleto / Pasajero / Rutas\n buff.append(a.getNumero());\n\n buff.append(\"/\");\n\n //numero boleto\n buff.append(\"#\");\n buff.append(boleto.getNumero());\n buff.append(\"/\");\n\n //Pasajero\n buff.append(boleto.getNombrePasajero().toUpperCase());\n\n // Rutas\n buff.append(\"/\");\n buff.append(boleto.getIdRuta1() != null ? boleto.getIdRuta1() : \"\");\n buff.append(\"/\");\n buff.append(boleto.getIdRuta2() != null ? boleto.getIdRuta2() : \"\");\n buff.append(\"/\");\n buff.append(boleto.getIdRuta3() != null ? boleto.getIdRuta3() : \"\");\n buff.append(\"/\");\n buff.append(boleto.getIdRuta4() != null ? boleto.getIdRuta4() : \"\");\n buff.append(\"/\");\n buff.append(boleto.getIdRuta5() != null ? boleto.getIdRuta5() : \"\");\n\n //jala el nombre cliente\n comprobante.setIdCliente(cliente);\n comprobante.setConcepto(buff.toString());\n comprobante.setFactorCambiario(boleto.getFactorCambiario());\n comprobante.setFecha(boleto.getFechaEmision());\n comprobante.setFechaInsert(boleto.getFechaInsert());\n comprobante.setIdEmpresa(boleto.getIdEmpresa());\n comprobante.setIdUsuarioCreador(boleto.getIdUsuarioCreador());\n comprobante.setTipo(tipo);\n\n //ComprobanteContablePK numero = getNextComprobantePK(boleto.getFechaEmision(), tipo);\n Integer numero = getNextComprobantePK(boleto.getFechaEmision(), tipo);\n comprobante.setIdNumeroGestion(numero);\n comprobante.setGestion(DateContable.getPartitionDateInt(DateContable.getDateFormat(boleto.getFechaEmision(), DateContable.LATIN_AMERICA_FORMAT)));\n\n return comprobante;\n }", "public JogadorTradutor() {\n this.nome= \"Sem Registro\";\n this.pontuacao = pontuacao;\n id = id;\n \n geradorDesafioItaliano = new GerarPalavra(); // primeira palavra ja é gerada para o cliente\n }", "com.soa.SolicitarServicioDocument.SolicitarServicio addNewSolicitarServicio();", "public void CrearNew(ActionEvent e) {\n List<Pensum> R = ejbFacade.existePensumID(super.getSelected().getIdpensum());\n if(R.isEmpty()){\n super.saveNew(e);\n }else{\n new Auxiliares().setMsj(3,\"PENSUM ID YA EXISTE\");\n }\n }", "public boolean createPalvelupiste(Palvelupiste palvelupiste);", "Oracion createOracion();", "Persistencia() {\n\t}", "@Override\r\n\tpublic Libro create(Libro libro) {\n\t\treturn libroRepository.save(libro);\r\n\t}", "Lancamento persistir(Lancamento lancamento);", "@POST\n\t@Consumes({MediaType.APPLICATION_FORM_URLENCODED, MediaType.APPLICATION_JSON} )\n\t@Produces(MediaType.TEXT_HTML)\n\tpublic void createPunto(Punto punto,\n\t\t\t@Context HttpServletResponse servletResponse) throws IOException {\n\t\tpunto.setId(AutoIncremental.getAutoIncremental());\n\t\tpuntoService.agregarPunto(punto);\n\t\tservletResponse.sendRedirect(\"./rutas/\");\n\t}", "@Override\n\tpublic void create () {\n\n\t}", "@Override\r\n\tpublic void create() {\n\r\n\t}", "public void creoVehiculo() {\n\t\t\n\t\tAuto a= new Auto(false, 0);\n\t\ta.encender();\n\t\ta.setPatente(\"saraza\");\n\t\ta.setCantPuertas(123);\n\t\ta.setBaul(true);\n\t\t\n\t\tSystem.out.println(a);\n\t\t\n\t\tMoto m= new Moto();\n\t\tm.encender();\n\t\tm.frenar();\n\t\tm.setManubrio(true);\n\t\tm.setVelMax(543);\n\t\tm.setPatente(\"zas 241\");\n\t\tVehiculo a1= new Auto(true, 0);\n\t\ta1.setPatente(\"asd 423\");\n\t\t((Auto)a1).setBaul(true);\n\t\t((Auto)a1).setCantPuertas(15);\n\t\tif (a1 instanceof Auto) {\n\t\t\tAuto autito= (Auto) a1;\n\t\t\tautito.setBaul(true);\n\t\t\tautito.setCantPuertas(531);\n\t\t\t\n\t\t}\n\t\tif (a1 instanceof Moto) {\n\t\t\tMoto motito=(Moto) a1;\n\t\t\tmotito.setManubrio(false);\n\t\t\tmotito.setVelMax(15313);\n\t\t\t\n\t\t\t\n\t\t}\n\t\tif (a1 instanceof Camion) {\n\t\t\tCamion camioncito=(Camion) a1;\n\t\t\tcamioncito.setAcoplado(false);\n\t\t\tcamioncito.setPatente(\"ge\");\n\t\t\t\n\t\t\t\n\t\t}\n\t\tVehiculo a2= new Moto();\n\t\tSystem.out.println(a2);\n\t\ta1.frenar();\n\t\t\n\t\tArrayList<Vehiculo>listaVehiculo= new ArrayList<Vehiculo>();\n\t\tlistaVehiculo.add(new Auto(true, 53));\n\t\tlistaVehiculo.add(new Moto());\n\t\tlistaVehiculo.add(new Camion());\n\t\tfor (Vehiculo vehiculo : listaVehiculo) {\n\t\t\tSystem.out.println(\"clase:\" +vehiculo.getClass().getSimpleName());\n\t\t\tvehiculo.encender();\n\t\t\tvehiculo.frenar();\n\t\t\tSystem.out.println(\"=======================================\");\n\t\t\t\n\t\t}\n\t}", "Long crear(Espacio espacio);", "T create() throws PersistException;", "private static void crearPedidoGenerandoOPP() throws RemoteException {\n\n\t\tlong[] idVariedades = { 25 };\n\t\tint[] cantidades = { 7 };\n\t\tPedidoClienteDTO pedido = crearPedido(\"20362134596\", \"test 2\", idVariedades, cantidades);\n\n\t\tpedido = PedidoController.getInstance().crearPedido(pedido).toDTO();\n\n\t\tPedidoController.getInstance().cambiarEstadoPedidoCliente(pedido.getNroPedido(), EstadoPedidoCliente.ACEPTADO);\n\t}", "@Override\r\n\tpublic void createFournisseur(Fournisseur fournisseur) {\n\t\tthis.sessionFactory.getCurrentSession().save(fournisseur);\r\n\t}", "com.soa.SolicitarCreditoDocument.SolicitarCredito addNewSolicitarCredito();", "public static void crearPartida() throws FileNotFoundException, IOException, ExcepcionesFich {\n\t\tLecturaFicheros.AllLecture(\"C:\\\\Users\\\\Erick\\\\pruebaPOO.txt\");\n\t\tinterfaz = new GUI(0);\t\t\n\t}", "private void newProject()\n\t{\n\t\tnew FenetreCreationProjet();\n\t}", "public static Porra createEntity(EntityManager em) {\n Porra porra = new Porra()\n .cantidad(DEFAULT_CANTIDAD)\n .eleccion(DEFAULT_ELECCION);\n return porra;\n }", "public VistaInicial crearventanaInicial(){\n if(vistaInicial==null){\n vistaInicial = new VistaInicial();\n }\n return vistaInicial;\n }", "@POST\n @Consumes(\"application/json\")\n public Response createPO(PurchaseOrderEJBDTO po) {\n int pono = pfb.addPO(po);\n URI uri = context.getAbsolutePath();\n return Response.created(uri).entity(pono).build();\n }", "private void adicionar(No novo, Pessoa pessoa) {\n if(raiz == null)\n raiz = new No(pessoa);\n else{\n if(pessoa.getIdade()<novo.getPessoa().getIdade()){\n if(novo.getEsquerda() != null)\n adicionar(novo.getEsquerda() , pessoa);\n else\n novo.setEsquerda(new No(pessoa));\n }else{\n if(novo.getDireita() !=null)\n adicionar(novo.getDireita(), pessoa);\n else\n novo.setDireita(new No(pessoa));\n }\n }\n \n }", "public CrearPedidos() {\n initComponents();\n }" ]
[ "0.7184366", "0.7107954", "0.70864797", "0.69300884", "0.6828432", "0.6823568", "0.6766508", "0.6731207", "0.67197126", "0.66259146", "0.66172063", "0.6568384", "0.65387964", "0.65316164", "0.65094745", "0.64975595", "0.64820176", "0.64661294", "0.6457062", "0.64418936", "0.64204276", "0.6409153", "0.6378085", "0.6374599", "0.63550895", "0.6351499", "0.6341846", "0.63228387", "0.631886", "0.6292134", "0.62855387", "0.6268604", "0.62489784", "0.6245402", "0.6237897", "0.62308145", "0.62003845", "0.6179452", "0.61669993", "0.61626714", "0.6162604", "0.61600214", "0.6157542", "0.6155501", "0.61554205", "0.61539006", "0.61526054", "0.6145002", "0.6140388", "0.6125853", "0.610858", "0.6106323", "0.6102511", "0.6085241", "0.60851765", "0.6076244", "0.60753673", "0.60709906", "0.60669005", "0.6058575", "0.60461205", "0.6036544", "0.6032708", "0.6028693", "0.6021615", "0.5992454", "0.5988595", "0.5982653", "0.59775627", "0.5971465", "0.5969517", "0.59671414", "0.59637576", "0.596085", "0.5953794", "0.59465754", "0.5945202", "0.5945139", "0.594362", "0.59367585", "0.59348375", "0.5928239", "0.5925345", "0.59233665", "0.5916977", "0.59153676", "0.59141916", "0.5913163", "0.59131056", "0.59065515", "0.5904028", "0.5903568", "0.58990437", "0.5898324", "0.58910817", "0.5891002", "0.5887612", "0.587705", "0.5870911", "0.5870264" ]
0.62130356
36
SE 1 ataque ganhou, se 0 defesa ganhou se 2 nada acontece
private int[] comparaSeAtaqueGanhouNoDado() { int size_ataque; int size_defesa; if (dadosAtaque[1] == 0) { size_ataque = 1; } else if (dadosAtaque[2] == 0) { size_ataque = 2; } else { size_ataque = 3; } if (dadosDefesa[1] == 0) { size_defesa = 1; } else if (dadosDefesa[2] == 0) { size_defesa = 2; } else { size_defesa = 3; } int[] resultado = new int[Math.max(size_defesa, size_ataque)]; for (int i = resultado.length - 1; i >= 0; i--) { if (dadosAtaque[i] > 0 && dadosDefesa[i] > 0) { if (dadosAtaque[i] > dadosDefesa[i]) { resultado[i] = 1; } else { resultado[i] = 0; } } else { resultado[i] = 2; } } return resultado; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void aumentarMinas(){\n\r\n if(espM==false){\r\n minascerca++;\r\n }\r\n }", "public int hayGanador() {\n\t\tif(marcador1==2) {\n\t\t\tresultado=1;\n\t\t\treturn 1;\n\t\t}\n\t\telse if(marcador2==2) {\n\t\t\tresultado=2;\n\t\t\treturn 2;\n\t\t}\n\t\telse {\n\t\t\treturn 0;\n\t\t}\n\t}", "public void daiGioco() {\n System.out.println(\"Scrivere 1 per giocare al PC, al costo di 200 Tam\\nSeleziona 2 per a Calcio, al costo di 100 Tam\\nSeleziona 3 per Disegnare, al costo di 50 Tam\");\n\n switch (creaturaIn.nextInt()) {\n case 1 -> {\n puntiFelicita += 60;\n puntiVita -= 30;\n soldiTam -= 200;\n }\n case 2 -> {\n puntiFelicita += 40;\n puntiVita -= 20;\n soldiTam -= 100;\n }\n case 3 -> {\n puntiFelicita += 30;\n puntiVita -= 10;\n soldiTam -= 50;\n }\n }\n checkStato();\n }", "@Override\r\n public boolean ubahStatus(int masukan) {\r\n if (masukan == 1) {\r\n return true;\r\n } else {\r\n return false;\r\n }\r\n }", "private void trocaFase() {\n\n\t\tif (score == mudaFase && fase == 1) {\n\t\t\tfase++;\n\t\t\tmudaFase += valorDeFase;\n\t\t\tcriaBlocos();\n\t\t\tpaddle.paddleInicio();\n\t\t\tbola.bolaInicio();\n\t\t\tmove = false;\n\t\t\tJOptionPane.showMessageDialog(null, \"Round \" + (fase));\n\t\t} else if (score == mudaFase && fase == 2) {\n\t\t\tfase++;\n\t\t\tmudaFase += valorDeFase;\n\t\t\tcriaBlocos();\n\t\t\tpaddle.paddleInicio();\n\t\t\tbola.bolaInicio();\n\t\t\tmove = false;\n\t\t\tJOptionPane.showMessageDialog(null, \"Round \" + (fase));\n\t\t} else if (score == mudaFase && fase == 3) {\n\t\t\tJOptionPane.showMessageDialog(null, \"VOCÊ VENCEU, PARABÉNS!\");\n\t\t\tint continuar;\n\t\t\tcontinuar = JOptionPane.showConfirmDialog(null, \"Deseja jogar novamente?\", \"Game Over\",\n\t\t\t\t\tJOptionPane.YES_NO_OPTION);\n\t\t\tif (continuar == 0) {\n\t\t\t\tfase = 1;\n\t\t\t\tvida += 3;\n\t\t\t\tmudaFase += valorDeFase;\n\t\t\t\tpaddle.paddleInicio();\n\t\t\t\tbola.bolaInicio();\n\t\t\t\tmove = false;\n\t\t\t\tcriaBlocos();\n\t\t\t} else {\n\t\t\t\tSystem.exit(0);\n\t\t\t}\n\t\t} // fecha else if\n\t}", "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 void turnoSuccessivo(int lancioCorrente) {\n }", "private void setStatusTelaExibir () {\n setStatusTelaExibir(-1);\n }", "@Override\n public void cantidad_Defensa(){\n defensa=2+nivel+aumentoD;\n }", "private static void menuno(int menuno2) {\n\t\t\r\n\t}", "static void sueldo7diasl(){\nSystem.out.println(\"Ejemplo estructura Condicional Multiple 1 \");\nString descuenta=\"\";\n//datos de entrada xd\nint ganancias= teclado.nextInt();\nif(ganancias<=150){\ndescuenta=\"0.5\";\n}else if (ganancias>150 && ganancias<300){\n descuenta=\"0.7\";}\n else if (ganancias>300 && ganancias<450){\n descuenta=\"0.9\";}\n //datos de salida:xd\n System.out.println(\"se le descuenta : \"+descuenta);\n}", "public Ej_varclase1() {\n\t\t//contador++; \n\t\tcontador = contador + 1;\n\t\t\n\t}", "@Override\n public void subida(){\n // si es mayor a la eperiencia maxima sube de lo contrario no\n if (experiencia>(100*nivel)){\n System.out.println(\"Acabas de subir de nivel\");\n nivel++;\n System.out.println(\"Nievel: \"+nivel);\n }else {\n\n }\n }", "public void faiLavoro(){\n System.out.println(\"Scrivere 1 per Consegna lunga\\nSeleziona 2 per Consegna corta\\nSeleziona 3 per Consegna normale\");\n\n switch (creaturaIn.nextInt()) {\n case 1 -> {\n soldiTam += 500;\n puntiVita -= 40;\n puntiFame -= 40;\n puntiFelicita -= 40;\n }\n case 2 -> {\n soldiTam += 300;\n puntiVita -= 20;\n puntiFame -= 20;\n puntiFelicita -= 20;\n }\n case 3 -> {\n soldiTam += 100;\n puntiVita -= 10;\n puntiFame -= 10;\n puntiFelicita -= 10;\n }\n }\n checkStato();\n }", "public void iniciar(){\nSystem.out.println(\"El primer contador comenzara en el número 0\");\ncontador=0;\nSystem.out.println(\"El segundo contador comenzara en el número 100\");\ncontador2=100;}", "public void notificaAlgiocatore(int azione, Giocatore g) {\n\r\n }", "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 }", "@Override\n public void cantidad_Ataque(){\n ataque=5+2*nivel+aumentoT;\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 }", "@SuppressWarnings(\"SuspiciousMethodCalls\")\n private int houve_estouro()\n {\n int retorno = 0;\n boolean checar = false;\n for (Map.Entry i: janela.entrySet())\n {\n if (janela.get(i.getKey()).isEstouro())\n {\n janela.get(i.getKey()).setEstouro(false);\n retorno =(int) i.getKey();\n checar = true;\n break;\n }\n }\n for(Map.Entry i2: janela.entrySet()) janela.get(i2.getKey()).setEstouro(false);\n if(checar) return retorno;\n else return -69;\n }", "public boolean HayObstaculo(int avenida, int calle);", "protected boolean colaVacia() {\r\n return ini == -1;\r\n }", "public void accionAtaques(int i) throws SQLException{\r\n if(turno ==0){\r\n if(pokemon_activo1.getCongelado() == false || pokemon_activo1.getDormido() == false){\r\n if(pokemon_activo1.getConfuso() == true && (int)(Math.random()*100) > 50){\r\n// inflingirDaño(pokemon_activo1.getMovimientos()[i], pokemon_activo1, pokemon_activo1);\r\n// System.out.println(\"El pokemon se ha hecho daño a si mismo!\");\r\n// try {\r\n// creg.guardarRegistroSimulacion(\"El pokemon se ha hecho daño a si mismo\");\r\n// } catch (IOException ex) {\r\n// Logger.getLogger(ControladorCombate.class.getName()).log(Level.SEVERE, null, ex);\r\n// }\r\n }\r\n else{\r\n inflingirDaño(pokemon_activo1.getMovimientos()[i], pokemon_activo2, pokemon_activo1);\r\n if(pokemon_activo2.getVida_restante() <= 0){\r\n pokemon_activo2.setVida_restante(0);\r\n pokemon_activo2.setDebilitado(true);\r\n JOptionPane.showMessageDialog(this.vc, \"El Pokemon: \"+ pokemon_activo2.getPseudonimo()+\" se ha Debilitado\", \"Debilitado\", JOptionPane.INFORMATION_MESSAGE);\r\n System.out.println(\"El Pokemon: \"+ pokemon_activo2.getPseudonimo()+\" se ha Debilitado\");\r\n try {\r\n creg.guardarRegistroSimulacion(\"El Pokemon: \"+ pokemon_activo2.getPseudonimo()+\" se ha Debilitado\");\r\n } catch (IOException ex) {\r\n Logger.getLogger(ControladorCombate.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n if(condicionVictoria(getEquipo1(), getEquipo2()) == true){\r\n JOptionPane.showMessageDialog(this.vc, \"El Ganador de este Combate es:\"+ entrenador1.getNombre(), \"Ganador\", JOptionPane.INFORMATION_MESSAGE);\r\n System.out.println(\"El Ganador de este Combate es:\"+ entrenador1.getNombre());\r\n try {\r\n creg.guardarRegistroSimulacion(\"El Ganador de este Combate es:\"+ entrenador1.getNombre());\r\n } catch (IOException ex) {\r\n Logger.getLogger(ControladorCombate.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n vc.dispose();\r\n vpc.dispose();\r\n combate.setGanador(entrenador1);\r\n combate.setPerdedor(entrenador2);\r\n termino = true;\r\n if(esLider == true){\r\n cmed.ganoCombate();\r\n }\r\n }\r\n else if(getEquipo2()[0].getDebilitado() == false){\r\n pokemon_activo2 = getEquipo2()[0]; \r\n }\r\n else if(getEquipo2()[1].getDebilitado() == false){\r\n pokemon_activo2 = getEquipo2()[1]; \r\n }\r\n else if(getEquipo2()[2].getDebilitado() == false){\r\n pokemon_activo2 = getEquipo2()[2]; \r\n }\r\n else if(getEquipo2()[3].getDebilitado() == false){\r\n pokemon_activo2 = getEquipo2()[3]; \r\n }\r\n else if(getEquipo2()[4].getDebilitado() == false){\r\n pokemon_activo2 = getEquipo2()[4]; \r\n }\r\n else if(getEquipo2()[5].getDebilitado() == false){\r\n pokemon_activo2 = getEquipo2()[5]; \r\n }\r\n vc.setjL_nombrepokemon2(pokemon_activo2.getPseudonimo());\r\n vc.setjL_especie2(pokemon_activo2.getNombre_especie());\r\n vc.setjL_Nivel2(pokemon_activo2.getNivel());\r\n \r\n }\r\n va.setVisible(false);\r\n vc.setjL_Turno_actual(entrenador2.getNombre());\r\n vc.setjL_vida_actual1(pokemon_activo1.getVida_restante(), pokemon_activo1.getVida());\r\n vc.setjL_vida_actual2(pokemon_activo2.getVida_restante(), pokemon_activo2.getVida());\r\n if(tipo_simulacion == 1){\r\n JOptionPane.showMessageDialog(this.vc, \"Turno\"+\" \"+entrenador2.getNombre(), \"Tu Turno\", JOptionPane.INFORMATION_MESSAGE);\r\n System.out.println(\"Turno\"+\" \"+entrenador2.getNombre());\r\n try {\r\n creg.guardarRegistroSimulacion(\"Turno\"+\" \"+entrenador2.getNombre());\r\n } catch (IOException ex) {\r\n Logger.getLogger(ControladorCombate.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n vc.turnoJugador2();\r\n this.turno = 1;\r\n }\r\n else if(tipo_simulacion == 2){\r\n if(termino==false){\r\n turnoSistema();\r\n }\r\n }\r\n }\r\n }\r\n else {\r\n System.out.println(\"El pokemon no puede atacar\");\r\n try {\r\n creg.guardarRegistroSimulacion(\"El pokemon no puede atacar\");\r\n } catch (IOException ex) {\r\n Logger.getLogger(ControladorCombate.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n if((int)(Math.random()*3) == 1){ //1/3 de probabilidad de desactivar el efecto\r\n pokemon_activo1.setCongelado(false);\r\n pokemon_activo1.setDormido(false);\r\n }\r\n }\r\n \r\n }\r\n else if(turno ==1){\r\n if(pokemon_activo2.getCongelado() == false || pokemon_activo2.getDormido() == false){\r\n if(pokemon_activo2.getConfuso() == true && (int)(Math.random()*100) > 50){\r\n// inflingirDaño(pokemon_activo2.getMovimientos()[i], pokemon_activo2, pokemon_activo2);\r\n// System.out.println(\"El pokemon se ha hecho daño a si mismo!\");\r\n// try {\r\n// creg.guardarRegistroSimulacion(\"El pokemon se ha hecho daño a si mismo!\");\r\n// } catch (IOException ex) {\r\n// Logger.getLogger(ControladorCombate.class.getName()).log(Level.SEVERE, null, ex);\r\n// }\r\n }\r\n else{\r\n inflingirDaño(pokemon_activo2.getMovimientos()[i], pokemon_activo1, pokemon_activo2);\r\n if(pokemon_activo1.getVida_restante() <= 0){\r\n pokemon_activo1.setVida_restante(0);\r\n pokemon_activo1.setDebilitado(true);\r\n JOptionPane.showMessageDialog(this.vc, \"El Pokemon: \"+ pokemon_activo1.getPseudonimo()+\" se ha Debilitado\", \"Debilitado\", JOptionPane.INFORMATION_MESSAGE);\r\n System.out.println(\"El Pokemon: \"+ pokemon_activo1.getPseudonimo()+\" se ha Debilitado\");\r\n try {\r\n creg.guardarRegistroSimulacion(\"El Pokemon: \"+ pokemon_activo1.getPseudonimo()+\" se ha Debilitado\");\r\n } catch (IOException ex) {\r\n Logger.getLogger(ControladorCombate.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n if(condicionVictoria(getEquipo1(), getEquipo2()) == true){\r\n JOptionPane.showMessageDialog(this.vc, \"El Ganador de este Combate es:\"+ entrenador2.getNombre(), \"Ganador\", JOptionPane.INFORMATION_MESSAGE);\r\n System.out.println(\"El Ganador de este Combate es:\"+ entrenador2.getNombre());\r\n try {\r\n creg.guardarRegistroSimulacion(\"El Ganador de este Combate es:\"+ entrenador2.getNombre());\r\n } catch (IOException ex) {\r\n Logger.getLogger(ControladorCombate.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n vc.dispose();\r\n vpc.dispose();\r\n combate.setGanador(entrenador2);\r\n combate.setPerdedor(entrenador1);\r\n }\r\n else if(getEquipo1()[0].getDebilitado() == false){\r\n pokemon_activo1 = getEquipo1()[0]; \r\n }\r\n else if(getEquipo1()[1].getDebilitado() == false){\r\n pokemon_activo1 = getEquipo1()[1]; \r\n }\r\n else if(getEquipo1()[2].getDebilitado() == false){\r\n pokemon_activo1 = getEquipo1()[2]; \r\n }\r\n else if(getEquipo1()[3].getDebilitado() == false){\r\n pokemon_activo1 = getEquipo1()[3]; \r\n }\r\n else if(getEquipo1()[4].getDebilitado() == false){\r\n pokemon_activo1 = getEquipo1()[4]; \r\n }\r\n else if(getEquipo1()[5].getDebilitado() == false){\r\n pokemon_activo1 = getEquipo1()[5]; \r\n }\r\n vc.setjL_nombrepokemon1(pokemon_activo1.getPseudonimo());\r\n vc.setjL_especie1(pokemon_activo1.getNombre_especie());\r\n vc.setjL_Nivel1(pokemon_activo1.getNivel());\r\n }\r\n va.setVisible(false);\r\n vc.setjL_Turno_actual(entrenador1.getNombre());\r\n vc.setjL_vida_actual1(pokemon_activo1.getVida_restante(), pokemon_activo1.getVida());\r\n vc.setjL_vida_actual2(pokemon_activo2.getVida_restante(), pokemon_activo2.getVida());\r\n JOptionPane.showMessageDialog(this.vc, \"Turno\"+\" \"+entrenador1.getNombre(), \"Tu Turno\", JOptionPane.INFORMATION_MESSAGE);\r\n System.out.println(\"Turno\"+\" \"+entrenador1.getNombre());\r\n try {\r\n creg.guardarRegistroSimulacion(\"Turno\"+\" \"+entrenador1.getNombre());\r\n } catch (IOException ex) {\r\n Logger.getLogger(ControladorCombate.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n vc.turnoJugador1();\r\n this.turno = 0;\r\n }\r\n }\r\n else {\r\n System.out.println(\"El pokemon no puede atacar\");\r\n try {\r\n creg.guardarRegistroSimulacion(\"El pokemon no puede atacar\");\r\n } catch (IOException ex) {\r\n Logger.getLogger(ControladorCombate.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n if((int)(Math.random()*3) == 1){ //1/3 de probabilidad de desactivar el efecto\r\n pokemon_activo2.setCongelado(false);\r\n pokemon_activo2.setDormido(false);\r\n }\r\n }\r\n }\r\n setLabelEstados(1);\r\n setLabelEstados(0); \r\n \r\n }", "public void carroNoAgregado(){\n System.out.println(\"No hay un parqueo para su automovil\");\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 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 int cantFantasmasRestantes() {\n // TODO implement here\n return 0;\n }", "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 void faiBagnetto() {\n System.out.println(\"Scrivere 1 per Bagno lungo, al costo di 150 Tam\\nSeleziona 2 per Bagno corto, al costo di 70 Tam\\nSeleziona 3 per Bide', al costo di 40 Tam\");\n\n switch (creaturaIn.nextInt()) {\n case 1 -> {\n puntiVita += 50;\n puntiFelicita -= 30;\n soldiTam -= 150;\n }\n case 2 -> {\n puntiVita += 30;\n puntiFelicita -= 15;\n soldiTam -= 70;\n }\n case 3 -> {\n puntiVita += 10;\n puntiFelicita -= 5;\n soldiTam -= 40;\n }\n }\n checkStato();\n }", "public void gagne()\r\n\t{\r\n\t\tthis.nbVictoires++;\r\n\t}", "private static int menu() {\r\n\t\tSystem.out.println(\"Elige opcion de jugada:\");\r\n\t\tSystem.out.println(\"1-Piedra\");\r\n\t\tSystem.out.println(\"2-Papel\");\r\n\t\tSystem.out.println(\"3-Tijera\");\r\n\t\tSystem.out.println(\"0-Salir\");\r\n\t\tSystem.out.print(\"Opcion: \");\r\n\t\treturn Teclado.leerInt();\r\n\t}", "public void aumentaInSitu(){\n if(quantidade_in_situ<quantidade_disponivel)\n quantidade_in_situ++;\n else\n return;\n }", "private int pasarMilisegundoASegundo( long milisegundos )\n {\n return (int)(milisegundos/MILISEGUNDOS_EN_SEGUNDO);\n }", "public int masVendido(int cantidad){\r\n \r\n return cantidad;\r\n }", "public int rekisteroi() {\r\n alId = seuraavaNro;\r\n seuraavaNro++;\r\n\r\n return seuraavaNro;\r\n }", "public void tenta(int t) {\n \tif(this.checkBoxHelp.isSelected()) {\r\n \t\t//distinguo se sono ancora in gara o meno\r\n \t\tif(Integer.parseInt(this.tentativiRimasti.getText()) > 0) {\r\n \t\t\tif(t == segreto) {\r\n \t\t\t\tthis.output.setText(\"Hai vinto! Il numero era: \" + this.segreto + \". Hai utilizzato \" + this.tentativiFatti + \" tentativi.\");\r\n \t\tthis.layout.setDisable(true);\r\n \t\tthis.inGioco = false;\r\n \t\treturn;\r\n \t\t\t}\r\n \t\t\telse {\r\n \t\t\t\tif(t < segreto) {\r\n \t\t\t\t\tif(t > min) {\r\n \t\t\t\t\t\tmin = t;\r\n \t\t\t\t\t}\r\n \t\t\t\t\tthis.output.setText(\"Troppo basso! Inserisci un numero tra [\" + min + \" - \" + max + \"]. Suggerimento:\" + ((int)(min+max)/2));\r\n \t\t\t\t}\r\n \t\t\t\telse {\r\n \t\t\t\t\t// tentativo troppo alto\r\n \t\t\t\t\tif(t > segreto) {\r\n \t\t\t\t\t\tif(t < max) {\r\n \t\t\t\t\t\t\tmax = t;\r\n \t\t\t\t\t\t}\r\n \t\t\t\t\t\tthis.output.setText(\"Troppo alto! Inserisci un numero tra [\" + min + \" - \" + max + \"]. Suggerimento:\" + ((int)(min+max)/2));\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\telse {\r\n \t\t\t// ho perso\r\n \t\t\tthis.output.setText(\"Hai perso! Il numero era: \" + this.segreto);\r\n \t\tthis.layout.setDisable(true);\r\n \t\tthis.inGioco = false;\r\n \t\treturn;\r\n \t\t}\r\n \t}\r\n \telse {\r\n \t\t// Modalita normale\r\n \t\t//distinguo se sono ancora in gara o meno\r\n \t\tif(Integer.parseInt(this.tentativiRimasti.getText()) > 0) {\r\n \t\t\tif(t == segreto) {\r\n \t\t\t\tthis.output.setText(\"Hai vinto! Il numero era: \" + this.segreto + \". Hai utilizzato \" + this.tentativiFatti + \" tentativi.\");\r\n \t\tthis.layout.setDisable(true);\r\n \t\tthis.inGioco = false;\r\n \t\treturn;\r\n \t\t\t}\r\n \t\t\telse {\r\n \t\t\t\tif(t < segreto) {\r\n \t\t\t\t\tthis.output.setText(\"Troppo basso!\");\r\n \t\t\t\t}\r\n \t\t\t\telse {\r\n \t\t\t\t\t// tentativo troppo alto\r\n \t\t\t\t\tthis.output.setText(\"Troppo alto!\");\r\n \t\t\t\t}\r\n \t\t\t}\r\n \t\t}\r\n \t\telse {\r\n \t\t\t// ho perso\r\n \t\t\tthis.output.setText(\"Hai perso! Il numero era: \" + this.segreto);\r\n \t\tthis.layout.setDisable(true);\r\n \t\tthis.inGioco = false;\r\n \t\treturn;\r\n \t\t}\r\n \t}\r\n \t\r\n }", "public void verificar_que_se_halla_creado() {\n\t\t\n\t}", "public void controllore() {\n if (puntiVita > maxPunti) puntiVita = maxPunti;\n if (puntiFame > maxPunti) puntiFame = maxPunti;\n if (puntiFelicita > maxPunti) puntiFelicita = maxPunti;\n if (soldiTam < 1) {\n System.out.println(\"Hai finito i soldi\");\n System.exit(3);\n }\n //controlla che la creatura non sia morta, se lo è mette sonoVivo a false\n if (puntiVita <= minPunti && puntiFame <= minPunti && puntiFelicita <= minPunti) sonoVivo = false;\n }", "public static void Turno(){\n\t\tif (pl1){\n\t\t\tpl1=false;\n\t\t\tpl2=true;\t\n\t\t\tvalore = 1;\n\t\t}\n\t\telse{\n\t\t\tpl1=true;\n\t\t\tpl2=false;\n\t\t\tvalore = 2;\n\t\t}\n\t}", "public void somaVezes(){\n qtVezes++;\n }", "public void aumentarAciertos() {\r\n this.aciertos += 1;\r\n this.intentos += 1; \r\n }", "@Test\n\tpublic void testMonto1() {\n\n\t\tSystem.out.println(\" la cantidad introducida es menor de 1\"\n\t\t\t\t+ \"monto1: equivalencia: si el monto es menor de 1,ahora 0, el mensaje seria:\\n\");\n\t\tint cantidad = 0;\n\n\t\tString expResult = \"Error: La cantidad introducida es menor de 1\";\n\t\tString result = instance.ingreso(cantidad);\n\t\tassertEquals(expResult, result);\n\n\t}", "public void acaba() \n\t\t{\n\t\t\tsigo2 = false;\n\t\t}", "public void confirmar(){\r\n if((gato[0][0]==gato[0][1])&&(gato[0][0]==gato[0][2])&&(gato[0][0]!=' ')){\r\n //si encuentra alguna victoria la variable ganador agarra el simbolo del ganador 'o' o 'x'\r\n //para confirmar quien gano\r\n ganador=gato[0][0];\r\n //es lo que tomara tirar para salir del while si hay una victoria\r\n victoria=1; \r\n \r\n }\r\n\r\n if((gato[1][0]==gato[1][1])&&(gato[1][0]==gato[1][2])&&(gato[1][0]!=' ')){\r\n ganador=gato[1][0];\r\n victoria=1;\r\n }\r\n\r\n if((gato[2][0]==gato[2][1])&&(gato[2][0]==gato[2][2])&&(gato[2][0]!=' ')){\r\n ganador=gato[2][0];\r\n victoria=1;\r\n }\r\n\r\n if((gato[0][0]==gato[1][0])&&(gato[0][0]==gato[2][0])&&(gato[0][0]!=' ')){\r\n ganador=gato[0][0];\r\n victoria=1;\r\n }\r\n\r\n if((gato[0][1]==gato[1][1])&&(gato[0][1]==gato[2][1])&&(gato[0][1]!=' ')){\r\n ganador=gato[0][1];\r\n victoria=1;\r\n }\r\n\r\n if((gato[0][2]==gato[1][2])&&(gato[0][2]==gato[2][2])&&(gato[0][2]!=' ')){\r\n ganador=gato[0][2];\r\n victoria=1;\r\n }\r\n\r\n if((gato[0][0]==gato[1][1])&&(gato[0][0]==gato[2][2])&&(gato[0][0]!=' ')){\r\n ganador=gato[0][0];\r\n victoria=1;\r\n }\r\n\r\n if((gato[2][0]==gato[1][1])&&(gato[2][0]==gato[0][2])&&(gato[2][0]!=' ')){\r\n ganador=gato[2][0];\r\n victoria=1;\r\n }\r\n }", "@Override\n\tpublic void doit() {\n\t\tafficher_texte(UtilitaireChainesCommunes.demande_saisie_nombre);\n\t\tint i = saisie_entier();\n\t\tafficher_texte(UtilitaireChainesCommunes.demande_saisie_nombre);\n\t\tint j = saisie_entier();\n\t\t// tous deux strictements positifs ou strictement négatifs? \n\t\t// vrai => produit positif\n\t\t// faux => produit negatif ou nul\n\t\tboolean Truth = TrueIfSameTruthValue(i,j,this.estposit);\n if (Truth){afficher_texte(UtilitaireChainesCommunes.resultat_positif);}\n else{ \n \t// l un des deux est soit de signe différent soit nul.\n \t// on vire le cas \"est de signe différent\" (on aurait pu faire l autre)\n \tboolean Truth2 = ((i < 0 && j > 0) || (i > 0 && j < 0));\n \tif (Truth2){afficher_texte(UtilitaireChainesCommunes.resultat_negatif);}\n \telse {afficher_texte(UtilitaireChainesCommunes.nombre_nul);}\n }\n\n\t}", "public void verificaCambioEstado(int op) {\r\n try {\r\n if (Seg.getCodAvaluo() == 0) {\r\n mbTodero.setMens(\"Seleccione un numero de Radicacion\");\r\n mbTodero.warn();\r\n } else {\r\n mBRadicacion.Radi.setCodAvaluo(Seg.getCodAvaluo());\r\n if (op == 1) {\r\n RequestContext.getCurrentInstance().execute(\"PF('DlgEstAvaluo').show()\");\r\n } else if (op == 2) {\r\n RequestContext.getCurrentInstance().execute(\"PF('DLGAnuAvaluo').show()\");\r\n }\r\n\r\n }\r\n } catch (Exception e) {\r\n mbTodero.setMens(\"Error en el metodo '\" + this.getClass() + \".verificaCambioEstado()' causado por: \" + e.getMessage());\r\n mbTodero.error();\r\n }\r\n\r\n }", "public void sincronizza() {\n boolean abilita;\n\n super.sincronizza();\n\n try { // prova ad eseguire il codice\n\n /* abilitazione bottone Esegui */\n abilita = false;\n if (!Lib.Data.isVuota(this.getDataInizio())) {\n if (!Lib.Data.isVuota(this.getDataFine())) {\n if (Lib.Data.isSequenza(this.getDataInizio(), this.getDataFine())) {\n abilita = true;\n }// fine del blocco if\n }// fine del blocco if\n }// fine del blocco if\n this.getBottoneEsegui().setEnabled(abilita);\n\n } catch (Exception unErrore) { // intercetta l'errore\n Errore.crea(unErrore);\n }// fine del blocco try-catch\n\n }", "@Override\n public void calcularIntGanado() {\n intGanado = saldo;\n for(int i = 0; i < plazoInv; i++){\n intGanado += inve * 12;\n intGanado += intGanado * (intAnual / 100);\n }\n intGanado = intGanado - (inve + saldo);\n }", "public int rekisteroi() {\n this.tunnusNro = seuraavaNro;\n Tuote.seuraavaNro++;\n return tunnusNro;\n }", "public void calcular() {\n int validar, c, d, u;\n int contrasena = 246;\n c = Integer.parseInt(spiCentenas.getValue().toString());\n d = Integer.parseInt(spiDecenas.getValue().toString());\n u = Integer.parseInt(spiUnidades.getValue().toString());\n validar = c * 100 + d * 10 + u * 1;\n //Si es igual se abre.\n if (contrasena == validar) {\n etiResultado.setText(\"Caja Abierta\");\n }\n //Si es menor nos indica que es mas grande\n if (validar < contrasena) {\n etiResultado.setText(\"El número secreto es mayor\");\n }\n //Si es mayot nos indica que es mas pequeño.\n if (validar > contrasena) {\n etiResultado.setText(\"El número secreto es menor\");\n }\n }", "public void coMina(){\n espM=true;\r\n }", "public int obtenerSegundo() { return segundo; }", "private int obtem_primeiro(int numero)\n {\n for (Map.Entry i : janela.entrySet()) if(((Estado)i.getValue()).getNumero_sequencia() == numero && !((Estado) i.getValue()).isEstado()) return (int) i.getKey();\n return 0;\n }", "@Override\r\n\tpublic int operar() {\n\t\treturn 0;\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 }", "int aDonde(int x,int y,int x1,int y1){\n \n int m;\n //revision si la posicion del queso es la misma que la del raton \n if(llegue(x,y,x1,y1)==1){\n System.out.println(\"llegue al queso\");\n // retrazo.stop();\n //GB=10; \n return 5;\n }else{\n if(x1==x){//movimiento horizontal en la misma fila \n //System.out.println(\"\");\n m=moverseY(y,y1);//si 0 a la izquierda 1 a la derecha \n \n if(m==0){\n System.out.println(\"el raton se tiene que mover hacia la Izquierda\");\n return 4;\n }else{\n System.out.println(\"el raton se tiene que mover hacia la Derecha\");\n return 2;\n }\n }else{\n if(x1<x){//movimiento hacia arriba\n System.out.println(\"el raton se tiene que mover hacia Arriba\");\n return 1;\n }else{//movimiento hacia abajo\n System.out.println(\"el raton se tiene que mover hacia Abajo\");\n return 3;\n }\n }//fin arriba y abajo\n } //fin if movimiento horizontal \n }", "public int probabilidadesHastaAhora(){\n return contadorEstados + 1;\n }", "public void setLabelEstados(int pokemon){\r\n if(pokemon ==0){\r\n if(pokemon_activo1.getConfuso() == true) vc.setjL_Estado1(\"Confuso\");\r\n else if(pokemon_activo1.getCongelado()== true) vc.setjL_Estado1(\"Congelado\");\r\n else if(pokemon_activo1.getDormido()== true) vc.setjL_Estado1(\"Dormido\");\r\n else if(pokemon_activo1.getEnvenenado()== true) vc.setjL_Estado1(\"Envenenado\");\r\n else if(pokemon_activo1.getParalizado()== true) vc.setjL_Estado1(\"Paralizado\");\r\n else if(pokemon_activo1.getQuemado()== true) vc.setjL_Estado1(\"Quemado\");\r\n else if(pokemon_activo1.getCongelado() == false && pokemon_activo1.getDormido() == false && pokemon_activo1.getEnvenenado() == false && \r\n pokemon_activo1.getParalizado() == false && pokemon_activo1.getQuemado() == false){\r\n vc.setjL_Estado1(\"Normal\");\r\n }\r\n }\r\n if(pokemon ==1){\r\n if(pokemon_activo2.getConfuso() == true) vc.setjL_Estado2(\"Confuso\");\r\n else if(pokemon_activo2.getCongelado()== true) vc.setjL_Estado2(\"Congelado\");\r\n else if(pokemon_activo2.getDormido()== true) vc.setjL_Estado2(\"Dormido\");\r\n else if(pokemon_activo2.getEnvenenado()== true) vc.setjL_Estado2(\"Envenenado\");\r\n else if(pokemon_activo2.getParalizado()== true) vc.setjL_Estado2(\"Paralizado\");\r\n else if(pokemon_activo2.getQuemado()== true) vc.setjL_Estado2(\"Quemado\");\r\n else if(pokemon_activo2.getCongelado() == false && pokemon_activo2.getDormido() == false && pokemon_activo2.getEnvenenado() == false && \r\n pokemon_activo2.getParalizado() == false && pokemon_activo2.getQuemado() == false){\r\n vc.setjL_Estado2(\"Normal\");\r\n }\r\n }\r\n }", "public void processarJogada(int resultadoDado1, int resultadoDado2, boolean PagamentoPrisao) throws Exception {\n\n\n if ((isResultadoDadoValido(resultadoDado1)) && (isResultadoDadoValido(resultadoDado2))) {\n\n if(bankruptcy && !listaJogadores.get(vez).ifRollAvaliable()){\n\n throw new Exception(\"Player can't roll dice when trying to avoid bankruptcy\");\n }\n\n if (!this.jogadorTerminouAVez() == true) {\n this.terminarAVez();// Prepara proxima jogada e coloca terminou vez para true\n\n }\n if (resultadoDado1 == resultadoDado2 && this.RegraJogadaDupla == true) {\n this.repete = true;\n this.duplasAcumuladas++;\n print(\"Repete foi ativado\");\n } else if (resultadoDado1 != resultadoDado2 && this.RegraJogadaDupla == true) {\n this.duplasAcumuladas = 0;\n this.repete = false;\n print(\"Repete foi desativado\");\n }\n\n\n if (this.duplasAcumuladas == 3 && this.RegraJogadaDupla == true) {\n adicionaNaPrisao(listaJogadores.get(jogadorAtual()));\n this.DeslocarJogador(jogadorAtual(), 10);\n this.duplasAcumuladas = 0;\n while (listaJogadoresNaPrisao.contains(listaJogadores.get(jogadorAtual()).getNome())) {\n PrepareNextJogada();\n }\n } else if (PagamentoPrisao == true) {\n this.pagarSaidaDaPrisao();\n pagouPrisaoRecentemente = true;\n this.repete = false;\n } else if (PagamentoPrisao == false) {\n if (this.repete == false) {\n this.terminarAVez();\n this.iniciarNovaVez();//coloca terminouVez para false\n }\n this.moverJogadorDaVez(resultadoDado1, resultadoDado2);\n this.repete = false;\n }\n\n\n this.print(\"Jogador \" + this.jogadorAtual());\n this.print(\"\\tEstá em \" + this.posicoes[this.jogadorAtual()]);\n this.print(\"\\tvai andar \" + (resultadoDado1 + resultadoDado2) + \" casas.\");\n\n\n\n }\n\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 ruotaNuovoStatoPaziente() {\r\n\t\tif(nuovoStatoPaziente==StatoPaziente.WAITING_WHITE)\r\n\t\t\tnuovoStatoPaziente = StatoPaziente.WAITING_YELLOW;\r\n\t\telse if(nuovoStatoPaziente==StatoPaziente.WAITING_YELLOW)\r\n\t\t\tnuovoStatoPaziente = StatoPaziente.WAITING_RED;\r\n\t\telse if(nuovoStatoPaziente==StatoPaziente.WAITING_RED)\r\n\t\t\tnuovoStatoPaziente = StatoPaziente.WAITING_WHITE;\r\n\t\t\r\n\t}", "private void asserEquals(int esperado, int resultado) {\n\t\t\r\n\t}", "public void act() \n {\n // Add your action code here.\n contaP++;\n if(contaP == 25)\n {\n baja();\n contaP=0;\n }\n }", "public void precio4e(){\n precioHabitaciones = precioHabitaciones + (cantidadHabitaciones * numeroCamas);\n\n //Restaurante\n if(capacidadRestaurant < 30){\n precioHabitaciones = precioHabitaciones + 10;\n } else if (capacidadRestaurant > 29 && capacidadRestaurant < 51){\n precioHabitaciones = precioHabitaciones + 30;\n } else if (capacidadRestaurant > 50){\n precioHabitaciones = precioHabitaciones + 50;\n }\n\n //Gimnasio\n switch (gimnasio){\n case \"A\":\n precioHabitaciones = precioHabitaciones + 50;\n break;\n case \"B\":\n precioHabitaciones = precioHabitaciones + 30;\n break;\n }\n\n }", "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 void atrapar() {\n if( una == false) {\n\t\tif ((app.mouseX > 377 && app.mouseX < 591) && (app.mouseY > 336 && app.mouseY < 382)) {\n\t\t\tint aleotoridad = (int) app.random(0, 4);\n\n\t\t\tif (aleotoridad == 3) {\n\n\t\t\t\tSystem.out.print(\"Lo atrapaste\");\n\t\t\t\tcambioEnemigo = 3;\n\t\t\t\tsuerte = true;\n\t\t\t\tuna = true;\n\t\t\t}\n\t\t\tif (aleotoridad == 1 || aleotoridad == 2 || aleotoridad == 0) {\n\n\t\t\t\tSystem.out.print(\"Mala Suerte\");\n\t\t\t\tcambioEnemigo = 4;\n\t\t\t\tmal = true;\n\t\t\t\tuna = true;\n\t\t\t}\n\n\t\t}\n }\n\t}", "public void actionPerformed(ActionEvent evento) {\n\t\t \t \t\tString por = numpor.getText().trim();\n\t\t \t \t\tif (Integer.parseInt(por)>0) {\n\t\t \t\t\t\n\t\t \t \t\tInteger count = quantita.getPiatto(indicecorrente).getNumcategory() - 1;\n\t\t \t \t\tquantita.getPiatto(indicecorrente).setNumcategory(count);\n\t\t \t \t\tString porz = count.toString();\n \t \t\t\t\tnumpor.setText(\" \" + porz);\n \t \t\t\t\tcontatore_quantita=count;\n\t\t \t \t\t}\n\t\t \t \t}", "public void visKontingenthaandteringMenu ()\r\n {\r\n System.out.println(\"Du har valgt kontingent.\");\r\n System.out.println(\"Hvad oensker du at foretage dig?\");\r\n System.out.println(\"1: Se priser\");\r\n System.out.println(\"2: Se medlemmer i restance\");\r\n System.out.println(\"0: Afslut\");\r\n\r\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 void soin() {\n if (!autoriseOperation()) {\n return;\n }\n if (tamagoStats.getXp() >= 2) {\n incrFatigue(-3);\n incrHumeur(3);\n incrFaim(-3);\n incrSale(-3);\n incrXp(-2);\n\n if (tamagoStats.getPoids() == 0) {\n incrPoids(3);\n } else if (tamagoStats.getPoids() == TamagoStats.POIDS_MAX) {\n incrPoids(-3);\n }\n\n setEtatPiece(Etat.NONE);\n tamagoStats.setEtatSante(Etat.NONE);\n\n setChanged();\n notifyObservers();\n }\n }", "public void accionFinRonda() {\n\t\t//Si ha ganado alguien pero aun no se ha vencido al mejor de 3\n\t\tif(hayGanador()==0 && finRonda) {\n\t\t\t//Se reinicia el tiempo\n\t\t\thandler.getGame().tiempoRestante=99;\n\t\t\t\n\t\t\tif(fighter2==0) {\n\t\t\t\tworld=new WorldBrazil(handler,fighter1,fighter2,mode);\n\t\t\t}\n\t\t\telse if(fighter2==1) {\n\t\t\t\tworld=new WorldChina(handler,fighter1,fighter2,mode);\n\t\t\t}\n\t\t\telse {\n\t\t\t\tworld=new WorldJapan(handler,fighter1,fighter2,mode);\n\t\t\t}\n\t\t\tfinRonda=false;\n\t\t\t\n\t\t\t//Va a comenzar una nueva ronda\n\t\t\tcontadorRonda++;\n\t\t\tmsjRonda=true;\n\t\t\tif(contadorRonda==2) {\n\t\t\t\thandler.getGame().setSoundEffect(22,true);\n\t\t\t}\n\t\t\telse if(contadorRonda==3) {\n\t\t\t\thandler.getGame().setSoundEffect(23,true);\n\t\t\t}\n\t\t}\n\t\t//Si ha ganado alguien y ya hay vencedor al mejor de 3 se muestran las caras reventadas\n\t\telse if(hayGanador()!=0 && finRonda){\n\t\t\tfighting=false;\n\t\t\thandler.getGame().setFighting(false);\n\t\t\tfinRonda=false;\n\t\t\thandler.getGame().setFade(true);\n\t\t\thandler.getGame().setCurrentSong(1);\n\t\t\t//Si ha sido la primera pelea\n\t\t\tif(handler.getGame().getNumPelea()==0) {\n\t\t\t\t//Si gana el player1 se sigue con el modo historia\n\t\t\t\tif(hayGanador()==1) {\n\t\t\t\t\t//Contar la pelea en la que se esta\n\t\t\t\t\thandler.getGame().setNumPelea(handler.getGame().getNumPelea()+1);\n\t\t\t\t\tfighterToSelectFighter=fighter1;\n\t\t\t\t}\n\t\t\t\t//Si gana la CPU se reinicia el modo historia\n\t\t\t\telse if(hayGanador()==2) {\n\t\t\t\t\thandler.getGame().setNumPelea(0);\n\t\t\t\t\t//fighterToSelectFighter=3;\n\t\t\t\t\tmostrarScoreLose=true;\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t}\n\t\t\t//Ha terminado el modo historia asi que se vuelve a empezar\n\t\t\telse {\n\t\t\t\thandler.getGame().setNumPelea(0);\n\t\t\t\t\n\t\t\t\t//Si ganas la segunda pelea del modo historia se muestra el final\n\t\t\t\tif(hayGanador()==1) {\n\t\t\t\t\tmostrarScoreWin=true;\n\t\t\t\t}\n\t\t\t\t//Si pierdes la segunda pelea del modo historia se va directamente a ScoreState\n\t\t\t\telse if(hayGanador()==2) {\n\t\t\t\t\tmostrarScoreLose=true;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t}\n\t}", "private void verificaVencedor(){\n\n // Metodo para verificar o vencedor da partida\n\n if(numJogadas > 4) {\n\n String vencedor = tabuleiro.verificaVencedor();\n\n vencedor = (numJogadas == tabuleiro.TAM_TABULEIRO && vencedor == null) ? \"Deu Velha!\" : vencedor;\n\n if (vencedor != null) {\n\n mostraVencedor(vencedor);\n temVencedor = true;\n\n }\n\n }\n\n }", "public void ingresar() \r\n\t{\r\n\r\n\t\tString numeroCasilla = JOptionPane.showInputDialog(this, \"Ingresar numero en la casilla \" + sudoku.darFilaActual() + \",\" +sudoku.darColumnaActual());\r\n\t\tif (numeroCasilla == null || numeroCasilla ==\"\")\r\n\t\t{}\r\n\t\telse\r\n\t\t{\r\n\t\t\ttry\r\n\t\t\t{\tint numeroCasillaInt = Integer.parseInt(numeroCasilla);\r\n\t\t\t\tif(numeroCasillaInt > sudoku.darCantidadColumnasZona()*sudoku.darCantidadFilasZona() || numeroCasillaInt < 1)\r\n\t\t\t\t{\r\n\t\t\t\t\tJOptionPane.showMessageDialog( this, \"El numero ingresado no es valido. Debe ser un valor entre 1 y \" + sudoku.darCantidadColumnasZona()*sudoku.darCantidadFilasZona(), \"Error\", JOptionPane.ERROR_MESSAGE );\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tcatch(Exception e)\r\n\t\t\t{\r\n\t\t\t\tJOptionPane.showMessageDialog( this, \"Debe ingresar un valor numerico entre 1 y \" + sudoku.darCantidadColumnasZona()*sudoku.darCantidadFilasZona(), \"Error\", JOptionPane.ERROR_MESSAGE );\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public int getGanadas(){\n\t\treturn ganadas;\n\t}", "public boolean verMina(){\n\r\n return espM;\r\n }", "public boolean restarUno(){\n\t\tif (numero>0){\n\t\t\tnumero--;\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}", "public int esquinas(){\n int v=0;\n if (fila==0 && columna==0){\n if(automata.getElemento(fila,columna+1)!=null && automata.getElemento(fila,columna+1).isVivo()){v++;}\n if(automata.getElemento(fila+1,columna+1)!=null && automata.getElemento(fila+1,columna+1).isVivo()){v++;}\n if(automata.getElemento(fila+1,columna)!=null && automata.getElemento(fila+1,columna).isVivo()){v++;}\n }\n else if(fila==0 && columna==15){\n if(automata.getElemento(fila,columna-1)!=null && automata.getElemento(fila,columna-1).isVivo()){v++;}\n if(automata.getElemento(fila+1,columna-1)!=null && automata.getElemento(fila+1,columna-1).isVivo()){v++;}\n if(automata.getElemento(fila+1,columna)!=null && automata.getElemento(fila+1,columna).isVivo()){v++;}\n }\n else if(fila==15 && columna==0){\n if(automata.getElemento(fila-1,columna)!=null && automata.getElemento(fila-1,columna).isVivo()){v++;}\n if(automata.getElemento(fila-1,columna+1)!=null && automata.getElemento(fila-1,columna+1).isVivo()){v++;}\n if(automata.getElemento(fila,columna+1)!=null && automata.getElemento(fila,columna+1).isVivo()){v++;}\n }\n else if(fila==15 && columna==15){\n if(automata.getElemento(fila-1,columna)!=null && automata.getElemento(fila-1,columna).isVivo()){v++;}\n if(automata.getElemento(fila-1,columna-1)!=null && automata.getElemento(fila-1,columna-1).isVivo()){v++;}\n if(automata.getElemento(fila,columna-1)!=null && automata.getElemento(fila,columna-1).isVivo()){v++;}\n }\n return v;\n }", "public void precioFinal(){\r\n if(getConsumoEnergetico() == Letra.A){\r\n precioBase = 100+precioBase;\r\n }\r\n else if((getConsumoEnergetico() == Letra.B)){\r\n precioBase = 80+precioBase;\r\n }\r\n else if(getConsumoEnergetico() == Letra.C){\r\n precioBase = 60+precioBase;\r\n }\r\n else if((getConsumoEnergetico() == Letra.D)){\r\n precioBase = 50+precioBase;\r\n }\r\n else if(getConsumoEnergetico() == Letra.E){\r\n precioBase = 30+precioBase;\r\n }\r\n else if((getConsumoEnergetico() == Letra.F)){\r\n precioBase = 10+precioBase;\r\n }\r\n else{\r\n aux=1;\r\n System.out.println(\"...No existe...\");\r\n }\r\n if (aux==0){\r\n peso();\r\n }\r\n \r\n }", "public int orientaceGrafu(){\n\t\tint poc = 0;\n\t\tfor(int i = 0 ; i < hrana.length ; i++){\n\t\t\tif(!oriNeboNeoriHrana(hrana[i].zacatek,hrana[i].konec))\n\t\t\t poc++;\n\t\t}\n\t\tif(poc == 0 )\n\t\t\treturn 0;\n\t\t\n\t\tif(poc == pocetHr)\n\t\t\treturn 1;\n\t\t\n\t\t\n\t\t\treturn 2;\n\t\t \n\t\t\n\t\t\t\t\t\n\t}", "public void gastarDinero(double cantidad){\r\n\t\t\r\n\t}", "private void obsluga_bonusu()\n {\n if(bonusy_poziomu>0)\n {\n boolean numer= los.nextBoolean();\n if(numer){\n bon.add(new Bonus(w.getPolozenie_x(),w.getPolozenie_y(),getWidth(),getHeight()));\n bonusy_poziomu--;\n }\n }\n }", "public void jumlahgajianggota(){\n \n jmlha = Integer.valueOf(txtha.getText());\n jmlharga = Integer.valueOf(txtharga.getText());\n jmlanggota = Integer.valueOf(txtanggota.getText());\n \n if (jmlanggota == 0){\n txtgajianggota.setText(\"0\");\n }else{\n jmltotal = jmlharga * jmlha;\n hasil = jmltotal / jmlanggota;\n txtgajianggota.setText(Integer.toString(hasil)); \n }\n\n \n }", "public int check(){\r\n\r\n\treturn count ++;\r\n\t\r\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 aleatorizarNaipe() {\n\t\tint aux;\n\t\taux = r.getIntRand(4);\n\t\treturn aux;\n\t}", "public boolean prestamo(){\n boolean prestado = true;\n if (cantPres < cantLibro) {\n cantPres++;\n } else {\n prestado = false;\n }\n return prestado;\n }", "private void peliLoppuuUfojenTuhoamiseen() {\n if (tuhotut == Ufolkm) {\n ingame = false;\n Loppusanat = \"STEVE HOLT!\";\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 static void verifPayement(){\n\t\tint x,y, dime;\n\t\tx=jeu.getAssam().getXPion()-1;\n\t\ty=jeu.getAssam().getYPion()-1;\n\t\tint caseInfoTapis = jeu.cases[x][y].getCouleurTapis();\n\t\tif(caseInfoTapis == tour || caseInfoTapis == 0){\n\t\t\treturn;\n\t\t}\n\t\telse{\n\t\t\tdime = jeu.payerDime(caseInfoTapis,x,y,0,new boolean[7][7]);\n\t\t\tJoueur payeur = jeu.getJoueurs()[tour-1];\n\t\t\tJoueur paye = jeu.getJoueurs()[caseInfoTapis-1];\n\t\t\tif(jeu.payerVraimentDime(payeur,paye,dime)){\n\t\t\t\tjoueurElimine++;\n\t\t\t}\n\t\t\tconsole.afficherPayeurPaye(payeur, paye, dime);\n\t\t}\n\t}", "private Boolean precond() {\r\n\t\tcalculoCantidadSacar(grupoPuestosController.getIdConcursoPuestoAgr());\r\n\t\t/**\r\n\t\t * fin incidencia 0001649\r\n\t\t */\r\n\t\tBoolean respuesta = validacionesIteracion();\r\n\t\treturn respuesta;\r\n\t}", "public void Entrada(int cantidad) {\n if(cantidad*-1>this.stock) {\n System.out.println(\"La cantidad a retirar es mayor que la que hay en stock, no es posible hacer la operacion.\");\n }else {\n this.stock+=cantidad;\n }\n }", "public boolean Vacia (){\n return cima==-1;\n \n }", "public static int AnaEkranGoruntusu(){\n\t\t@SuppressWarnings(\"resource\")\n\t\tScanner scan = new Scanner(System.in);\n\t\tSystem.out.println(\"****************************************\");\n\t\tSystem.out.println(\"* NE YAPMAK İSTERSİNİZ?\t\t\t*\");\n\t\tSystem.out.println(\"* 0)Alisveris Sepetini Goster\t\t*\");\n\t\tSystem.out.println(\"* 1)Sepetine Yeni Urun Ekle\t\t*\");\n\t\tSystem.out.println(\"* 2)Toplam Harcamami Goster\t\t*\");\n\t\tSystem.out.println(\"* 3)Cikis\t\t\t\t*\");\n\t\tSystem.out.println(\"****************************************\");\n\t\tSystem.out.println();\n\t\tSystem.out.print(\"Lutfen Secimini Giriniz: \");\n\t\tint anamenu_secim = scan.nextInt();\n\t\treturn anamenu_secim;\n\t}", "public void cambiaRitmo(int valor){\r\n\t\t\r\n\t}", "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 int verificarRemocao(No no){\n if(no.getDireita()==null && no.getEsquerda()==null)\n return 1;\n if((no.getDireita()==null && no.getEsquerda()!=null) || (no.getDireita()!=null && no.getEsquerda()==null))\n return 2;\n if(no.getDireita() != null && no.getEsquerda() != null)\n return 3;\n else return -1;\n }", "@Override\r\n\tpublic void action() {\n\t\tMessageTemplate mt=MessageTemplate.or(MessageTemplate.MatchContent(\"comida\"), MessageTemplate.MatchContent(\"bebida\"));\r\n ACLMessage msg = myAgent.receive(mt);\r\n if(msg!=null){\r\n \tif(msg.getContent().compareTo(\"comida\")==0){\r\n \t\tif(Comida>=5){\r\n \t\t\tACLMessage reply = msg.createReply();\r\n reply.setContent(\"Si\");\r\n System.out.println(myAgent.getLocalName()+\":Si, gracias tengo hambre todavia\"); \r\n myAgent.send(reply);\r\n Comida=Comida-5;\r\n \t\t}\r\n \t\telse{\r\n \t\t\tACLMessage reply = msg.createReply();\r\n reply.setContent(\"No\");\r\n System.out.println(myAgent.getLocalName()+\":No gracias\"); \r\n myAgent.send(reply);\r\n \t\t} \r\n \t}\r\n \telse if(msg.getContent().compareTo(\"bebida\")==0){\r\n \t\tif(Bebida>=5){\r\n \t\t\tACLMessage reply = msg.createReply();\r\n reply.setContent(\"Si\");\r\n System.out.println(myAgent.getLocalName()+\":Si, gracias tengo sed todavia\"); \r\n myAgent.send(reply);\r\n Bebida=Bebida-5;\r\n \t\t}\r\n \t\telse{\r\n \t\t\tACLMessage reply = msg.createReply();\r\n reply.setContent(\"No\");\r\n System.out.println(myAgent.getLocalName()+\":No gracias\"); \r\n myAgent.send(reply);\r\n \t\t} \r\n \t}\r\n }\r\n if (Comida==0 && Bebida==0){\r\n \tmyAgent.doDelete();\r\n }\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 }", "@Override\n public int contarHojas(){\n return (super.contarHojas());\n }", "public static int BIASED_ONE_OR_ZERO()\n\t{\n\t}", "public void identificacion(){\n System.out.println(\"¡Bienvenido gamer!\\nSe te solcitaran algunos datos con el fin de personalizar tu experiencia :)\");\n System.out.println(\"Porfavor, ingresa tu nombre\");\n nombre = entrada.nextLine();\n System.out.println(\"Bien, ahora, ingresa tu gamertag\");\n gamertag = entrada.nextLine();\n System.out.println(\"Ese es un gran gamertag, ahora, diseña tu id, recuerda que tiene que ser un numero entero\");\n id = entrada.nextInt();\n //se le pide al usuario que elija la dificultad del juego, cada dificultad invocara a un metodo distinto\n System.out.println(\"Instrucciones:\\nTienes un numero limitado de intentos, tendras que encontrar las minas para asi desactivarlas\\n¿Quien no queria ser un Desactivador de minas de niño?\");\n System.out.println(\"Selecciona la dificultad\\n1. Facil\\n2. Intermedia\\n3 .Dificil\\n4. Imposible\");\n decision = entrada.nextInt();\n //creo el objeto que me llevara al juego, mandandolo con mis variables recopiladas\n Buscaminas dear = new Buscaminas(nombre, gamertag, id);\n if (decision==1){\n System.out.println(\"Estamos listos para empezar :), La dificultad que has elegido es Facil\");\n //vamos para el juego\n dear.juego();\n }else if(decision==2){\n System.out.println(\"Estamos listos para empezar :), La dificultad que has elegido es Intermedia\");\n dear.juego1();\n\n }else if(decision==3){\n System.out.println(\"Estamos listos para empezar :), La dificultad que has elegido es Dificil\");\n dear.juego2();\n\n }else if(decision==4){\n System.out.println(\"Estamos listos para empezar :), La dificultad que has elegido es Imposible\");\n dear.juego3();\n\n }\n\n\n\n }" ]
[ "0.6815345", "0.65059155", "0.6439356", "0.62209046", "0.62070614", "0.61596197", "0.6152673", "0.6136207", "0.6104359", "0.6097907", "0.6095065", "0.60835165", "0.6081271", "0.60686857", "0.6063797", "0.6062863", "0.60537076", "0.60223126", "0.59671503", "0.5960836", "0.59452784", "0.59438664", "0.5942683", "0.593078", "0.5927692", "0.5915263", "0.5912531", "0.5905104", "0.58925146", "0.5880481", "0.58794", "0.58600336", "0.58590597", "0.58211046", "0.5808194", "0.5807691", "0.5804654", "0.58036685", "0.5781454", "0.577573", "0.577544", "0.57744414", "0.5758763", "0.57575256", "0.5754096", "0.57503307", "0.5739798", "0.5737658", "0.5723958", "0.5719177", "0.57065475", "0.5705803", "0.5694445", "0.5683026", "0.5672437", "0.5672211", "0.56711715", "0.5670947", "0.56666076", "0.56582123", "0.5654879", "0.5653559", "0.5643671", "0.56380075", "0.5638005", "0.5633769", "0.5633094", "0.56326497", "0.56294084", "0.56243986", "0.56241673", "0.56229126", "0.5621895", "0.56163985", "0.5615037", "0.56108433", "0.5609625", "0.5609073", "0.56090075", "0.56068903", "0.5597773", "0.5596514", "0.5590966", "0.5590418", "0.55873245", "0.5578368", "0.5576836", "0.55536515", "0.55517954", "0.5550201", "0.5547528", "0.55406606", "0.55390793", "0.5533485", "0.5532837", "0.55326545", "0.5532568", "0.55310893", "0.5528802", "0.55277497", "0.55246073" ]
0.0
-1
Initialise une liste de components. Pascal Luttgens.
public void init(Component... components) { for (Component component : components) { if (component instanceof Script) { this.scripts.add((Script) component); } else { this.components.add(component); } } this.components.sort(new Component.UpdatePriorityComparator()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public List init(List list) {\n Iterator it = components.iterator();\n PortletComponent comp;\n while (it.hasNext()) {\n comp = (PortletComponent) it.next();\n comp.setTheme(theme);\n list = comp.init(list);\n }\n System.err.println(\"Made a components list!!!! \" + list.size());\n for (int i = 0; i < list.size(); i++) {\n ComponentIdentifier c = (ComponentIdentifier) list.get(i);\n System.err.println(\"id: \" + c.getComponentID() + \" : \" + c.getClassName() + \" : \" + c.hasPortlet());\n \n }\n componentIdentifiers = list;\n return componentIdentifiers;\n }", "private void initComponents() {\n\t\t\n\t}", "private void initComponents() {\n\t\t\n\t}", "private void initList() {\n\n }", "private void initcomponent() {\n\r\n\t}", "public void init() {\r\n\t\tsuper.init();\r\n\t\tfor (int i = 0; i < _composites.size(); i++) {\r\n\t\t\t_composites.get(i).init();\t\t\t\r\n\t\t} \r\n\t}", "private void inicializarcomponentes() {\n Comunes.cargarJList(jListBecas, becasFacade.getTodasBecasVigentes());\n \n }", "public void initComponents() {\n Iterator<Component> itComponent = this.components.iterator();\n while (itComponent.hasNext()) {\n itComponent.next().init(this);\n }\n\n Iterator<Script> itScript = this.scripts.iterator();\n while (itScript.hasNext()) {\n itScript.next().init(this);\n }\n System.out.println(this.owner.id + \" : \" + this.components.toString() + \" \" + this.scripts.toString());\n\n }", "private void inicializarComponentes() {\n universidadesIncluidos = UniversidadFacade.getInstance().listarTodosUniversidadOrdenados();\n universidadesIncluidos.removeAll(universidadesExcluidos);\n Comunes.cargarJList(jListMatriculasCatastrales, universidadesIncluidos);\n }", "private void initList() {\n\n\t\tfor (int i = 0; i < lstPool.size(); i++) {\n\t\t\tpoolList.add(createPool(\"nomPool\", lstPool.get(i).getNomPool()));\n\t\t}\n\t}", "public IHM() {\n initComponents();\n da = new ArrayList<String>();\n ba = new ArrayList<String>();\n //a.lerArraylist();\n }", "protected void CriarComponentes(){\n\n //VINCULANDO A LISTA DA TELA AO LISTVIEW QUE DECLARAMOS\n ListMenu = (ListView) this.findViewById(R.id.ListMenu);\n }", "public void initComponents();", "private void initComposants() {\r\n\t\tselectionMatierePanel = new SelectionMatierePanel(1);\r\n\t\ttableauPanel = new TableauPanel(1);\r\n\t\tadd(selectionMatierePanel, BorderLayout.NORTH);\r\n\t\tadd(tableauPanel, BorderLayout.SOUTH);\r\n\t\t\r\n\t}", "private void initList(CartInfo ci) {\n\t\t\t\t\n\t\t\t\t\n\t\t\t}", "private void initList() {\n tempShopList=wdh.getTempShopList();\n final String[] listIndex=new String[tempShopList.size()];\n \n // System.out.println(tempShopList.size());\n \n for(int i=0;i<tempShopList.size();i++)\n listIndex[i]=String.valueOf(i+1); \n \n// jList1=new JList(listIndex);\n// jScrollPane1=new JScrollPane(jList1);\n// jScrollPane1.setViewportView(jList1);\n \n \n jList1.setModel(new javax.swing.AbstractListModel() {\n String[] strings1 = listIndex;\n public int getSize() { return strings1.length; }\n public Object getElementAt(int i) { return strings1[i]; }\n });\n jScrollPane1.setViewportView(jList1);\n \n }", "private void initAuxComponent() {\n\t\tauxComponent.setPickable(false);\n\t\tauxComponent.addChild(unitDiscComponent);\n\t\tauxComponent.addChild(circlesComponent);\n\t\tauxComponent.addChild(hyperboloidComponent);\n\t\tauxComponent.addChild(paraboloidComponent);\n\t\tauxComponent.addChild(poincareGeodesicsComponent);\n\t}", "public ListaColores() {\n initComponents();\n buscaColor();\n\n }", "private void initList() {\r\n\t\tthis.panelList = new JPanel();\r\n\t\tthis.panelList.setLayout(new BoxLayout(this.panelList,\r\n\t\t\t\tBoxLayout.PAGE_AXIS));\r\n\r\n\t\tJLabel labelList = new JLabel(\"Weapons list\");\r\n\t\tlabelList.setAlignmentX(Component.CENTER_ALIGNMENT);\r\n\t\tthis.dlm = new DefaultListModel<String>();\r\n\t\tthis.list = new JList<String>(dlm);\r\n\t\tthis.scrollPane = new JScrollPane(this.list,\r\n\t\t\t\tJScrollPane.VERTICAL_SCROLLBAR_ALWAYS,\r\n\t\t\t\tJScrollPane.HORIZONTAL_SCROLLBAR_ALWAYS);\r\n\t\tthis.scrollPane.setBounds(new Rectangle(10, 10, 450, 80));\r\n\t\tthis.list.addMouseListener(this.editWeaponControl);\r\n\t\tthis.updateList();\r\n\t\tthis.panelList.add(labelList);\r\n\t\tthis.panelList.add(this.scrollPane);\r\n\t}", "@Test\n\tvoid test2ConstructorWithList() {\n\t\t// comp1.setHeight(500); this is now component 4\n\t\tlistItems.add(comp1);\n\t\t// comp3.setWidth(678); now component 5\n\t\tlistItems.add(comp2);\n\t\tlistItems.add(comp3);\n\t\tlistItems.add(comp4);\n\t\tlistItems.add(comp5);\n\t\tvc = new VerticalComponentList(x, y, listItems,0);\n\t\tassertEquals(comp5, vc.getComponentsList().get(4));\n\t\tassertTrue(this.x == vc.getX() && this.y == vc.getY() && 678 == vc.getWidth()\n\t\t\t\t&& (comp1.getHeight() + comp2.getHeight() + comp3.getHeight()) + comp4.getHeight()\n\t\t\t\t\t\t+ comp5.getHeight() == vc.getHeight());\n\t}", "public ListaDependente() {\n initComponents();\n carregarTabela();\n }", "public void initialize() {\r\n\t\tfor (iPhone iphone : iphoneList) {\r\n\t\t\tadd(iphone);\r\n\t\t}\r\n\t}", "void instantiateComponents();", "public void Initialise(List<IComponent> _components) \r\n {\r\n // LOOP through all the IComponents within the _components List passed: \r\n for(IComponent _c : _components)\r\n {\r\n // CALL Initialise and pass a reference to this:\r\n _c.Initialise(this);\r\n\r\n // ADD the IComponent to the HashMap calling the inherited addComponent method:\r\n addComponent(_c);\r\n }\r\n\r\n }", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t\tfecha = new Date();\r\n\t\t\r\n\t\tlistaBancos = new ArrayList<SelectItem>();\r\n\t\tlistaRegiones = new ArrayList<SelectItem>();\r\n\t\tlistaCiudades = new ArrayList<SelectItem>();\r\n\t\tlistaComunas = new ArrayList<SelectItem>();\r\n\t\t\r\n\t\tfor(EmpresaDTO empresa : configJProcessService.selectEmpresasByOrganizacion(1))\r\n\t\t\tlistaBancos.add(new SelectItem(empresa.getId(), empresa.getNombre()));\r\n\t}", "private void initComponents() {\n\t\tlistPanel = new JPanel();\r\n\r\n\t\t//======== this ========\r\n\t\tsetLayout(new BorderLayout());\r\n\r\n\t\t//======== listPanel ========\r\n\t\t{\r\n\t\t\tlistPanel.setAutoscrolls(true);\r\n\t\t\tlistPanel.setLayout(new BoxLayout(listPanel, BoxLayout.Y_AXIS));\r\n\t\t}\r\n\t\tadd(listPanel, BorderLayout.CENTER);\r\n\t\t// JFormDesigner - End of component initialization //GEN-END:initComponents\r\n\t}", "private void initComponent() {\n\t\taddGrid();\n\t\taddToolBars();\n\t}", "public void setPortletComponents(ArrayList components) {\n this.components = components;\n }", "@Test\n\tvoid test4AddComponentToList() {\n\t\tlistItems.add(comp1);\n\t\tlistItems.add(comp2);\n\t\tvc = new VerticalComponentList(x, y, listItems,0);\n\t\tvc.addComponent(comp3);\n\t\tassertEquals(comp3.hashCode(), vc.getComponentsList().get(vc.getComponentsList().size() - 1).hashCode());\n\t}", "private void initComponents() {\n LOOGER.info(\"Get init components\");\n this.loadButton = new JButton(\"Load\");\n this.fillButton = new JButton(\"Fill\");\n this.deleteButton = new JButton(\"Delete\");\n this.setLayout(new FlowLayout());\n LOOGER.info(\"components exit\");\n }", "public VistaListadeproductos() {\n // You can initialise any data required for the connected UI components here.\n }", "public pfcGuiLlistaPacients() { \n \n this.llistaPacientsModel = new javax.swing.DefaultListModel();\n initComponents(); \n centraFormulari(); \n \n }", "private void initControlList() {\n this.controlComboBox.addItem(CONTROL_PANELS);\n //this.controlComboBox.addItem(PEER_TEST_CONTROL);\n //this.controlComboBox.addItem(DISAGGREGATION_CONTROL);\n this.controlComboBox.addItem(AXIS_CONTROL);\n this.controlComboBox.addItem(DISTANCE_CONTROL);\n this.controlComboBox.addItem(SITES_OF_INTEREST_CONTROL);\n this.controlComboBox.addItem(CVM_CONTROL);\n this.controlComboBox.addItem(X_VALUES_CONTROL);\n }", "private List<SimpleComponent> list() {\n\t\treturn this.list(null);\n\t}", "private void initializeComponents() {\n\t\tplantDAO = new PlantDAOStub();\r\n\t\t\r\n\t\ttry {\r\n\t\t\tList<String> plantNames = plantDAO.getPlantNames();\r\n\t\t\tArrayAdapter<String> plantNamesAdapter = new ArrayAdapter<String>(this, android.R.layout.simple_expandable_list_item_1, plantNames);\r\n\t\t\t\r\n\t\t\tactPlantName = (AutoCompleteTextView) findViewById(R.id.actPlantName);\r\n\t\t\t\r\n\t\t\tactPlantName.setAdapter(plantNamesAdapter);\r\n\t\t\t\r\n\t\t\tbtnPlantSearch = (Button) findViewById(R.id.btnSearchPlants);\r\n\t\t\t\r\n\t\t\tbtnPlantSearch.setOnClickListener(new View.OnClickListener() {\r\n\t\t\t\t\r\n\t\t\t\tpublic void onClick(View v) {\r\n\t\t\t\t\t// TODO Auto-generated method stub\r\n\t\t\t\t\tinvokeResults();\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t\t\r\n\t\t} catch (Exception 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 ComandosJuego() //constructor\n\t{\n\t\tlista = new ArrayList<String>();\n\t}", "public void init() {\n l0 = new EmptyList();\n l1 = FListInteger.add(l0, new Integer(5));\n l2 = FListInteger.add(l1, new Integer(4));\n l3 = FListInteger.add(l2, new Integer(7));\n l4 = new EmptyList();\n l5 = FListInteger.add(l2, new Integer(7));\n }", "private void initComponents() {\n jPanel2 = new javax.swing.JPanel();\n jScrollPane1 = new javax.swing.JScrollPane();\n parameterList = new javax.swing.JList();\n\n setLayout(new java.awt.BorderLayout());\n\n jPanel2.setLayout(new java.awt.BorderLayout());\n\n parameterList.setModel(new javax.swing.AbstractListModel() {\n String[] strings = { \"H2\", \"H2O\" };\n public int getSize() { return strings.length; }\n public Object getElementAt(int i) { return strings[i]; }\n });\n parameterList.setSelectionMode(javax.swing.ListSelectionModel.SINGLE_SELECTION);\n parameterList.setToolTipText(\"List of possible parameters\");\n parameterList.setMaximumSize(new java.awt.Dimension(200, 2000));\n parameterList.setMinimumSize(new java.awt.Dimension(50, 3000));\n parameterList.addMouseListener(new java.awt.event.MouseAdapter() {\n public void mouseClicked(java.awt.event.MouseEvent evt) {\n parameterListMouseClicked(evt);\n }\n });\n\n jScrollPane1.setViewportView(parameterList);\n\n jPanel2.add(jScrollPane1, java.awt.BorderLayout.CENTER);\n\n add(jPanel2, java.awt.BorderLayout.CENTER);\n\n }", "private void initList() {\r\n\t\tlist = new JList<>();\r\n\t\tFile rootFile = new File(System.getProperty(\"user.dir\"));\r\n\t\tloadFilesInFolder(rootFile);\r\n\t\tlist.addListSelectionListener(new FileListSelectionListener());\r\n\t}", "public void init(Vector<String> initialList) {\n\t\tfor (int i = 0; i < initialList.size(); i++) {\r\n\t\t\t/*\r\n\t\t\t * System.out.println (\"CNTT \" + i);\r\n\t\t\t * \r\n\t\t\t * if (i == 319 || i == 387) { int j = i; }\r\n\t\t\t */\r\n\t\t\tput(initialList.get(i));\r\n\t\t}\r\n\t\tputChildren();\r\n\t}", "public PanelListaMotoristas() {\n initComponents();\n atualizarListaMotoristas();\n }", "private void initComponents()\n {\n //LAYOUT\n initLayoutComponents();\n \n //TRANSITION COMPONENTS\n initTransitionComponents();\n \n //SEARCH PANE COMPONENTS\n initSearchComponents();\n \n //RESULTS PANE COMPONENTS\n initResultComponents();\n \n // CRAWLER CONTROLS\n initCrawlerControlsComponents();\n \n // KEYWORD BAR\n initKeywordBarComponents();\n \n //WORKER CONTROLS\n initWorkerComponents();\n \n //URL COMPONENTS\n initURLMenuComponents();\n\n //BASE LAYOUT COMPONENTS\n initBaseLayout();\n }", "public InternmentList() {\n\t\tsuper(\"Internments\", List.IMPLICIT);\n\n\t\tstartData();\n\t\tstartComponents();\n\t}", "private void initialize() {\n\tif (setup == false) {\n\t elementList.add(new GUISlider());\n\t elementList.add(new GUIChart());\n\t elementList.add(new GUIStatsDisplay());\n\t elementList.add(new GUIPID());\n\t elementList.add(new GUITimer());\n\t elementList.add(new GUINumericUpDown());\n\t setup = true;\n\t}\n }", "private void initializeLists() {\n this.sensorsPm10 = new ArrayList<>();\n this.sensorsTempHumid = new ArrayList<>();\n }", "private void initialize() {\n this.setLayout(new BorderLayout());\n this.setSize(300, 200);\n this.setPreferredSize(new java.awt.Dimension(450, 116));\n this.add(getListPanel(), java.awt.BorderLayout.CENTER);\n this.add(getButtonPanel(), java.awt.BorderLayout.SOUTH);\n }", "public void addComponents()\r\n\t{\n\t\tSteveTechFarming.fruit = new BlockFruit(SteveTechFarming.config.getBlockID(1202, \"Fruit\", null)).setBlockName(\"WiduX-SteveTech-Farm-Fruit\");\r\n\t\tSteveTechFarming.crops = new BlockCrops(SteveTechFarming.config.getBlockID(1203, \"Crops\", null)).setBlockName(\"WiduX-SteveTech-Farm-Crops\");\r\n\t\t\r\n\t\tSteveTechFarming.seeds = new ItemSeeds(SteveTechFarming.config.getItemID(11000, \"Seeds\", null)).setItemName(\"WiduX-SteveTech-Farm-Seeds\");\r\n\t\tSteveTechFarming.harvestedItems = new ItemHarvest(SteveTechFarming.config.getItemID(11002, \"Harvest\", null)).setItemName(\"WiduX-SteveTech-Farm-Harvest\");\r\n\t\tSteveTechFarming.creativeTools = new ItemCreativeTools(SteveTechFarming.config.getItemID(11001, \"Creative Tools\", null)).setItemName(\"WiduX-SteveTech-Farm-CTools\");\r\n\t\tSteveTechFarming.foods = new Item[EnumFood.getNumberFoods()];\r\n\t\tint firstFoodItemID = SteveTechFarming.config.getItemID(11003, \"Foods Array\", \"This is the first item ID in the list of foods. Item IDs used will start here, and use the next \" + EnumFood.getNumberFoods() + \" IDs. Make sure they are all available.\");\r\n\t\tfor(int idOffset = 0; idOffset < SteveTechFarming.foods.length; idOffset++)\r\n\t\t{\r\n\t\t\tEnumFood food = EnumFood.getFood(idOffset);\r\n\t\t\tSteveTechFarming.foods[idOffset] = new ItemSTFood(firstFoodItemID + idOffset, food).setItemName(\"WiduX-SteveTech-Farm-Foods-Food\" + idOffset);\r\n\t\t}\r\n\t}", "private void initComponents(inventorycontroller.function.DbInterface dbi) {\n \tdbInterface1=dbi;\n \tpoAmount=\"0\";\n \tpoType=-1;\n \tresetPerforming=false;\n\t selectedBomList=null;\n\t bomList=null;\n\t bomDet=null;\n\t itmList=null;\n\t poDet=null;\n\t vndList=null;\n\t poDetType=new java.lang.Class[] {\n\t \tjava.lang.Short.class,\n\t \tjava.lang.String.class,\n\t \tjava.lang.Long.class,\n\t \tjava.lang.Double.class,\n\t \tjava.lang.Double.class,\n\t \tjava.lang.Double.class,\n\t \tjava.lang.Double.class,\n\t \tjava.lang.Double.class,\n\t \tjava.lang.Double.class,\n\t \tjava.lang.Double.class,\n\t \tjava.lang.Double.class,\n\t \tjava.lang.Double.class,\n\t \tjava.lang.Double.class,\n\t \tjava.lang.Double.class,\n\t \tjava.lang.Double.class,\n\t \tjava.lang.Double.class,\n\t \tjava.lang.Double.class,\n\t \tjava.lang.Double.class,\n\t };\n\t poDetEditableForBM=new boolean[18];\n\t poDetEditableForLP=new boolean[18];\n\t for (int i = 0; i<18; i++){\n\t\t poDetEditableForBM[i]=true;\n\t\t poDetEditableForLP[i]=true;\n\t }\n\t poDetEditableForBM[0]=false;\n\t poDetEditableForBM[1]=false;\n\t poDetEditableForBM[2]=false;\n\t poDetEditableForBM[4]=false;\n\t poDetEditableForBM[17]=false;\n\t poDetEditableForLP[0]=false;\n\t poDetEditableForLP[1]=false;\n\t poDetEditableForLP[4]=false;\n\t poDetEditableForLP[17]=false;\n\t poDetEditable=null;\n\t addedBom=new java.util.Vector<String>(); \n\t addedBomDet=new java.util.Vector<java.util.Vector<String>>(); \n\t \n \t\n jLabel1 = new javax.swing.JLabel();\n jPanel1 = new javax.swing.JPanel();\n jTabbedPane1 = new javax.swing.JTabbedPane();\n jPanel3 = new javax.swing.JPanel();\n buttonGroup1 = new javax.swing.ButtonGroup();\n jRadioButton1 = new javax.swing.JRadioButton();\n jRadioButton2 = new javax.swing.JRadioButton();\n jLabel2 = new javax.swing.JLabel();\n jLabel3 = new javax.swing.JLabel();\n jLabel4 = new javax.swing.JLabel();\n jLabel5 = new javax.swing.JLabel();\n jLabel6 = new javax.swing.JLabel();\n jTextField2 = new javax.swing.JComboBox();\n jSpinner1 = new javax.swing.JSpinner();\n jTextField1 = new javax.swing.JLabel();\n jTextField3 = new javax.swing.JTextField();\n jSpinner2 = new javax.swing.JSpinner();\n jLabel7 = new javax.swing.JLabel();\n jScrollPane2 = new javax.swing.JScrollPane();\n jEditorPane1 = new javax.swing.JEditorPane();\n jLabel8 = new javax.swing.JLabel();\n jButton6 = new javax.swing.JButton();\n jScrollPane1 = new javax.swing.JScrollPane();\n jList1 = new javax.swing.JList();\n jPanel4 = new javax.swing.JPanel();\n jPanel5 = new javax.swing.JPanel();\n jScrollPane3 = new javax.swing.JScrollPane();\n jTable1 = new javax.swing.JTable();\n jLabel9 = new javax.swing.JLabel();\n jLabel10 = new javax.swing.JLabel();\n jLabel12 = new javax.swing.JLabel();\n jScrollPane4 = new javax.swing.JScrollPane();\n jTable2 = new javax.swing.JTable();\n jButton5 = new javax.swing.JButton();\n jButton4 = new javax.swing.JButton();\n jButton7 = new javax.swing.JButton();\n jScrollPane5 = new javax.swing.JScrollPane();\n jScrollPane6 = new javax.swing.JScrollPane();\n jTable3 = new javax.swing.JTable();\n jTable4 = new javax.swing.JTable();\n jButton1 = new javax.swing.JButton();\n jLabel11 = new javax.swing.JLabel();\n jPanel2 = new javax.swing.JPanel();\n jButton2 = new javax.swing.JButton();\n jButton3 = new javax.swing.JButton();\n jXDatePicker1 = new inventorycontroller.display.RDateSpinner(inventorycontroller.display.RDateSpinner.DD_MM_YYYY);\n jXDatePicker2 = new inventorycontroller.display.RDateSpinner(inventorycontroller.display.RDateSpinner.DD_MM_YYYY);\n\n setTitle(\"Purchase Order\");\n \n jTextField2.setMaximumRowCount(8);\n \n jLabel1.setBackground(new java.awt.Color(127, 157, 185));\n jLabel1.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);\n jLabel1.setText(\"jLabel1\");\n jLabel1.setOpaque(true);\n\n jPanel1.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(127, 157, 185)));\n jRadioButton1.setText(\"Purchase against BOM\");\n jRadioButton1.addActionListener(new java.awt.event.ActionListener(){\n \tpublic void actionPerformed(java.awt.event.ActionEvent evt){\n \t\tpoTypeChanged((javax.swing.JRadioButton)evt.getSource());\n \t}\n });\n\n jRadioButton2.setText(\"Local Purchase\");\n jRadioButton2.addActionListener(new java.awt.event.ActionListener(){\n \tpublic void actionPerformed(java.awt.event.ActionEvent evt){\n \t\tpoTypeChanged((javax.swing.JRadioButton)evt.getSource());\n \t}\n });\n \n buttonGroup1.add(jRadioButton1);\n buttonGroup1.add(jRadioButton2);\n\n jLabel2.setText(\"PO No.\");\n\n jLabel3.setText(\"PO Date\");\n\n jLabel4.setText(\"Vendor Name\");\n\n jLabel5.setText(\"Quotation No.\");\n\n jLabel6.setText(\"Quotation Date\");\n\n jLabel7.setText(\"BOM List:\");\n\n jScrollPane2.setViewportView(jEditorPane1);\n\n jLabel8.setText(\"Remarks (if any):\");\n\n jButton6.setText(\"Generate Purchase Requisition\");\n jButton6.addActionListener(new java.awt.event.ActionListener(){\n \tpublic void actionPerformed(java.awt.event.ActionEvent evt){\n \t\tgeneratePurchaseRequition();\n \t}\n });\n\n jScrollPane1.setViewportView(jList1);\n\n javax.swing.GroupLayout jPanel3Layout = new javax.swing.GroupLayout(jPanel3);\n jPanel3.setLayout(jPanel3Layout);\n jPanel3Layout.setHorizontalGroup(\n jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel3Layout.createSequentialGroup()\n .addContainerGap()\n .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel3Layout.createSequentialGroup()\n .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabel4)\n .addComponent(jLabel3)\n .addComponent(jLabel2)\n .addComponent(jLabel5)\n .addComponent(jLabel6))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jXDatePicker1, javax.swing.GroupLayout.DEFAULT_SIZE, 140, Short.MAX_VALUE)\n .addComponent(jTextField2, javax.swing.GroupLayout.DEFAULT_SIZE, 140, Short.MAX_VALUE)\n .addComponent(jTextField3, javax.swing.GroupLayout.DEFAULT_SIZE, 140, Short.MAX_VALUE)\n .addComponent(jXDatePicker2, javax.swing.GroupLayout.DEFAULT_SIZE, 140, Short.MAX_VALUE)\n .addComponent(jTextField1, javax.swing.GroupLayout.DEFAULT_SIZE, 140, Short.MAX_VALUE))\n .addGap(16, 16, 16)\n .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\n .addGroup(jPanel3Layout.createSequentialGroup()\n .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabel7)\n .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 140, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(16, 16, 16)\n .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabel8)\n .addComponent(jScrollPane2, javax.swing.GroupLayout.PREFERRED_SIZE, 140, javax.swing.GroupLayout.PREFERRED_SIZE)))\n .addComponent(jButton6, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)))\n .addGroup(jPanel3Layout.createSequentialGroup()\n .addComponent(jRadioButton1)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jRadioButton2)))\n .addContainerGap())\n );\n jPanel3Layout.setVerticalGroup(\n jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel3Layout.createSequentialGroup()\n .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jRadioButton1)\n .addComponent(jRadioButton2))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel3Layout.createSequentialGroup()\n .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel2)\n .addComponent(jTextField1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel3)\n .addComponent(jXDatePicker1, 20, 20, 20))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel4)\n .addComponent(jTextField2, 20, 20, 20))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel5)\n .addComponent(jTextField3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel6)\n .addComponent(jXDatePicker2, 20, 20, 20)))\n .addGroup(jPanel3Layout.createSequentialGroup()\n\t .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)\n\t .addGroup(javax.swing.GroupLayout.Alignment.LEADING, jPanel3Layout.createSequentialGroup()\n\t .addComponent(jLabel8)\n\t .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n\t .addComponent(jScrollPane2))\n\t .addGroup(javax.swing.GroupLayout.Alignment.LEADING, jPanel3Layout.createSequentialGroup()\n\t .addComponent(jLabel7)\n\t .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n\t .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 66, javax.swing.GroupLayout.PREFERRED_SIZE)))\n .addGap(8, 16, 32)\n .addComponent(jButton6)))\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n );\n jTabbedPane1.addTab(\"Purchase Order Detail\", jPanel3);\n\n jTable1.setSelectionMode(javax.swing.ListSelectionModel.SINGLE_SELECTION);\n jTable1.getSelectionModel().addListSelectionListener(new javax.swing.event.ListSelectionListener(){\n \tpublic void valueChanged(javax.swing.event.ListSelectionEvent e) {\n \t\t//Ignore extra messages.\n \t\tif (e.getValueIsAdjusting()) return;\n \t\tjavax.swing.ListSelectionModel lsm =(javax.swing.ListSelectionModel)e.getSource();\n \t\tint selectedRow;\n \t\tif (lsm.isSelectionEmpty()) { //no rows are selected\n \t\t\tselectedRow=-1;\n \t\t} \n \t\telse {\n \t\tselectedRow = lsm.getMinSelectionIndex();\n \t\tbomSelected(selectedRow);\n \t}\n \t}\n\t\t});\n jTable1.setAutoResizeMode(jTable2.AUTO_RESIZE_OFF);\n jTable1.setAutoCreateRowSorter(false);\n jScrollPane3.setViewportView(jTable1);\n\n jLabel9.setText(\"BOM List:\");\n\n jLabel10.setText(\"BOM Details:\");\n\n\t\tjTable2.setAutoResizeMode(jTable2.AUTO_RESIZE_OFF);\n jTable2.setAutoCreateRowSorter(false);\n jScrollPane4.setViewportView(jTable2);\n\n jButton5.setText(\"Add Selected Item/s\");\n jButton5.addActionListener(new java.awt.event.ActionListener(){\n \tpublic void actionPerformed(java.awt.event.ActionEvent evt){\n \t\tselectBom();\n \t}\n });\n\n javax.swing.GroupLayout jPanel5Layout = new javax.swing.GroupLayout(jPanel5);\n jPanel5.setLayout(jPanel5Layout);\n jPanel5Layout.setHorizontalGroup(\n jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel5Layout.createSequentialGroup()\n .addContainerGap()\n .addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel5Layout.createSequentialGroup()\n .addComponent(jScrollPane3, javax.swing.GroupLayout.PREFERRED_SIZE, 321, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)\n .addComponent(jScrollPane4, javax.swing.GroupLayout.DEFAULT_SIZE, 324, Short.MAX_VALUE)\n .addComponent(jButton5, javax.swing.GroupLayout.DEFAULT_SIZE, 324, Short.MAX_VALUE)\n .addComponent(jLabel10, javax.swing.GroupLayout.Alignment.LEADING)))\n .addComponent(jLabel9))\n .addContainerGap())\n );\n jPanel5Layout.setVerticalGroup(\n jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel5Layout.createSequentialGroup()\n .addComponent(jLabel9)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel5Layout.createSequentialGroup()\n .addComponent(jLabel10)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jScrollPane4, javax.swing.GroupLayout.DEFAULT_SIZE, 74, Short.MAX_VALUE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jButton5))\n .addComponent(jScrollPane3, javax.swing.GroupLayout.DEFAULT_SIZE, 123, Short.MAX_VALUE))\n .addContainerGap())\n );\n jTabbedPane1.addTab(\"BOM Selection\", jPanel5);\n\n jTable4.setAutoCreateRowSorter(false);\n jTable4.setAutoResizeMode(javax.swing.JTable.AUTO_RESIZE_OFF);\n jScrollPane6.setViewportView(jTable4);\n\n jLabel12.setText(\"Material List:\");\n\n jButton7.setText(\"<html><center>Add Selected<br>Material/s</center></html>\");\n jButton7.addActionListener(new java.awt.event.ActionListener(){\n \tpublic void actionPerformed(java.awt.event.ActionEvent evt){\n \t\titemSelected();\n \t}\n });\n\n javax.swing.GroupLayout jPanel4Layout = new javax.swing.GroupLayout(jPanel4);\n jPanel4.setLayout(jPanel4Layout);\n jPanel4Layout.setHorizontalGroup(\n jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel4Layout.createSequentialGroup()\n .addContainerGap()\n .addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel4Layout.createSequentialGroup()\n .addComponent(jScrollPane6, javax.swing.GroupLayout.PREFERRED_SIZE, 511, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jButton7, javax.swing.GroupLayout.DEFAULT_SIZE, 134, Short.MAX_VALUE))\n .addComponent(jLabel12))\n .addContainerGap())\n );\n jPanel4Layout.setVerticalGroup(\n jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel4Layout.createSequentialGroup()\n .addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)\n .addGroup(jPanel4Layout.createSequentialGroup()\n .addContainerGap()\n .addComponent(jButton7))\n .addGroup(javax.swing.GroupLayout.Alignment.LEADING, jPanel4Layout.createSequentialGroup()\n .addComponent(jLabel12)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jScrollPane6, javax.swing.GroupLayout.DEFAULT_SIZE, 123, Short.MAX_VALUE)))\n .addContainerGap())\n );\n jTabbedPane1.addTab(\"Material Selection\", jPanel4);\n \n jTable3.setAutoCreateRowSorter(false);\n jTable3.setAutoResizeMode(javax.swing.JTable.AUTO_RESIZE_OFF);\n jScrollPane5.setViewportView(jTable3);\n\n jButton1.setText(\"Save this Purchase Order\");\n jButton1.addActionListener(new java.awt.event.ActionListener(){\n \tpublic void actionPerformed(java.awt.event.ActionEvent evt){\n \t\tinsertPerform();\n \t}\n });\n \n jButton4.setText(\"Generate Print Preview\");\n jButton4.addActionListener(new java.awt.event.ActionListener(){\n \tpublic void actionPerformed(java.awt.event.ActionEvent evt){\n \t\tshowPrintView();\n \t}\n });\n\n jLabel11.setBackground(new java.awt.Color(255, 255, 255));\n jLabel11.setFont(new java.awt.Font(\"Dialog\", 1, 12));\n jLabel11.setForeground(new java.awt.Color(255, 102, 0));\n jLabel11.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);\n jLabel11.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(127, 157, 185)));\n jLabel11.setOpaque(true);\n\n resetPerform();\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(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createSequentialGroup()\n .addContainerGap()\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)\n .addComponent(jScrollPane5, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, 640, Short.MAX_VALUE)\n .addComponent(jLabel11, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, 640, Short.MAX_VALUE)\n .addComponent(jTabbedPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 640, Short.MAX_VALUE)\n .addGroup(jPanel1Layout.createSequentialGroup()\n \t.addGap(0, 0, Short.MAX_VALUE)\n .addComponent(jButton1, 220, 320, 320)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jButton4, 220, 320, 320)\n .addGap(0, 0, Short.MAX_VALUE)))\n .addContainerGap())\n );\n jPanel1Layout.setVerticalGroup(\n jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createSequentialGroup()\n .addContainerGap()\n .addComponent(jTabbedPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 182, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jScrollPane5, javax.swing.GroupLayout.DEFAULT_SIZE, 155, Short.MAX_VALUE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jLabel11)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jButton4)\n .addComponent(jButton1))\n .addContainerGap())\n );\n\n jPanel2.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(127, 157, 185)));\n jButton2.setText(\"Reset\");\n jButton2.addActionListener(new java.awt.event.ActionListener(){\n \tpublic void actionPerformed(java.awt.event.ActionEvent evt){\n \t\tresetPerform();\n \t}\n });\n jButton2.setMaximumSize(new java.awt.Dimension(120, 22));\n jButton2.setMinimumSize(new java.awt.Dimension(120, 22));\n jButton2.setPreferredSize(new java.awt.Dimension(120, 22));\n\n jButton3.setText(\"Exit\");\n jButton3.addActionListener(new java.awt.event.ActionListener(){\n \tpublic void actionPerformed(java.awt.event.ActionEvent evt){\n \t\texitPerform();\n \t}\n });\n jButton3.setMaximumSize(new java.awt.Dimension(120, 22));\n jButton3.setMinimumSize(new java.awt.Dimension(120, 22));\n jButton3.setPreferredSize(new java.awt.Dimension(120, 22));\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 .addComponent(jButton2)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jButton3)\n .addContainerGap())\n );\n jPanel2Layout.setVerticalGroup(\n jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel2Layout.createSequentialGroup()\n .addContainerGap()\n .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jButton2)\n .addComponent(jButton3))\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.CENTER)\n .addGroup(layout.createSequentialGroup()\n .addContainerGap()\n .addComponent(jLabel1, javax.swing.GroupLayout.DEFAULT_SIZE, 540, Short.MAX_VALUE)\n .addContainerGap())\n .addGroup(layout.createSequentialGroup()\n .addContainerGap(0, java.lang.Short.MAX_VALUE)\n .addComponent(jPanel2)\n .addContainerGap(0, java.lang.Short.MAX_VALUE))\n .addGroup(layout.createSequentialGroup()\n .addContainerGap()\n .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, 720, javax.swing.GroupLayout.DEFAULT_SIZE)\n .addContainerGap())\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()\n .addContainerGap()\n .addComponent(jPanel1)\n .addGap(4, 16, 22)\n .addComponent(jPanel2)\n .addGap(4, 16, 22)\n .addComponent(jLabel1)\n .addContainerGap())\n );\n pack();\n setVisible(true);\n setClosable(true);\n setIconifiable(true);\n setMaximizable(true);\n setResizable(true);\n getRootPane().setDefaultButton(jButton1);\n //* ENDING: initComponent()\n }", "public void init() {\n\t\tfor(int i = 0; i < 5; i++) {\n\t\t\tpageLists.add(new Page(i));\n\t\t}\n\t}", "public JSmartList()\n {\n }", "@PostConstruct\r\n private void init() {\n this.ccTypes = new ArrayList<SelectItem>();\r\n this.ccTypes.add(new SelectItem(CreditCardType.CARD_A, getCCTypeLabel(CreditCardType.CARD_A)));\r\n this.ccTypes.add(new SelectItem(CreditCardType.CARD_B, getCCTypeLabel(CreditCardType.CARD_B)));\r\n\r\n // Initialize categories select items\r\n this.categories = new ArrayList<SelectItem>();\r\n this.categories.add(new SelectItem(\"cat_it\", getCategoryLabel(\"cat_it\")));\r\n this.categories.add(new SelectItem(\"cat_gr\", getCategoryLabel(\"cat_gr\")));\r\n this.categories.add(new SelectItem(\"cat_at\", getCategoryLabel(\"cat_at\")));\r\n this.categories.add(new SelectItem(\"cat_mx\", getCategoryLabel(\"cat_mx\")));\r\n }", "private void initComponent() {\n\t\tmlistview=(ClickLoadListview) findViewById(R.id.ListView_hidden_check);\n\t\tChemicals_directory_search=(CustomFAB) findViewById(R.id.company_hidden_search);\n\t\tChemicals_directory_search.setVisibility(View.GONE);\n\t\ttopbar_com_name=(TopBarView) findViewById(R.id.topbar_com_name);\n\t\tsearch_chemical_name=(SearchInfoView) findViewById(R.id.search_chemical_name);\n\t}", "public void init() {\n initComponents();\n initData();\n }", "private void initializeComponents() {\n\n startHourSpinner.setValue( DEFAULT_START_HOUR );\n endHourSpinner.setValue( DEFAULT_END_HOUR );\n \n //Add the time freq\n TimeFreq[] theFreqArr = new TimeFreq[ ]{ new TimeFreq(TimeFreq.HOURLY), new TimeFreq(TimeFreq.DAILY), new TimeFreq(TimeFreq.WEEKLY), new TimeFreq(TimeFreq.MONTHLY) };\n freqCombo.setModel(new javax.swing.DefaultComboBoxModel( theFreqArr ));\n \n addListListeners();\n \n }", "private void initMyComponents() {\n this.jPanel1.setLayout(new BoxLayout(this.jPanel1, BoxLayout.Y_AXIS));\n this.jPanel1.add(controller.getPressureController().getEMeasureBasicView());\n this.jPanel1.add(controller.getTemperatureController().getEMeasureBasicView());\n this.controller.getPressureController().getListeners().add(this);\n this.controller.getTemperatureController().getListeners().add(this);\n this.jComboBox1.setModel(new DefaultComboBoxModel(FluidKind.values()));\n this.changeResponce();\n }", "@Override\r\n public void initializeComponents() {\r\n nameTf = new ITextField(\"name\");\r\n nameTf.addEditedListener(this, \"name\");\r\n\r\n separatorTf = new ITextField(\"Separator\");\r\n separatorTf.addEditedListener(this, \"separator\");\r\n }", "public void inicializar(Component comp) {\r\n\r\n\t\tList<Tematica> tematica = servicioTematica.buscarTematicasDeArea(area);\r\n\t\tltbTematica.setModel(new ListModelList<Tematica>(tematica));\r\n\r\n\t}", "public ProductListJPanel() {\n initComponents();\n }", "public ListIDE() {\n initComponents();\n loadAsset();\n directory = new Directory();\n }", "public ListaPrecios() {\n initComponents();\n listaListaPrecio();\n }", "public Workflow(ArrayList<Component> components) {\n\t\tsuper();\n\t\tsetSubComponents(components);\n\t}", "private void createComponents() {\n \n Dimension thisSize = this.getSize();\n \n this.setLayout(new BoxLayout(this, BoxLayout.X_AXIS));\n \n ArrayList<Integer> numbers = new ArrayList<>();\n for (int i = 0; i < recordCount; ++i) {\n numbers.add(i);\n }\n \n recordList = new JList(numbers.toArray());\n recordList.addListSelectionListener(selectionListener);\n JScrollPane listPane = new JScrollPane(recordList);\n listPane.setPreferredSize(new Dimension(thisSize.width / 3, thisSize.height));\n \n select(0, 0);\n \n this.add(listPane);\n \n recordForm = new RecordForm(fields, thisSize);\n entryForm = new JScrollPane(recordForm);\n \n this.add(entryForm);\n \n selectionAction = WAITING_ON_SELECTION;\n \n }", "private void fillList(JList aListComponent,ArrayList<String> theList) {\n DefaultListModel itsModel = new DefaultListModel();\n aListComponent.setModel(itsModel);\n for(String anItem : theList){\n itsModel.addElement(anItem);\n }\n aListComponent.setModel(itsModel);\n }", "public ACLPropertyList() {\n try {\n jbInit();\n }\n catch (Exception e) {\n e.printStackTrace();\n }\n }", "public IFrmListar() {\n initComponents();\n \n }", "private void initComponents() {\r\n\t\trand = new Random();\r\n\t\tfetchProfiles();\r\n\t\tgetPeopleFromFile();\r\n\t}", "public ListOfUsers() {\n initComponents();\n }", "private void criarComponentes() {\n\n add(criarPainelNorte(), BorderLayout.NORTH);\n add(criarPainelCentro(), BorderLayout.CENTER);\n add(criarPainelSul(), BorderLayout.SOUTH);\n }", "@Override\n public void initComponent() {\n }", "@Override\n public void initComponent() {\n }", "@FXML\n\tpublic void initialize() {\n\t\t\n\t\tcbCores.getItems().add(\"Azul\");\n\t\tcbCores.getItems().add(\"Vermelho\");\n\t\tcbCores.getItems().add(\"Verde\");\n\t\t\n\t\tcbCores1.getItems().add(\"Azul\");\n\t\tcbCores1.getItems().add(\"Vermelho\");\n\t\tcbCores1.getItems().add(\"Verde\");\n\t\t\n\t\t//cbCores.setItems(FXCollections.observableArrayList(cbCores));\n\t}", "public GuiCadastroAtendente(ArrayList<Pessoa> c) {\n initComponents();\n cadPessoas = c;\n }", "private void setupCourseList(){\n\t\tcourseList = new JList<>(listModel);\n\t\tcourseList.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);\n\t\tcourseList.setLayoutOrientation(JList.VERTICAL);\n\t\t\n\t\tJScrollPane scroller = new JScrollPane(courseList);\n\t\tscroller.setMaximumSize(new Dimension(400,300));\n\t\tadd(scroller);\n\t}", "@Override\r\n public void initComponent() {\n }", "public Liste(){\n\t\tsuper();\n\t\tthis.liste = new int[this.BASE_LENGTH];\n\t\tthis.nb = 0;\n\t}", "@PostConstruct\r\n public void init() {\n this.tab = false;\r\n this.tabNumber = 0;\r\n\r\n weekdaysItem = new ArrayList<>();\r\n\r\n for (WeekDay wd : WeekDay.values()) {\r\n weekdaysItem.add(new SelectItem(wd, wd.name()));\r\n }\r\n }", "public VComponente() {\n initComponents();\n }", "private void Initialize()\n {\n \tEcran = new Rectangle(Framework.gauche, Framework.haut, Framework.frameWidth\n\t\t\t\t- Framework.droite - Framework.gauche, Framework.frameHeight - Framework.bas\n\t\t\t\t- Framework.haut);\n\t\tCentreEcranX = (int)(Ecran.getWidth()/2);\n\t\tCentreEcranY = (int)(Ecran.getHeight()/2);\n\t\twidth = Ecran.getWidth();\n\t\theight = Ecran.getHeight();\t\t\n\t\tpH=height/768;\t\t\n\t\tpW=width/1366;\n\t\tObjets = new ArrayList<Objet>(); // Créer la liste chainée en mémoire\n\t\tMissiles = new ArrayList<Missile>(); // Créer la liste chainée en mémoire\n\t\tStations = new ArrayList<Station>(); // Créer la liste chainée en mémoire\n\t\tJoueurs = new ArrayList<Joueur>();\n\t\tlastTrajectoires = new ArrayList<Trajectoire>();\n\n\t\tDisposeAstres(Framework.niveauChoisi);\n\t\tstationCourante = Stations.get(0);\n\n\t\tetat = ETAT.PREPARATION;\n\t\tmouseClicked = mousePressed = mouseReleased = false;\n\t}", "private void iniciarComponentesInterface() {\n\t\tPanelchildren panelchildren = new Panelchildren();\r\n\t\tpanelchildren.setParent(this);\r\n\t\tlistBox = new Listbox();\r\n\t\tlistBox.setHeight(\"300px\");\r\n\t\tlistBox.setCheckmark(true);\r\n\t\tlistBox.setMultiple(false);\r\n\t\tlistBox.setParent(panelchildren);\r\n\t\tListhead listHead = new Listhead();\r\n\t\tlistHead.setParent(listBox);\r\n\t\tListheader listHeader = new Listheader(\"Projeto\");\r\n\t\tlistHeader.setParent(listHead);\r\n\r\n\t\t// Botões OK e Cancelar\r\n\t\tDiv div = new Div();\r\n\t\tdiv.setParent(panelchildren);\r\n\t\tdiv.setStyle(\"float: right;\");\r\n\t\tSeparator separator = new Separator();\r\n\t\tseparator.setParent(div);\r\n\t\tButton botaoOK = new Button(\"OK\");\r\n\t\tbotaoOK.addEventListener(\"onClick\", new EventListenerOK());\r\n\t\tbotaoOK.setWidth(\"100px\");\r\n\t\tbotaoOK.setStyle(\"margin-right: 5px\");\r\n\t\tbotaoOK.setParent(div);\r\n\t\tButton botaoCancelar = new Button(\"Cancelar\");\r\n\t\tbotaoCancelar.addEventListener(\"onClick\", new EventListenerCancelar());\r\n\t\tbotaoCancelar.setWidth(\"100px\");\r\n\t\tbotaoCancelar.setParent(div);\r\n\t}", "@PostConstruct\n\tprivate void init() {\n\t\tEntrada entr = new Entrada(\n\t\t\t\tnew Persona(\"Manuel\",\"Jimenex\",\"52422\",\"100000\",\"Cra 340\"),\n\t\t\t\t(new PreFactura(1l,new Date())), itemsService.lista());\n\t\t\n\t\tlistaEntrada.add(entr);\n\t}", "private void addComponents() {\n\t\t\n\t\t// prima riga di lettere\n\t\tfor (int i = 0; i < 10; i++)\n\t\t\tadd(letterLabel(i));\n\t\t\t\n\t\t/* la scacchiera ha l'oringine 0,0 in basso a sinistra\n\t\t * mentre la griglia si riempie di elementi dall'alto\n\t\t * percio' il for delle x (j) cresce mentre popoliamo le celle (bottoni)\n\t\t * mentre il for delle y (i) decresce man mano che passiamo di riga in riga */\n\t\tfor (int i = 7; i >= 0; i--)\n\t\t\tfor (int j = 0; j < 10; j++) {\n\t\t\t\tif (j == 0 || j == 9)\n\t\t\t\t\tadd(numberLabel(i + 1));\n\t\t\t\telse\n\t\t\t\t\tadd(buttons[j - 1][i]);\n\t\t\t}\n\t\t\n\t\t// ultima riga (uguale alla prima)\n\t\tfor (int i = 0; i < 10; i++)\n\t\t\tadd(letterLabel(i));\n\t}", "private void initData() {\n\t\tcomboBoxInit();\n\t\tinitList();\n\t}", "public CadastroComplemento() {\n initComponents();\n \n }", "public GUICarsApp() {\n initComponents();\n \n aList = new ArrayList<Object>();\n }", "public Composition(Components components) {\n this.components = components;\n N = new double[components.numComponents()];\n }", "public LlistaPistes() {\n _llistaPistes = new ArrayList();\n }", "public ListItems() {\n itemList = new ArrayList();\n }", "public Tmpenlaties() {\n initComponents();\n }", "public final void addToInitList() {\n\t\tEngine.getSingleton().addToInitList(this);\n\t}", "private void initialize()\n {\n this.setPreferredSize(new com.ulcjava.base.application.util.Dimension(549,426));\n this.add(getComboBox(), com.ulcjava.base.application.ULCBorderLayoutPane.NORTH);\n }", "public Portlets() \r\n {\r\n super();\r\n _portletList = new Vector();\r\n }", "@Override\r\n public void init() {\r\n setSize(370, 380);\r\n l1 = new List();\r\n l1.add(\"White\");\r\n l1.add(\"Gray\");\r\n l1.add(\"Dark Gray\");\r\n l1.add(\"Cyan\");\r\n l1.add(\"Black\");\r\n l1.add(\"Red\");\r\n l1.addItemListener(this);\r\n add(l1);\r\n // TODO start asynchronous download of heavy resources\r\n }", "@Override\n public void init() {\n // Perform initializations inherited from our superclass\n super.init();\n // Perform application initialization that must complete\n // *before* managed components are initialized\n // TODO - add your own initialiation code here\n \n // <editor-fold defaultstate=\"collapsed\" desc=\"Managed Component Initialization\">\n // Initialize automatically managed components\n // *Note* - this logic should NOT be modified\n try {\n _init();\n } catch (Exception e) {\n log(\"ListSemental Initialization Failure\", e);\n throw e instanceof FacesException ? (FacesException) e: new FacesException(e);\n }\n \n // </editor-fold>\n // Perform application initialization that must complete\n // *after* managed components are initialized\n // TODO - add your own initialization code here\n }", "public DLList() {\r\n init();\r\n }", "public OrganizeItemsPanel() {\n initComponents();\n// lastIndeks = catalogProducts.size();\n }", "private void initComponent() {\r\n\t\tjlHistory = new JList<String>(history.get());\r\n\t\tjlHistory.setLayoutOrientation(JList.VERTICAL);\r\n\t\tjlHistory.setVisibleRowCount(history.size());\r\n\t\t\r\n\t\tjspHistory = new JScrollPane(jlHistory);\r\n\t\t\r\n\t\tjbClose = new JButton(\"Close\");\r\n\t\tjbClose.addActionListener(new ActionListener() {\r\n\t\t\t@Override\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\r\n\t\t\t\tdispose();\r\n\t\t\t}\r\n\t\t});\t\r\n\t\t\r\n\t\tjbSave = new JButton(\"Save\");\r\n\t\tjbSave.addActionListener(new ActionListener() {\r\n\t\t\t@Override\r\n\t\t\tpublic void actionPerformed(ActionEvent evt) {\r\n\t\t\t\tsaveHistory();\r\n\t\t\t}\r\n\t\t});\r\n\t\t\r\n\t\t// Add the components\r\n\t\tsetLayout(new GridBagLayout());\r\n\t\tGridBagConstraints c = new GridBagConstraints();\r\n\r\n\t\tc.fill = GridBagConstraints.BOTH;\r\n\t\tc.gridx = 0;\r\n\t\tc.gridy = 0;\r\n\t\tc.gridwidth = 2;\r\n\t\tc.weightx = 1;\r\n\t\tc.weighty = 0.99;\r\n\t\tadd(jspHistory, c);\r\n\t\t\r\n\t\tc.fill = GridBagConstraints.VERTICAL;\r\n\t\tc.gridx = 0;\r\n\t\tc.gridy = 1;\r\n\t\tc.gridwidth = 1;\r\n\t\tc.weighty = 0.01;\r\n\t\tadd(jbSave, c);\t\t\r\n\t\t\r\n\t\tc.gridx = 1;\r\n\t\tc.gridy = 1;\r\n\t\tadd(jbClose, c);\r\n\t}", "public UrunListele() {\n initComponents();\n updateProductTable();\n this.setLocation(veriIslemleri.StartScreenLocation(this.getBounds().getSize()));\n }", "public Jahresrangliste() {\r\n\t\tLaeufe = new ArrayList<Lauf>();\r\n\t\tRennfahrer = new ArrayList<Fahrer>();\r\n\t}", "public void initialize() {\n\n list.add(user1);\n list.add(user2);\n list.add(user3);\n }", "public Lentejas() {\n initComponents();\n }" ]
[ "0.7522236", "0.7059854", "0.7059854", "0.705644", "0.69118863", "0.67304754", "0.6674681", "0.6670304", "0.6637488", "0.6612427", "0.65532047", "0.6506848", "0.6497704", "0.6481467", "0.6452172", "0.6449916", "0.6447648", "0.64285505", "0.6424458", "0.642304", "0.6417502", "0.6385758", "0.6378614", "0.63623875", "0.63612795", "0.6352721", "0.6348075", "0.63379025", "0.6337749", "0.6319622", "0.6277221", "0.62710124", "0.6266741", "0.6262705", "0.6241776", "0.6239936", "0.6236831", "0.62237763", "0.6206381", "0.6205836", "0.61952513", "0.61943376", "0.6189536", "0.6181214", "0.61796856", "0.61786735", "0.61769587", "0.61431575", "0.61421144", "0.61368644", "0.6134445", "0.6133097", "0.61302036", "0.6126687", "0.6122814", "0.6114433", "0.6112474", "0.6105254", "0.6101545", "0.6097404", "0.60911936", "0.60807437", "0.6079287", "0.60753655", "0.6075281", "0.6073671", "0.6065907", "0.606574", "0.6057351", "0.6057351", "0.6052913", "0.6047457", "0.6044345", "0.60404706", "0.6032013", "0.6023687", "0.60214764", "0.6019057", "0.60173714", "0.60114866", "0.60070443", "0.599887", "0.59978056", "0.5993735", "0.598741", "0.59796584", "0.5978115", "0.59773165", "0.597297", "0.5970557", "0.59681493", "0.59636265", "0.5952762", "0.59479713", "0.59459543", "0.59363496", "0.5935178", "0.5934393", "0.59232146", "0.5919926" ]
0.60918546
60
Initialise tous les components
public void initComponents() { Iterator<Component> itComponent = this.components.iterator(); while (itComponent.hasNext()) { itComponent.next().init(this); } Iterator<Script> itScript = this.scripts.iterator(); while (itScript.hasNext()) { itScript.next().init(this); } System.out.println(this.owner.id + " : " + this.components.toString() + " " + this.scripts.toString()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void initComponents() {\n\t\t\n\t}", "private void initComponents() {\n\t\t\n\t}", "private void initcomponent() {\n\r\n\t}", "public void init() {\n initComponents();\n initData();\n }", "private void initComponents()\n {\n //LAYOUT\n initLayoutComponents();\n \n //TRANSITION COMPONENTS\n initTransitionComponents();\n \n //SEARCH PANE COMPONENTS\n initSearchComponents();\n \n //RESULTS PANE COMPONENTS\n initResultComponents();\n \n // CRAWLER CONTROLS\n initCrawlerControlsComponents();\n \n // KEYWORD BAR\n initKeywordBarComponents();\n \n //WORKER CONTROLS\n initWorkerComponents();\n \n //URL COMPONENTS\n initURLMenuComponents();\n\n //BASE LAYOUT COMPONENTS\n initBaseLayout();\n }", "private void initComponent() {\n\t\taddGrid();\n\t\taddToolBars();\n\t}", "private void initComposants() {\r\n\t\tselectionMatierePanel = new SelectionMatierePanel(1);\r\n\t\ttableauPanel = new TableauPanel(1);\r\n\t\tadd(selectionMatierePanel, BorderLayout.NORTH);\r\n\t\tadd(tableauPanel, BorderLayout.SOUTH);\r\n\t\t\r\n\t}", "private void initComponents() {\n LOOGER.info(\"Get init components\");\n this.loadButton = new JButton(\"Load\");\n this.fillButton = new JButton(\"Fill\");\n this.deleteButton = new JButton(\"Delete\");\n this.setLayout(new FlowLayout());\n LOOGER.info(\"components exit\");\n }", "private void initComponents() {\r\n\t\temulator = new Chip8();\r\n\t\tpanel = new DisplayPanel(emulator);\r\n\t\tregisterPanel = new EmulatorInfoPanel(emulator);\r\n\t\t\r\n\t\tcontroller = new Controller(this, emulator, panel, registerPanel);\r\n\t}", "void inicializaComponentes(){\r\n\t\t\r\n\t\t//Botão com status\r\n\t\ttgbGeral = (ToggleButton) findViewById(R.id.tgbGeral);\r\n\t\ttgbGeral.setOnClickListener(this);\r\n\t\ttgbMovimento = (ToggleButton) findViewById(R.id.tgbMovimento);\r\n\t\ttgbMovimento.setOnClickListener(this);\r\n\t\ttgbfogo = (ToggleButton) findViewById(R.id.tgbFogo);\r\n\t\ttgbfogo.setOnClickListener(this);\r\n\r\n\t\t//botão\r\n\t\tbtnTemperatura = (Button) findViewById(R.id.btnTemperatura);\r\n\t\tbtnTemperatura.setOnClickListener(this);\r\n\t\t\r\n\t\t//label\r\n\t\ttxtLegenda = (TextView) findViewById(R.id.txtSensorLegenda);\r\n\t}", "private void initComponents() {\r\n\t\trand = new Random();\r\n\t\tfetchProfiles();\r\n\t\tgetPeopleFromFile();\r\n\t}", "public void initComponents();", "private void initComponents() {\r\n\r\n setLayout(new java.awt.BorderLayout());\r\n }", "private void initMyComponents() {\n this.jPanel1.setLayout(new BoxLayout(this.jPanel1, BoxLayout.Y_AXIS));\n this.jPanel1.add(controller.getPressureController().getEMeasureBasicView());\n this.jPanel1.add(controller.getTemperatureController().getEMeasureBasicView());\n this.controller.getPressureController().getListeners().add(this);\n this.controller.getTemperatureController().getListeners().add(this);\n this.jComboBox1.setModel(new DefaultComboBoxModel(FluidKind.values()));\n this.changeResponce();\n }", "private void initialize() {\r\n\t\t// set specific properties and add inner components.\r\n\t\tthis.setBorder(BorderFactory.createEtchedBorder());\r\n\t\tthis.setSize(300, 400);\r\n\t\tthis.setLayout(new BorderLayout());\r\n\t\taddComponents();\r\n\t}", "private void initComponents() {\n\n setLayout(new java.awt.BorderLayout());\n }", "public meseros() {\n initComponents();\n }", "public Cadastros() {\n initComponents();\n }", "private void init() {\n List<Contructor> list = servisContructor.getAllContructors();\n for (Contructor prod : list) {\n contructor.add(new ContructorViewer(prod));\n }\n\n Label label = new Label(\"Catalog Contructors\");\n label.setLayoutX(140);\n label.setLayoutY(20);\n label.setStyle(\"-fx-font-size:20px\");\n\n initTable();\n table.setLayoutX(120);\n table.setLayoutY(60);\n table.setStyle(\"-fx-font-size:16px\");\n\n GridPane control = new ControlPanel(this, 2).getPanel();\n control.setLayoutX(120);\n control.setLayoutY(300);\n\n panel.setAlignment(Pos.CENTER);\n panel.add(label, 0, 0);\n panel.add(table, 0, 1);\n panel.add(control, 0, 2);\n }", "public Ajuda() {\n initComponents();\n }", "public void InicializarComponentes() {\n campoCadastroNome = findViewById(R.id.campoCadastroNome);\n campoCadastroEmail = findViewById(R.id.campoCadastroEmail);\n campoCadastroSenha = findViewById(R.id.campoCadastroSenha);\n switchEscolhaTipo = findViewById(R.id.switchCadastro);\n botaoFinalizarCadastro = findViewById(R.id.botaoFinalizarCriacao);\n\n\n }", "public CadastroComplemento() {\n initComponents();\n \n }", "private void initComponents() {\n rootLayout = new Grid();\n rootLayout.setWidth(new Extent(100, Extent.PERCENT));\n rootLayout.setSize(2);\n add(rootLayout);\n Empsn_Label= new nextapp.echo2.app.Label();\n Empsn_Label.setText(\"N_TIME_BEAR.EMPSN\");\n rootLayout.add(Empsn_Label);\n \n Empsn_DscField = new dsc.echo2app.component.DscField();\n Empsn_DscField.setId(\"Empsn_DscField\");\n Empsn_DscField.setWidth(new Extent(4, Extent.CM));\n rootLayout.add(Empsn_DscField);\n \n\t}", "public Vencimientos() {\n initComponents();\n \n \n }", "public misTutores() {\n initComponents();\n }", "private void initCom() {\n lbNome = new JLabel(\"Nome: \");\n lbSenha = new JLabel(\"Senha: \");\n txNome = new JTextField();\n txSenha = new JTextField();\n layout = new GridBagLayout();\n panelFormulario = new JPanel(layout);\n\n }", "public TelaCadastro1() {\n \n initComponents();\n }", "public VComponente() {\n initComponents();\n }", "public Libros() {\n initComponents();\n }", "public Tmpenlaties() {\n initComponents();\n }", "public intrebarea() {\n initComponents();\n }", "private void initialize() {\r\n this.setSize(new Dimension(800,600));\r\n this.setContentPane(getJPanel());\r\n\r\n List<String> title = new ArrayList<String>();\r\n title.add(\"Select\");\r\n title.add(\"Field Id\");\r\n title.add(\"Field Name\");\r\n title.add(\"Field Type\");\r\n title.add(\"Image\");\r\n\r\n List<JComponent> componentList = new ArrayList<JComponent>();\r\n componentList.add(checkInit);\r\n componentList.add(fieldIdInit);\r\n componentList.add(filedNameInit);\r\n componentList.add(fieldTypeInit);\r\n componentList.add(imageButton);\r\n\r\n String []arrColumn = {\"SELECT\", \"FIELD_ID\", \"FIELD_NAME\", \"FIELD_TYPE\", \"FIELD_VALUE\"};\r\n String []arrTitle = {\"SELECT\", \"FIELD_ID\", \"FIELD_NAME\", \"FIELD_TYPE\", \"FIELD_VALUE\"};\r\n // init grid\r\n grid = new GridUtils(pageSheet, title, componentList, arrColumn, preButton, afterButton, 5, arrTitle);\r\n // set title\r\n grid.setPageInfo(pageInfoLbl);\r\n \r\n searchDetailList();\r\n \r\n initComboBox();\r\n \r\n setTitle(\"Page Select page\");\r\n\t}", "private void initilize()\n\t{\n\t\tdimXNet = project.getNoC().getNumRotX();\n\t\tdimYNet = project.getNoC().getNumRotY();\n\t\t\n\t\taddProperties();\n\t\taddComponents();\n\t\tsetVisible(true);\n\t}", "public Altas() {\n initComponents();\n }", "protected void initialize()\n {\n uiFactory.configureUIComponent(this, UI_PREFIX);\n\n initializeFields();\n initializeLabels();\n initLayout();\n }", "public Captura() {\n initComponents();\n }", "@Override\n\tpublic void init() {\n\t\tmaterialImages = new JButton[MaterialState.materialLibrary.size()];\n\t\tmaterialNames = new JLabel[MaterialState.materialLibrary.size()];\n\t\tmaterialAmounts = new JLabel[MaterialState.materialLibrary.size()];\n\t\tmaterialColours = new JLabel[MaterialState.materialLibrary.size()];\n\n\t\ttotalRating = 0;\n\t\ttotalToxic = 0;\n\t\ttotalNegative = 0;\n\t\ttotalDamage = 0;\n\n\t}", "public VPacientes() {\n initComponents();\n inicializar();\n }", "public Lentejas() {\n initComponents();\n }", "public static void init()\n {\n\n addShapeless();\n\n addShaped();\n }", "public void init() {\n \n }", "public AnaPencere() {\n initComponents();\n }", "private void initialize() {\n\t\tthis.setSize(430, 280);\n\t\tthis.setContentPane(getJContentPane());\n\t\tthis.setUndecorated(true);\n\t\tthis.setModal(true);\n\t\tthis.setBackground(new java.awt.Color(226,226,222));\n\t\tthis.setTitle(\"Datos del Invitado\");\n\t\tthis.addComponentListener(this);\n\t}", "public Janela01() {\n initComponents();\n }", "private void init (){\n ///compoennetes\n // cuadros de texto\n txCodigo = new JTextField(10);\n txNombre = new JTextField(10);\n // etiquetas\n lbCodigo = new JLabel(\"codigo: \");\n lbNombre = new JLabel(\"nombre: \");\n // boton \n btAcpetar = new JButton(\"aceptar\");\n btAcpetar.setToolTipText(\"realizar insert\");\n btAcpetar.addActionListener(this);\n // paneles contenedores\n JPanel pCodigo = new JPanel();\n JPanel pNombre = new JPanel();\n // cambio de layout\n BoxLayout bx = new BoxLayout(this.getContentPane(), BoxLayout.PAGE_AXIS);\n this.setLayout(bx);\n // annadir a los paneles\n pCodigo.add(lbCodigo);\n pCodigo.add(txCodigo);\n pNombre.add(lbNombre);\n pNombre.add(txNombre);\n // annadir al dialogo\n add(pCodigo);\n add(pNombre);\n add(btAcpetar);\n }", "private void init() {\n\t\tinitDesign();\n\t\tinitHandlers();\n\t}", "public cargamasiva() {\n initComponents();\n }", "public Conteo() {\n initComponents();\n }", "public Cadastro() {\n initComponents();\n }", "private void initialize() {\r\n label = new JLabel();\r\n panel = new JPanel();\r\n }", "private void instanciarComponentes() {\n\t\t\n\t\tpainelTopo = new JPanel(new FlowLayout());\n\t\tpainelTopo.setBackground(Color.LIGHT_GRAY);\n\t\tlbInicial = new JLabel(\"De: \");\n\t\tlbFinal = new JLabel(\"Até: \");\n\t\tlabelTabuadoDo = new JLabel(\"Tabuada do: \");\n\t\ttxtInicial = new JTextField(10);\n\t\ttxtFinal = new JTextField(10);\n\t\ttxtNumero = new JTextField(10);\n\t\tbuttonCalcular = new JButton(\"Calcular\");\n\t\tpainelCentro = new JPanel(new FlowLayout());\n\t}", "private void Initialize()\n {\n \tEcran = new Rectangle(Framework.gauche, Framework.haut, Framework.frameWidth\n\t\t\t\t- Framework.droite - Framework.gauche, Framework.frameHeight - Framework.bas\n\t\t\t\t- Framework.haut);\n\t\tCentreEcranX = (int)(Ecran.getWidth()/2);\n\t\tCentreEcranY = (int)(Ecran.getHeight()/2);\n\t\twidth = Ecran.getWidth();\n\t\theight = Ecran.getHeight();\t\t\n\t\tpH=height/768;\t\t\n\t\tpW=width/1366;\n\t\tObjets = new ArrayList<Objet>(); // Créer la liste chainée en mémoire\n\t\tMissiles = new ArrayList<Missile>(); // Créer la liste chainée en mémoire\n\t\tStations = new ArrayList<Station>(); // Créer la liste chainée en mémoire\n\t\tJoueurs = new ArrayList<Joueur>();\n\t\tlastTrajectoires = new ArrayList<Trajectoire>();\n\n\t\tDisposeAstres(Framework.niveauChoisi);\n\t\tstationCourante = Stations.get(0);\n\n\t\tetat = ETAT.PREPARATION;\n\t\tmouseClicked = mousePressed = mouseReleased = false;\n\t}", "public void init() {\n\t\t//initializing graphics area\n \tcanvas = new FacePamphletCanvas();\n \tadd(canvas);\n \t\n\t\taddInteractors();\n\t\taddActionListeners();\n }", "private void initialize() {\n\t\tjLabel3 = new JLabel();\n\t\tjLabel = new JLabel();\n\t\tthis.setLayout(null);\n\t\tthis.setBounds(new java.awt.Rectangle(0, 0, 486, 377));\n\t\tjLabel.setText(PluginServices.getText(this,\n\t\t\t\t\"Areas_de_influencia._Introduccion_de_datos\") + \":\");\n\t\tjLabel.setBounds(5, 20, 343, 21);\n\t\tjLabel3.setText(PluginServices.getText(this, \"Cobertura_de_entrada\")\n\t\t\t\t+ \":\");\n\t\tjLabel3.setBounds(6, 63, 190, 21);\n\t\tthis.add(jLabel, null);\n\t\tthis.add(jLabel3, null);\n\t\tthis.add(getLayersComboBox(), null);\n\t\tthis.add(getSelectedOnlyCheckBox(), null);\n\t\tthis.add(getMethodSelectionPanel(), null);\n\t\tthis.add(getResultSelectionPanel(), null);\n\t\tthis.add(getExtendedOptionsPanel(), null);\n\t\tconfButtonGroup();\n\t\tlayersComboBox.setSelectedIndex(0);\n\t\tinitSelectedItemsJCheckBox();\n\t\tdistanceBufferRadioButton.setSelected(true);\n\t\tlayerFieldsComboBox.setEnabled(false);\n\t\tverifyTypeBufferComboEnabled();\n\t}", "public TelaInicial() {\n initComponents();\n }", "public TelaInicial() {\n initComponents();\n }", "protected void initializeComponents() {\n\t\t/* Create fonts for information nodes */\n\t\tFont titleFont = Font.font(\"Arial\", FontWeight.BOLD, 18);\n\t\tFont descriptionFont = Font.font(\"Arial\", 14);\n\t\t/* Configure information nodes */\n\t\tconfigureTitle(titleFont);\n\t\tconfigureDescription(descriptionFont);\n\t\tconfigureIconContainer();\n\t\tconfigureWindow();\n\t\t/* set scene */\n\n\t\tgetContent().add(notificationContainer);\n\t}", "public xo() {\n initComponents();\n }", "@Override\n public void initComponent() {\n }", "@Override\n public void initComponent() {\n }", "public kunde() {\n initComponents();\n }", "public InicioSesion() {\n initComponents();\n\n }", "public void init(){\n \n }", "public empleado() {\n initComponents();\n }", "public void init()\n\t\t{\n\t\t\t//Makes Lists\n\t\t\tmakeLists();\n\n\t\t\t//layout for GUI\n\t\t\tGridLayout layout = new GridLayout(2,4, 5 ,5);\n\t\t\tsetLayout(layout);\n\n\t\t\t//add panels to window\n\t\t\tadd(Panel_1);\n\t\t\tadd(Panel_2);\n\t\t\tadd(Panel_3);\n\t\t\tadd(Panel_4);\n\n\t\t\t//create buttons\n\t\t\tCalculateButton = new JButton(\"Calculate\");\n\t\t ExitButton = new JButton(\"Exit\");\n\n\t\t\t//connect event handlers to buttons\n\t\t CalculateButton.addActionListener(new ButtonListener());\n\t\t ExitButton.addActionListener(new ButtonListener());\n\n\t\t\t//add buttons to window\n\t\t add(CalculateButton);\n\t\t add(ExitButton);\n\n\t\t //make window visible\n\t\t\tsetVisible(true);\n\t\t}", "private void initialize() {\r\n\t\tsetLabels();\r\n\t\tinitPoints();\r\n\t\tsetButtons();\r\n\t\tthis.setTitle(\"Digite os pesos dos pontos\");\r\n\t\tthis.setDefaultCloseOperation(WindowConstants.DISPOSE_ON_CLOSE);\r\n\t}", "public void initialize() {\n\n fechaDeLaVisita.set(LocalDate.now());\n\n if (medico.get() != null) {\n medico.get().clear();\n } else {\n medico.set(new Medico());\n }\n\n turnoVisita.set(\"\");\n visitaAcompanadaSN.set(false);\n lugarVisita.set(\"\");\n if (causa.get() != null) {\n causa.get().clear();\n } else {\n causa.set(new Causa());\n }\n\n if (promocion.get() != null) {\n promocion.get().clear();\n } else {\n promocion.set(new Promocion());\n }\n\n observacion.set(\"\");\n persistida.set(false);\n persistidoGraf.set(MaterialDesignIcon.SYNC_PROBLEM.graphic());\n\n fechaCreacion.set(LocalDateTime.now());\n\n }", "private void init() {\n\t\tcreateSubjectField();\n\t\tcreateTextField();\n\t\tcreateButton();\n\t\tsetupSubjectPanel();\n\t\tsetupToDoPanel();\n\n\t\tsetBorder(BorderFactory.createTitledBorder(\"To Do List\"));\n\t\tsetLayout(new BorderLayout());\n\t\tadd(pnlSubject, BorderLayout.NORTH);\n\t\tadd(scroll, BorderLayout.CENTER);\n\t\tadd(pnlButton, BorderLayout.SOUTH);\n\t}", "private void initialize() {\n\t\troot = new Group();\n\t\tgetProperties();\n\t\tsetScene();\n\t\tsetStage();\n\t\tsetGUIComponents();\n\t}", "private void initComponent() {\n\t\tmlistview=(ClickLoadListview) findViewById(R.id.ListView_hidden_check);\n\t\tChemicals_directory_search=(CustomFAB) findViewById(R.id.company_hidden_search);\n\t\tChemicals_directory_search.setVisibility(View.GONE);\n\t\ttopbar_com_name=(TopBarView) findViewById(R.id.topbar_com_name);\n\t\tsearch_chemical_name=(SearchInfoView) findViewById(R.id.search_chemical_name);\n\t}", "private void inicializarComponentes() \n\t{\n\t\tthis.table=new JTable(); \n\t\ttablas.setBackground(Color.white);\n\t\tscroll =new JScrollPane(table); // Scroll controla la tabla\n\t\tthis.add(scroll,BorderLayout.CENTER);\n\t\tthis.add(tablas,BorderLayout.NORTH);\n\t\t\n\t}", "public iDentistry() {\n initComponents();\n initMyComponents();\n }", "private void inicializarComponentes() {\n universidadesIncluidos = UniversidadFacade.getInstance().listarTodosUniversidadOrdenados();\n universidadesIncluidos.removeAll(universidadesExcluidos);\n Comunes.cargarJList(jListMatriculasCatastrales, universidadesIncluidos);\n }", "public void init() {\r\n\r\n\t}", "private void initComponents() {\n // Create the RGB and the HSB radio buttons.\n createRgbHsbButtons();\n\n \n \n ColorData initial = new ColorData(new RGB(255, 255, 255), 255);\n\n // Create the upper color wheel for the display.\n upperColorWheel = new ColorWheelComp(shell, this, upperWheelTitle);\n // upperColorWheel.setColor(colorArray.get(0));\n upperColorWheel.setColor(initial);\n\n // Create the color bar object that is displayed\n // in the middle of the dialog.\n colorBar = new ColorBarViewer(shell, this, sliderText, cmapParams);\n\n // Create the lower color wheel for the display.\n lowerColorWheel = new ColorWheelComp(shell, this, lowerWheelTitle);\n // lowerColorWheel.setColor(colorArray.get(colorArray.size() - 1));\n lowerColorWheel.setColor(initial);\n\n // Create the bottom control buttons.\n createBottomButtons();\n }", "@Override\r\n public void initComponent() {\n }", "public Oddeven() {\n initComponents();\n }", "public Calculadora() {\n initComponents();\n }", "public void init(){\n\t\t\n\t\t// Definition general de la fenetre\n\t\tthis.setLayout(new BorderLayout());\n\t\t\n\t\t/*********** PARTIE HAUTE *************/\n\t\t\n\t\t// JPanel qui va contenir l'interface de controle\n\t\tJPanel panH=new JPanel();\n\t\t\n\t\t// Ajout de la zone de saisie du mot binaire\n\t\tpanH.add(new JLabel(\"Mot binaire:\"));\n\t\tentree=new JTextField(\"1100110101\",10);\n\t\tpanH.add(entree);\n\t\t\n\t\t// Ajout de la liste de selection du codage\n\t\tcodage=new JComboBox();\n\t\tcodage.addItem(\"NRZ\");\n\t\tcodage.addItem(\"NRZI\");\n\t\tcodage.addItem(\"Manchester\");\n\t\tcodage.addItem(\"Manchester differentiel\");\n\t\tcodage.addItem(\"Miller\");\n\t\t\n\t\tpanH.add(codage);\n\t\t\n\t\t\n\t\t// Ajout du bouton d'execution du codage\n\t\tconvertir=new JButton(\"Convertir\");\n\t\tconvertir.addActionListener(new EcouteurBouton());\n\t\tpanH.add(convertir);\n\t\t\n\t\t\n\t\tadd(panH,BorderLayout.NORTH);\n\t\t\n\t\t\n\t\t/*********** PARTIE CENTRALE *************/\n\t\t\n\t\t// Ajout de la zone d'affichage de la solution\n\t\tzoneGraph=new Dessin();\n\t\tadd(zoneGraph);\n\t}", "public void initComponent(){\n\t\t\n\t\tpanelMiddle.setCaption(\"PROSES:\");\n\t\t\n\t\t//INIT COMPONENT BAWAH\t\n\t\tlabelNotes.setContentMode(ContentMode.HTML);\n\t\tlabelNotes.setValue(\"Notes: <br> Perubahan pada Calender Kerja akan mempengaruhi seluruh sistem <br>.\" );\n\t}", "public anakP() {\n initComponents();\n }", "private void initialize() {\r\n\t\r\n\t\tpanel = new JPanel();\r\n\t\tpanel.setBounds(0, 0, 300, 100);\r\n\t\tpanel.setLayout(null);\r\n\t\t\r\n\t\ttxtQas = new JTextField();\r\n\t\ttxtQas.setToolTipText(\"\");\r\n\t\ttxtQas.setBounds(124, 11, 166, 20);\r\n\t\tpanel.add(txtQas);\r\n\t\ttxtQas.setColumns(10);\r\n\t\t\r\n\t\tJLabel lblId = new JLabel(\"ID: \");\r\n\t\tlblId.setBounds(10, 14, 46, 14);\r\n\t\tpanel.add(lblId);\r\n\t\t\r\n\t\tbtnExcluirItem = new JButton(\"Excluir Item\");\r\n\t\tbtnExcluirItem.setBounds(10, 70, 99, 23);\r\n\t\tpanel.add(btnExcluirItem);\r\n\r\n\t}", "public TelaContaUnica() {\n initComponents();\n }", "public Opis() {\n initComponents();\n \n \n }", "public uitax() {\n initComponents();\n }", "public dokter() {\n initComponents();\n }", "private void initialize() {\n\tif (setup == false) {\n\t elementList.add(new GUISlider());\n\t elementList.add(new GUIChart());\n\t elementList.add(new GUIStatsDisplay());\n\t elementList.add(new GUIPID());\n\t elementList.add(new GUITimer());\n\t elementList.add(new GUINumericUpDown());\n\t setup = true;\n\t}\n }", "private void initActors() {\r\n\t\t// Prepare everything\r\n\t\tinitLabels();\r\n\t\tinitButtons();\r\n\t\t// Initialize our Actors\r\n\t\tinitTable();\r\n\t}", "private void criarComponentes() {\n\n add(criarPainelNorte(), BorderLayout.NORTH);\n add(criarPainelCentro(), BorderLayout.CENTER);\n add(criarPainelSul(), BorderLayout.SOUTH);\n }", "public ordenProduccion() {\r\n initComponents();\r\n }", "private void init(){\n panel_principal = new JPanel();\r\n panel_principal.setLayout(new BorderLayout());\r\n //EN EL NORTE IRA LA CAJA DE TEXTO\r\n caja = new JTextField();\r\n panel_principal.add(\"North\",caja);\r\n //EN EL CENTRO IRA EL PANEL DE BOTONES\r\n panel_botones = new JPanel();\r\n //El GRIDLAYOUT RECIBE COMO PARAMETROS:\r\n //FILAS,COLUMNAS ESPACIADO ENTRE FILAS,\r\n //ESPACIADO ENTRE COLUMNAS\r\n panel_botones.setLayout(new GridLayout(5,4,8,8));\r\n agregarBotones();\r\n panel_principal.add(\"Center\",panel_botones);\r\n //AGREGAMOS TODO EL CONTENIDO QUE ACABAMOS DE HACER EN\r\n //PANEL_PRINCIPAL A EL PANEL DEL FORMULARIO\r\n getContentPane().add(panel_principal);\r\n\r\n }", "public Saida() {\n initComponents();\n defaults();\n preencherTabela();\n \n }", "public Ablak() {\n initComponents();\n }", "@PostConstruct\r\n\tpublic void init() {\n\t\ttexto=\"Nombre : \";\r\n\t\topcion = 1;\r\n\t\tverPn = true;\r\n\t\ttipoPer = 1;\r\n\t\tsTipPer = \"N\";\r\n\t\tverGuar = true;\r\n\t\tvalBus = \"\";\r\n\t\tverCampo = true;\r\n\t\tread = false;\r\n\t\tgrabar = 0;\r\n\t\tcodCli = 0;\r\n\t\tcargarLista();\r\n\t}", "private void initComponents() {\n\t\tthis.setTitle(\"Boggle\");\n\t\tthis.setDefaultCloseOperation(EXIT_ON_CLOSE);\n\t\tthis.setMinimumSize(new Dimension(600, 575));\n\t\t\n\t\tinitMenuBar();\n\t\tinitDiceGridPanel();\n\t\tinitInputPanel();\n\t\tinitInfoPanel();\n\t\taddPanels();\n\t\t\n\t\tthis.setVisible(true);\n\t}", "public Interfaz() {\n initComponents();\n }", "public Interfaz() {\n initComponents();\n }", "public Interfaz() {\n initComponents();\n }", "public frmacceso() {\n initComponents();\n }", "private void init()\n\t{\n\t\tsetModel(new Model(Id.model, this, null));\n\t\tsetEnviroment(new Enviroment(Id.enviroment, this, model()));\n\t\tsetVaccinationCenter(new VaccinationCenter(Id.vaccinationCenter, this, model()));\n\t\tsetCanteen(new Canteen(Id.canteen, this, vaccinationCenter()));\n\t\tsetRegistration(new Registration(Id.registration, this, vaccinationCenter()));\n\t\tsetExamination(new Examination(Id.examination, this, vaccinationCenter()));\n\t\tsetVaccination(new Vaccination(Id.vaccination, this, vaccinationCenter()));\n\t\tsetWaitingRoom(new WaitingRoom(Id.waitingRoom, this, vaccinationCenter()));\n\t\tsetSyringes(new Syringes(Id.syringes, this, vaccination()));\n\t}" ]
[ "0.8220887", "0.8220887", "0.8019211", "0.79788685", "0.7886524", "0.78449225", "0.7690912", "0.7557128", "0.7463869", "0.7445563", "0.740579", "0.73586047", "0.73554504", "0.73541194", "0.73470414", "0.73400503", "0.73321235", "0.72963333", "0.7280608", "0.72696775", "0.72417647", "0.72236806", "0.7215035", "0.720724", "0.7197633", "0.7179423", "0.7168813", "0.7167452", "0.7165185", "0.71625763", "0.7160355", "0.71589285", "0.7156092", "0.71531963", "0.71385235", "0.7125038", "0.7124756", "0.7120668", "0.7105598", "0.70954466", "0.70939255", "0.7090202", "0.7084844", "0.70820165", "0.70792395", "0.70787334", "0.7078702", "0.70758563", "0.70754117", "0.7073175", "0.7071146", "0.70682806", "0.706762", "0.7061972", "0.7051832", "0.7051832", "0.70397365", "0.7039718", "0.70389426", "0.70389426", "0.7037344", "0.7022307", "0.70105606", "0.70057863", "0.70000917", "0.699901", "0.69968134", "0.6995868", "0.69901884", "0.6988934", "0.6987406", "0.69873077", "0.6985822", "0.6969992", "0.6969477", "0.69691944", "0.6967712", "0.6965919", "0.69632894", "0.69582516", "0.69543105", "0.6951225", "0.694974", "0.6945774", "0.6941429", "0.69360226", "0.6933466", "0.6930539", "0.6927892", "0.6923502", "0.69134563", "0.6912014", "0.69090736", "0.6907333", "0.6904069", "0.6904049", "0.6904049", "0.6904049", "0.69020015", "0.6901545" ]
0.7149726
34
/ Test adding item to basket
@Test public void testAddItemToBasket() throws Exception { BBBRequest request = BBBRequestFactory.getInstance().createAddBasketItemRequest(BOOK_BASKET_ITEM_ISBN); String expectedUrl = AccountHelper.constructUrl(BBBRequestFactory.getInstance().getHostBasket(), PATH_MY_BASKETS_ITEMS); assertEquals(expectedUrl, request.getUrl()); BBBResponse response = BBBRequestManager.getInstance().executeRequestSynchronously(request); if(response.getResponseCode() != HttpURLConnection.HTTP_OK) { fail("Error: "+response.toString()); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Then(\"^click on add to basket$\")\r\n\tpublic void click_on_add_to_basket() throws Throwable {\n\t\tverbose(\"***********************************************************\");\r\n\t\tAssert.assertTrue(navigate_rsc.addbasket());\r\n\t\tverbose(\"***********************************************************\");\r\n\t \r\n\t}", "@Test\n public void testAddItem() {\n \n System.out.println(\"AddItem\");\n \n /*ShoppingCart instance = new ShoppingCart();\n Product p1 = new Product(\"Galletas\", 1.2);\n Product p2 = new Product(\"Raton\", 85.6);\n Product p3 = new Product(\"Teclado\", 5.5);\n Product p4 = new Product(\"Monitor 4K\", 550.6);\n \n instance.addItem(p1);\n instance.addItem(p2);\n instance.addItem(p3);\n instance.addItem(p4);\n \n assertEquals(instance.getItemCount(), 4, 0.0);*/\n \n /*----------------------------------------------*/\n \n ShoppingCart instance = new ShoppingCart();\n Product p1 = new Product(\"Galletas\", 1.2);\n \n instance.addItem(p1);\n \n assertTrue(instance.findProduct(\"Galletas\"));\n \n }", "@Test\n\tpublic void testAddItem() throws IOException{\n\t\tModel.addItem(item, amount + \"\");\n\t\tassertEquals(amount + \"\", Model.hash.get(item));\n\t\t\n\t}", "public static int addToBasket(Basket basket, String item, int quantity) {\n StockItem stockItem = stockList.get(item);\n if(stockItem == null) {\n System.out.println(\"We don't sell \" + item);\n return 0;\n }\n if(stockList.reserveStock(item, quantity) != 0) {\n basket.addToBasket(stockItem, quantity);\n return quantity;\n }\n return 0;\n }", "@Test \n\tpublic void testGetBasketItem() throws Exception {\n\t\tBBBBasket basket = AccountHelper.getInstance().getBasket();\n\t\t\n\t\tif(basket == null || basket.items == null || basket.items.length < 1) {\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tString id = basket.items[0].id;\n\t\t\n\t\tBBBRequest request = BBBRequestFactory.getInstance().createGetBasketItemRequest(id);\n\t\tString expectedUrl = AccountHelper.constructUrl(BBBRequestFactory.getInstance().getHostBasket(), String.format(PATH_MY_BASKETS_ITEMS_, id) );\n\t\tassertEquals(expectedUrl, request.getUrl());\n\t\t\n\t\tBBBResponse response = BBBRequestManager.getInstance().executeRequestSynchronously(request);\n\t\tbasketItemHandler.receivedResponse(response);\n\t}", "@Test\n public void addToCart() throws Exception {\n\n ReadableProducts product = super.readyToWorkProduct(\"addToCart\");\n assertNotNull(product);\n\n PersistableShoppingCartItem cartItem = new PersistableShoppingCartItem();\n cartItem.setProduct(product.getId());\n cartItem.setQuantity(1);\n\n final HttpEntity<PersistableShoppingCartItem> cartEntity =\n new HttpEntity<>(cartItem, getHeader());\n final ResponseEntity<ReadableShoppingCart> response =\n testRestTemplate.postForEntity(\n String.format(\"/api/v1/cart/\"), cartEntity, ReadableShoppingCart.class);\n\n // assertNotNull(response);\n // assertThat(response.getStatusCode(), is(CREATED));\n\n }", "@Test\n\tpublic void testAddProductToCart() {\n\t\tdouble startBalance = cart.getBalance();\n\t\tassertEquals(0,startBalance,0.01);\n\t\t\n\t\t\n\t\t\t // 4. CHECK NUM ITEMS IN CART BEFORE ADDING PRODUCT\n\t\t\t // \t\t - PREV NUM ITEMS\n\t\t\n\t\tint StartingNumItems = cart.getItemCount();\n\t\tassertEquals(0,StartingNumItems);\n\t\t\n\t\t\t // 5. ADD THE PRODUCT TO THE CART \n\t\tcart.addItem(phone);\n\t\t\n\t\t\t // 6. CHECK THE UPDATED NUMBER OF ITEMS IN CART \n\t\t\t // \t\t-- EO: NUM ITEMS + 1\n\t\tassertEquals(StartingNumItems + 1, cart.getItemCount());\n\t\t\t // -----------------------\n\t\t\t // 7. CHECK THE UPDATED BALANCE OF THE CART\n\t\t\t // \t\t-- EO: PREVIOUS BALANCE + PRICE OF PRODUCT\n\t\t\n\t\tdouble expectedBalance = startBalance + phone.getPrice();\n\t\t\n\t\tassertEquals(expectedBalance,cart.getBalance(),0.01);\n\t\t\n\t\t\n\t\t\n\t}", "public void addToBasket(Product product){\n\n Purchaseitem purchaseitem = new Purchaseitem();\n purchaseitem.setProduct(product.getId());\n purchaseitem.setProductByProduct(product);\n boolean toAdd = false;\n if(basket.isEmpty()){\n purchaseitem.setQuantity(1);\n basket.add(purchaseitem);\n }else {\n for(int i = 0; i < basket.size(); i++){\n if(basket.get(i).getProduct() == product.getId()){\n basket.get(i).setQuantity(basket.get(i).getQuantity() + 1);\n return;\n } else {\n purchaseitem.setQuantity(1);\n toAdd = true;\n }\n }\n }\n if(toAdd){\n basket.add(purchaseitem);\n }\n }", "@Test\n\tpublic void addProductToCartFromCategoryDrop() {\n\t}", "void add(Item item);", "@Test\n\tpublic void testAddingItemsToShoppingCart() {\n\t\tShoppingCartAggregate shoppingCartAggregate = storeFrontService.getStoreFront()\n\t\t\t\t.getShoppingCounter(SHOPPING_COUNTER_NAME).get().startShoppingCart(CUSTOMER_NAME);\n\n\t\ttry {\n\t\t\tshoppingCartAggregate.addToCart(TestProduct.phone.getProductId(), new BigDecimal(1));\n\t\t\tshoppingCartAggregate.addToCart(TestProduct.phoneCase.getProductId(), new BigDecimal(2));\n\t\t} catch (InsufficientStockException e) {\n\t\t\tfail(\"Inventory check failed while adding a product in shopping cart\");\n\t\t}\n\n\t\tPurchaseOrderAggregate purchaseOrderAggregate = shoppingCartAggregate.checkoutCart();\n\t\tassertNotNull(purchaseOrderAggregate);\n\n\t\tPurchaseOrder purchaseOrder = purchaseOrderAggregate.getPurchaseOrder();\n\t\tassertNotNull(purchaseOrder);\n\n\t\tassertEquals(2, purchaseOrder.getOrderItems().size());\n\n\t\tassertEquals(ShoppingCart.CartStatus.CHECKEDOUT, shoppingCartAggregate.getShoppingCart().getCartStatus());\n\t}", "@Test\n void addItem() {\n }", "@Test\n public void verifyAppleOfferApplied() {\n \tProduct product = new Product(\"Apple\", 0.2);\n \tBasket basket = new Basket();\n \tbasket.getProducts().put(product, 5);\n \tassertTrue(\"Have to get the price of 3 items = 0.6 ==> \", \n \t\t\tDouble.compare(calculator.calculatePrice(basket), 0.6) == 0);\n }", "@Test\n\tpublic void addProductToCartAndEmailIt() {\n\t}", "@Override\n\tpublic Basket addBasket(Basket basket) {\n\t\treturn br.save(basket);\n\t}", "@Test\n public void verifyNewOfferIsApplied() {\n \tProduct product = new Product(\"Watermelon\", 0.8);\n \tProduct product2 = new Product(\"Apple\", 0.2);\n \tProduct product3 = new Product(\"Orange\", 0.5);\n \tOffer offer = new Offer(product3, 5, product3.getPrice());\n \tConfigurations.offers.add(offer);\n \tBasket basket = new Basket();\n \tbasket.getProducts().put(product, 6);\n \tbasket.getProducts().put(product2, 4);\n \tbasket.getProducts().put(product3, 5);\n \tassertTrue(\"Have to get the price of 15 items = 5.6 ==> \", (calculator.calculatePrice(basket) - 5.6) < 0.0001);\n }", "@Test\n void addItem() {\n\n }", "private void add(GroceryItem itemObj, String itemName) {\n\t\tbag.add(itemObj);\n\t\tSystem.out.println(itemName + \" added to the bag.\");\n\t}", "@Test\n\tpublic void testAddBook() {\n\t\t//System.out.println(\"Adding book to bookstore...\");\n\t\tstore.addBook(b5);\n\t\tassertTrue(store.getBooks().contains(b5));\n\t\t//System.out.println(store);\n\t}", "public void add() {\n\t\tcart.add(item.createCopy());\n\t}", "@Test(groups = \"suite2-2\")\n\tpublic void addItemToCart() {\n\t\tdriver = new FirefoxDriver();\n\n\t\tdriver.get(CART_URL);\n\t\tWebDriverWait wait = new WebDriverWait(driver, 10);\n\n\t\ttry {\n\t\t\twait.until(ExpectedConditions.presenceOfElementLocated(By\n\t\t\t\t\t.xpath(\"/HTML/BODY/DIV[@id=\\\"content\\\"]/DIV[@id=\\\"primary\\\"]/DIV[@id=\\\"checkout\\\"]/DIV[@id=\\\"newempty\\\"]/DIV\")));\n\t\t} catch (NoSuchElementException e) {\n\t\t\tfail(\"Cart should be empty\");\n\t\t}\n\n\t\t// Find the button to do the search inside treasury objects\n\t\tWebElement searchButton = wait\n\t\t\t\t.until(ExpectedConditions.elementToBeClickable(By\n\t\t\t\t\t\t.xpath(\"/HTML/BODY/DIV[@id=\\\"header\\\"]/DIV[@id=\\\"navigation-group\\\"]/FORM[@id=\\\"search-bar\\\"]/DIV/BUTTON[@id=\\\"search_submit\\\"]\")));\n\n\t\t// Find the text input field to do the search\n\t\tWebElement searchField = driver\n\t\t\t\t.findElement(By\n\t\t\t\t\t\t.xpath(\"/HTML/BODY/DIV[@id=\\\"header\\\"]/DIV[@id=\\\"navigation-group\\\"]/FORM[@id=\\\"search-bar\\\"]/DIV/INPUT[@id=\\\"search-query\\\"]\"));\n\t\t// Search key\n\t\tsearchField.sendKeys(\"hat\");\n\n\t\tsearchButton.click();\n\n\t\tWebElement itemToBuy = wait\n\t\t\t\t.until(ExpectedConditions.elementToBeClickable(By\n\t\t\t\t\t\t.xpath(\"/HTML/BODY/DIV[@id=\\\"content\\\"]/DIV/DIV/DIV/DIV[@id=\\\"primary\\\"]/UL/LI[1]/A\")));\n\n\t\titemToBuy.click();\n\n\t\tWebElement addToCartButton = wait\n\t\t\t\t.until(ExpectedConditions.elementToBeClickable(By\n\t\t\t\t\t\t.xpath(\"/HTML/BODY/DIV[@id=\\\"content\\\"]/DIV/DIV/DIV/DIV[2]/DIV[1]/DIV[2]/DIV[3]/DIV[1]/FORM/SPAN/SPAN/INPUT\")));\n\n\t\taddToCartButton.click();\n\n\t\tWebElement itemInCartMessage = driver\n\t\t\t\t.findElement(By\n\t\t\t\t\t\t.xpath(\"/HTML/BODY/DIV[@id=\\\"content\\\"]/DIV[@id=\\\"primary\\\"]/DIV[@id=\\\"checkout\\\"]/DIV[@id=\\\"checkout-header\\\"]/H1\"));\n\n\t\tassertEquals(itemInCartMessage.getText().trim().substring(0, 1), \"1\",\n\t\t\t\t\"1 item expected in cart\");\n\t}", "public void addItem() {\n\t\tScanner scanner = new Scanner(System.in);\n\t\tSystem.out.print(\"Enter Item Name: \");\n\t\tString itemName = scanner.nextLine();\n\t\tSystem.out.print(\"Enter Item Description: \");\n\t\tString itemDescription = scanner.nextLine();\n\t\tSystem.out.print(\"Enter minimum bid price for item: $\");\n\t\tdouble basePrice = scanner.nextDouble();\n\t\tLocalDate createDate = LocalDate.now();\n\t\tItem item = new Item(itemName, itemDescription, basePrice, createDate);\n\t\taddItem(item);\n\t}", "@Test\r\n\tpublic void testAddPurchaseOrder() {\r\n\t\tassertNotNull(\"Test if there is valid purchase order list to add to\", purchaseOrder);\r\n\r\n\t\tpurchaseOrder.add(o1);\r\n\t\tassertEquals(\"Test that if the purchase order list size is 1\", 1, purchaseOrder.size());\r\n\r\n\t\tpurchaseOrder.add(o2);\r\n\t\tassertEquals(\"Test that if purchase order size is 2\", 2, purchaseOrder.size());\r\n\t}", "public void AddToCartListPage(String Item){\r\n\t\tString Addtocartlistitem = getValue(Item);\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:- Addtocartlist should be Added\");\r\n\t\ttry{\r\n\t\t\twaitForElement(locator_split(\"BylnkFavListAddToCart\"));\r\n\t\t\tclickObjectByMatchingPropertyValue(locator_split(\"BylnkFavListAddToCart\"),propId,Addtocartlistitem);\r\n\t\t\twaitForPageToLoad(20);\r\n\t\t\tSystem.out.println(\"Addtocartlist is Added.\");\r\n\t\t\tReporter.log(\"PASS_MESSAGE:- Addtocartlist is Added\");\r\n\t\t}\r\n\t\tcatch(Exception e){\r\n\t\t\tReporter.log(\"FAIL_MESSAGE:- Addtocartlist is not Added\");\r\n\t\t\tthrow new NoSuchElementException(\"The element with\"\r\n\t\t\t\t\t+ elementProperties.getProperty(\"BylnkFavListAddToCart\").toString().replace(\"By.\", \" \")\r\n\t\t\t\t\t+ \" not found\");\r\n\t\t}\r\n\t}", "public void addBasketItem(BasketItem newItem) {\n \n // If the sku already exists in the basket then update the quantity\n for(BasketItem item : basketItems) {\n if(item.getVariant().getSku().equals(newItem.getVariant().getSku())) {\n item.setQuantity(newItem.getQuantity() + item.getQuantity());\n return;\n }\n }\n \n // If the sku wasn't found above then add it to the basket\n basketItems.add(newItem);\n }", "@Test\n\tpublic void testAddItem() {\n\t\tassertEquals(\"testAddItem(LongTermTest): valid enter failure\", 0, ltsTest.addItem(item4, 10)); //can enter\n\t\tassertEquals(\"testAddItem(LongTermTest): invalid available capacity after adding\", 900, ltsTest.getAvailableCapacity());\n\t\tassertEquals(\"testAddItem(LongTermTest): invalid item count after adding\", 10, ltsTest.getItemCount(item4.getType()));\n\n\t\tassertEquals(\"testAddItem(LongTermTest): invalid enter failure\", -1, ltsTest.addItem(item4, 100)); // can't enter\n\t\tassertEquals(\"testAddItem(LongTermTest): invalid available capacity after adding\", 900, ltsTest.getAvailableCapacity());\n\t\tassertEquals(\"testAddItem(LongTermTest): invalid item count after adding\", 10, ltsTest.getItemCount(item4.getType()));\n\t}", "@Test(dependsOnMethods = {\"searchItem\"})\n\tpublic void purchaseItem() {\n\t\tclickElement(By.xpath(item.addToCar));\n\t\twaitForText(By.id(item.cartButton), \"1\");\n\t\tclickElement(By.id(item.cartButton));\n\t\t// on checkout screen validating the title and price of item is same as what we selected on search result page by text.\n\t\tAssert.assertTrue(isPresent(locateElement(By.xpath(item.priceLocator(price)))));\n\t\tAssert.assertTrue(isPresent(locateElement(By.xpath(item.titlelocator(title)))));\t\n\t}", "@Test\r\n\tvoid testaddProductToCart() throws Exception\r\n\t{\r\n\t\tCart cart=new Cart();\r\n\t\tcart.setProductId(1001);\r\n\t\tcartdao.addProductToCart(cart);\r\n\t\tList<Cart> l=cartdao.findAllProductsInCart();\r\n\t\tassertEquals(1,l.size());\r\n\t}", "public void doShopping(IBasket basket,IArchiveBasket archiveBasket);", "public int addItem(Item i);", "@Test\n\tpublic void testAddInventory() throws InventoryException {\n\t\tcoffeeMaker.addInventory(\"4\",\"7\",\"0\",\"9\");\n\t}", "@Test\n void testAdding100Items() {\n Inventory inventory = new Inventory();\n int itemsToAdd = 100;\n\n assertEquals(0, inventory.getItems(\"\").size());\n\n for (int i = 0; i < itemsToAdd; i++) {\n inventory.addItem(\"XXXXXXXX\" + String.format(\"%02d\", i), \"Name\", 20.00, i);\n }\n\n assertEquals(100, inventory.getItems(\"\").size());\n }", "public void testCreate() {\n TCreate_Return[] Baskets_create_out = basketService.create(new TCreate_Input[] { Basket_in });\n assertNoError(Baskets_create_out[0].getError());\n\n assertNull(\"No FormErrors\", Baskets_create_out[0].getFormErrors());\n assertEquals(\"created?\", true, Baskets_create_out[0].getCreated());\n assertNotNull(\"Path not null\", Baskets_create_out[0].getPath());\n BasketPath = Baskets_create_out[0].getPath();\n }", "@Test\n public void testAddGetItem() throws Exception {\n String itemName = \"Snickers\";\n Item item = new Item(itemName);\n item.setItemPrice(new BigDecimal(\"2.75\"));\n item.setItemStock(10);\n\n // ACT - add/get the item from the DAO\n testDao.addItem(itemName, item);\n Item retrievedItem = testDao.getItem(itemName);\n\n // ASSERT - Check that the data is equal\n assertEquals(item.getItemName(),\n retrievedItem.getItemName(),\n \"Checking Item Name.\");\n assertEquals(item.getItemPrice(),\n retrievedItem.getItemPrice(),\n \"Checking Item Price.\");\n assertEquals(item.getItemStock(),\n retrievedItem.getItemStock(),\n \"Checking Item Stock.\");\n }", "@Test\n public void validAdd1() {\n assertEquals(i3, isl.get(2));\n\n //checks the amount of ingredient 4\n assertEquals(2.39, ((Ingredient) isl.get(3)).amountNeed, 0);\n assertEquals(1.01, ((Ingredient) isl.get(3)).amountHave, 0);\n\n //add an ingredient that is already present in the list\n //the amount should be added to the current amount 2.39 + 0.45 = 2.84\n //ignores the fact that category and unit don't match\n assertFalse(isl.add(new Ingredient(\"vANiLle\", \"niks\", 0.45, 0.69, \"none\")));\n assertEquals(2.84, ((Ingredient) isl.get(3)).amountNeed, 0.00001);\n assertEquals(1.7, ((Ingredient) isl.get(3)).amountHave, 0.00001);\n assertEquals(\"kruiden\", ((Ingredient) isl.get(3)).category);\n assertEquals(Unit.GRAMS, ((Ingredient) isl.get(3)).unit);\n\n //add a new ingredient and check if it's added correctly\n assertTrue(isl.add(new Ingredient(\"cookies\", \"yum\", 3, 4, \"none\")));\n assertEquals(\"cookies\", isl.get(5).name);\n assertEquals(\"yum\", ((Ingredient) isl.get(5)).category);\n assertEquals(3, ((Ingredient) isl.get(5)).amountNeed, 0);\n assertEquals(4, ((Ingredient) isl.get(5)).amountHave, 0);\n assertEquals(Unit.NONE, ((Ingredient) isl.get(5)).unit);\n }", "public void add(int index){\n int i = 0;\n boolean isFound = false;\n for (Product product:inventory.getProducts().keySet())\n {\n i++;\n if (i == index && inventory.getProducts().get(product) > 0)\n {\n if (myBasket.containsKey(product))\n {\n System.out.println(\"One more of this product added.\");\n myBasket.replace(product , myBasket.get(product) + 1);\n }\n else {\n System.out.println(\"Product added to your basket.\");\n myBasket.put(product , 1);\n }\n totalCost = totalCost + product.getPrice();\n isFound = true;\n inventory.updateStock(product , '-');\n }\n }\n if (!isFound)\n System.out.println(\"Sorry. Invalid index or not enough product in stock!\");\n }", "public void adding() {\n\t\t By cr=By.xpath(\"//a[@href=\\\"/cart?add&itemId=EST-2\\\"]\"); \r\n\t\tWebElement we_cr=wt.ElementToBeClickable(cr, 20);\r\n\t\twe_cr.click();\r\n\t}", "public abstract void addItem(AbstractItemAPI item);", "@Test\n public void testAddProduct() {\n }", "@Test\n public void addOrderTest() {\n Orders orders = new Orders();\n orders.addOrder(order);\n\n Order test = orders.orders.get(0);\n String[] itemTest = test.getItems();\n String[] priceTest = test.getPrices();\n\n assertEquals(items, itemTest);\n assertEquals(prices, priceTest);\n }", "@Test\n public void canAddBookToLibrary(){\n library.add(book);\n assertEquals(1, library.countBooks());\n }", "@Test\n public void testAddItem() throws Exception {\n System.out.println(\"addItem\");\n Orcamentoitem orcItem = null;\n EJBContainer container = javax.ejb.embeddable.EJBContainer.createEJBContainer();\n OrcamentoService instance = (OrcamentoService)container.getContext().lookup(\"java:global/classes/OrcamentoService\");\n instance.addItem(orcItem);\n container.close();\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 verifyWatermelonOfferApplied() {\n \tProduct product = new Product(\"Watermelon\", 0.8);\n \tBasket basket = new Basket();\n \tbasket.getProducts().put(product, 7);\n \tassertTrue(\"Have to get the price of 7 items = 4 ==> \", \n \t\t\tDouble.compare(calculator.calculatePrice(basket), 4) == 0);\n }", "@Test\n\tpublic void testAddToCart() {\n\t}", "@Test\n void checkBidAddedAfterSubscribeBidding(){\n tradingSystem.subscriberBidding(NofetID,NconnID,storeID,1,2950,1);\n boolean added=false;\n for (Bid b:store.getBids()\n ) {\n if(b.getProductID()==1&&b.getUserID()==NofetID&&b.getPrice()==2950&&b.getQuantity()==1){\n added=true;\n }\n }\n assertTrue(added);\n }", "@Before\n public void setUp() {\n Basket_in = new TCreate_Input();\n Basket_up = new TUpdate_Input();\n BasketAttr_in = new TAttribute(\"IsAddressOK\", \"1\", null, null);\n BasketAttr_up = new TAttribute(\"IsAddressOK\", \"0\", null, null);\n Address_in = new TAddressNamed();\n\n // init input address data\n Address_in.setEMail(\"[email protected]\");\n Address_in.setFirstName(\"Klaus\");\n Address_in.setLastName(\"Klaussen\");\n Address_in.setCity(\"Klausdorf\");\n Address_in.setZipcode(\"08151\");\n Address_in.setCountryID(BigInteger.valueOf(276));\n Address_in.setStreet(\"Musterstraße 2\");\n Address_in.setStreet2(\"Ortsteil Niederfingeln\");\n Address_in.setAttributes(new TAttribute[] { new TAttribute(\"JobTitle\", \"best Job\", null, null),\n new TAttribute(\"Salutation\", \"Dr.\", null, null), });\n\n Address_up = Address_in;\n // just update some fields\n Address_up.setFirstName(\"Hans\");\n Address_up.setLastName(\"Hanssen\");\n Address_up.setStreet(\"Musterstraße 2b\");\n Address_up.setStreet2(\"Ortsteil Oberfingeln\");\n\n Basket_in.setBillingAddress(Address_in);\n\n Basket_in.setAttributes(new TAttribute[] { BasketAttr_in });\n TLineItemContainerIn lineItemContainer = new TLineItemContainerIn();\n lineItemContainer.setCurrencyID(\"EUR\");\n lineItemContainer.setPaymentMethod(\"PaymentMethods/Invoice\");\n lineItemContainer.setShippingMethod(\"ShippingMethods/Express\");\n lineItemContainer.setTaxArea(\"/TaxMatrixGermany/\\\"non EU\\\"\");\n lineItemContainer.setTaxModel(\"gross\");\n String productGuid = productService.getInfo(new String[]{\"Products/ho_1112105010\"}, new String[]{\"GUID\"})[0].getAttributes()[0].getValue();\n assertNotNull(productGuid);\n lineItemContainer.setProductLineItems(new TProductLineItemIn[] { new TProductLineItemIn(productGuid, (float) 10) });\n Basket_in.setLineItemContainer(lineItemContainer);\n\n // init order update data\n Basket_up.setBillingAddress(Address_up);\n Basket_up.setAttributes(new TAttribute[] { BasketAttr_up });\n\n // delete the test order if it exists\n TExists_Return[] Baskets_exists_out = basketService.exists(new String[] { BasketPath });\n if (Baskets_exists_out[0].getExists()) {\n TDelete_Return[] Baskets_delete_out = basketService.delete(new String[] { BasketPath });\n assertNoError(Baskets_delete_out[0].getError());\n }\n }", "@Test \n\tpublic void saveItemTest() throws Exception {\n\t\tItemDTO aItemDto = catalogService.createItem(itemDto);\n\t\tassertNotNull(aItemDto);\n\t\tassertEquals(itemDto,aItemDto);\n\t}", "@Test\n public void verifyOffersApplied() {\n \tProduct product = new Product(\"Watermelon\", 0.8);\n \tProduct product2 = new Product(\"Apple\", 0.2);\n \tProduct product3 = new Product(\"Orange\", 0.5);\n \tBasket basket = new Basket();\n \tbasket.getProducts().put(product, 6);\n \tbasket.getProducts().put(product2, 4);\n \tbasket.getProducts().put(product3, 5);\n \tassertTrue(\"Have to get the price of 15 items = 6.1 ==> \", (calculator.calculatePrice(basket) - 6.1) < 0.0001);\n }", "public void clickAddTopping(int itemIndex, ItemCart item);", "public synchronized void pdp_AddToBag() throws Exception {\n\n\t\t// Code to remove focus from zoomed image on page load\n\t\tif (!Utils.isDeviceMobile()) {\n\t\t\tActions actions = new Actions(driver);\n\t\t\tactions.moveToElement(productPrice()).build().perform();\n\t\t}\n\n\t\tutils.scrollToViewElement(driver, pdp_btn_AddToBag());\n\n\t\t// Handling Pop-Up that sometimes over shadows the ADD TO BAG button in mobile\n\t\tif (Utils.isDeviceMobile())\n\t\t\thandleBounceXOnPDP();\n\n\t\tpdp_btn_AddToBag().click();\n\t\t// Thread.sleep(3000);\n\n\t\tif (!utils.brand.equals(\"LGFP\"))\n\t\t\tAssert.assertTrue(utils.isElementPresent(driver, \"PDP_continueShopping\"),\n\t\t\t\t\t\"Item Added To Bag modal not displayed in mobile\");\n\t}", "@Test\r\n\tpublic void testAddSong() {\r\n\t\taLibrary.addItem(song1);\r\n\t\tassertTrue(aLibrary.containsItem(song1));\r\n\t\tassertFalse(aLibrary.containsItem(song2));\r\n\t\tassertTrue(aList.getView().getItems().contains(song1));\r\n\t\tassertFalse(aList.getView().getItems().contains(song2));\r\n\t}", "public void addToInventory() {\r\n\t\tdo {\r\n\t\t\tint quantity = 0;\r\n\t\t\tString brand = getToken(\"Enter washer brand: \");\r\n\t\t\tString model = getToken(\"Enter washer model: \");\r\n\t\t\tWasher washer = store.searchWashers(brand + model);\r\n\t\t\tif (washer == null) {\r\n\t\t\t\tSystem.out.println(\"No such washer exists.\");\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t\tquantity = getInteger(\"Enter quantity to add: \");\r\n\t\t\tboolean result = store.addWasherToInventory(brand, model, quantity);\r\n\t\t\tif(result) {\r\n\t\t\t\tSystem.out.println(\"Added \" + quantity + \" of \" + washer);\r\n\t\t\t}else {\r\n\t\t\t\tSystem.out.println(\"Washer could not be added to inventory.\");\r\n\t\t\t}\r\n\t\t\t\r\n\t\t} while (yesOrNo(\"Add more washers to the inventory?\"));\r\n\t}", "void createItem (String name, String description, double price);", "@Override\n\tpublic void addItems(Session session){\n\t\ttry{\n\t\t\tSystem.out.print(\"+++++++++++Add items here+++++++++++\\n\");\n\t\t\t//scanner class allows the admin to enter his/her input\n\t\t\tScanner scanner = new Scanner(System.in);\n\t\t\t//read input item id, name, price and quantity\n\t\t\tSystem.out.print(\"Enter Item Id: \");\n\t\t\tint itemId = scanner.nextInt();\n\n\t\t\tSystem.out.print(\"Enter Item Name without space: \");\n\t\t\tString itemName = scanner.next();\n\n\t\t\tSystem.out.print(\"Enter Item Type without space: \");\n\t\t\tString itemType = scanner.next();\n\n\t\t\tSystem.out.print(\"Enter Item Price: \");\n\t\t\tString itemPrice = scanner.next();\n\n\t\t\tSystem.out.print(\"Enter Item Quantity: \");\n\t\t\tint itemQuantity = scanner.nextInt();\n\t\t\t//pass these input items to client controller\n\t\t\tsamp=mvc.addItems(session,itemId,itemName,itemType,itemPrice,itemQuantity);\n\t\t\tSystem.out.println(samp);\n\t\t}\n\t\tcatch(Exception e){\n\t\t\tSystem.out.println(\"Online Market App- Add Items Exception: \" +e.getMessage());\n\t\t}\n\t}", "@Test\n public void testGetItemCount() {\n \n System.out.println(\"GetItemCount\");\n \n ShoppingCart instance = new ShoppingCart();\n Product p1 = new Product(\"Galletas\", 1.2);\n \n instance.addItem(p1);\n \n assertEquals(instance.getItemCount(), 1, 0.0);\n \n Product p2 = new Product(\"Raton\", 85.6);\n Product p3 = new Product(\"Teclado\", 5.5);\n \n instance.addItem(p2);\n instance.addItem(p3);\n \n assertEquals(instance.getItemCount(), 3, 0.0);\n \n \n }", "public void addItemToSale(String productId, int quantity) {\r\n if (productId.isEmpty()) {\r\n System.out.println(\"Class CashRegister, method addItemToSale\");\r\n System.out.println(\"product id is missing - enter valid product id\");\r\n System.exit(1);\r\n }\r\n if (quantity <= 0) {\r\n System.out.println(\"Class CashRegister, method addItemToSale\");\r\n System.out.println(\"quantity is less than or equal to 0 - enter valid quantity\");\r\n System.exit(1);\r\n }\r\n FakeDatabase db = new FakeDatabase();\r\n Product product = db.findProduct(productId);\r\n\r\n if (product != null) { //product found in database\r\n receipt.addLineItem(product, quantity);\r\n } else {\r\n System.out.println(\"Class CashRegister, method addItemToSale\");\r\n System.out.println(\"product id not found in database - enter valid product id\");\r\n System.exit(1);\r\n }\r\n }", "public boolean add(Type item);", "@Test\n\tpublic void getCostForDuplicateItem() {\n\t\tfinal BasketItemImpl bi = new BasketItemImpl();\n\t\tbi.addBasketItem(\"banana\", 2);\n\t\tbi.addBasketItem(\"banana\", 4);\n\t\tbi.addBasketItem(\"lemon\", 3);\n\n\t\tfinal int fc = bi.getAllBasketItems().get(\"banana\");\n\t\tassertTrue(Integer.compare(6, fc) == 0);\n\n\t}", "@When(\"^: Add them to the cart$\")\r\n\tpublic void add_them_to_the_cart() throws Throwable {\n\t\tobj.search();\r\n\t}", "@Test\r\n\tpublic void testMakePurchase_enough_money() {\r\n\t\tVendingMachineItem test = new VendingMachineItem(\"test\", 10.0);\r\n\t\tvendMachine.addItem(test, \"A\");\r\n\t\tvendMachine.addItem(test, \"C\");\r\n\t\tvendMachine.insertMoney(10.0);\r\n\t\tassertEquals(true, vendMachine.makePurchase(\"A\"));\r\n\t}", "@Test\r\n public void testAddInventory() throws InventoryException {\r\n coffeeMaker.addInventory(\"4\", \"7\", \"0\", \"9\");\r\n coffeeMaker.addInventory(\"0\", \"0\", \"0\", \"0\");\r\n coffeeMaker.addInventory(\"3\", \"6\", \"9\", \"12\"); // this should not fail\r\n coffeeMaker.addInventory(\"10\", \"10\", \"10\", \"10\");// this should not fail\r\n }", "@Test\r\n\tpublic void testAddItem_not_occupied() {\r\n\t\tVendingMachineItem test = new VendingMachineItem(\"test\", 10.0);\r\n\t\tvendMachine.addItem(test, \"A\");\r\n\t\tassertEquals(test, vendMachine.getItem(\"A\"));\r\n\t}", "@Test\r\n public void testAdd() {\r\n Grocery entry1 = new Grocery(\"Mayo\", \"Dressing / Mayo\", 1, 2.99f, 1);\r\n System.out.println(entry1.toString());\r\n // Initial state\r\n assertEquals(0, instance.size());\r\n assertFalse(instance.contains(entry1));\r\n\r\n instance.add(entry1);\r\n\r\n // Test general case (size)\r\n assertEquals(1, instance.size());\r\n\r\n // Test general case (content)\r\n assertTrue(instance.contains(entry1));\r\n\r\n // Test combined quantity case\r\n // Test that matching ignores letter case\r\n// int initialQuantity = entry1.getQuantity();\r\n int diff = 1;\r\n// int newQuantity = initialQuantity + diff;\r\n Grocery duplicate = new Grocery(entry1.getName().toLowerCase(),\r\n entry1.getCategory());\r\n duplicate.setQuantity(diff);\r\n instance.add(duplicate);\r\n System.out.println(instance.toString());\r\n // and ? do we test anything here?\r\n }", "@Test void addIngredientZero()\n {\n }", "public int addItem(Itemset i);", "@Test\n public void shoppingListSavesLocally() throws Exception {\n }", "@Test\n public void testAddItem() throws Exception {\n\n Tracker tracker = new Tracker();\n\n String action = \"0\";\n String yes = \"y\";\n String no = \"n\";\n\n String name = \"task1\";\n String desc = \"desc1\";\n String create = \"3724\";\n\n Input input = new StubInput(new String[]{action, name, desc, create, yes});\n new StartUI(input).init(tracker);;\n\n for (Item item : tracker.getAll()) {\n if (item != null) {\n Assert.assertEquals(item.getName(), name);\n }\n }\n\n }", "void addProduct(Product product);", "public abstract void add(T item) throws RepositoryException;", "@Override\n public void addItem(P_CK t) {\n \n }", "@Test\n public void TestUserChipsSoldOut()\n {\n List<Coin> aBagOfCoins = new ArrayList<Coin>();\n aBagOfCoins.add(new Quarter());\n aBagOfCoins.add(new Quarter());\n /*productManager.Setup( m => m.GetProductCount(It.IsAny<Chips>())).Returns(0);\n var deposited = vendingController.Post(new VendingRequest()\n {\n BagOfCoins = aBagOfCoins,\n });\n var result = vendingController.Post(new VendingRequest()\n {\n Empty = false,\n Selection = new Chips().Type(),\n });*/\n VendingResponse result = new VendingResponse();\n assertThat(result.Message, Is.is(ModelValues.SOLD_OUT));\n }", "@Test\n public void testFindProduct() {\n ShoppingCart instance = new ShoppingCart();\n Product p1 = new Product(\"Galletas\", 1.2);\n Product p2 = new Product(\"Raton\", 85.6);\n \n instance.addItem(p1);\n instance.addItem(p2);\n \n assertTrue(instance.findProduct(\"Galletas\"));\n }", "@Test\n public void testSave() throws Exception {\n System.out.println(\"save\");\n Item item = new Item(1L, new Category(\"name\", \"code\", \"description\"), \n new Shop(new Date(), \"12345\", \"Pepe perez\", \"Tienda\", \"Nit\", \"Natural\"), new Date(), \"name\", 20.0);\n \n \n// Item result = itemDAO.save(item);\n// Assert.assertNotNull(result);\n // TODO review the generated test code and remove the default call to fail.\n \n }", "public boolean addItem(Item item) throws RemoteException, ClassNotFoundException, SQLException {\n Connection conn = DBConnection.getConnection();\n PreparedStatement stm = conn.prepareStatement(\"Insert into Item values(?,?,?,?)\");\n Object[] itemData = {item.getCode(), item.getDescription(), item.getUnitPrice(), item.getQtyOnHand()};\n for (int i = 0; i < itemData.length; i++) {\n stm.setObject(i + 1, itemData[i]);\n }\n return stm.executeUpdate() > 0;\n }", "public void addItem(Item item){\n if(ChronoUnit.DAYS.between(LocalDate.now(), item.getBestBefore()) <= 2){\n //testInfoMessage = true; //ONLY FOR TESTING\n infoMessage(item.getName(), item.getBestBefore()); // DISABLE FOR TESTING\n }\n itemList.add(item);\n totalCost += item.getPrice();\n }", "public void addProduct(Product product);", "@Test(expected = InsufficientStockException.class)\n\tpublic void testInventoryCheckOnAddingItemsToShoppingCart() throws InsufficientStockException {\n\t\tShoppingCartAggregate shoppingCartAggregate = storeFrontService.getStoreFront()\n\t\t\t\t.getShoppingCounter(SHOPPING_COUNTER_NAME).get().startShoppingCart(CUSTOMER_NAME);\n\n\t\tBigDecimal orderQuantity = TestProductInventory.iphoneInventory.getAvailableStock().add(new BigDecimal(1));\n\t\tshoppingCartAggregate.addToCart(TestProduct.phone.getProductId(), orderQuantity);\n\n\t}", "@Test\r\n\tpublic void test() {\n\t\tString serverUrl = \"https://openapi.kaola.com/router\";\r\n\t\tString accessToken = \"a2d50342-d6c9-4bff-9329-ab289904cf68\";\r\n\t\tString appKey = \"3526616f2ecf2beeceac7f7a940dce41\";\r\n\t\tString appSecret = \"afab22a1e6124bbd93179adb37188fe5a9cdbc5d78dc1631be2d6a4efc896c83\";\r\n\t\tDefaultKaolaClient client = new DefaultKaolaClient(serverUrl, accessToken, appKey, appSecret);\r\n\r\n\t\tItemAddRequest request = (ItemAddRequest) ObjectFieldManager.pushValues(new ItemAddRequest(), createAddItemRequest());\r\n\t\tSystem.out.println(JsonUtils.toJson(request));\r\n\t\tItemAddResponse response = client.execute(request);\r\n\t\tSystem.out.println(JsonUtils.toJson(response));\r\n\t}", "public void addProduct(Product item)\n {\n stock.add(item);\n }", "@Test\r\n public void testPurchaseBeverage() {\r\n coffeeMaker.addRecipe(recipe1);\r\n assertEquals(25, coffeeMaker.makeCoffee(0, 75));\r\n assertEquals(0, coffeeMaker.makeCoffee(0, 50));\r\n }", "public static void addOrderedItem() {\n\t\tSystem.out.print(\"\\t\\t\");\n\t\tSystem.out.println(\"************Adding ordered item************\");\n\t\tOrderManager orderManager = new OrderManager();\n\t\tList listOfOrders = orderManager.viewOrder();\n\n\t\tOrderedItemManager orderedItemManager = new OrderedItemManager();\n\t\tList listOfOrderedItems = null;\n\n\t\tItemManager itemManager = new ItemManager();\n\t\tList listOfItems = itemManager.onStartUp();\n\n\t\tint i = 0;\n\t\tint choice = 0;\n\t\tOrder order = null;\n\t\tItem item = null;\n\t\tOrderedItem orderedItem = null;\n\t\tboolean check = false;\n\t\tScanner sc = new Scanner(System.in);\n\n\t\tif (listOfOrders.size() == 0) {\n\t\t\tSystem.out.print(\"\\t\\t\");\n\t\t\tSystem.out.format(\"%-25s:\", \"TASK STATUS\");\n\t\t\tSystem.out.println(\"There is no orders!\");\n\t\t\treturn;\n\t\t}\n\n\t\tif (listOfItems.size() == 0) {\n\t\t\tSystem.out.print(\"\\t\\t\");\n\t\t\tSystem.out.format(\"%-25s:\", \"TASK STATUS\");\n\t\t\tSystem.out.println(\"There is no items!\");\n\t\t\treturn;\n\t\t}\n\n\t\ttry {\n\t\t\tSystem.out.println();\n\t\t\t// print the list of orders for the user to select from.\n\t\t\tfor (i = 0; i < listOfOrders.size(); i++) {\n\t\t\t\torder = (Order) listOfOrders.get(i);\n\t\t\t\tSystem.out.print(\"\\t\\t\");\n\n\t\t\t\tSystem.out.println((i + 1) + \") Order: \" + order.getId()\n\t\t\t\t\t\t+ \" | Table: \" + order.getTable().getId());\n\t\t\t}\n\t\t\tSystem.out.println();\n\t\t\tSystem.out.print(\"\\t\\t\");\n\n\t\t\tSystem.out.print(\"Select an order to add the item ordered: \");\n\t\t\tchoice = Integer.parseInt(sc.nextLine());\n\n\t\t\torder = (Order) listOfOrders.get(choice - 1);\n\n\t\t\tdo {\n\t\t\t\tfor (i = 0; i < listOfItems.size(); i++) {\n\t\t\t\t\titem = (Item) listOfItems.get(i);\n\t\t\t\t\tSystem.out.print(\"\\t\\t\");\n\n\t\t\t\t\tSystem.out.println((i + 1) + \") ID: \" + item.getId()\n\t\t\t\t\t\t\t+ \" | Name: \" + item.getName() + \" | Price: $\"\n\t\t\t\t\t\t\t+ item.getPrice());\n\t\t\t\t}\n\t\t\t\tSystem.out.print(\"\\t\\t\");\n\t\t\t\tSystem.out.println((i + 1) + \") Done\");\n\t\t\t\tSystem.out.println();\n\t\t\t\tSystem.out.print(\"\\t\\t\");\n\n\t\t\t\tSystem.out.print(\"Select an item to add into order: \");\n\t\t\t\tchoice = Integer.parseInt(sc.nextLine());\n\n\t\t\t\tif (choice != (i + 1)) {\n\t\t\t\t\titem = (Item) listOfItems.get(choice - 1);\n\n\t\t\t\t\torderedItem = new OrderedItem();\n\t\t\t\t\torderedItem.setItem(item);\n\t\t\t\t\torderedItem.setOrder(order);\n\t\t\t\t\torderedItem.setPrice(item.getPrice());\n\n\t\t\t\t\torder.addOrderedItem(orderedItem);\n\n\t\t\t\t\tcheck = orderedItemManager.createOrderedItem(orderedItem);\n\n\t\t\t\t\tif (check) {\n\t\t\t\t\t\tSystem.out.print(\"\\t\\t\");\n\t\t\t\t\t\tSystem.out.format(\"%-25s:\", \"TASK UPDATE\");\n\t\t\t\t\t\tSystem.out\n\t\t\t\t\t\t\t\t.println(\"Item added into order successfully!\");\n\t\t\t\t\t}\n\n\t\t\t\t\telse {\n\t\t\t\t\t\tSystem.out.print(\"\\t\\t\");\n\t\t\t\t\t\tSystem.out.format(\"%-25s:\", \"TASK STATUS\");\n\t\t\t\t\t\tSystem.out.println(\"Failed to add item into order!\");\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t} while (choice != (i + 1));\n\n\t\t}\n\n\t\tcatch (Exception e) {\n\t\t\tSystem.out.print(\"\\t\\t\");\n\t\t\tSystem.out.format(\"%-25s:\", \"TASK STATUS\");\n\t\t\tSystem.out.println(\"Invalid Input!\");\n\t\t}\n\t\tSystem.out.print(\"\\t\\t\");\n\t\tSystem.out.println(\"************End of adding items************\");\n\t}", "public void AddtoCart(int id){\n \n itemdb= getBooksById(id);\n int ids = id;\n \n for(Books k:itemdb){ \n System.out.println(\"Quantity :\"+k.quantity); \n if (k.quantity>0){\n newcart.add(ids);\n System.out.println(\"Added to cartitem list with bookid\"+ ids);\n setAfterBuy(ids);\n System.out.println(\"Quantity Updated\");\n setCartitem(newcart);\n System.out.println(\"setCartitem :\"+getCartitem().size());\n System.out.println(\"New cart :\"+newcart.size());\n test.add(k);\n }\n else{\n System.out.println(\"Quantity is not enough !\");\n }\n }\n setBookcart(test);\n }", "@Test\n\tpublic void getCostForItem() {\n\t\tfinal BasketItemImpl bi = new BasketItemImpl();\n\t\tbi.addBasketItem(\"banana\", 2);\n\t\tbi.addBasketItem(\"lemon\", 3);\n\n\t\tfinal int fc = bi.getAllBasketItems().get(\"banana\");\n\t\tassertTrue(Integer.compare(2, fc) == 0);\n\n\t}", "@Test\n public void createBasket(){\n BasketRepositoryImpl basketRepository=new BasketRepositoryImpl(basketCrudRepository);\n // basketRepository.save(basket);\n var response= basketRepository.findByProductId(\"11\");\n System.out.println(response.toString());\n }", "@Test\n\tpublic void testAddWrong() throws ApiException {\n\t\t\n\t\t\n\n\n\t\tOrderItemPojo order_item = getWrongOrderItemPojo(products.get(0));\n\t\tList<OrderItemPojo> lis = new ArrayList<OrderItemPojo>();\n\t\tlis.add(order_item);\n\n\t\ttry {\n\t\t\torder_service.add(lis);\n\t\t\tfail(\"ApiException did not occur\");\n\t\t} catch (ApiException e) {\n\t\t\tassertEquals(e.getMessage(), \"Quantity must be positive\");\n\t\t}\n\n\t}", "@Override\n public void insertIntoAuthBooks(long cartid, long itemid) {\n wishListRepository.insertIntoAuthBooks(cartid, itemid);\n\n }", "@Then(\"the product is added to my cart\")\n\t\tpublic void the_product_is_added_to_my_cart() throws Exception {\n\n\t\t\t//Waits for the cart page to load\n\t\t\tdriver.manage().timeouts().implicitlyWait(120, TimeUnit.SECONDS);\n\t\t\tcartElement = driver.findElement(By.xpath(itemSacola)).getText();\n\t\t\t\n\t\t\t//Verify that the product on the shopping cart is the correct one\n\t\t\tAssert.assertEquals(cartElement, TituloFinal);\n\n\t\t\t// Take snapshot as evidence\n\t\t\tFunctions.takeSnapShot(driver, null);\n\t\t}", "@Test\n public void testRemoveItem() throws Exception {\n \n System.out.println(\"RemoveItem\");\n \n /*ShoppingCart instance = new ShoppingCart();\n Product p1 = new Product(\"Galletas\", 1.2);\n Product p2 = new Product(\"Raton\", 85.6);\n Product p3 = new Product(\"Teclado\", 5.5);\n Product p4 = new Product(\"Monitor 4K\", 550.6);\n \n instance.addItem(p1);\n instance.addItem(p2);\n instance.addItem(p3);\n instance.addItem(p4);\n \n try{\n \n instance.removeItem(p1);\n \n } catch(Exception e){\n \n fail(\"No existe\");\n \n }*/\n \n /*---------------------------------------------*/\n \n ShoppingCart instance = new ShoppingCart();\n Product p1 = new Product(\"Galletas\", 1.2);\n \n instance.addItem(p1);\n \n try{\n \n instance.removeItem(p1);\n \n } catch(Exception e){\n \n assertTrue(instance.isEmpty());\n \n }\n \n }", "@Test\n void showStoreHistorySuccess() {\n Integer productID1 = store.getProductID(\"computer\");\n tradingSystem.AddProductToCart(EconnID,storeID, productID1,5);\n tradingSystem.subscriberPurchase(EuserId, EconnID, \"123456\",\"4\",\"2022\",\"123\",\"123456\",\"Rager\",\"Beer Sheva\",\"Israel\",\"123\");\n List<DummyShoppingHistory> list = store.ShowStoreHistory();\n assertEquals(list.size(), 1);\n assertTrue(list.get(0).getProducts().get(0).getProductName().equals(\"computer\"));\n }", "void addFruit(Fruit item){\n\t\tfruitList.add(item);\n\t}", "Cart addToCart(String productCode, Long quantity, String userId);", "void add(T item);", "@Test\n public void verifyNoOfferApplied() {\n \tProduct product = new Product(\"Watermelon\", 0.8);\n \tProduct product2 = new Product(\"Apple\", 0.2);\n \tProduct product3 = new Product(\"Orange\", 0.5);\n \tBasket basket = new Basket();\n \tbasket.getProducts().put(product, 2);\n \tbasket.getProducts().put(product2, 1);\n \tbasket.getProducts().put(product3, 5);\n \tassertTrue(\"Have to get the price of 8 items = 4.3 ==> \", (calculator.calculatePrice(basket) - 4.3) < 0.0001);\n }", "@Test(expected = VendingMachineException.class)\r\n\tpublic void testAddItem_already_occupied() {\r\n\t\tVendingMachineItem test = new VendingMachineItem(\"test\", 10.0);\r\n\t\tvendMachine.addItem(test, \"A\");\r\n\t\tVendingMachineItem test2 = new VendingMachineItem(\"test\", 10.0);\r\n\t\tvendMachine.addItem(test2, \"A\");\r\n\r\n\t}", "@Test(dependsOnMethods = \"checkSiteVersion\")\n public void createNewOrder() {\n actions.openRandomProduct();\n\n // save product parameters\n actions.saveProductParameters();\n\n // add product to Cart and validate product information in the Cart\n actions.addToCart();\n actions.goToCart();\n actions.validateProductInfo();\n\n // proceed to order creation, fill required information\n actions.proceedToOrderCreation();\n\n // place new order and validate order summary\n\n // check updated In Stock value\n }", "public void addItem(SoldItem item) {\n\n items.add(item);\n log.debug(\"Added \" + item.getName() + \" quantity of \" + item.getQuantity());\n\n }", "@Test\n public void getItem() {\n Item item = new Item();\n item.setName(\"Drill\");\n item.setDescription(\"Power Tool\");\n item.setDaily_rate(new BigDecimal(\"24.99\"));\n item = service.saveItem(item);\n\n // Copy the Item added to the mock database using the Item API method\n Item itemCopy = service.findItem(item.getItem_id());\n\n // Test the getItem() API method\n verify(itemDao, times(1)).getItem(item.getItem_id());\n TestCase.assertEquals(itemCopy, item);\n }", "@Test \n\tpublic void testGetBasket() throws Exception {\n\t\tBBBRequest request = BBBRequestFactory.getInstance().createGetBasketRequest();\n\t\t\n\t\tString expectedUrl = AccountHelper.constructUrl(BBBRequestFactory.getInstance().getHostBasket(), PATH_MY_BASKETS);\n\t\tassertEquals(expectedUrl, request.getUrl());\n\t\t\n\t\tBBBResponse response = BBBRequestManager.getInstance().executeRequestSynchronously(request);\n\t\tbasketHandler.receivedResponse(response);\n\t}", "@Override\n\t@RequestMapping(value=ZuelControllerValue.Manage+\"addItem\")\n\tpublic ZuelResult addItem(TbItem item) {\n\t\treturn service.addItem(item);\n\t}", "@Test void addIngredientBoundary()\n {\n }" ]
[ "0.7638219", "0.7412803", "0.7269644", "0.7044094", "0.6967302", "0.69509816", "0.6940419", "0.69289917", "0.6896751", "0.68956304", "0.68359053", "0.6825949", "0.67878205", "0.675983", "0.6749824", "0.6747619", "0.6743207", "0.66962034", "0.66835463", "0.6674203", "0.6631549", "0.6629393", "0.6561255", "0.65611875", "0.65521264", "0.6550265", "0.6550174", "0.65426797", "0.6540933", "0.65378577", "0.6524992", "0.6511534", "0.6508481", "0.64962167", "0.6489134", "0.64875144", "0.6482294", "0.6479213", "0.6478375", "0.6477657", "0.6472632", "0.64590263", "0.6452828", "0.64527583", "0.6443535", "0.64324546", "0.642603", "0.64140666", "0.6411723", "0.64059937", "0.6387696", "0.6368229", "0.63511664", "0.6348922", "0.6347681", "0.63430184", "0.6340448", "0.63315946", "0.63301915", "0.6329931", "0.6321346", "0.6318748", "0.63176775", "0.63173306", "0.631367", "0.63130754", "0.63024557", "0.62926054", "0.629025", "0.62900877", "0.6281102", "0.6273143", "0.6258676", "0.6257601", "0.6257029", "0.6252119", "0.62480724", "0.6245514", "0.6219519", "0.62130004", "0.62116194", "0.62095153", "0.61991566", "0.6196021", "0.61932087", "0.619073", "0.6190413", "0.61879325", "0.6186934", "0.6183838", "0.61822474", "0.61757576", "0.61729795", "0.61725366", "0.6171755", "0.6169694", "0.61664516", "0.61651886", "0.61651474", "0.6160859" ]
0.80988383
0
/ Test getting the users basket
@Test public void testGetBasket() throws Exception { BBBRequest request = BBBRequestFactory.getInstance().createGetBasketRequest(); String expectedUrl = AccountHelper.constructUrl(BBBRequestFactory.getInstance().getHostBasket(), PATH_MY_BASKETS); assertEquals(expectedUrl, request.getUrl()); BBBResponse response = BBBRequestManager.getInstance().executeRequestSynchronously(request); basketHandler.receivedResponse(response); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test \n\tpublic void testGetBasketItem() throws Exception {\n\t\tBBBBasket basket = AccountHelper.getInstance().getBasket();\n\t\t\n\t\tif(basket == null || basket.items == null || basket.items.length < 1) {\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tString id = basket.items[0].id;\n\t\t\n\t\tBBBRequest request = BBBRequestFactory.getInstance().createGetBasketItemRequest(id);\n\t\tString expectedUrl = AccountHelper.constructUrl(BBBRequestFactory.getInstance().getHostBasket(), String.format(PATH_MY_BASKETS_ITEMS_, id) );\n\t\tassertEquals(expectedUrl, request.getUrl());\n\t\t\n\t\tBBBResponse response = BBBRequestManager.getInstance().executeRequestSynchronously(request);\n\t\tbasketItemHandler.receivedResponse(response);\n\t}", "@Then(\"^view basket$\")\r\n\tpublic void view_basket() throws Throwable {\n\t\tverbose(\"***********************************************************\");\r\n\t\tAssert.assertTrue(navigate_rsc.viewbasket());\r\n\t\tverbose(\"***********************************************************\");\r\n\t \r\n\t}", "@GetMapping(\"/baskets\")\n\tpublic ResponseEntity<List<Basket>> getBasketsOfUser(@RequestParam String email) {\n\t\tfinal User user = userservice.getUser(email);\n\t\treturn ResponseEntity.ok(userservice.selectBasketsOfUser(user));\n\t}", "public void doShopping(IBasket basket,IArchiveBasket archiveBasket);", "@Test \n\tpublic void testAddItemToBasket() throws Exception {\n\t\tBBBRequest request = BBBRequestFactory.getInstance().createAddBasketItemRequest(BOOK_BASKET_ITEM_ISBN);\n\t\t\n\t\tString expectedUrl = AccountHelper.constructUrl(BBBRequestFactory.getInstance().getHostBasket(), PATH_MY_BASKETS_ITEMS);\n\t\tassertEquals(expectedUrl, request.getUrl());\n\t\t\n\t\tBBBResponse response = BBBRequestManager.getInstance().executeRequestSynchronously(request);\n\t\t\n\t\tif(response.getResponseCode() != HttpURLConnection.HTTP_OK) {\n\t\t\tfail(\"Error: \"+response.toString());\n\t\t}\n\t}", "@Test\n public void TestUserChipsSoldOut()\n {\n List<Coin> aBagOfCoins = new ArrayList<Coin>();\n aBagOfCoins.add(new Quarter());\n aBagOfCoins.add(new Quarter());\n /*productManager.Setup( m => m.GetProductCount(It.IsAny<Chips>())).Returns(0);\n var deposited = vendingController.Post(new VendingRequest()\n {\n BagOfCoins = aBagOfCoins,\n });\n var result = vendingController.Post(new VendingRequest()\n {\n Empty = false,\n Selection = new Chips().Type(),\n });*/\n VendingResponse result = new VendingResponse();\n assertThat(result.Message, Is.is(ModelValues.SOLD_OUT));\n }", "@GetMapping(\"/get/{id}\")\n @ApiOperation(value = \"Retrieve Basket\",response = CustomResponseEntity.class)\n public ResponseEntity<Object> getBasket(@RequestParam @ApiParam(value = \"ID of User\") Long userId) throws UserException, SQLException {\n userService.findUserById(userId);\n CustomResponseEntity customResponseEntity = basketService.getBasket(userId);\n return new ResponseEntity<>(customResponseEntity, HttpStatus.OK);\n }", "public static int checkout(Basket basket) {\n\t\tfor (Map.Entry<StockItem, Integer> item : basket.Items().entrySet()) {\n\t\t\tString itemName = item.getKey().getName();\n\t\t\tStockItem stockItem = stockList.get(itemName);\n\t\t\tif (stockItem == null) {\n\t\t\t\tSystem.out.println(\"We don't sell \" + itemName);\n\t\t\t\treturn 0;\n\t\t\t}\n\t\t\tstockList.sellStock(itemName);\n\t\t}\n\t\tbasket.clear();\n\t\treturn 0;\n\t}", "@Test\n void showStoreHistorySuccess() {\n Integer productID1 = store.getProductID(\"computer\");\n tradingSystem.AddProductToCart(EconnID,storeID, productID1,5);\n tradingSystem.subscriberPurchase(EuserId, EconnID, \"123456\",\"4\",\"2022\",\"123\",\"123456\",\"Rager\",\"Beer Sheva\",\"Israel\",\"123\");\n List<DummyShoppingHistory> list = store.ShowStoreHistory();\n assertEquals(list.size(), 1);\n assertTrue(list.get(0).getProducts().get(0).getProductName().equals(\"computer\"));\n }", "@Test\n public void verifyOffersApplied() {\n \tProduct product = new Product(\"Watermelon\", 0.8);\n \tProduct product2 = new Product(\"Apple\", 0.2);\n \tProduct product3 = new Product(\"Orange\", 0.5);\n \tBasket basket = new Basket();\n \tbasket.getProducts().put(product, 6);\n \tbasket.getProducts().put(product2, 4);\n \tbasket.getProducts().put(product3, 5);\n \tassertTrue(\"Have to get the price of 15 items = 6.1 ==> \", (calculator.calculatePrice(basket) - 6.1) < 0.0001);\n }", "@Test\n public void verifyAppleOfferApplied() {\n \tProduct product = new Product(\"Apple\", 0.2);\n \tBasket basket = new Basket();\n \tbasket.getProducts().put(product, 5);\n \tassertTrue(\"Have to get the price of 3 items = 0.6 ==> \", \n \t\t\tDouble.compare(calculator.calculatePrice(basket), 0.6) == 0);\n }", "@Test\n public void TestUserCandySoldOut()\n {\n List<Coin> aBagOfCoins = new ArrayList<Coin>();\n aBagOfCoins.add(new Quarter());\n aBagOfCoins.add(new Quarter());\n aBagOfCoins.add(new Dime());\n aBagOfCoins.add(new Nickel());\n /*productManager.Setup(m => m.GetProductCount(It.IsAny<Candy>())).Returns(0);\n var deposited = vendingController.Post(new VendingRequest()\n {\n BagOfCoins = aBagOfCoins,\n });\n var result = vendingController.Post(new VendingRequest()\n {\n Empty = false,\n Selection = new Candy().Type(),\n });*/\n\n VendingResponse result = new VendingResponse();\n assertThat(result.Message, Is.is(ModelValues.SOLD_OUT));\n }", "public void testGetInfo(boolean isAlreadyUpdated) {\n Baskets = new String[] { BasketPath };\n TGetInfo_Return[] Baskets_info_out = basketService.getInfo(Baskets, BasketAttributes, AddressAttributes, ItemAttributes, null);\n assertEquals(\"exists result set\", 1, Baskets_info_out.length);\n\n TGetInfo_Return Basket_info_out = Baskets_info_out[0];\n assertNoError(Basket_info_out.getError());\n assertNotNull(Basket_info_out.getAlias());\n\n TAddressNamed Address_out = Basket_info_out.getBillingAddress();\n assertEquals(\"EMail\", Address_in.getEMail(), Address_out.getEMail());\n TProductLineItemOut productLineItem = Basket_info_out.getLineItemContainer().getProductLineItems()[0];\n assertEquals(\"/Units/piece\", productLineItem.getOrderUnit());\n\n if (isAlreadyUpdated) {\n // check updated order data\n assertEquals(\"IsAcceptCreditCheckOK\", Basket_up.getAttributes()[0].getValue(), Basket_info_out.getAttributes()[0].getValue());\n\n // check updated address\n assertEquals(\"FirstName\", Address_up.getFirstName(), Address_out.getFirstName());\n assertEquals(\"LastName\", Address_up.getLastName(), Address_out.getLastName());\n assertEquals(\"Street\", Address_up.getStreet(), Address_out.getStreet());\n assertEquals(\"Street2\", Address_up.getStreet2(), Address_out.getStreet2());\n assertEquals(\"Quantity\", 20f, productLineItem.getQuantity(), 0.0);\n } else {\n // check order data created without update\n assertEquals(\"IsAcceptCreditCheckOK\", Basket_in.getAttributes()[0].getValue(), Basket_info_out.getAttributes()[0].getValue());\n\n // check created address\n assertEquals(\"FirstName\", Address_in.getFirstName(), Address_out.getFirstName());\n assertEquals(\"LastName\", Address_in.getLastName(), Address_out.getLastName());\n assertEquals(\"Street\", Address_in.getStreet(), Address_out.getStreet());\n assertEquals(\"Street2\", Address_in.getStreet2(), Address_out.getStreet2());\n assertEquals(\"Quantity\", 10f, productLineItem.getQuantity(), 0.0);\n }\n\n assertEquals(\"TaxArea\", Basket_in.getLineItemContainer().getTaxArea(), Basket_info_out.getLineItemContainer().getTaxArea());\n assertEquals(\"TaxModel\", Basket_in.getLineItemContainer().getTaxModel(), Basket_info_out.getLineItemContainer().getTaxModel());\n assertEquals(\"CurrencyID\", Basket_in.getLineItemContainer().getCurrencyID(), Basket_info_out.getLineItemContainer().getCurrencyID());\n // \"IsAddressOK\", \"WebUrl\", \"PickupToken\"\n assertNotNull(\"IsAddressOK\", Basket_info_out.getAttributes()[0].getValue());\n assertNotNull(\"WebUrl\", Basket_info_out.getAttributes()[1].getValue());\n assertNotNull(\"PickupToken\", Basket_info_out.getAttributes()[2].getValue());\n\n assertNotNull(\"Alias\", productLineItem.getAlias());\n assertNotNull(\"Name\", productLineItem.getName());\n assertNotNull(\"Product\", productLineItem.getProduct());\n assertNotNull(\"TaxClass\", productLineItem.getTaxClass());\n assertTrue(\"BasePrice\", productLineItem.getBasePrice() > 0);\n assertTrue(\"LineItemPrice\", productLineItem.getLineItemPrice() > 0);\n assertEquals(\"SKU\", \"ho_1112105010\", productLineItem.getSKU());\n }", "@Test\n\tpublic void getCostForItem() {\n\t\tfinal BasketItemImpl bi = new BasketItemImpl();\n\t\tbi.addBasketItem(\"banana\", 2);\n\t\tbi.addBasketItem(\"lemon\", 3);\n\n\t\tfinal int fc = bi.getAllBasketItems().get(\"banana\");\n\t\tassertTrue(Integer.compare(2, fc) == 0);\n\n\t}", "@Test\n public void createBasket(){\n BasketRepositoryImpl basketRepository=new BasketRepositoryImpl(basketCrudRepository);\n // basketRepository.save(basket);\n var response= basketRepository.findByProductId(\"11\");\n System.out.println(response.toString());\n }", "@Test\n public void TestUserColaSoldOut()\n {\n List<Coin> aBagOfCoins = new ArrayList<Coin>();\n aBagOfCoins.add(new Quarter());\n aBagOfCoins.add(new Quarter());\n aBagOfCoins.add(new Quarter());\n aBagOfCoins.add(new Quarter());\n /*productManager.Setup(m => m.GetProductCount(It.IsAny<Cola>())).Returns(0);\n var deposited = vendingController.Post(new VendingRequest()\n {\n BagOfCoins = aBagOfCoins,\n });\n var result = vendingController.Post(new VendingRequest()\n {\n Empty = false,\n Selection = new Cola().Type(),\n });*/\n\n VendingResponse result = new VendingResponse();\n assertThat(result.Message, Is.is(ModelValues.SOLD_OUT));\n }", "@Test\n void checkBidAddedAfterSubscribeBidding(){\n tradingSystem.subscriberBidding(NofetID,NconnID,storeID,1,2950,1);\n boolean added=false;\n for (Bid b:store.getBids()\n ) {\n if(b.getProductID()==1&&b.getUserID()==NofetID&&b.getPrice()==2950&&b.getQuantity()==1){\n added=true;\n }\n }\n assertTrue(added);\n }", "private void basketData() {\n basketViewModel.setBasketListObj(selectedShopId);\n basketViewModel.getAllBasketList().observe(this, resourse -> {\n if (resourse != null) {\n basketViewModel.basketCount = resourse.size();\n if (resourse.size() > 0) {\n setBasketMenuItemVisible(true);\n } else {\n setBasketMenuItemVisible(false);\n }\n }\n });\n }", "static int calculateTotalOf(Set<Fruit> basket) {\n\t\tint totalPrice = 0;\n\t\tint Qty = 0;\n\t\tfor (Fruit fruit : basket) {\n\t\t\tQty = getQuantityOf(fruit);\n\t\t\tQty = Qty <= 0 ? 1 : Qty;\n\t\t\ttotalPrice = totalPrice + (fruit.price * Qty);\n\t\t}\n\t\tSystem.out.println(\"Total Price = \" + totalPrice);\n\t\treturn totalPrice;\n\t}", "public Basket getBasket() {\n\t\treturn theBasket;\n\t}", "@Test\n public void buy() {\n System.out.println(client.purchase(1, 0, 1));\n }", "private void getItemsInBasket(){\n Disposable disposable = mViewModel.getItemsInBasket()\n .subscribeOn(Schedulers.io())\n .observeOn(AndroidSchedulers.mainThread())\n .doOnError(throwable -> Log.e(\"BasketFragment\",throwable.getMessage()))\n .subscribe(basketItems -> basketListAdapter.submitList(basketItems));\n mDisposable.add(disposable);\n }", "public void testCreate() {\n TCreate_Return[] Baskets_create_out = basketService.create(new TCreate_Input[] { Basket_in });\n assertNoError(Baskets_create_out[0].getError());\n\n assertNull(\"No FormErrors\", Baskets_create_out[0].getFormErrors());\n assertEquals(\"created?\", true, Baskets_create_out[0].getCreated());\n assertNotNull(\"Path not null\", Baskets_create_out[0].getPath());\n BasketPath = Baskets_create_out[0].getPath();\n }", "@Test\n public void verifyWatermelonOfferApplied() {\n \tProduct product = new Product(\"Watermelon\", 0.8);\n \tBasket basket = new Basket();\n \tbasket.getProducts().put(product, 7);\n \tassertTrue(\"Have to get the price of 7 items = 4 ==> \", \n \t\t\tDouble.compare(calculator.calculatePrice(basket), 4) == 0);\n }", "@GetMapping(\"/basket\")\n public String getBasket(HttpServletRequest request, Model model) {\n Map<Product, Integer> productsInBasket = basketService.getProductsInBasket(request);\n model.addAttribute(\"items\", productsInBasket);\n try {\n Client clientForView = clientService.getClientForView();\n model.addAttribute(\"addresses\", clientForView.getAddressList());\n model.addAttribute(\"client\", clientForView);\n model.addAttribute(\"addressesSelf\", orderService.getAllShops());\n } catch (ClassCastException ex) {\n logger.info(\"Not authorized attempt to go to the basket page\");\n }\n logger.info(\"Go to basket page\");\n return \"basket\";\n }", "public List<StockFavorite> getListFavoriteStock(int userId);", "Cart getCartForUser(String userId);", "@GetMapping(\"/detailed-basket/{username}\")\n public List<BasketDto> getDetailedBasketByUsername(@PathVariable String username) {\n return basketService.getDetailedBasketByUsername(username);\n }", "private Basket findById(int idBasket) {\n\t\treturn null;\n\t}", "@Then(\"^click on add to basket$\")\r\n\tpublic void click_on_add_to_basket() throws Throwable {\n\t\tverbose(\"***********************************************************\");\r\n\t\tAssert.assertTrue(navigate_rsc.addbasket());\r\n\t\tverbose(\"***********************************************************\");\r\n\t \r\n\t}", "public void checkCarts(int userId) throws CartException {\n cartService.getUserCarts(userId); \n }", "@Test\n public void TestABBACBBABABBACBBAB() {\n HashMap<Character, Product> productList = new HashMap<Character, Product>();\n Product product = new Product('A', 20);\n productList.put(product.getName(), product);\n\n product = new Product('B', 50, 5, 3);\n productList.put(product.getName(), product);\n\n product = new Product('C', 30);\n productList.put(product.getName(), product);\n\n com.jama.domain.Supermarket supermarket = new com.jama.domain.Supermarket(productList);\n\n try {\n int totalPrice = supermarket.checkout(\"ABBACBBABABBACBBAB\");\n assertEquals(\"Total prices does not equal.\", new Integer(480), new Integer(totalPrice));\n }\n catch (Exception e)\n {\n fail(e.getMessage());\n }\n }", "public void getCartProducts(int userId) {\n try {\n int flag = 1;\n while(1 == flag) {\n int prodId = InputUtil.getInt(\"Enter product Id : \");\n Product product = cartService.getProductFromStore(prodId);\n if(!cartService.validateProduct(userId,prodId)) {\n System.out.println(\"Product added already in cart\\n\"); \n break;\n }\n Cart cart = new Cart();\n\t\t cart.setProduct(product); \n cart.setUser(userService.getUser(userId));\n\t\t int quantity = InputUtil.getInt(\"Enter product quantity : \"); \n cart.setQuantity(quantity);\n cart.setCreated(DateUtil.getCurrentDateTime());\n cart.setModified(DateUtil.getCurrentDateTime());\n cartService.add(cart);\n System.out.println(\"\\n\"+product.getName().toUpperCase()+\" added to cart \");\n flag = InputUtil.getInt(\"Enter 1 to add products. 2 to exit : \");\n }\n } catch (ProductException e) {\n\t System.out.println(e);\n } catch (DatabaseConnectionException e) {\n\t System.out.println(e);\n\t } catch (NoRecordFoundException ex) {\n System.out.println(ex);\n } catch (CartException ex) {\n System.out.println(ex);\n } \n }", "@Test\n public void verifyNoOfferApplied() {\n \tProduct product = new Product(\"Watermelon\", 0.8);\n \tProduct product2 = new Product(\"Apple\", 0.2);\n \tProduct product3 = new Product(\"Orange\", 0.5);\n \tBasket basket = new Basket();\n \tbasket.getProducts().put(product, 2);\n \tbasket.getProducts().put(product2, 1);\n \tbasket.getProducts().put(product3, 5);\n \tassertTrue(\"Have to get the price of 8 items = 4.3 ==> \", (calculator.calculatePrice(basket) - 4.3) < 0.0001);\n }", "public void showCart(int userId) {\n try {\n List<Cart> carts = cartService.getUserCarts(userId);\n System.out.println(\"\\n\"+Constants.DECOR+\"YOUR CART\"+Constants.DECOR_END);\n System.out.println(Constants.CART_HEADER);\n for(Cart cart : carts) {\n System.out.println(String.valueOf(userId)\n +\"\\t\\t\"+String.valueOf(cart.getCartId())+(\"\\t\\t\"+String.valueOf(cart.getProduct().getId())\n +\"\\t\\t\"+String.valueOf(cart.getQuantity())+\"\\t\\t\"+cart.getCreated()+\"\\t\\t\"+cart.getModified()));\n }\n } catch (CartException ex) {\n System.out.println(ex);\n } \n }", "Integer getNumberOfProducts(Basket basket, Category category);", "@Test(priority = 1)\n public void testPurchaseSingleItemAndGetTotal() throws Exception {\n URI uri = new URI(LOCALHOST + randomServerPort + \"/api/mycart\");\n HttpEntity<String> request = new HttpEntity<>(headersUser1);\n ResponseEntity<String> result = restTemplate.exchange(uri, HttpMethod.GET, request, String.class);\n assertEquals(200, result.getStatusCodeValue());\n setCookie(result, headersUser1); // save the session cookie to use with subsequent requests.\n\n // doing an API call to get products and select a random product\n List<ProductDTO> products = getProducts(headersUser1);\n Random random = new Random();\n ProductDTO product = products.stream().skip(random.nextInt(products.size())).findFirst().orElseThrow();\n\n BigDecimal exceptedTotal = new BigDecimal(\"0.0\");\n CartItemDTO item = new CartItemDTO();\n item.setQuantity((long) (random.nextInt(5) + 1));\n item.setProduct(product);\n\n BigDecimal price = product.getPrice().add(product.getTax());\n exceptedTotal = exceptedTotal.add(price.multiply(new BigDecimal(item.getQuantity())));\n\n // doing an API call to add the select product into cart.\n uri = new URI(LOCALHOST + randomServerPort + \"/api/mycart/items\");\n HttpEntity<CartItemDTO> itemAddRequest = new HttpEntity<>(item, headersUser1);\n result = restTemplate.exchange(uri, HttpMethod.POST, itemAddRequest, String.class);\n assertEquals(201, result.getStatusCodeValue());\n\n // doing an API call to get the content of the cart\n uri = new URI(LOCALHOST + randomServerPort + \"/api/mycart\");\n request = new HttpEntity<>(headersUser1);\n ResponseEntity<ShoppingCartDTO> cartResponse = restTemplate.exchange(uri,\n HttpMethod.GET, request, ShoppingCartDTO.class);\n assertEquals(200, cartResponse.getStatusCodeValue());\n assertNotNull(cartResponse.getBody());\n exceptedTotal = exceptedTotal.multiply(new BigDecimal(\"1.15\"));\n assertEquals(exceptedTotal, cartResponse.getBody().getTotalAmount());\n\n // doing an API call to clear the cart.\n uri = new URI(LOCALHOST + randomServerPort + \"/api/mycart\");\n request = new HttpEntity<>(headersUser1);\n result = restTemplate.exchange(uri, HttpMethod.DELETE, request, String.class);\n assertEquals(204, result.getStatusCodeValue());\n }", "@Test\n public void TestABBACBBAB() {\n HashMap<Character, Product> productList = new HashMap<Character, Product>();\n Product product = new Product('A', 20);\n productList.put(product.getName(), product);\n\n product = new Product('B', 50, 5, 3);\n productList.put(product.getName(), product);\n\n product = new Product('C', 30);\n productList.put(product.getName(), product);\n\n com.jama.domain.Supermarket supermarket = new com.jama.domain.Supermarket(productList);\n\n try {\n int totalPrice = supermarket.checkout(\"ABBACBBAB\");\n assertEquals(\"Total prices does not equal.\", new Integer(240), new Integer(totalPrice));\n }\n catch (Exception e)\n {\n fail(e.getMessage());\n }\n }", "@Test\r\n\tpublic void itemRetTest() {\r\n\t\tItem item = new Item();\r\n\t\ttry {\r\n\t\t\tint k = 0;\r\n\t\t\tk = item.getNumberOfItems(SELLER);\r\n\t\t\tassertNotSame(k, 0);\r\n\t\t\tItem tempSet[] = item.getAllForUser(SELLER);\r\n\t\t\tassertEquals(tempSet.length, k);\t\t\t// Retrieves correct number of items\r\n\t\t} catch (SQLException e) {\r\n\t\t\tfail(\"Failed to get number of items for seller id \" + SELLER + \": SQLException\");\r\n\t\t\t//e.printStackTrace();\r\n\t\t}\r\n\t\t\r\n\t\ttry {\r\n\t\t\tint k = 0;\r\n\t\t\tk = item.getNumberOfItemsInOrder(ORDER);\r\n\t\t\tassertNotSame(k, 0);\r\n\t\t\tItem tempSet[] = item.getAllByOrder(ORDER);\r\n\t\t\tassertEquals(tempSet.length, k);\t\t\t// Retrieves correct number of items\r\n\t\t} catch (SQLException e) {\r\n\t\t\tfail(\"Failed to get number of items for order id \" + ORDER + \": SQLException\");\r\n\t\t\t//e.printStackTrace();\r\n\t\t}\r\n\t\t\r\n\t\ttry {\r\n\t\t\tItem tempSet[] = item.getAllByOrder(ORDER);\r\n\t\t\tfor (int i = 0; i < tempSet.length; i++) {\r\n\t\t\t\tassertNotNull(tempSet[i]);\r\n\t\t\t\tassertNotNull(tempSet[i].getId());\r\n\t\t\t\tassertNotSame(tempSet[i].getId(), 0);\r\n\t\t\t}\r\n\t\t} catch (SQLException e) {\r\n\t\t\tfail(\"Failed to load items for order id \" + ORDER + \": SQLException\");\r\n\t\t\t//e.printStackTrace();\r\n\t\t}\r\n\t}", "@Test\n public void TestUserEntersEnoughForChips()\n {\n List<Coin> aBagOfCoins = new ArrayList<Coin>();\n aBagOfCoins.add(new Quarter());\n aBagOfCoins.add(new Quarter());\n //productManager.Setup(m => m.GetProductCount(It.IsAny<Chips>())).Returns(1);\n\n Map<Coin, Integer> coinBank = new HashMap<Coin, Integer>();\n coinBank.put(new Quarter(), 2);\n coinBank.put(new Dime(), 2);\n coinBank.put(new Nickel(), 1);\n /*coinManager.Setup(m => m.GetBankOfCoins()).Returns(coinBank);\n\n var deposited = vendingController.Post(new VendingRequest()\n {\n BagOfCoins = aBagOfCoins,\n });\n var result = vendingController.Post(new VendingRequest()\n {\n Empty = false,\n Selection = new Chips().Type(),\n });*/\n VendingResponse result = new VendingResponse();\n assertThat(result.Delivery.type(), Is.is(new Chips().type()));\n }", "@Test\n public void TestUserEntersEnoughForChipsTenderisZero()\n {\n ArrayList<Coin> aBagOfCoins = new ArrayList<Coin>();\n aBagOfCoins.add(new Quarter());\n aBagOfCoins.add(new Quarter());\n //productManager.(m => m.GetProductCount(It.IsAny<Chips>())).Returns(1);\n\n Map<Coin, Integer> coinBank = new HashMap<Coin, Integer>();\n coinBank.put(new Quarter(), 2);\n //coinManager.Setup(m => m.GetBankOfCoins()).Returns(coinBank);\n\n VendingRequest request = new VendingRequest();\n request.BagOfCoins = aBagOfCoins;\n\n VendingResponse deposited = vendingController.Post(request);\n\n VendingRequest secondrequest = new VendingRequest();\n secondrequest.IsEmpty= false;\n secondrequest.Selection = new Chips().type();\n\n VendingResponse result = vendingController.Post(secondrequest);\n\n assertThat(result.TenderValue, Is.is(0));\n }", "@Test\n public void testGetProductsByPurcher() throws Exception {\n System.out.println(\"getProductsByPurcher\");\n Customer c = new Customer();\n c.setId(1l);\n prs = dao.getProductsByPurcher(c);\n assertTrue(prs.contains(p3));\n assertTrue(prs.size() == 1);\n c.setId(2l);\n prs = dao.getProductsByPurcher(c);\n assertTrue(prs.contains(p1));\n assertTrue(prs.size() == 1);\n \n c.setId(3l);\n prs = dao.getProductsByPurcher(c);\n assertTrue(prs.isEmpty());\n }", "@Test\n public void test4() {\n userFury.login(\"23ab\");\n assertTrue(userFury.getLoggedIn());\n\n userFury.buy(secondMusicTitle);\n ArrayList<MusicTitle> actualList = userFury.getTitlesBought();\n assertTrue(actualList.isEmpty());\n }", "@Test\n public void TestUserSelectsChipsHasChange()\n {\n List<Coin> aBagOfCoins = new ArrayList<Coin>();\n aBagOfCoins.add(new Quarter());\n aBagOfCoins.add(new Quarter());\n aBagOfCoins.add(new Nickel());\n //productManager.Setup(m => m.GetProductCount(It.IsAny<Chips>())).Returns(1);\n\n Map<Coin, Integer> coinBank = new HashMap<Coin, Integer>();\n coinBank.put(new Quarter(), 2);\n coinBank.put(new Nickel(), 1);\n /*coinManager.Setup(m => m.GetBankOfCoins()).Returns(coinBank);\n\n var deposited = vendingController.Post(new VendingRequest()\n {\n BagOfCoins = aBagOfCoins,\n });\n var result = vendingController.Post(new VendingRequest()\n {\n Empty = false,\n Selection = new Chips().Type(),\n });*/\n VendingResponse result = new VendingResponse();\n assertThat(result.TenderValue, Is.is(new Nickel().value()));\n }", "@Test(priority = 2)\n public void testPurchaseMultipleItemsAndGetTotal() throws Exception {\n URI uri = new URI(LOCALHOST + randomServerPort + \"/api/mycart\");\n HttpEntity<String> request = new HttpEntity<>(headersUser2);\n ResponseEntity<String> result = restTemplate.exchange(uri, HttpMethod.GET, request, String.class);\n assertEquals(200, result.getStatusCodeValue());\n setCookie(result, headersUser2);\n\n // doing an API call to get products and select a random product\n List<ProductDTO> products = getProducts(headersUser2);\n Random random = new Random();\n ProductDTO product1 = products.stream().skip(random.nextInt(products.size())).findFirst().orElseThrow();\n\n BigDecimal exceptedTotal = new BigDecimal(\"0.0\");\n CartItemDTO item1 = new CartItemDTO();\n item1.setQuantity((long) (random.nextInt(5) + 1));\n item1.setProduct(product1);\n\n BigDecimal price1 = product1.getPrice().add(product1.getTax());\n exceptedTotal = exceptedTotal.add(price1.multiply(new BigDecimal(item1.getQuantity())));\n\n // doing an API call to add the select product into cart.\n uri = new URI(LOCALHOST + randomServerPort + \"/api/mycart/items\");\n HttpEntity<CartItemDTO> itemAddRequest = new HttpEntity<>(item1, headersUser2);\n result = restTemplate.exchange(uri, HttpMethod.POST, itemAddRequest, String.class);\n assertEquals(201, result.getStatusCodeValue());\n\n // Select another random product\n ProductDTO product2 = products.stream().skip(random.nextInt(products.size())).findFirst().orElseThrow();\n\n CartItemDTO item2 = new CartItemDTO();\n item2.setQuantity((long) (random.nextInt(5) + 1));\n item2.setProduct(product2);\n\n BigDecimal price2 = product2.getPrice().add(product2.getTax());\n exceptedTotal = exceptedTotal.add(price2.multiply(new BigDecimal(item2.getQuantity())));\n\n // doing an API call to add the select product into cart.\n itemAddRequest = new HttpEntity<>(item2, headersUser2);\n result = restTemplate.exchange(uri, HttpMethod.POST, itemAddRequest, String.class);\n assertEquals(201, result.getStatusCodeValue());\n\n // doing an API call to get the content of the cart\n uri = new URI(LOCALHOST + randomServerPort + \"/api/mycart\");\n request = new HttpEntity<>(headersUser2);\n ResponseEntity<ShoppingCartDTO> cartResponse = restTemplate.exchange(uri,\n HttpMethod.GET, request, ShoppingCartDTO.class);\n assertEquals(200, cartResponse.getStatusCodeValue());\n assertNotNull(cartResponse.getBody());\n exceptedTotal = exceptedTotal.multiply(new BigDecimal(\"1.15\"));\n assertEquals(exceptedTotal, cartResponse.getBody().getTotalAmount());\n\n // doing an API call to submit the cart to process.\n uri = new URI(LOCALHOST + randomServerPort + \"/api/mycart/submit\");\n request = new HttpEntity<>(headersUser2);\n result = restTemplate.exchange(uri, HttpMethod.POST, request, String.class);\n assertEquals(201, result.getStatusCodeValue());\n }", "@Test\n public void TestUserEntersEnoughForDrink()\n {\n List<Coin> aBagOfCoins = new ArrayList<Coin>();\n aBagOfCoins.add(new Quarter());\n aBagOfCoins.add(new Quarter());\n aBagOfCoins.add(new Quarter());\n aBagOfCoins.add(new Quarter());\n //productManager.Setup(m => m.GetProductCount(It.IsAny<Cola>())).Returns(1);\n\n Map<Coin, Integer> coinBank = new HashMap<Coin, Integer>();\n coinBank.put(new Quarter(), 4);\n /*coinManager.Setup(m => m.GetBankOfCoins()).Returns(coinBank);\n\n var deposited = vendingController.Post(new VendingRequest()\n {\n BagOfCoins = aBagOfCoins,\n });\n var result = vendingController.Post(new VendingRequest()\n {\n Empty = false,\n Selection = new Cola().Type(),\n });*/\n VendingResponse result = new VendingResponse();\n assertThat(result.Delivery.type(), Is.is(new Cola().type()));\n\n }", "@Test\n public void TestUserEntersEnoughForCandy()\n {\n List<Coin> aBagOfCoins = new ArrayList<Coin>();\n aBagOfCoins.add(new Quarter());\n aBagOfCoins.add(new Quarter());\n aBagOfCoins.add(new Dime());\n aBagOfCoins.add(new Dime());\n aBagOfCoins.add(new Nickel());\n //productManager.Setup(m => m.GetProductCount(It.IsAny<Candy>())).Returns(1);\n\n Map<Coin, Integer> coinBank = new HashMap<Coin, Integer>();\n coinBank.put(new Quarter(), 2);\n coinBank.put(new Dime(), 2);\n coinBank.put(new Nickel(), 1);\n /*coinManager.Setup(m => m.GetBankOfCoins()).Returns(coinBank);\n\n var deposited = vendingController.Post(new VendingRequest()\n {\n BagOfCoins = aBagOfCoins,\n });\n var result = vendingController.Post(new VendingRequest()\n {\n Empty = false,\n Selection = new Candy().Type(),\n });*/\n VendingResponse result = new VendingResponse();\n assertThat(result.Delivery.type(), Is.is(new Candy().type()));\n }", "@GetMapping(\"/createBasket\")\n\tpublic ResponseEntity createBasket(@RequestParam String email, @RequestParam Integer basketId) {\n\n\t\ttry {\n\t\t\treturn ResponseEntity.ok(userservice.createBasketFromuser(basketId, email));\n\t\t} catch (final DaoException e) {\n\t\t\treturn ResponseEntity.status(HttpStatus.BAD_REQUEST).body(e.toString());\n\t\t}\n\t}", "@Test\n public void TestBCABBACBCB() {\n HashMap<Character, Product> productList = new HashMap<Character, Product>();\n Product product = new Product('A', 20, 2, 1);\n productList.put(product.getName(), product);\n\n product = new Product('B', 50, 5, 3);\n productList.put(product.getName(), product);\n\n product = new Product('C', 30, 3, 2);\n productList.put(product.getName(), product);\n\n com.jama.domain.Supermarket supermarket = new com.jama.domain.Supermarket(productList);\n\n try {\n int totalPrice = supermarket.checkout(\"BCABBACBCB\");\n assertEquals(\"Total prices are not equal.\", new Integer(230), new Integer(totalPrice));\n }\n catch (Exception e)\n {\n fail(e.getMessage());\n }\n }", "void getMarketOrders();", "@Test\n\tpublic void testGetShoppingCart() {\n\t}", "public long getItemShopBasketId();", "private void requestBucks() {\n\t\ttry {\n\t\t\tSystem.out.println(\"Please choose a user to request TE Bucks from:\");\n\t\t\tUser fromUser;\n\t\t\tboolean isValidUser;\n\t\t\tdo {\n\t\t\t\tfromUser = (User)console.getChoiceFromOptions(userService.getUsers());\n\t\t\t\tisValidUser = ( fromUser\n\t\t\t\t\t\t\t\t.getUsername()\n\t\t\t\t\t\t\t\t.equalsIgnoreCase(currentUser.getUser().getUsername())\n\t\t\t\t\t\t\t ) ? false : true;\n\n\t\t\t\tif(!isValidUser) {\n\t\t\t\t\tSystem.out.println(\"You can not request money from yourself\");\n\t\t\t\t}\n\t\t\t} while (!isValidUser);\n\t\t\t\n\t\t\t// Select an amount\n\t\t\tBigDecimal amount = new BigDecimal(\"0.00\");\n\t\t\tboolean isValidAmount = false;\n\t\t\tdo {\n\t\t\t\ttry {\n\t\t\t\t\tamount = new BigDecimal(console.getUserInput(\"Enter An Amount (0 to cancel):\\n \"));\n\t\t\t\t\tisValidAmount = true;\n\t\t\t\t} catch (NumberFormatException e) {\n\t\t\t\t\tSystem.out.println(\"Please enter a numerical value\");\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\tif(amount.doubleValue() < 0.99 && amount.doubleValue() > 0.00) {\n\t\t\t\t\tSystem.out.println(\"You cannot request less than $0.99 TEB\");\n\t\t\t\t\tisValidAmount = false;\n\t\t\t\t\tcontinue;\n\t\t\t\t} else if (amount.doubleValue() == 0.00) {\n\t\t\t\t\tmainMenu();\n\t\t\t\t}\n\t\t\t} while(!isValidAmount);\n\n\t\t\t// Create transfer object\n\t\t\tboolean confirmedAmount = false;\n\t\t\tString confirm = \"\";\n\t\t\tTransfer transfer = null;\n\t\t\twhile (!confirmedAmount) {\n\t\t\t\tconfirm = console.getUserInput(\"You entered: \" + amount.toPlainString() + \" TEB. Is this correct? (y/n)\");\n\t\t\t\tif (confirm.toLowerCase().startsWith(\"y\")) {\n\t\t\t\t\t// transferService to POST to server db\n\t\t\t\t\tSystem.out.println(\"You are requesting: \" + amount.toPlainString() +\n\t\t\t\t\t\t\t\" TEB from \" + fromUser.getUsername());\n\t\t\t\t\ttransfer = createTransferObj(\"Request\", \"Pending\",\n\t\t\t\t\t\t\t\t\tcurrentUserId, fromUser.getId(), amount);\n\t\t\t\t\tboolean hasSent = \n\t\t\t\t\t\t\ttransferService.sendBucks(currentUserId, fromUser.getId(), transfer);\n\t\t\t\t\tif (hasSent) {\n\t\t\t\t\t\t// TODO :: Test this\n\t\t\t\t\t\tSystem.out.println(\"The code executed\");\n\t\t\t\t\t}\n\t\t\t\t\tconfirmedAmount = true;\n\t\t\t\t\tcontinue;\n\n\t\t\t\t} else {\n\t\t\t\t\tSystem.out.println(\"Request canceled.\");\n\t\t\t\t\tconfirmedAmount = true;\n\t\t\t\t\tcontinue;\n\t\t\t\t} \t\n\t\t\t}\n\t\t\t\n\t\t}catch(UserServiceException ex) {\n\t\t\tSystem.out.println(\"User Service Exception\");\n\t\t}catch(TransferServiceException ex) {\n\t\t\tSystem.out.println(\"Transfer Service Exception\");\n\t\t}\n\t\t\n\t}", "@Test\n public void test_getBillByItem() {\n List<Bill> resultTwo = billManageServiceImpl.getBillByItem(\"0\");\n Assert.assertNotNull(resultTwo);\n// Assert.assertNull(resultOne);\n }", "@Test\r\n public void testgetUserRatedTop() throws ServletException, IOException {\r\n final Question question = createQuestion(\"abcdefg\", \"pattern\");\r\n createTweetPollPublicated(Boolean.TRUE, Boolean.TRUE, new Date(),\r\n getSpringSecurityLoggedUserAccount(), question);\r\n createPoll(new Date(), question, getSpringSecurityLoggedUserAccount(),\r\n Boolean.TRUE, Boolean.TRUE);\r\n initService(\"/api/common/frontend/topusers.json\", MethodJson.GET);\r\n setParameter(\"status\", \"1\");\r\n final JSONObject response = callJsonService();\r\n final JSONObject success = getSucess(response);\r\n final JSONArray items = (JSONArray) success.get(\"profile\");\r\n Assert.assertNotNull(items);\r\n Assert.assertEquals(items.size(), 1);\r\n }", "private static void viewItems() {\r\n\t\tdisplayShops();\r\n\t\tint shopNo = getValidUserInput(scanner, shops.length);\r\n\t\tdisplayItems(shopNo);\r\n\t\tSystem.out.println();\r\n\t\tSystem.out.println(\" Please enter the ID of the element to add to cart. \\\"0\\\" for exit\");\r\n\t\tSystem.out.println();\r\n\t\tint productNo = getValidUserInput(scanner, shops[shopNo].getAllSales().length + 1);\r\n\t\tif (productNo > 0) {\r\n\t\t\tProduct productToBeAdd = shops[shopNo].getAllSales()[productNo - 1];\r\n\t\t\tSystem.out.println();\r\n\t\t\tSystem.out.print(\" Please enter the number of the item you would like to buy: \");\r\n\t\t\tint numberOfTheItems = getUserIntInput();\r\n\t\t\tcart.addProduct(productToBeAdd, numberOfTheItems);\r\n\t\t}\r\n\t\tSystem.out.println();\r\n\t\tSystem.out.println(\" Purchase done, going back to the menu.\");\r\n\t\tSystem.out.println();\r\n\t}", "@Test\n\tpublic void getCostForDuplicateItem() {\n\t\tfinal BasketItemImpl bi = new BasketItemImpl();\n\t\tbi.addBasketItem(\"banana\", 2);\n\t\tbi.addBasketItem(\"banana\", 4);\n\t\tbi.addBasketItem(\"lemon\", 3);\n\n\t\tfinal int fc = bi.getAllBasketItems().get(\"banana\");\n\t\tassertTrue(Integer.compare(6, fc) == 0);\n\n\t}", "private void testShippingGoods(){\n\t\tItem []itemArray1 = warehouse.getProductsByID(\"\");\n\n\n\t\tItem[] itemArray = warehouse.shippingGoods(itemArray1);\n\t\tSystem.out.println(\"There are \" + itemArray.length + \" items\");\n\t\tfor(Item item: itemArray){\n\t\t\tItemImpl tmpItemImpl = new ItemImpl(item);\n\t\t\tSystem.out.println(tmpItemImpl.toString());\n\t\t}\n\t}", "@Test\n public void HappyDailyIncomeForStore(){\n Integer productID1 = store.getProductID(\"computer\");\n tradingSystem.AddProductToCart(NconnID, storeID, productID1, 3);\n tradingSystem.subscriberPurchase(NofetID, NconnID, \"123456789\", \"4\",\"2022\" , \"123\", \"123456789\", \"Rager 101\",\"Beer Sheva\",\"Israel\",\"8458527\");\n\n Double dailyIncome = store.getDailyIncome();\n assertEquals(dailyIncome, 9000.0);\n }", "@GetMapping(\"/shoescart\")\n\tString basket(Model model) {\n\t\tList<Product> exceedsShoes = new ArrayList<Product>();\n\t\tmodel.addAttribute(\"exceedsShoes\", exceedsShoes);\n\t\treturn \"shoescart\";\n\t}", "private void checkoutNotEmptyBag() {\n\t\tSystem.out.println(\"Checking out \" + bag.getSize() + \" items.\");\n\t\tbag.print();\n\t\tDecimalFormat df = new DecimalFormat(\"0.00\");\n\t\tdouble salesPrice = bag.salesPrice();\n\t\tSystem.out.println(\"*Sales total: $\" + df.format(salesPrice));\n\t\tdouble salesTax = bag.salesTax();\n\t\tSystem.out.println(\"*Sales tax: $\" + df.format(salesTax));\n\t\tdouble totalPrice = salesPrice + salesTax;\n\t\tSystem.out.println(\"*Total amount paid: $\" + df.format(totalPrice));\n\t\tbag = new ShoppingBag(); // Empty bag after checking out.\n\t}", "public long getShopBasketId();", "public ArrayList<Product> loadProducts(String username ,String userType);", "@Test\n public void TestABC() {\n HashMap<Character, Product> productList = new HashMap<Character, Product>();\n Product product = new Product('A', 20);\n productList.put(product.getName(), product);\n\n product = new Product('B', 50, 5, 3);\n productList.put(product.getName(), product);\n\n product = new Product('C', 30);\n productList.put(product.getName(), product);\n\n com.jama.domain.Supermarket supermarket = new com.jama.domain.Supermarket(productList);\n\n try {\n int totalPrice = supermarket.checkout(\"ABC\");\n assertEquals(\"Total prices are not equal.\", new Integer(100), new Integer(totalPrice));\n }\n catch (Exception e)\n {\n fail(e.getMessage());\n }\n }", "@Test \n\tpublic void testClearBasket() throws Exception {\n\t\tBBBRequest request = BBBRequestFactory.getInstance().createClearBasketRequest();\n\t\t\n\t\tString expectedUrl = AccountHelper.constructUrl(BBBRequestFactory.getInstance().getHostBasket(), PATH_MY_BASKETS);\n\t\tassertEquals(expectedUrl, request.getUrl());\n\t\t\n\t\tBBBResponse response = BBBRequestManager.getInstance().executeRequestSynchronously(request);\n\t\t\n\t\tif(response.getResponseCode() != HttpURLConnection.HTTP_OK) {\n\t\t\tfail(\"Error: \"+response.toString());\n\t\t}\n\t}", "@Test\n public void TestUserSelectsCandyHasChange()\n {\n List<Coin> aBagOfCoins = new ArrayList<Coin>();\n aBagOfCoins.add(new Quarter());\n aBagOfCoins.add(new Quarter());\n aBagOfCoins.add(new Dime());\n aBagOfCoins.add(new Dime());\n aBagOfCoins.add(new Nickel());\n //productManager.Setup(m => m.GetProductCount(It.IsAny<Candy>())).Returns(1);\n\n Map<Coin, Integer> coinBank = new HashMap<Coin, Integer>();\n coinBank.put(new Quarter(), 2);\n coinBank.put(new Dime(), 2);\n coinBank.put(new Nickel(),1);\n //coinManager.Setup(m => m.GetBankOfCoins()).Returns(coinBank);\n/*\n var deposited = vendingController.Post(new VendingRequest()\n {\n BagOfCoins = aBagOfCoins,\n });\n var result = vendingController.Post(new VendingRequest()\n {\n Empty = false,\n Selection = new Candy().Type(),\n });\n */\n VendingResponse result = new VendingResponse();\n assertThat(result.TenderValue, Is.is(new Dime().value()));\n }", "@Test\n public void testGetProductsBySaler() throws Exception {\n System.out.println(\"getProductsBySaler\");\n Customer c = new Customer();\n c.setId(1l);\n prs = dao.getProductsBySaler(c);\n assertTrue(prs.contains(p1));\n assertTrue(prs.contains(p2));\n assertTrue(prs.size() == 2);\n\n c.setId(2l);\n prs = dao.getProductsBySaler(c);\n assertTrue(prs.isEmpty());\n \n c.setId(3l);\n prs = dao.getProductsBySaler(c);\n assertTrue(prs.contains(p3));\n assertTrue(prs.size() == 1);\n \n }", "@Test\n /*He utilizado los 2 precios, uno para que sea el precio de cada producto y el otro sera la suma total de los precios*/\n public void testGetBalance() {\n System.out.println(\"getBalance\");\n ShoppingCart instance = new ShoppingCart();\n \n Product p1 = new Product(\"Galletas\", precio1);\n Product p2 = new Product(\"Raton\", precio1);\n Product p3 = new Product(\"Teclado\", precio1);\n Product p4 = new Product(\"Monitor 4K\", precio1);\n \n instance.addItem(p1);\n instance.addItem(p2);\n instance.addItem(p3);\n instance.addItem(p4);\n \n double precio_total = precio2;\n \n double result = instance.getBalance();\n assertEquals(precio_total, result, 0.0);\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\tpublic void addProductToCartAndEmailIt() {\n\t}", "@Test\n public void verifyNewOfferIsApplied() {\n \tProduct product = new Product(\"Watermelon\", 0.8);\n \tProduct product2 = new Product(\"Apple\", 0.2);\n \tProduct product3 = new Product(\"Orange\", 0.5);\n \tOffer offer = new Offer(product3, 5, product3.getPrice());\n \tConfigurations.offers.add(offer);\n \tBasket basket = new Basket();\n \tbasket.getProducts().put(product, 6);\n \tbasket.getProducts().put(product2, 4);\n \tbasket.getProducts().put(product3, 5);\n \tassertTrue(\"Have to get the price of 15 items = 5.6 ==> \", (calculator.calculatePrice(basket) - 5.6) < 0.0001);\n }", "@Test\n public void GETProduct_ProductInventoryCall() {\n\n givenHeaders().\n when().\n get(_url_product).//.body().prettyPrint();\n then().\n using().defaultParser(Parser.JSON).\n log().ifError().\n statusCode(200).\n body(\"response\", not(isEmptyString()));\n System.out.print(\"GETPRODUCT_Inventory Test Run Result\");\n }", "@Test\n public void validSessionTransactionsGetTest() {\n validSessionValidTransactionPostTest();\n\n int size = given()\n .header(\"X-session-ID\", sessionId)\n .get(\"api/v1/transactions\")\n .then()\n .assertThat()\n .body(matchesJsonSchema(TRANSACTION_LIST_SCHEMA_PATH))\n .contentType(ContentType.JSON)\n .statusCode(200)\n .extract()\n .jsonPath()\n .getList(\"$\")\n .size();\n\n assertThat(size, lessThanOrEqualTo(20));\n }", "@Test\n\tpublic void testGetUser() {\n\t\tassertEquals(\"Test : getUser()\", bid.getUser(), user);\n\t}", "@Test\n public void others(){\n Item item = itemService.getItem(50);\n System.out.println(item);\n\n }", "@Test\n public void testGetItemCount() {\n \n System.out.println(\"GetItemCount\");\n \n ShoppingCart instance = new ShoppingCart();\n Product p1 = new Product(\"Galletas\", 1.2);\n \n instance.addItem(p1);\n \n assertEquals(instance.getItemCount(), 1, 0.0);\n \n Product p2 = new Product(\"Raton\", 85.6);\n Product p3 = new Product(\"Teclado\", 5.5);\n \n instance.addItem(p2);\n instance.addItem(p3);\n \n assertEquals(instance.getItemCount(), 3, 0.0);\n \n \n }", "@Test\n public void testReturnPickUpRequest() {\n List<List<String>> orders = new ArrayList<>();\n ArrayList<String> order1 = new ArrayList<>();\n order1.add(\"White\");\n order1.add(\"SE\");\n orders.add(order1);\n ArrayList<String> order2 = new ArrayList<>();\n order2.add(\"Red\");\n order2.add(\"S\");\n orders.add(order2);\n ArrayList<String> order3 = new ArrayList<>();\n order3.add(\"Blue\");\n order3.add(\"SEL\");\n orders.add(order3);\n ArrayList<String> order4 = new ArrayList<>();\n order4.add(\"Beige\");\n order4.add(\"S\");\n orders.add(order4);\n PickUpRequest expected = new PickUpRequest(orders, translation);\n warehouseManager.makePickUpRequest(orders);\n assertEquals(expected.getSkus(), warehouseManager.returnPickUpRequest().getSkus());\n }", "@Test\n public void TestUserSelectsDrinkHasChange()\n {\n List<Coin> aBagOfCoins = new ArrayList<Coin>();\n aBagOfCoins.add(new Quarter());\n aBagOfCoins.add(new Quarter());\n aBagOfCoins.add(new Quarter());\n aBagOfCoins.add(new Quarter());\n aBagOfCoins.add(new Quarter());\n //productManager.Setup(m => m.GetProductCount(It.IsAny<Cola>())).Returns(1);\n\n Map<Coin, Integer> coinBank = new HashMap<Coin, Integer>();\n coinBank.put(new Quarter(), 5);\n /*coinManager.Setup(m => m.GetBankOfCoins()).Returns(coinBank);\n\n var deposited = vendingController.Post(new VendingRequest()\n {\n BagOfCoins = aBagOfCoins,\n });\n var result = vendingController.Post(new VendingRequest()\n {\n Empty = false,\n Selection = new Cola().Type(),\n });*/\n VendingResponse result = new VendingResponse();\n assertThat(result.TenderValue, Is.is(new Quarter().value()));\n }", "public List<Product> getProductsBought(int idUser){\n\t\treturn orderDetailRepository.getProductsBought(idUser);\n\t}", "@Test\n public void testApprovedByUser() {\n String responseBody = requestGetAndReturnBodyAsString(\"/approved/za-200-zu\");\n JSONArray jsonArray = JSONArray.fromObject(responseBody);\n assertEquals(1, jsonArray.size());\n responseBody = requestGetAndReturnBodyAsString(\"/approved/pam-300-sam\");\n jsonArray = JSONArray.fromObject(responseBody);\n assertEquals(2, jsonArray.size());\n }", "boolean isValidForBasket(Collection<Item> items);", "public List<Orders> findAccepted2(int userID);", "@Override\n public boolean checkAvailability(BasketEntryDto basketEntryDto) {\n // Add communication to product micro service here for product validation\n return Boolean.TRUE;\n }", "private void viewPurchases(User user, Scanner sc) {\n\n\t\tboolean run = true;\n\t\tdo {\n\t\t\tlog.info(\"The Following are your Purchases\\n\");\n\t\t\tList<Item> purchased = cService.seeOwnedItems(user);\n\t\t\tpurchased.stream().forEach(item -> log.info(item.toString()));\n\n\t\t\tlog.info(\"Choose an option:\");\n\t\t\tlog.info(\"\t\tPress anything else to exit\");\n\t\t\tString choice = sc.nextLine();\n\t\t\tswitch (choice) {\n\t\t\tdefault:\n\t\t\t\tlog.info(\"\\nGoing back to the Customer Dashboard\\n\");\n\t\t\t\trun = false;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t} while (run);\n\t}", "@Test\n public void getAllItem() {\n Item item1 = new Item();\n item1.setName(\"Drill\");\n item1.setDescription(\"Power Tool\");\n item1.setDaily_rate(new BigDecimal(\"24.99\"));\n item1 = service.saveItem(item1);\n\n // Add an Item to the mock database using the Item API method (item2)\n Item item2 = new Item();\n item2.setName(\"Screwdriver\");\n item2.setDescription(\"Hand Tool\");\n item2.setDaily_rate(new BigDecimal(\"4.99\"));\n item2 = service.saveItem(item2);\n\n // Add all the Item's in the mock database to a list of Items using the Item API method\n List<Item> itemList = service.findAllItems();\n\n // Test the getAllItem() API method\n TestCase.assertEquals(2, itemList.size());\n TestCase.assertEquals(item1, itemList.get(0));\n TestCase.assertEquals(item2, itemList.get(1));\n }", "@Test\n public void testIsInCheckoutList() {\n }", "List<transactionsProducts> purchasedProducts();", "@Test\n\tpublic void bikesAvailable()\n\t{\t\t\n\t\tassertTrue(controller.getReport().getNoOfBikesAvailable() == 1);\n\t}", "@Test\n public void testGetProducts() {\n }", "@Test\n public void testUserProduct() {\n // TODO: test UserProduct\n }", "@RequestMapping(value=\"/purchase/user/{userId}\",method=RequestMethod.GET)\n\t\tpublic @ResponseBody ResponseEntity<List<Purchases>> getUserPurchaseDetails(@PathVariable Long userId)throws Exception{\n\t\t\tList<Purchases> purchase=null;\n\t\t\tUser user=null;\n\t\t\tBooks book=null;\n\t\t\tuser=userDAO.findOne(userId);\n\t\t\tif(user==null){\n\t\t\t\tthrow new Exception(\" User with id : \"+userId+\" does not exists !!!\"); \n\t\t\t}\n\t\t\tpurchase=purchaseDAO.findByUserId(userId);\n\t\t\tif(purchase!=null){\n\t\t\t\t for(Purchases purch : purchase) {\n\t\t\t\t\t book=booksDAO.findOne(purch.getIsbn());\n\t\t\t\t\t purch.setBook(book);\n\t\t\t\t }\n\t\t\t\t return new ResponseEntity<List<Purchases>>(purchase, HttpStatus.OK);\n\t\t\t}\n\t\t\telse {\n\t\t\t\treturn new ResponseEntity<List<Purchases>>(HttpStatus.NOT_FOUND);\n\t\t\t}\n\t\t}", "@Then(\"^user updates the basket$\")\n\tpublic void user_updates_the_basket() throws Throwable {\n\t\tamendFerry.updateBasket();\n\t}", "@Test\r\n\tpublic void findStore() {\n\r\n\t\tRestAssured.baseURI= \"https://api.bestbuy.com/v1/products/6341359/stores.json?\";\r\n\r\n\t\t//\t\tproducts/6341359/stores.json?postalCode=95125&apiKey=qUh3qMK14GdwAs9bO59QRSCJ\r\n\r\n\t\t//\t\tproducts(manufacturer=apple&search=iPhone 11 Pro)?format=json&show=name,regularPrice,salePrice&apiKey=qUh3qMK14GdwAs9bO59QRSCJ\r\n\t\t// products(manufacturer=apple&search=iPhone 11 64GB&inStorePickup=true)+stores(region=RI)?format=json&show=sku,name,stores.storeId,stores.name,stores.address&apiKey=qUh3qMK14GdwAs9bO59QRSCJ\r\n\r\n\t\t// Map<String, String> parametersMap = new HashMap<String, String>();\r\n\t\t//parametersMap.put(\"products\", \"products/6341359/\");\r\n\r\n\r\n\r\n\r\n\t\tResponse response = RestAssured\r\n\t\t\t\t.given()\r\n\t\t\t\t.log().all()\r\n\t\t\t\t.accept(ContentType.JSON)\r\n\t\t\t\t.queryParam(\"postalCode\",\"95125\")\r\n\t\t\t\t.queryParam(\"apiKey\",\"qUh3qMK14GdwAs9bO59QRSCJ\")\r\n\t\t\t\t.get();\r\n\r\n\t\tresponse.prettyPrint();\r\n\r\n\t\tSystem.out.println(\" Response code : \" + response.getStatusCode());\r\n\r\n\t}", "public ArrayList<Transaction> GetUserTransactions(int UserID);", "@Test\n void getCollectedHouses() {\n Integer userId = 10001;\n System.out.println(houseService.getCollectedHouses(userId.toString()));\n }", "@GetMapping(value = \"/basket\", produces = {MediaType.APPLICATION_JSON_VALUE})\n @ResponseBody\n public ResponseEntity<Integer> addToBasketAjax(@RequestParam(name = \"item\") int id,\n HttpSession session) {\n Integer shop_basket = basketService.prepareProductsForBasket(id, session);\n return new ResponseEntity<>(shop_basket, HttpStatus.OK);\n }", "public ArrayList<ProductType> findValidProducts(Integer UserId);", "@Test\n public void testGetAllSnacks() throws Exception {\n\n //creating a snack to test\n Snack testSnack = new Snack(\"1111\");\n testSnack.setName(\"Cookies\");\n testSnack.setPrice(new BigDecimal(\"6.99\"));\n testSnack.setQuantity(1);\n\n //adding the snack to the hashmap (inventory)\n dao.addSnack(testSnack.getSnackId(), testSnack);\n\n //the size returned should be 1\n assertEquals(1, dao.getAllSnacks().size());\n\n //removing the test snack from the hashmap\n dao.removeSnack(testSnack.getSnackId());\n }", "@Test\n public void sell() {\n System.out.println(client.sell(1, 0, 1));\n }", "@Test\n public void testSell() {\n Game game = Game.getInstance();\n Player player = new Player(\"Chisom\", 2, 2, 2,\n 2, SolarSystems.SOMEBI);\n game.setPlayer(player);\n game.getPlayer().getShip().getShipCargo().add(new CargoItem(2, Goods.Water));\n game.getPlayer().getShip().getShipCargo().add(new CargoItem(1, Goods.Food));\n game.getPlayer().getShip().getShipCargo().add(new CargoItem(1, Goods.Furs));\n CargoItem good = game.getPlayer().getShip().getShipCargo().get(2);\n good.getGood().sell(good.getGood(), 1);\n CargoItem water = game.getPlayer().getShip().getShipCargo().get(0);\n water.setQuantity(2);\n CargoItem food = game.getPlayer().getShip().getShipCargo().get(1);\n food.setQuantity(1);\n good.setQuantity(0);\n int P = good.getGood().getPrice(1);\n int total = game.getPlayer().getCredits();\n boolean quan = water.getQuantity() == 2 && food.getQuantity() == 1 && good.getQuantity() == 0;\n boolean check = water.getQuantity() == 2;\n System.out.print(total);\n assertTrue(quan && total == 1560);\n //assertEquals(true, quan && total == 1560);\n }", "public List<CartItem> getAllcartitem();" ]
[ "0.70718795", "0.65635943", "0.62733585", "0.6256325", "0.62383866", "0.6158505", "0.6148199", "0.61442876", "0.6092615", "0.6040337", "0.6010067", "0.5954026", "0.5947795", "0.5934649", "0.59338325", "0.58861214", "0.5853281", "0.5832235", "0.58016664", "0.5787045", "0.5782292", "0.5775641", "0.57589227", "0.5757523", "0.575576", "0.57345104", "0.5731738", "0.5720529", "0.5715947", "0.5714177", "0.5706735", "0.5704527", "0.57011205", "0.56918913", "0.56898314", "0.5647862", "0.5637822", "0.56371415", "0.5625734", "0.5618025", "0.56045634", "0.55902517", "0.5587719", "0.55516106", "0.5537456", "0.5534361", "0.55211926", "0.5518188", "0.55064064", "0.55020654", "0.54915404", "0.5443527", "0.5434342", "0.54116297", "0.54074544", "0.5406644", "0.5403477", "0.53894365", "0.53877", "0.5380046", "0.53787845", "0.5377131", "0.5369437", "0.53691334", "0.53689784", "0.5362816", "0.53608227", "0.5352981", "0.5344237", "0.53431004", "0.5329015", "0.53264934", "0.53167534", "0.53125936", "0.53051996", "0.52963495", "0.5295598", "0.5287296", "0.5285659", "0.5283094", "0.52813077", "0.5281129", "0.5280305", "0.52653444", "0.5265065", "0.52628297", "0.52496713", "0.5249475", "0.5244295", "0.5244235", "0.5241629", "0.5239502", "0.52394205", "0.5238442", "0.5233145", "0.5231331", "0.52264065", "0.5226249", "0.5225184", "0.52186596" ]
0.7107449
0
/ Test getting a single basket item
@Test public void testGetBasketItem() throws Exception { BBBBasket basket = AccountHelper.getInstance().getBasket(); if(basket == null || basket.items == null || basket.items.length < 1) { return; } String id = basket.items[0].id; BBBRequest request = BBBRequestFactory.getInstance().createGetBasketItemRequest(id); String expectedUrl = AccountHelper.constructUrl(BBBRequestFactory.getInstance().getHostBasket(), String.format(PATH_MY_BASKETS_ITEMS_, id) ); assertEquals(expectedUrl, request.getUrl()); BBBResponse response = BBBRequestManager.getInstance().executeRequestSynchronously(request); basketItemHandler.receivedResponse(response); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test\n\tpublic void getCostForItem() {\n\t\tfinal BasketItemImpl bi = new BasketItemImpl();\n\t\tbi.addBasketItem(\"banana\", 2);\n\t\tbi.addBasketItem(\"lemon\", 3);\n\n\t\tfinal int fc = bi.getAllBasketItems().get(\"banana\");\n\t\tassertTrue(Integer.compare(2, fc) == 0);\n\n\t}", "@Test \n\tpublic void testGetBasket() throws Exception {\n\t\tBBBRequest request = BBBRequestFactory.getInstance().createGetBasketRequest();\n\t\t\n\t\tString expectedUrl = AccountHelper.constructUrl(BBBRequestFactory.getInstance().getHostBasket(), PATH_MY_BASKETS);\n\t\tassertEquals(expectedUrl, request.getUrl());\n\t\t\n\t\tBBBResponse response = BBBRequestManager.getInstance().executeRequestSynchronously(request);\n\t\tbasketHandler.receivedResponse(response);\n\t}", "@Test\n public void getItem() {\n Item item = new Item();\n item.setName(\"Drill\");\n item.setDescription(\"Power Tool\");\n item.setDaily_rate(new BigDecimal(\"24.99\"));\n item = service.saveItem(item);\n\n // Copy the Item added to the mock database using the Item API method\n Item itemCopy = service.findItem(item.getItem_id());\n\n // Test the getItem() API method\n verify(itemDao, times(1)).getItem(item.getItem_id());\n TestCase.assertEquals(itemCopy, item);\n }", "@Test \n\tpublic void testAddItemToBasket() throws Exception {\n\t\tBBBRequest request = BBBRequestFactory.getInstance().createAddBasketItemRequest(BOOK_BASKET_ITEM_ISBN);\n\t\t\n\t\tString expectedUrl = AccountHelper.constructUrl(BBBRequestFactory.getInstance().getHostBasket(), PATH_MY_BASKETS_ITEMS);\n\t\tassertEquals(expectedUrl, request.getUrl());\n\t\t\n\t\tBBBResponse response = BBBRequestManager.getInstance().executeRequestSynchronously(request);\n\t\t\n\t\tif(response.getResponseCode() != HttpURLConnection.HTTP_OK) {\n\t\t\tfail(\"Error: \"+response.toString());\n\t\t}\n\t}", "@Test\n\tpublic void getCostForDuplicateItem() {\n\t\tfinal BasketItemImpl bi = new BasketItemImpl();\n\t\tbi.addBasketItem(\"banana\", 2);\n\t\tbi.addBasketItem(\"banana\", 4);\n\t\tbi.addBasketItem(\"lemon\", 3);\n\n\t\tfinal int fc = bi.getAllBasketItems().get(\"banana\");\n\t\tassertTrue(Integer.compare(6, fc) == 0);\n\n\t}", "ShoppingItem getShoppingItemByGuid(String itemGuid);", "@Order(2)\n\t@Test\n\tpublic void Attempt_GetItemByIdSuccess()\n\t{\n\t\tint iD = 1;\n\t\tboolean owned = false;\n\t\tItem test_Item = is.getItemByID(iD, owned);\n\t\tassertTrue(test_Item != null);\n\t}", "@Test\n public void others(){\n Item item = itemService.getItem(50);\n System.out.println(item);\n\n }", "@Test\r\n\tpublic void itemRetTest() {\r\n\t\tItem item = new Item();\r\n\t\ttry {\r\n\t\t\tint k = 0;\r\n\t\t\tk = item.getNumberOfItems(SELLER);\r\n\t\t\tassertNotSame(k, 0);\r\n\t\t\tItem tempSet[] = item.getAllForUser(SELLER);\r\n\t\t\tassertEquals(tempSet.length, k);\t\t\t// Retrieves correct number of items\r\n\t\t} catch (SQLException e) {\r\n\t\t\tfail(\"Failed to get number of items for seller id \" + SELLER + \": SQLException\");\r\n\t\t\t//e.printStackTrace();\r\n\t\t}\r\n\t\t\r\n\t\ttry {\r\n\t\t\tint k = 0;\r\n\t\t\tk = item.getNumberOfItemsInOrder(ORDER);\r\n\t\t\tassertNotSame(k, 0);\r\n\t\t\tItem tempSet[] = item.getAllByOrder(ORDER);\r\n\t\t\tassertEquals(tempSet.length, k);\t\t\t// Retrieves correct number of items\r\n\t\t} catch (SQLException e) {\r\n\t\t\tfail(\"Failed to get number of items for order id \" + ORDER + \": SQLException\");\r\n\t\t\t//e.printStackTrace();\r\n\t\t}\r\n\t\t\r\n\t\ttry {\r\n\t\t\tItem tempSet[] = item.getAllByOrder(ORDER);\r\n\t\t\tfor (int i = 0; i < tempSet.length; i++) {\r\n\t\t\t\tassertNotNull(tempSet[i]);\r\n\t\t\t\tassertNotNull(tempSet[i].getId());\r\n\t\t\t\tassertNotSame(tempSet[i].getId(), 0);\r\n\t\t\t}\r\n\t\t} catch (SQLException e) {\r\n\t\t\tfail(\"Failed to load items for order id \" + ORDER + \": SQLException\");\r\n\t\t\t//e.printStackTrace();\r\n\t\t}\r\n\t}", "@Test\n public void listSingleItemTest() {\n List<Item> items = itemSrv.getAllItems();\n Assert.assertNotNull(\"List of items is null\", items);\n\n Assert.assertEquals(\"Wrong initial size of the list, should be 0\", 0, items.size());\n\n final Item item1 = new Item(\"item1\", \"item1 description\");\n Assert.assertEquals(\"Item adding failure\", ErrCode.ADD_SUCCESS, itemSrv.addItem(item1));\n items = itemSrv.getAllItems();\n\n Assert.assertEquals(\"Total item count should be 1\", 1, items.size());\n Assert.assertNotNull(\"Item retrieved is null\", items.get(0));\n }", "@Test\n public void createBasket(){\n BasketRepositoryImpl basketRepository=new BasketRepositoryImpl(basketCrudRepository);\n // basketRepository.save(basket);\n var response= basketRepository.findByProductId(\"11\");\n System.out.println(response.toString());\n }", "public long getItemShopBasketId();", "public Item getItemById(Integer itemId);", "io.opencannabis.schema.commerce.OrderItem.Item getItem(int index);", "@Test(dependsOnMethods = {\"searchItem\"})\n\tpublic void purchaseItem() {\n\t\tclickElement(By.xpath(item.addToCar));\n\t\twaitForText(By.id(item.cartButton), \"1\");\n\t\tclickElement(By.id(item.cartButton));\n\t\t// on checkout screen validating the title and price of item is same as what we selected on search result page by text.\n\t\tAssert.assertTrue(isPresent(locateElement(By.xpath(item.priceLocator(price)))));\n\t\tAssert.assertTrue(isPresent(locateElement(By.xpath(item.titlelocator(title)))));\t\n\t}", "@Test\n public void testFindProduct() {\n ShoppingCart instance = new ShoppingCart();\n Product p1 = new Product(\"Galletas\", 1.2);\n Product p2 = new Product(\"Raton\", 85.6);\n \n instance.addItem(p1);\n instance.addItem(p2);\n \n assertTrue(instance.findProduct(\"Galletas\"));\n }", "@Test\n public void getCatalogItemTest() throws ApiException {\n String asin = null;\n List<String> marketplaceIds = null;\n List<String> includedData = null;\n String locale = null;\n Item response = api.getCatalogItem(asin, marketplaceIds, includedData, locale);\n // TODO: test validations\n }", "@Test \n\tpublic void testDeleteBasketItem() throws Exception {\n\t\tBBBBasket basket = AccountHelper.getInstance().getBasket();\n\t\t\n\t\tif(basket == null || basket.items == null || basket.items.length < 1) {\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tString id = basket.items[0].id;\n\t\t\n\t\tBBBRequest request = BBBRequestFactory.getInstance().createDeleteBasketItemRequest(id);\n\t\tString expectedUrl = AccountHelper.constructUrl(BBBRequestFactory.getInstance().getHostBasket(), String.format(PATH_MY_BASKETS_ITEMS_, id) );\n\t\tassertEquals(expectedUrl, request.getUrl());\n\t\t\n\t\tBBBResponse response = BBBRequestManager.getInstance().executeRequestSynchronously(request);\n\t\t\n\t\tif(response.getResponseCode() != HttpURLConnection.HTTP_OK) {\n\t\t\tfail(\"Error: \"+response.toString());\n\t\t}\n\t}", "@Test\n public void testGetItem() {\n System.out.println(\"getItem\");\n long itemId = 1L;\n ItemDaoImpl instance = (ItemDaoImpl) applicationContext.getBean(\"itemDao\", ItemDaoImpl.class);\n Item result = instance.getItem(itemId);\n assertEquals(1, result.getId());\n }", "@Test\n public void getAllItem() {\n Item item1 = new Item();\n item1.setName(\"Drill\");\n item1.setDescription(\"Power Tool\");\n item1.setDaily_rate(new BigDecimal(\"24.99\"));\n item1 = service.saveItem(item1);\n\n // Add an Item to the mock database using the Item API method (item2)\n Item item2 = new Item();\n item2.setName(\"Screwdriver\");\n item2.setDescription(\"Hand Tool\");\n item2.setDaily_rate(new BigDecimal(\"4.99\"));\n item2 = service.saveItem(item2);\n\n // Add all the Item's in the mock database to a list of Items using the Item API method\n List<Item> itemList = service.findAllItems();\n\n // Test the getAllItem() API method\n TestCase.assertEquals(2, itemList.size());\n TestCase.assertEquals(item1, itemList.get(0));\n TestCase.assertEquals(item2, itemList.get(1));\n }", "private Basket findById(int idBasket) {\n\t\treturn null;\n\t}", "@Test\n public void testAddGetItem() throws Exception {\n String itemName = \"Snickers\";\n Item item = new Item(itemName);\n item.setItemPrice(new BigDecimal(\"2.75\"));\n item.setItemStock(10);\n\n // ACT - add/get the item from the DAO\n testDao.addItem(itemName, item);\n Item retrievedItem = testDao.getItem(itemName);\n\n // ASSERT - Check that the data is equal\n assertEquals(item.getItemName(),\n retrievedItem.getItemName(),\n \"Checking Item Name.\");\n assertEquals(item.getItemPrice(),\n retrievedItem.getItemPrice(),\n \"Checking Item Price.\");\n assertEquals(item.getItemStock(),\n retrievedItem.getItemStock(),\n \"Checking Item Stock.\");\n }", "public Item getItem(long idItem) throws ItemNotFound;", "@Test\n public void testGetItem() throws Exception {\n System.out.println(\"getItem\");\n Integer orcamentoItemId = null;\n EJBContainer container = javax.ejb.embeddable.EJBContainer.createEJBContainer();\n OrcamentoService instance = (OrcamentoService)container.getContext().lookup(\"java:global/classes/OrcamentoService\");\n Orcamentoitem expResult = null;\n Orcamentoitem result = instance.getItem(orcamentoItemId);\n assertEquals(expResult, result);\n container.close();\n // TODO review the generated test code and remove the default call to fail.\n fail(\"The test case is a prototype.\");\n }", "@GetMapping(\"/items/{item_id}\")\n\tpublic ResponseEntity<Item> getItemById(@PathVariable(value=\"item_id\") Long item_id){ \n\t\tItem item = itemDAO.findOne(item_id);\n\t\t\n\t\tif(item == null) {\n\t\t\treturn ResponseEntity.notFound().build();\n\t\t}\n\t\treturn ResponseEntity.ok().body(item);\n\t}", "@Test\n public void GETProduct_ProductInventoryCall() {\n\n givenHeaders().\n when().\n get(_url_product).//.body().prettyPrint();\n then().\n using().defaultParser(Parser.JSON).\n log().ifError().\n statusCode(200).\n body(\"response\", not(isEmptyString()));\n System.out.print(\"GETPRODUCT_Inventory Test Run Result\");\n }", "@Test\n public void testAddItem() {\n \n System.out.println(\"AddItem\");\n \n /*ShoppingCart instance = new ShoppingCart();\n Product p1 = new Product(\"Galletas\", 1.2);\n Product p2 = new Product(\"Raton\", 85.6);\n Product p3 = new Product(\"Teclado\", 5.5);\n Product p4 = new Product(\"Monitor 4K\", 550.6);\n \n instance.addItem(p1);\n instance.addItem(p2);\n instance.addItem(p3);\n instance.addItem(p4);\n \n assertEquals(instance.getItemCount(), 4, 0.0);*/\n \n /*----------------------------------------------*/\n \n ShoppingCart instance = new ShoppingCart();\n Product p1 = new Product(\"Galletas\", 1.2);\n \n instance.addItem(p1);\n \n assertTrue(instance.findProduct(\"Galletas\"));\n \n }", "@Test\n public void getItemType () {\n Assert.assertEquals(\"SPECIAL\", bomb.getItemType().name());\n }", "@Override\n\tpublic Basket findOne(Integer arg0) {\n\t\treturn null;\n\t}", "@Then(\"^view basket$\")\r\n\tpublic void view_basket() throws Throwable {\n\t\tverbose(\"***********************************************************\");\r\n\t\tAssert.assertTrue(navigate_rsc.viewbasket());\r\n\t\tverbose(\"***********************************************************\");\r\n\t \r\n\t}", "@Test\n void showStoreHistorySuccess() {\n Integer productID1 = store.getProductID(\"computer\");\n tradingSystem.AddProductToCart(EconnID,storeID, productID1,5);\n tradingSystem.subscriberPurchase(EuserId, EconnID, \"123456\",\"4\",\"2022\",\"123\",\"123456\",\"Rager\",\"Beer Sheva\",\"Israel\",\"123\");\n List<DummyShoppingHistory> list = store.ShowStoreHistory();\n assertEquals(list.size(), 1);\n assertTrue(list.get(0).getProducts().get(0).getProductName().equals(\"computer\"));\n }", "Item findById(String id);", "@Test\n public void testItemService() {\n Item i = itemService.getItem(1);\n System.out.println(i.toString());\n Assert.assertSame(i, item);\n }", "@Test\n public void testGetItemCount() {\n \n System.out.println(\"GetItemCount\");\n \n ShoppingCart instance = new ShoppingCart();\n Product p1 = new Product(\"Galletas\", 1.2);\n \n instance.addItem(p1);\n \n assertEquals(instance.getItemCount(), 1, 0.0);\n \n Product p2 = new Product(\"Raton\", 85.6);\n Product p3 = new Product(\"Teclado\", 5.5);\n \n instance.addItem(p2);\n instance.addItem(p3);\n \n assertEquals(instance.getItemCount(), 3, 0.0);\n \n \n }", "@Test\n public void testCreateAndReadPositive() throws Exception{\n Item item = new Item();\n item.setName(\"item\");\n item.setType(ItemTypes.ALCOHOLIC_BEVERAGE);\n itemDao.create(item);\n Assert.assertNotNull(itemDao.read(item.getName()));\n }", "@Test\r\n\tpublic void testIdItem() {\r\n\r\n\t\ttry {\r\n\t\t\tItem itemDes = new Item(idItem, \"elixir de Destreza\", 0, 0, 0, 0, 0, 0, null, null);\r\n\r\n\t\t\tAssert.assertEquals(12321, itemDes.getIdItem());\r\n\r\n\t\t} catch (IOException e) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te.printStackTrace();\r\n\t\t}\t\t\r\n\r\n\t}", "public @NotNull Item findItem(@NotNull final Identifier identifier) throws ItemNotFoundException, BazaarException;", "InventoryItem getInventoryItem();", "@Test\n public void test_getBillByItem() {\n List<Bill> resultTwo = billManageServiceImpl.getBillByItem(\"0\");\n Assert.assertNotNull(resultTwo);\n// Assert.assertNull(resultOne);\n }", "@Test\n public void testGetByKey() throws Exception {\n when(repository.findByKey(this.product.getKey())).thenReturn(Optional.of(this.product));\n\n assertEquals(this.product, service.getByKey(this.product.getKey()));\n }", "public long getShopBasketId();", "public void doShopping(IBasket basket,IArchiveBasket archiveBasket);", "public static int reserveItem(Basket basket, String item, int quantity){\n StockItem stockItem = stockList.get(item);\n if(stockItem == null){\n System.out.println(\"We don't sell \"+ item);\n return 0;\n }\n if(stockList.reserveStock(item, quantity) != 0){\n basket.addToBasket(stockItem, quantity);\n return quantity;\n }\n System.out.println(\"Unable to reserve: '\"+item+\"' with quantity \"+ quantity + (quantity == 1 ? \" pc.\" : \" pcs.\"));\n return 0; //if get here means have no sufficient stock to sell.\n }", "@Test\n public void verifyAppleOfferApplied() {\n \tProduct product = new Product(\"Apple\", 0.2);\n \tBasket basket = new Basket();\n \tbasket.getProducts().put(product, 5);\n \tassertTrue(\"Have to get the price of 3 items = 0.6 ==> \", \n \t\t\tDouble.compare(calculator.calculatePrice(basket), 0.6) == 0);\n }", "@Test\n public void getProductDetailTest() throws ApiException {\n String productId = null;\n \n ResponseBankingProductById response = api.getProductDetail( productId );\n response.toString();\n // TODO: test validations\n }", "@Test\n\tpublic void testGet() throws ApiException {\n\n\t\tOrderItemPojo db_orderitem_pojo = order_service.get(orderitems.get(0).getId());\n\t\tassertEquals(orderitems.get(0).getOrder(), db_orderitem_pojo.getOrder());\n\t\tassertEquals(orderitems.get(0).getProduct(), db_orderitem_pojo.getProduct());\n\t\tassertEquals(orderitems.get(0).getQuantity(), db_orderitem_pojo.getQuantity());\n\t\tassertEquals(orderitems.get(0).getSellingPrice(), db_orderitem_pojo.getSellingPrice(), 0.001);\n\t}", "public BusinessObject getItem(Package pkg, String id);", "public void setItemShopBasketId(long itemShopBasketId);", "@Test(expected = ProductNotFoundException.class)\n public void TestProductNotFoundException() throws ProductNotFoundException {\n HashMap<Character, Product> productList = new HashMap<Character, Product>();\n Product product = new Product('A', 20, 2, 1);\n productList.put(product.getName(), product);\n\n product = new Product('B', 50, 5, 3);\n productList.put(product.getName(), product);\n\n product = new Product('C', 30, 3, 2);\n productList.put(product.getName(), product);\n\n com.jama.domain.Supermarket supermarket = new com.jama.domain.Supermarket(productList);\n\n int totalPrice = supermarket.checkout(\"BCABBACBCBX\");\n assertEquals(\"Total prices are not equal.\", new Integer(230), new Integer(totalPrice));\n }", "@Test\n\tpublic void testGetItem() throws Exception {\n\t\tNamespace testNamespace = new Namespace(this.fdb, \"\", this.fdb.getUsername());\n\t\t// There isn't anything there\n\t\tassertEquals(\"\", testNamespace.getId());\n\t\t// Lets call FluidDB and populate the fields... now there should be an ID\n\t\ttestNamespace.getItem();\n\t\tassertEquals(true, testNamespace.getId().length()>0);\n\t}", "public void testGetItem() throws RepositoryException{\n String path = \"path\";\n MockControl resultMock = MockControl.createControl(Item.class);\n Item result = (Item) resultMock.getMock();\n \n sessionControl.expectAndReturn(session.getItem(path), result);\n sessionControl.replay();\n sfControl.replay();\n \n assertSame(jt.getItem(path), result);\n \n }", "@Test\n public void getProductDetailTest() throws ApiException {\n String productId = null;\n ResponseBankingProduct response = api.getProductDetail(productId);\n\n // TODO: test validations\n }", "@Test\r\n\tpublic void testBonusSalud() {\r\n\t\t\r\n\t\ttry {\r\n\t\t\tItem itemDes = new Item(idItem, \"elixir de Destreza\", 0, bonusSalud, 0, 0, 0, 0, null, null);\r\n\t\t\t\r\n\t\t\tAssert.assertEquals(50, itemDes.getBonusSalud());\r\n\t\t\t\r\n\t\t} catch (IOException e) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te.printStackTrace();\r\n\t\t}\t\t\r\n\t}", "@Test(dependsOnMethods = {\"login\"})\n\tpublic void searchItem() {\n\t\thome.searchItem(data.readData(\"searchItem\"));\n\t\t// generating random number from total search result display using random number generator\n\t\tint index=data.randomeNum(getElementsCount(By.id(home.selectItem)));\n\t\t// storing title and price of searched item from search screen to verify later\n\t\ttitle= home.getTitle(index);\n\t\tprice=home.getPrice(index);\n\t\telementByIndex(By.id(home.selectItem), index).click();\n\t\twaitForElement(By.xpath(item.review));\n\t\t//Scrolling till we see addtocart button\n\t\tscrollPage();\n\t\tboolean actual = elementDisplay(By.xpath(item.addToCar));\n\t\tAssert.assertEquals(actual, true,\"Add to cart button not display\");\n\t}", "public String chooseItem() {\n console.promptForString(\"\");\n console.promptForPrintPrompt(\"PLEASE ENTER THE NAME OF THE ITEM TO PURCHASE\");\n console.promptForPrintPrompt(\"-----------------------\");\n String toBuy = console.promptForString(\"BUY: \");\n\n return toBuy;\n }", "@GetMapping(value=\"/item/view/{itemId}\")\r\n\tpublic ModelAndView itemDetailGetSingle(@PathVariable Long itemId) {\r\n\t\tEbayItem item;\r\n\t\tModelAndView modelAndView = new ModelAndView();\r\n\t\ttry {\r\n\t\t\titem = itemService.getItemForDisplay(itemId, null);\r\n\t\t} catch (Exception e) {\r\n\t\t\tmodelAndView.setViewName(\"redirect:/error\");\r\n\t\t\treturn modelAndView;\r\n\t\t}\r\n\t\tsetUpModelAndView(modelAndView, item);\r\n\t\tmodelAndView.setViewName(\"itemDetail\");\r\n\t\treturn modelAndView;\r\n\t}", "@Test\n public void testAddProductToShoppingCart_whenValidRequest_thenReturnAddedProduct() throws NotFoundException {\n Customer customerShoppingCartTest = customerStepsTest.createCustomerTest();\n Product productShoppingCartTest = productStepsTest.createProductTest();\n\n AddProductToShoppingCartRequest requestAddShoppingCartTest = new AddProductToShoppingCartRequest();\n requestAddShoppingCartTest.setCustomerId(customerShoppingCartTest.getId());\n requestAddShoppingCartTest.setProductId(productShoppingCartTest.getId());\n\n shoppingCartServiceTest.addProductToShoppingCart(requestAddShoppingCartTest);\n\n ShoppingCartDTO productRetrievedFromShoppingCartTest = shoppingCartServiceTest.getProductFromShoppingCart(customerShoppingCartTest.getId());\n\n assertThat(productRetrievedFromShoppingCartTest, notNullValue());\n assertThat(productRetrievedFromShoppingCartTest.getCustomer(), notNullValue());\n assertThat(productRetrievedFromShoppingCartTest.getCustomer().getId(), is(customerShoppingCartTest.getId()));\n assertThat(productRetrievedFromShoppingCartTest.getCustomer().getCustomerFirstName(), is(customerShoppingCartTest.getCustomerFirstName()));\n assertThat(productRetrievedFromShoppingCartTest.getCustomer().getCustomerLastName(), is(customerShoppingCartTest.getCustomerLastName()));\n assertThat(productRetrievedFromShoppingCartTest.getCustomer().getCustomerAddress(), is(customerShoppingCartTest.getCustomerAddress()));\n\n assertThat(productRetrievedFromShoppingCartTest.getProducts(), notNullValue());\n assertThat(productRetrievedFromShoppingCartTest.getProducts(), hasSize(1));\n\n ProductDTO firstProductFromShoppingChart = productRetrievedFromShoppingCartTest.getProducts().iterator().next();\n\n assertThat(firstProductFromShoppingChart, notNullValue());\n assertThat(firstProductFromShoppingChart.getName(), is(productShoppingCartTest.getName()));\n assertThat(firstProductFromShoppingChart.getQuantity(), is(productShoppingCartTest.getQuantity()));\n assertThat(firstProductFromShoppingChart.getPrice(), is(productShoppingCartTest.getPrice()));\n assertThat(firstProductFromShoppingChart.getImagePath(), is(productShoppingCartTest.getImagePath()));\n assertThat(firstProductFromShoppingChart.getProductDescription(), is(productShoppingCartTest.getProductDescription()));\n assertThat(firstProductFromShoppingChart.getProductRate(), is(productShoppingCartTest.getProductRate()));\n }", "@Test\n public void buy() {\n System.out.println(client.purchase(1, 0, 1));\n }", "@Transactional(readOnly = true)\n public Optional<ItemInstance> findOne(Long id) {\n log.debug(\"Request to get ItemInstance : {}\", id);\n return itemInstanceRepository.findById(id);\n }", "@Override\r\n\tpublic OrderItem getOrderItem(int id) {\n\t\tSession session = SessionFactorySingleton.getSessionFactory().getFactorySession();\r\n\t\tOrderItem order = (OrderItem) session.get(OrderItem.class,id);\r\n\t\treturn order;\r\n\r\n\t}", "@Test\n public void getOrderByIdTest() {\n Long orderId = 10L;\n Order response = api.getOrderById(orderId);\n Assert.assertNotNull(response);\n Assert.assertEquals(10L, response.getId().longValue());\n Assert.assertEquals(10L, response.getPetId().longValue());\n Assert.assertEquals(1, response.getQuantity().intValue());\n\n verify(exactly(1), getRequestedFor(urlEqualTo(\"/store/order/10\")));\n }", "@Test(priority = 1)\n public void testPurchaseSingleItemAndGetTotal() throws Exception {\n URI uri = new URI(LOCALHOST + randomServerPort + \"/api/mycart\");\n HttpEntity<String> request = new HttpEntity<>(headersUser1);\n ResponseEntity<String> result = restTemplate.exchange(uri, HttpMethod.GET, request, String.class);\n assertEquals(200, result.getStatusCodeValue());\n setCookie(result, headersUser1); // save the session cookie to use with subsequent requests.\n\n // doing an API call to get products and select a random product\n List<ProductDTO> products = getProducts(headersUser1);\n Random random = new Random();\n ProductDTO product = products.stream().skip(random.nextInt(products.size())).findFirst().orElseThrow();\n\n BigDecimal exceptedTotal = new BigDecimal(\"0.0\");\n CartItemDTO item = new CartItemDTO();\n item.setQuantity((long) (random.nextInt(5) + 1));\n item.setProduct(product);\n\n BigDecimal price = product.getPrice().add(product.getTax());\n exceptedTotal = exceptedTotal.add(price.multiply(new BigDecimal(item.getQuantity())));\n\n // doing an API call to add the select product into cart.\n uri = new URI(LOCALHOST + randomServerPort + \"/api/mycart/items\");\n HttpEntity<CartItemDTO> itemAddRequest = new HttpEntity<>(item, headersUser1);\n result = restTemplate.exchange(uri, HttpMethod.POST, itemAddRequest, String.class);\n assertEquals(201, result.getStatusCodeValue());\n\n // doing an API call to get the content of the cart\n uri = new URI(LOCALHOST + randomServerPort + \"/api/mycart\");\n request = new HttpEntity<>(headersUser1);\n ResponseEntity<ShoppingCartDTO> cartResponse = restTemplate.exchange(uri,\n HttpMethod.GET, request, ShoppingCartDTO.class);\n assertEquals(200, cartResponse.getStatusCodeValue());\n assertNotNull(cartResponse.getBody());\n exceptedTotal = exceptedTotal.multiply(new BigDecimal(\"1.15\"));\n assertEquals(exceptedTotal, cartResponse.getBody().getTotalAmount());\n\n // doing an API call to clear the cart.\n uri = new URI(LOCALHOST + randomServerPort + \"/api/mycart\");\n request = new HttpEntity<>(headersUser1);\n result = restTemplate.exchange(uri, HttpMethod.DELETE, request, String.class);\n assertEquals(204, result.getStatusCodeValue());\n }", "public Object get(String itemName);", "@Test\n public void getIngredient_ReturnsIngredient(){\n int returned = testDatabase.addIngredient(ingredient);\n assertNotEquals(\"getIngredient - Return Non-Null Ingredient\",null, testDatabase.getIngredient(returned));\n }", "@Override\n public Item retrieveSingleItem(int itemNo) throws VendingMachinePersistenceException {\n loadItemFile();\n return itemMap.get(itemNo);\n }", "private Item getNewItem(String gtin) throws IOException {\n\n\t\tlog.info(\"Getting Item with Barcode: \" + gtin);\n\t\tGson gson = new Gson();\n\t\tURL url = new URL(\"https://api.outpan.com/v2/products/\" + gtin + \"?apikey=e13a9fb0bda8684d72bc3dba1b16ae1e\");\n\n\t\tStringBuilder temp = new StringBuilder();\n\t\tScanner scanner = new Scanner(url.openStream());\n\n\t\twhile (scanner.hasNext()) {\n\t\t\ttemp.append(scanner.nextLine());\n\t\t}\n\t\tscanner.close();\n\n\t\tItem item = new Item(gson.fromJson(temp.toString(), Item.class));\n\t\t\n\t\tif (item.name != null) {\n\t\t\treturn item;\n\t\t} else {\n\t\t\tthrow new NoNameForProductException();\n\t\t}\n\t}", "@Test\n public void addToCart() throws Exception {\n\n ReadableProducts product = super.readyToWorkProduct(\"addToCart\");\n assertNotNull(product);\n\n PersistableShoppingCartItem cartItem = new PersistableShoppingCartItem();\n cartItem.setProduct(product.getId());\n cartItem.setQuantity(1);\n\n final HttpEntity<PersistableShoppingCartItem> cartEntity =\n new HttpEntity<>(cartItem, getHeader());\n final ResponseEntity<ReadableShoppingCart> response =\n testRestTemplate.postForEntity(\n String.format(\"/api/v1/cart/\"), cartEntity, ReadableShoppingCart.class);\n\n // assertNotNull(response);\n // assertThat(response.getStatusCode(), is(CREATED));\n\n }", "@Test\n public void getInventoryTest() {\n Map<String, Integer> response = api.getInventory();\n\n Assert.assertNotNull(response);\n Assert.assertFalse(response.isEmpty());\n\n verify(exactly(1), getRequestedFor(urlEqualTo(\"/store/inventory\")));\n }", "@Test\n public void getIngredient_CorrectInformation(){\n int returned = testDatabase.addIngredient(ingredient);\n Ingredient retrieved = testDatabase.getIngredient(returned);\n assertEquals(\"getIngredient - Correct Name\", \"Flour\", retrieved.getName());\n assertEquals(\"getIngredient - Correct ID\", returned, retrieved.getKeyID());\n }", "@Override\n public Item get(long idItem) throws EntityNotFound;", "@Override\n\tpublic FoodItem getItem(Long id) {\n\t\treturn foodItemRepository.getOne(id);\n\t}", "@Test\n public void testCartItemGetters() {\n int quantity = 4;\n Product p = new Product(\"test-product\", 5, new Category(\"Category1\"));\n CartItem cartItem = new CartItem(p, quantity);\n assertEquals(cartItem.getProduct(), p);\n assertEquals(cartItem.getQuantity(), quantity);\n }", "@GetMapping(\"/get/{id}\")\n @ApiOperation(value = \"Retrieve Basket\",response = CustomResponseEntity.class)\n public ResponseEntity<Object> getBasket(@RequestParam @ApiParam(value = \"ID of User\") Long userId) throws UserException, SQLException {\n userService.findUserById(userId);\n CustomResponseEntity customResponseEntity = basketService.getBasket(userId);\n return new ResponseEntity<>(customResponseEntity, HttpStatus.OK);\n }", "@Test\n public void testGetSingleRecipe() throws Exception {\n System.out.println(\"getSingleRecipeREST\");\n String recipe = \"slow cooker beef stew\";\n Recipe expResult = r1;\n Recipe result = get(\"/recipes/specific/\" + recipe).then()\n .assertThat()\n .statusCode(HttpStatus.OK_200.getStatusCode())\n .extract()\n .as(Recipe.class);\n assertEquals(expResult, result);\n \n }", "CatalogItem getItembyId(final Long id);", "@RequestMapping(value = \"/item/{id}\", method = RequestMethod.GET)\n\tpublic @ResponseBody Optional<Item> findItemRest(@PathVariable(\"id\") Long itemId) {\n\t\treturn repository.findById(itemId);\n\t}", "@Test\n public void testFindProductShouldCorrect() throws Exception {\n // Mock method\n when(productRepository.findOne(product.getId())).thenReturn(product);\n\n testResponseData(RequestInfo.builder()\n .request(get(PRODUCT_DETAIL_ENDPOINT, product.getId()))\n .token(memberToken)\n .httpStatus(HttpStatus.OK)\n .build());\n }", "public static int checkout(Basket basket) {\n\t\tfor (Map.Entry<StockItem, Integer> item : basket.Items().entrySet()) {\n\t\t\tString itemName = item.getKey().getName();\n\t\t\tStockItem stockItem = stockList.get(itemName);\n\t\t\tif (stockItem == null) {\n\t\t\t\tSystem.out.println(\"We don't sell \" + itemName);\n\t\t\t\treturn 0;\n\t\t\t}\n\t\t\tstockList.sellStock(itemName);\n\t\t}\n\t\tbasket.clear();\n\t\treturn 0;\n\t}", "@Test\n public void TestABBACBBABABBACBBAB() {\n HashMap<Character, Product> productList = new HashMap<Character, Product>();\n Product product = new Product('A', 20);\n productList.put(product.getName(), product);\n\n product = new Product('B', 50, 5, 3);\n productList.put(product.getName(), product);\n\n product = new Product('C', 30);\n productList.put(product.getName(), product);\n\n com.jama.domain.Supermarket supermarket = new com.jama.domain.Supermarket(productList);\n\n try {\n int totalPrice = supermarket.checkout(\"ABBACBBABABBACBBAB\");\n assertEquals(\"Total prices does not equal.\", new Integer(480), new Integer(totalPrice));\n }\n catch (Exception e)\n {\n fail(e.getMessage());\n }\n }", "@Override\n\tpublic Item loadSingleResult(Object itemId) {\n\t\treturn null;\n\t}", "private ClothingItem readItem() {\n System.out.println(\"Read item {id,name,designer,price}\");\n\n BufferedReader bufferRead = new BufferedReader(new InputStreamReader(System.in));\n try {\n Long id = Long.valueOf(bufferRead.readLine());\n String name = bufferRead.readLine();\n String designer = bufferRead.readLine();\n int price = Integer.parseInt(bufferRead.readLine());\n ClothingItem item = new ClothingItem(name, designer, price);\n item.setId(id);\n\n return item;\n\n } catch (IOException ex) {\n ex.printStackTrace();\n }\n return null;\n }", "public Item getItem(Long id)\n {\n return auctionManager.getItem(id);\n }", "public void testGetInfo(boolean isAlreadyUpdated) {\n Baskets = new String[] { BasketPath };\n TGetInfo_Return[] Baskets_info_out = basketService.getInfo(Baskets, BasketAttributes, AddressAttributes, ItemAttributes, null);\n assertEquals(\"exists result set\", 1, Baskets_info_out.length);\n\n TGetInfo_Return Basket_info_out = Baskets_info_out[0];\n assertNoError(Basket_info_out.getError());\n assertNotNull(Basket_info_out.getAlias());\n\n TAddressNamed Address_out = Basket_info_out.getBillingAddress();\n assertEquals(\"EMail\", Address_in.getEMail(), Address_out.getEMail());\n TProductLineItemOut productLineItem = Basket_info_out.getLineItemContainer().getProductLineItems()[0];\n assertEquals(\"/Units/piece\", productLineItem.getOrderUnit());\n\n if (isAlreadyUpdated) {\n // check updated order data\n assertEquals(\"IsAcceptCreditCheckOK\", Basket_up.getAttributes()[0].getValue(), Basket_info_out.getAttributes()[0].getValue());\n\n // check updated address\n assertEquals(\"FirstName\", Address_up.getFirstName(), Address_out.getFirstName());\n assertEquals(\"LastName\", Address_up.getLastName(), Address_out.getLastName());\n assertEquals(\"Street\", Address_up.getStreet(), Address_out.getStreet());\n assertEquals(\"Street2\", Address_up.getStreet2(), Address_out.getStreet2());\n assertEquals(\"Quantity\", 20f, productLineItem.getQuantity(), 0.0);\n } else {\n // check order data created without update\n assertEquals(\"IsAcceptCreditCheckOK\", Basket_in.getAttributes()[0].getValue(), Basket_info_out.getAttributes()[0].getValue());\n\n // check created address\n assertEquals(\"FirstName\", Address_in.getFirstName(), Address_out.getFirstName());\n assertEquals(\"LastName\", Address_in.getLastName(), Address_out.getLastName());\n assertEquals(\"Street\", Address_in.getStreet(), Address_out.getStreet());\n assertEquals(\"Street2\", Address_in.getStreet2(), Address_out.getStreet2());\n assertEquals(\"Quantity\", 10f, productLineItem.getQuantity(), 0.0);\n }\n\n assertEquals(\"TaxArea\", Basket_in.getLineItemContainer().getTaxArea(), Basket_info_out.getLineItemContainer().getTaxArea());\n assertEquals(\"TaxModel\", Basket_in.getLineItemContainer().getTaxModel(), Basket_info_out.getLineItemContainer().getTaxModel());\n assertEquals(\"CurrencyID\", Basket_in.getLineItemContainer().getCurrencyID(), Basket_info_out.getLineItemContainer().getCurrencyID());\n // \"IsAddressOK\", \"WebUrl\", \"PickupToken\"\n assertNotNull(\"IsAddressOK\", Basket_info_out.getAttributes()[0].getValue());\n assertNotNull(\"WebUrl\", Basket_info_out.getAttributes()[1].getValue());\n assertNotNull(\"PickupToken\", Basket_info_out.getAttributes()[2].getValue());\n\n assertNotNull(\"Alias\", productLineItem.getAlias());\n assertNotNull(\"Name\", productLineItem.getName());\n assertNotNull(\"Product\", productLineItem.getProduct());\n assertNotNull(\"TaxClass\", productLineItem.getTaxClass());\n assertTrue(\"BasePrice\", productLineItem.getBasePrice() > 0);\n assertTrue(\"LineItemPrice\", productLineItem.getLineItemPrice() > 0);\n assertEquals(\"SKU\", \"ho_1112105010\", productLineItem.getSKU());\n }", "ProductPurchaseItem getProductPurchaseItemPerId(long sprcId);", "@Test\n public void shouldReturnOKStatus() throws Exception{\n Mockito.when(itemService.getItemById(1)).thenReturn(new Item(1,\"Item1\",12,25));\n RequestBuilder requestBuilder= MockMvcRequestBuilders.get(\"/item?id=1\").accept(MediaType.APPLICATION_JSON);\n mockMvc.perform(requestBuilder).andExpect(status().isOk()).andExpect(content().json(\"{\" +\n \"id:1,name:Item1,price:12,quantity:25}\"));\n }", "@Test\n public void HappyDailyIncomeForStore(){\n Integer productID1 = store.getProductID(\"computer\");\n tradingSystem.AddProductToCart(NconnID, storeID, productID1, 3);\n tradingSystem.subscriberPurchase(NofetID, NconnID, \"123456789\", \"4\",\"2022\" , \"123\", \"123456789\", \"Rager 101\",\"Beer Sheva\",\"Israel\",\"8458527\");\n\n Double dailyIncome = store.getDailyIncome();\n assertEquals(dailyIncome, 9000.0);\n }", "@Override\n\tpublic Item getItemByID(String itemId) {\n\n\t\treturn actionOnItem(itemId).get(0);\n\t}", "@Override\n\tpublic Item getItemByID(String itemId) {\n\n\t\treturn actionOnItem(itemId).get(0);\n\t}", "public static int addToBasket(Basket basket, String item, int quantity) {\n StockItem stockItem = stockList.get(item);\n if(stockItem == null) {\n System.out.println(\"We don't sell \" + item);\n return 0;\n }\n if(stockList.reserveStock(item, quantity) != 0) {\n basket.addToBasket(stockItem, quantity);\n return quantity;\n }\n return 0;\n }", "@Test\n\tpublic void testFindProductSkuByGuidWithOneReturn() {\n\t\tfinal List<ProductSku> productSkus = new ArrayList<ProductSku>();\n\t\tProductSku productSku = new ProductSkuImpl();\n\t\tproductSkus.add(productSku);\n\t\tcontext.checking(new Expectations() {\n\t\t\t{\n\t\t\t\tallowing(getMockPersistenceEngine()).retrieveByNamedQuery(with(any(String.class)), with(any(Object[].class)));\n\t\t\t\twill(returnValue(productSkus));\n\t\t\t}\n\t\t});\n\t\tassertSame(productSku, this.importGuidHelper.findProductSkuByGuid(SOME_GUID));\n\t}", "@RequestMapping(method=RequestMethod.GET, value = \"/item/{id}\", produces = \"application/json\")\n public Item getItem(@PathVariable (name = \"id\") UUID id)\n {\n return this.itemRepository.getItem(id);\n }", "@Test\n public void verifyWatermelonOfferApplied() {\n \tProduct product = new Product(\"Watermelon\", 0.8);\n \tBasket basket = new Basket();\n \tbasket.getProducts().put(product, 7);\n \tassertTrue(\"Have to get the price of 7 items = 4 ==> \", \n \t\t\tDouble.compare(calculator.calculatePrice(basket), 4) == 0);\n }", "public void clickAddTopping(int itemIndex, ItemCart item);", "private void testShippingGoods(){\n\t\tItem []itemArray1 = warehouse.getProductsByID(\"\");\n\n\n\t\tItem[] itemArray = warehouse.shippingGoods(itemArray1);\n\t\tSystem.out.println(\"There are \" + itemArray.length + \" items\");\n\t\tfor(Item item: itemArray){\n\t\t\tItemImpl tmpItemImpl = new ItemImpl(item);\n\t\t\tSystem.out.println(tmpItemImpl.toString());\n\t\t}\n\t}", "@Test\n\tpublic void createItemEqual() {\n\t\tItem item = new Item().createItemFromItemName(\"lamp\");\n\t\tSystem.out.println(item);\n\t\tassertEquals(new Item(), item);\n\t}", "TradeItem getTradeItem(long id);", "public Object getItem(Node itemNode) throws XmlRecipeException;", "public Fruit getFruitByItem(int item) {\n int countItem = 1;\n for (Fruit fruit : fruitList) {\n //check shop have item or not \n if (fruit.getQuantity() != 0) {\n countItem++;\n }\n if (countItem - 1 == item) {\n return fruit;\n }\n }\n return null;\n }", "ItemVariant getItemVariant(Integer itemVariantId);", "@Test\n public void GETProductService_ProductCall() {\n givenHeaders().\n when().\n get(_url_prodservice).//.body().prettyPrint();\n then().\n using().defaultParser(Parser.JSON).\n log().ifError().\n statusCode(200).\n body(\"response\", not(isEmptyString()));\n System.out.print(\"GETProductService_ProductCall Test Run Result\");\n }" ]
[ "0.7060678", "0.6896003", "0.683193", "0.6720334", "0.6640545", "0.6608811", "0.6582085", "0.65181917", "0.6421486", "0.641511", "0.6390982", "0.6372108", "0.6366718", "0.6355223", "0.6346719", "0.6340909", "0.6319029", "0.6315865", "0.63012165", "0.6254966", "0.6193832", "0.61828643", "0.6172553", "0.6160959", "0.6150118", "0.6147626", "0.61439747", "0.6138405", "0.6118102", "0.6104731", "0.60674536", "0.6035964", "0.6016161", "0.5989786", "0.5980866", "0.5977676", "0.5960891", "0.59575343", "0.5953775", "0.5951393", "0.5938448", "0.59158266", "0.5889033", "0.58784574", "0.58757955", "0.58601886", "0.5856558", "0.5853647", "0.58524597", "0.58449376", "0.58182275", "0.58169883", "0.5809108", "0.58081776", "0.5805625", "0.5800936", "0.58003736", "0.5794607", "0.5794302", "0.5792016", "0.5767424", "0.5756842", "0.57512206", "0.57458407", "0.5739849", "0.5737613", "0.57370234", "0.57318777", "0.5731321", "0.5730347", "0.5726982", "0.57220054", "0.5720609", "0.57192934", "0.57128716", "0.5712821", "0.5711387", "0.57041425", "0.5700442", "0.569394", "0.5691065", "0.5687264", "0.56856793", "0.5659197", "0.56547916", "0.5652462", "0.56520814", "0.56520814", "0.56445706", "0.56362545", "0.56286186", "0.5627658", "0.56241864", "0.5622948", "0.5619951", "0.56114906", "0.56108373", "0.5609606", "0.56065774", "0.5605555" ]
0.83049196
0
/ Test deleting a basket item
@Test public void testDeleteBasketItem() throws Exception { BBBBasket basket = AccountHelper.getInstance().getBasket(); if(basket == null || basket.items == null || basket.items.length < 1) { return; } String id = basket.items[0].id; BBBRequest request = BBBRequestFactory.getInstance().createDeleteBasketItemRequest(id); String expectedUrl = AccountHelper.constructUrl(BBBRequestFactory.getInstance().getHostBasket(), String.format(PATH_MY_BASKETS_ITEMS_, id) ); assertEquals(expectedUrl, request.getUrl()); BBBResponse response = BBBRequestManager.getInstance().executeRequestSynchronously(request); if(response.getResponseCode() != HttpURLConnection.HTTP_OK) { fail("Error: "+response.toString()); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void testDelete() {\n TDelete_Return[] Basket_delete_out = basketService.delete(new String[] { BasketPath });\n assertNoError(Basket_delete_out[0].getError());\n }", "@Test\n public void deleteItem() {\n Item item = new Item();\n item.setName(\"Drill\");\n item.setDescription(\"Power Tool\");\n item.setDaily_rate(new BigDecimal(\"24.99\"));\n item = service.saveItem(item);\n\n // Delete the Item from the database using the Item API method\n service.removeItem(item.getItem_id());\n\n // Test the deleteItem() method\n verify(itemDao, times(1)).deleteItem(integerArgumentCaptor.getValue());\n TestCase.assertEquals(item.getItem_id(), integerArgumentCaptor.getValue().intValue());\n }", "@Test\n void deleteTest() {\n Product product = new Product(\"Apple\", 10, 4);\n shoppingCart.addProducts(product.getName(), product.getPrice(), product.getQuantity());\n //when deletes two apples\n boolean result = shoppingCart.deleteProducts(product.getName(), 2);\n //then basket contains two apples\n int appleNb = shoppingCart.getQuantityOfProduct(\"Apple\");\n assertTrue(result);\n assertEquals(2, appleNb);\n }", "void delete(ShoppingBasket shoppingBasket);", "@Test\n void deletePermanentlyTest() {\n Product product = new Product(\"Apple\", 10, 4);\n shoppingCart.addProducts(product.getName(), product.getPrice(), product.getQuantity());\n //when deletes four apples\n boolean result = shoppingCart.deleteProducts(product.getName(), 4);\n //then basket does not contain any apple\n int appleNb = shoppingCart.getQuantityOfProduct(\"Apple\");\n assertTrue(result);\n assertEquals(0, appleNb);\n }", "@Test\n\tpublic void deleteItemTest() {\n\t\tInteger associatedAccountId_1 = 1;\n\t\tString type_1 = \"deposit\";\n\t\tString date_1 = \"2018-04-03\";\n\t\tInteger amount_1 = 100;\n\t\tString description_1 = \"This is test transaction number one\";\n\t\tTransaction testDeleteTransaction_1 = new Transaction();\n\t\ttestDeleteTransaction_1.setAssociatedAccountId(associatedAccountId_1);\n\t\ttestDeleteTransaction_1.setType(type_1);\n\t\ttestDeleteTransaction_1.setDate(date_1);\n\t\ttestDeleteTransaction_1.setAmount(amount_1);\n\t\ttestDeleteTransaction_1.setDescription(description_1);\n\t\ttransacRepoTest.saveItem(testDeleteTransaction_1);\t\t\n\t\t\n\t\t//should now be 1 transaction in the repo\t\t\n\t\tArrayList<Transaction> transList = transacRepoTest.getItemsFromAccount(associatedAccountId_1);\n\t\tassertEquals(transList.size(), 1);\n\t\t\t\n\t\ttransacRepoTest.deleteItem(associatedAccountId_1);\n\n\t\t//should now be 0 transactions in the repo\n\t\ttransList = transacRepoTest.getItemsFromAccount(associatedAccountId_1);\n\t\tassertEquals(transList.size(), 0);\n\t\t\n\t}", "@Test\n void deleteItem() {\n }", "@Test\n public void testRemovePositive() throws Exception{\n Item item = new Item();\n item.setName(\"item\");\n item.setType(ItemTypes.ALCOHOLIC_BEVERAGE);\n itemDao.create(item);\n\n Assert.assertTrue(itemDao.delete(item.getName()));\n Assert.assertNull(itemDao.read(item.getName()));\n }", "@Test\n public void testRemoveItem() throws Exception {\n \n System.out.println(\"RemoveItem\");\n \n /*ShoppingCart instance = new ShoppingCart();\n Product p1 = new Product(\"Galletas\", 1.2);\n Product p2 = new Product(\"Raton\", 85.6);\n Product p3 = new Product(\"Teclado\", 5.5);\n Product p4 = new Product(\"Monitor 4K\", 550.6);\n \n instance.addItem(p1);\n instance.addItem(p2);\n instance.addItem(p3);\n instance.addItem(p4);\n \n try{\n \n instance.removeItem(p1);\n \n } catch(Exception e){\n \n fail(\"No existe\");\n \n }*/\n \n /*---------------------------------------------*/\n \n ShoppingCart instance = new ShoppingCart();\n Product p1 = new Product(\"Galletas\", 1.2);\n \n instance.addItem(p1);\n \n try{\n \n instance.removeItem(p1);\n \n } catch(Exception e){\n \n assertTrue(instance.isEmpty());\n \n }\n \n }", "public DeleteItemOutcome deleteItem(DeleteItemSpec spec);", "@Test\r\n\tpublic void remove_items() {\r\n//Go to http://www.automationpractice.com\r\n//Mouse hover on product one\r\n//Click 'Add to Cart'\r\n//Click 'Continue shopping' button\r\n//Verify Cart has text '1 Product'\r\n//Mouse hover over 'Cart 1 product' button\r\n//Verify product listed\r\n//Now mouse hover on another product\r\n//click 'Add to cart' button\r\n//Click on Porceed to checkout\r\n//Mouse hover over 'Cart 2 product' button\r\n//Verify 2 product listed now\r\n//click 'X'button for first product\r\n//Verify 1 product deleted and other remain\r\n\r\n\t}", "@Test\r\n\tvoid testdeleteProductFromCart() throws Exception\r\n\t{\r\n\t\tCart cart=new Cart();\r\n\t\tcart.setProductId(1001);\r\n\t\tcartdao.addProductToCart(cart);\r\n\t\tList<Cart> l=cartdao.findAllProductsInCart();\r\n\t\tcart=cartdao.deleteProductByIdInCart(1001);\r\n\t\tassertEquals(1,l.size());\r\n\t}", "@Test\n public void foodDeletedGoesAway() throws Exception {\n createFood();\n // locate the food item\n\n // delete the food item\n\n // check that food item no longer locatable\n\n }", "@Test\n void canNotDeleteTest() {\n Product product = new Product(\"Apple\", 10, 4);\n shoppingCart.addProducts(product.getName(), product.getPrice(), product.getQuantity());\n //when deletes five apples\n boolean result = shoppingCart.deleteProducts(product.getName(), 5);\n //then apples are not deleted\n int appleNb = shoppingCart.getQuantityOfProduct(\"Apple\");\n assertFalse(result);\n assertEquals(4, appleNb);\n }", "@Override\n public void deleteItem(P_CK t) {\n \n }", "@Test\n public void deleteIngredient_Deletes(){\n int returned = testDatabase.addIngredient(ingredient);\n testDatabase.deleteIngredient(returned);\n assertEquals(\"deleteIngredient - Deletes From Database\",null, testDatabase.getIngredient(returned));\n }", "@Test\n\tpublic void testDeleteCart() {\n\t}", "void deleteItem(IDAOSession session, int id);", "@Test\n public void testDeleteItem() throws Exception {\n\n Tracker tracker = new Tracker();\n\n String action = \"0\";\n String yes = \"y\";\n String no = \"n\";\n\n // add first item\n\n String name1 = \"task1\";\n String desc1 = \"desc1\";\n String create1 = \"3724\";\n\n Input input1 = new StubInput(new String[]{action, name1, desc1, create1, yes});\n new StartUI(input1).init(tracker);\n\n // add second item\n\n String name2 = \"task2\";\n String desc2 = \"desc2\";\n String create2 = \"97689\";\n\n Input input2 = new StubInput(new String[]{action, name2, desc2, create2, yes});\n new StartUI(input2).init(tracker);\n\n // get first item id\n\n String id = \"\";\n\n Filter filter = new FilterByName(name1);\n Item[] result = tracker.findBy(filter);\n for (Item item : result) {\n if (item !=null && item.getName().equals(name1)) {\n id = item.getId();\n break;\n }\n }\n\n // delete first item\n\n String action2 = \"2\";\n\n Input input3 = new StubInput(new String[]{action2, id, yes});\n new StartUI(input3).init(tracker);\n\n Assert.assertNull(tracker.findById(id));\n }", "@Test\r\n\tpublic void testRemoveItem() {\r\n\t\tVendingMachineItem test = new VendingMachineItem(\"test\", 10.0);\r\n\t\tvendMachine.addItem(test, \"B\");\r\n\t\tassertEquals(test, vendMachine.removeItem(\"B\"));\r\n\t}", "@Test\n void removeItem() {\n }", "@Test\r\n public void testDelete() {\r\n System.out.println(\"delete\");\r\n String isbn = \"1222111131\";\r\n int expResult = 1;\r\n int result = TitleDao.delete(isbn);\r\n assertEquals(expResult, result);\r\n }", "@Test\n public void myMetingList_deleteAction_shouldRemoveItem() {\n // Given : We remove the element at position 1\n onView(ViewMatchers.withId(R.id.recyclerview)).check(withItemCount(ITEMS_COUNT));\n // When perform a click on a delete icon\n onView(ViewMatchers.withId(R.id.recyclerview))\n .perform(RecyclerViewActions.actionOnItemAtPosition(1, new DeleteViewAction()));\n // Then : the number of element is 1\n onView(ViewMatchers.withId(R.id.recyclerview)).check(withItemCount(ITEMS_COUNT-1));\n }", "@Test\n public void deleteRecipe_Deletes(){\n int returned = testDatabase.addRecipe(testRecipe);\n testDatabase.deleteRecipe(returned);\n assertEquals(\"deleteRecipe - Deletes From Database\", null, testDatabase.getRecipe(returned));\n }", "@Test\n void removeItem() {\n\n }", "@Test\r\n public void testDeleteRecipe() {\r\n coffeeMaker.addRecipe(recipe1);\r\n assertEquals(recipe1.getName(), coffeeMaker.deleteRecipe(0));\r\n assertNull(coffeeMaker.deleteRecipe(0)); // Test already delete recipe\r\n }", "@Test\n void deleteSuccess() {\n\n UserDOA userDao = new UserDOA();\n User user = userDao.getById(1);\n String orderDescription = \"February Large Test-Tshirt Delete\";\n\n Order newOrder = new Order(orderDescription, user, \"February\");\n user.addOrder(newOrder);\n\n dao.delete(newOrder);\n List<Order> orders = dao.getByPropertyLike(\"description\", \"February Large Test-Tshirt Delete\");\n assertEquals(0, orders.size());\n }", "public void delete(MainItemOrdered mainItemOrdered);", "@Test\n public void testDeleteProductShouldCorrect() throws Exception {\n // Mock method\n when(productRepository.findOne(product.getId())).thenReturn(product);\n doNothing().when(productRepository).delete(product);\n\n testResponseData(RequestInfo.builder()\n .request(delete(PRODUCT_DETAIL_ENDPOINT, product.getId()))\n .token(adminToken)\n .httpStatus(HttpStatus.OK)\n .build());\n }", "@Test\n public void deleteOrderTest() {\n Long orderId = 10L;\n api.deleteOrder(orderId);\n\n verify(exactly(1), deleteRequestedFor(urlEqualTo(\"/store/order/10\")));\n }", "@Test\n\tpublic void testDeleteBook() {\n\t\t//System.out.println(\"Deleting book from bookstore...\");\n\t\tstore.deleteBook(b1);\n\t\tassertFalse(store.getBooks().contains(b1));\n\t\t//System.out.println(store);\n\t}", "@Test\r\n public void testAdiciona() {\r\n TipoItemRN rn = new TipoItemRN();\r\n TipoItem tipoitem = new TipoItem();\r\n \r\n if (tipoitem != null){\r\n rn.remover(tipoitem);\r\n }\r\n tipoitem = new TipoItem();\r\n tipoitem.setDescricao(\"TesteAdiciona\");\r\n assertEquals(tipoitem.getDescricao(),\"TesteAdiciona\");\r\n \r\n rn.remover(tipoitem);\r\n \r\n }", "@Test\r\n public void testRemover() {\r\n TipoItem item = new TipoItem();\r\n \r\n item.setDescricao(\"tipoItemDescrição\");\r\n TipoItemRN rn = new TipoItemRN();\r\n rn.salvar(item);\r\n \r\n if (item != null){\r\n rn.remover(item);\r\n }\r\n assertFalse(false);\r\n }", "@Test\r\n\tpublic void test_9and10_DeleteItemFromWishList() throws Exception {\n\t\tdriver.findElement(By.name(\"submit.deleteItem\")).click();\r\n\t\tThread.sleep(3000);\r\n\t\t\r\n\t\t// check whether the item exists on g-items removed class\r\n\t\tboolean itemExists = false;\r\n\t\t\r\n\t\t// create an array of product titles under g-item-sortable removed\r\n\t\t// get the product title in this list and compare it with selected item\r\n\t\tList<WebElement> productTitles = driver.findElements(By.xpath(\"//div[@id='g-items']//div[@class = 'a-section a-spacing-none g-item-sortable g-item-sortable-removed']/div/div[1]\"));\r\n\t\tfor(WebElement productTitle : productTitles) {\r\n\t\t\t// compare selected item and any item in wish list\r\n\t\t\t// try to find selected item in the list of removed items\r\n\t\t\tString listedItem = productTitle.getText();\r\n\t\t\tif (listedItem.equals(selectedItem)) {\r\n\t\t\t\titemExists = true;\r\n\t\t\t\tSystem.out.println(selectedItem + \" is deleted from wish list\");\r\n\t\t\t\tAssert.assertTrue(itemExists);\t\r\n\t\t\t}\r\n\t\t}\r\n\t}", "@Test\n public void testDeleteItem() {\n System.out.println(\"deleteItem\");\n String name = \"\";\n MainWindow1 instance = new MainWindow1();\n boolean expResult = false;\n boolean result = instance.deleteItem(name);\n assertEquals(expResult, result);\n // TODO review the generated test code and remove the default call to fail.\n fail(\"The test case is a prototype.\");\n }", "@Test\n public void deleteIngredient_ReturnsTrue(){\n int returned = testDatabase.addIngredient(ingredient);\n assertEquals(\"deleteIngredient - Returns True\",true, testDatabase.deleteIngredient(returned));\n }", "public DeleteItemOutcome deleteItem(String hashKeyName, Object hashKeyValue,\n Expected... expected);", "@Test\n public void testRemoveNegativeNonExistingId() throws Exception{\n Assert.assertFalse(itemDao.delete(\"non existing item\"));\n }", "@Test\n public void deleteRecipeIngredient_Deletes(){\n int returnedRecipe = testDatabase.addRecipe(testRecipe);\n int returnedIngredient = testDatabase.addRecipeIngredient(recipeIngredient);\n testDatabase.deleteRecipeIngredients(returnedIngredient);\n ArrayList<RecipeIngredient> allIngredients = testDatabase.getAllRecipeIngredients(returnedRecipe);\n boolean deleted = true;\n if(allIngredients != null){\n for(int i = 0; i < allIngredients.size(); i++){\n if(allIngredients.get(i).getIngredientID() == returnedIngredient){\n deleted = false;\n }\n }\n }\n assertEquals(\"deleteRecipeIngredient - Deletes From Database\", true, deleted);\n }", "void checkItemForDelete(Object item, java.sql.Statement stmt) throws PrismsRecordException;", "private static void deleteTest(int no) {\n\t\tboolean result=new CartDao().delete(no);\r\n\t\tif(!result) System.out.println(\"deleteTest fail\");\r\n\t}", "public void deleteProduct() {\n deleteButton.click();\n testClass.waitTillElementIsVisible(emptyShoppingCart);\n Assert.assertEquals(\n \"Message is not the same as expected\",\n MESSAGE_EMPTY_SHOPPING_CART,\n emptyShoppingCart.getText());\n }", "@Test\r\n\tpublic void TestdeleteFood() {\n\t\tassertNotNull(\"Test if there is valid food list to delete food item\", foodList);\r\n\r\n\t\t// when given an empty food list, after adding two items, the size of the food\r\n\t\t// list is 2. After removing a food item, the size of the food list becomes 1.\r\n\t\tfoodList.add(f1);\r\n\t\tfoodList.add(f2);\r\n\t\tassertEquals(\"Test that food list size is 2\", 2, foodList.size());\r\n\t\tC206_CaseStudy.getAllFoodItem(foodList);\r\n\t\tfoodList.remove(0);\r\n\t\tassertEquals(\"Test that food list size is 1\", 1, foodList.size());\r\n\r\n\t\t// Continue from step 2, test that after removing a food item, the size of the\r\n\t\t// food list becomes empty.\r\n\t\tC206_CaseStudy.getAllFoodItem(foodList);\r\n\t\tfoodList.remove(0);\r\n\t\tassertTrue(\"Test that the food list is empty\", foodList.isEmpty());\r\n\t}", "@Test\n void deleteSuccess() {\n dao.delete(dao.getById(2));\n assertNull(dao.getById(2));\n }", "@Test\n void deleteSuccess() {\n dao.delete(dao.getById(3));\n assertNull(dao.getById(3));\n }", "public void testDelete() {\n TDelete_Return[] PriceLists_delete_out = priceListService.delete(new String[] { path + alias });\n\n // test if deletion was successful\n assertEquals(\"delete result set\", 1, PriceLists_delete_out.length);\n\n TDelete_Return PriceList_delete_out = PriceLists_delete_out[0];\n\n assertNoError(PriceList_delete_out.getError());\n\n assertEquals(\"deleted?\", true, PriceList_delete_out.getDeleted());\n }", "@Override\n\tpublic boolean deleteShopCartItem(int cart) {\n\t\treturn false;\n\t}", "@Test\n public void testRemoveProduct() {\n }", "@Test\n public void testRemoveItem() throws Exception {\n System.out.println(\"removeItem\");\n Orcamentoitem orcItem = null;\n EJBContainer container = javax.ejb.embeddable.EJBContainer.createEJBContainer();\n OrcamentoService instance = (OrcamentoService)container.getContext().lookup(\"java:global/classes/OrcamentoService\");\n instance.removeItem(orcItem);\n container.close();\n // TODO review the generated test code and remove the default call to fail.\n fail(\"The test case is a prototype.\");\n }", "@Test\r\n public void testDeleteNonExistRecipe() {\r\n assertNull(coffeeMaker.deleteRecipe(1)); // Test do not exist recipe\r\n }", "@Test\n public void deleteRecipe_ReturnsTrue(){\n int returned = testDatabase.addRecipe(testRecipe);\n assertEquals(\"deleteRecipe - Returns True\",true, testDatabase.deleteRecipe(returned));\n\n }", "public DeleteItemOutcome deleteItem(PrimaryKey primaryKey,\n Expected... expected);", "@Test \n\tpublic void testClearBasket() throws Exception {\n\t\tBBBRequest request = BBBRequestFactory.getInstance().createClearBasketRequest();\n\t\t\n\t\tString expectedUrl = AccountHelper.constructUrl(BBBRequestFactory.getInstance().getHostBasket(), PATH_MY_BASKETS);\n\t\tassertEquals(expectedUrl, request.getUrl());\n\t\t\n\t\tBBBResponse response = BBBRequestManager.getInstance().executeRequestSynchronously(request);\n\t\t\n\t\tif(response.getResponseCode() != HttpURLConnection.HTTP_OK) {\n\t\t\tfail(\"Error: \"+response.toString());\n\t\t}\n\t}", "@Test\n public void deleteRecipeIngredient_ReturnsTrue(){\n int returned = testDatabase.addRecipe(testRecipe);\n assertEquals(\"deleteRecipeIngredient - Returns True\",true, testDatabase.deleteRecipeIngredients(returned));\n }", "Cart deleteFromCart(String code, Long quantity, String userId);", "@Test\r\n\tpublic void deleteProductDetails() {\r\n\t\tRestAssured.baseURI = \"http://localhost:9000/products\";\r\n\t\tRequestSpecification request = RestAssured.given();\r\n\t\tJSONObject requestParams = new JSONObject();\r\n\t\trequestParams.put(\"name\", \"Almond\");\r\n\t\trequest.header(\"Content-Type\", \"application/json\");\r\n\t\trequest.body(requestParams.toString());\r\n\t\tResponse response = request.delete(\"/7\");\r\n\t\tSystem.out.println(\"DELETE Responce Body ----->\" + response.asString());\r\n\t\tint statusCode = response.getStatusCode();\r\n\t\tAssert.assertEquals(statusCode, 200);\r\n\r\n\t}", "@Test(groups = \"Transactions Tests\", description = \"Delete transaction\")\n\tpublic void deleteTransaction() {\n\t\tMainScreen.clickAccountItem(\"Income\");\n\t\tSubAccountScreen.clickSubAccountItem(\"Salary\");\n\t\tTransactionsScreen.clickOptionsBtnFromTransactionItem(\"Bonus\");\n\t\tTransactionsScreen.clickDeleteTransactionOption();\n\t\tTransactionsScreen.clickOptionsBtnFromTransactionItem(\"Bonus\");\n\t\tTransactionsScreen.clickDeleteTransactionOption();\n\t\tTransactionsScreen.transactionItens(\"Edited Transaction test\").shouldHave(size(0));\n\t\ttest.log(Status.PASS, \"Transaction successfully deleted\");\n\n\t\t//Testing if there no transaction in the 'Double Entry' account and logging the result to the report\n\t\treturnToHomeScreen();\n\t\tMainScreen.clickAccountItem(\"Assets\");\n\t\tSubAccountScreen.clickSubAccountItem(\"Current Assets\");\n\t\tSubAccountScreen.clickSubAccountItem(\"Cash in Wallet\");\n\t\tTransactionsScreen.transactionItens(\"Bonus\").shouldHave(size(0));\n\t\ttest.log(Status.PASS, \"Transaction successfully deleted from the 'Double Entry' account\");\n\n\t}", "void removeCartItem(int cartItemId);", "public void deleteItem() {\n\t\t\tAsyncCallback<BmUpdateResult> callback = new AsyncCallback<BmUpdateResult>() {\n\t\t\t\t@Override\n\t\t\t\tpublic void onFailure(Throwable caught) {\n\t\t\t\t\tstopLoading();\n\t\t\t\t\tshowErrorMessage(this.getClass().getName() + \"-deleteItem(): ERROR \" + caught.toString());\n\t\t\t\t}\n\n\t\t\t\t@Override\n\t\t\t\tpublic void onSuccess(BmUpdateResult result) {\n\t\t\t\t\tstopLoading();\n\t\t\t\t\tprocessItemDelete(result);\n\t\t\t\t}\n\t\t\t};\n\n\t\t\t// Llamada al servicio RPC\n\t\t\ttry {\n\t\t\t\tif (!isLoading()) {\n\t\t\t\t\tstartLoading();\n\t\t\t\t\tgetUiParams().getBmObjectServiceAsync().delete(bmoRequisitionItem.getPmClass(), bmoRequisitionItem, callback);\n\t\t\t\t}\n\t\t\t} catch (SFException e) {\n\t\t\t\tstopLoading();\n\t\t\t\tshowErrorMessage(this.getClass().getName() + \"-deleteItem(): ERROR \" + e.toString());\n\t\t\t}\n\t\t}", "public DeleteItemOutcome deleteItem(String hashKeyName, Object hashKeyValue);", "@Test\n void testDeleteCity() {\n CityList cityList = mockCityList();\n cityList.delete(mockCity());\n\n assertFalse(cityList.hasCity(mockCity()));\n assertTrue(cityList.countCities() == 0);\n\n }", "public DeleteItemOutcome deleteItem(PrimaryKey primaryKey);", "@Test\n\tvoid testDeletePlant() {\n\t\tList<Plant> plant = service.deletePlant(50);\n\t\tassertFalse(plant.isEmpty());\n\t}", "@Override\n\t@RequestMapping(value=ZuelControllerValue.Manage+\"deleteItem\")\n\tpublic ZuelResult deleteItem(Long id) throws Exception {\n\t\treturn service.deleteItem(id);\n\t}", "@Override\n\tpublic void delete(Iterable<? extends Basket> arg0) {\n\t\t\n\t}", "public void deleteBasketItem(String sku) { \n Iterator<BasketItem> iter = basketItems.iterator();\n \n while(iter.hasNext()) {\n BasketItem basketItem = (BasketItem) iter.next();\n if(basketItem.getVariant().getSku().equals(sku)) {\n iter.remove();\n }\n }\n }", "private void deleteItem()\n {\n System.out.println(\"Delete item with the ID: \");\n\n BufferedReader bufferRead = new BufferedReader(new InputStreamReader(System.in));\n try {\n Long id = Long.valueOf(bufferRead.readLine());\n ctrl.deleteItem(id);\n }\n catch(IOException e)\n {\n e.printStackTrace();\n }\n\n }", "@Test\n public void deleteRecipeCategory_ReturnsTrue(){\n int returned = testDatabase.addRecipe(testRecipe);\n assertEquals(\"deleteRecipeCategory - Returns True\",true, testDatabase.deleteRecipeCategory(returned));\n }", "@Test\n void deleteNoteSuccess() {\n noteDao.delete(noteDao.getById(2));\n assertNull(noteDao.getById(2));\n }", "public abstract boolean depleteItem();", "@Test\n public void removeAlreadyDELETED() throws BusinessException {\n final ProductService productService = new ProductService();\n\n final Long pProductId = 1L;\n\n new Expectations() {\n\n {\n\n Deencapsulation.setField(productService, \"productDAO\", mockProductDAO);\n\n ProductBO productBO = new ProductBO();\n productBO.setStatus(Status.DELETED);\n mockProductDAO.get(1L);\n times = 1;\n returns(productBO);\n }\n };\n\n productService.remove(pProductId);\n }", "ShoppingBasket removeProductItem(Long shoppingBasketId, Long productItemId);", "@Test \n\tpublic void testGetBasketItem() throws Exception {\n\t\tBBBBasket basket = AccountHelper.getInstance().getBasket();\n\t\t\n\t\tif(basket == null || basket.items == null || basket.items.length < 1) {\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tString id = basket.items[0].id;\n\t\t\n\t\tBBBRequest request = BBBRequestFactory.getInstance().createGetBasketItemRequest(id);\n\t\tString expectedUrl = AccountHelper.constructUrl(BBBRequestFactory.getInstance().getHostBasket(), String.format(PATH_MY_BASKETS_ITEMS_, id) );\n\t\tassertEquals(expectedUrl, request.getUrl());\n\t\t\n\t\tBBBResponse response = BBBRequestManager.getInstance().executeRequestSynchronously(request);\n\t\tbasketItemHandler.receivedResponse(response);\n\t}", "@Override\n\tpublic Item delete() {\n\t\treadAll();\n\t\tLOGGER.info(\"\\n\");\n\t\t//user can select either to delete a customer from system with either their id or name\n\t\tLOGGER.info(\"Do you want to delete record by Item ID\");\n\t\tlong id = util.getLong();\n\t\titemDAO.deleteById(id);\n\t\t\t\t\n\t\t\t\t\n\t\treturn null;\n\t}", "@Test\n\tpublic void testDelete(){\n\t}", "public void delete(CbmCItemFininceItem entity);", "public boolean deleteInventory(int itemId) {\n boolean done = false;\n String sql = \"DELETE FROM inventory WHERE item_id = ?\";\n try ( Connection con = connect(); PreparedStatement pstmt = con.prepareStatement(sql)) {\n pstmt.setInt(1, itemId);\n pstmt.executeUpdate();\n done = true;\n } catch (SQLException e) {\n System.out.println(e);\n }\n return done;\n }", "public Inventory inventoryDelete (TheGroceryStore g, LinkedList<Inventory> deleter) throws ItemNotFoundException;", "@Test\n public void testDeleteCartsIdShippingmethodAction() throws ClientException, IOException, ProcessingException {\n CloudResponse response = this.actions.deleteCartsIdShippingmethodAction(\"{id}\", \"{customerId}\");\n List<Integer> expectedResults = Arrays.asList(200, 400, 403, 404);\n LOG.info(\"Got status {}\", response.getStatusLine());\n Assert.assertTrue(expectedResults.contains(response.getStatusLine().getStatusCode()));\n\n if(response.getStatusLine().getStatusCode() == 200) {\n this.actions.checkResponseJSONSchema(\"#/definitions/Cart\", response.getContent());\n }\n if(response.getStatusLine().getStatusCode() == 400) {\n this.actions.checkResponseJSONSchema(\"#/definitions/ErrorResponse\", response.getContent());\n }\n if(response.getStatusLine().getStatusCode() == 403) {\n this.actions.checkResponseJSONSchema(\"#/definitions/ErrorResponse\", response.getContent());\n }\n if(response.getStatusLine().getStatusCode() == 404) {\n this.actions.checkResponseJSONSchema(\"#/definitions/ErrorResponse\", response.getContent());\n }\n \n }", "@Test\n public void deleteRecipeCategory_Deletes(){\n int returnedRecipe = testDatabase.addRecipe(testRecipe);\n int returnedCategory = testDatabase.addRecipeCategory(recipeCategory);\n testDatabase.deleteRecipeCategory(returnedCategory);\n ArrayList<RecipeCategory> allCategories = testDatabase.getAllRecipeCategories(returnedRecipe);\n boolean deleted = true;\n if(allCategories != null){\n for(int i = 0; i < allCategories.size(); i++){\n if(allCategories.get(i).getCategoryID() == returnedCategory){\n deleted = false;\n }\n }\n }\n assertEquals(\"deleteRecipeCategory - Deletes From Database\", true, deleted);\n }", "public boolean deleteItem(int index);", "@Test(groups = \"suite2-2\", dependsOnMethods = \"addItemToCart\")\n\tpublic void removeItemFromCart() {\n\n\t\tdriver.get(CART_URL);\n\n\t\tWebElement itemInCartMessage = driver\n\t\t\t\t.findElement(By\n\t\t\t\t\t\t.xpath(\"/HTML/BODY/DIV[@id=\\\"content\\\"]/DIV[@id=\\\"primary\\\"]/DIV[@id=\\\"checkout\\\"]/DIV[@id=\\\"checkout-header\\\"]/H1\"));\n\n\t\tassertEquals(itemInCartMessage.getText().trim().substring(0, 1), \"1\",\n\t\t\t\t\"1 item expected in cart\");\n\n\t\tWebElement clearButton = driver\n\t\t\t\t.findElement(By\n\t\t\t\t\t\t.xpath(\"/HTML/BODY/DIV[@id=\\\"content\\\"]/DIV[@id=\\\"primary\\\"]/DIV[@id=\\\"checkout\\\"]/FORM[1]/H2/SPAN[2]/A\"));\n\n\t\tclearButton.click();\n\n\t\tWebDriverWait wait = new WebDriverWait(driver, 10);\n\n\t\ttry {\n\t\t\twait.until(ExpectedConditions.presenceOfElementLocated(By\n\t\t\t\t\t.xpath(\"/HTML/BODY/DIV[@id=\\\"content\\\"]/DIV[@id=\\\"primary\\\"]/DIV[@id=\\\"checkout\\\"]/DIV[@id=\\\"newempty\\\"]/DIV\")));\n\t\t} catch (NoSuchElementException e) {\n\t\t\tfail(\"Cart should be empty\");\n\t\t}\n\t}", "@Test\n public void testOrderFactoryRemove() {\n OrderController orderController = orderFactory.getOrderController();\n // create a 2 seater table // default is vacant\n tableFactory.getTableController().addTable(2);\n // add a menu item to the menu\n menuFactory.getMenu().addMenuItem(MENU_NAME, MENU_PRICE, MENU_TYPE, MENU_DESCRIPTION);\n\n // order 3 of the menu item\n HashMap<MenuItem, Integer> orderItems = new HashMap<>();\n HashMap<SetItem, Integer> setOrderItems = new HashMap<>();\n orderItems.put(menuFactory.getMenu().getMenuItem(1), 3);\n\n // create the order\n orderController.addOrder(STAFF_NAME, 1, false, orderItems, setOrderItems);\n assertEquals(1, orderController.getOrders().size());\n orderController.removeOrder(1);\n assertEquals(0, orderController.getOrders().size());\n }", "@Test\r\n public void testDelete() throws Exception {\r\n bank.removePerson(p2);\r\n assertEquals(bank.viewAllPersons().size(), 1);\r\n assertEquals(bank.viewAllAccounts().size(), 1);\r\n }", "@org.junit.Test\r\n\tpublic void itemNotInCartException() throws ProductNotFoundException{\r\n\t\tShoppingCart cart=new ShoppingCart();\r\n\t\tProduct tomato=new Product(\"Tomato\",3);\r\n\t\tcart.addItem(new Product(\"Orange\",5));\r\n\t\t\r\n\t\t//trying to remove a tomato from the cart\r\n\t\ttry {\r\n\t\t\tcart.removeItem(tomato);\r\n\t\t\tfail();\r\n\t\t\t\r\n\t\t}catch(ProductNotFoundException e) {\r\n\t\t\t\r\n\t\t}\r\n\t}", "@Test\n public void myNeighboursList_deleteAction_shouldRemoveItem() {\n // Given : We remove the element at position 2\n onView(ViewMatchers.withId(R.id.list_neighbours)).check(withItemCount(ITEMS_COUNT));\n // When perform a click on a delete icon\n onView(ViewMatchers.withId(R.id.list_neighbours))\n .perform(RecyclerViewActions.actionOnItemAtPosition(1, new DeleteViewAction()));\n // Then : the number of element is 11\n onView(ViewMatchers.withId(R.id.list_neighbours)).check(withItemCount(ITEMS_COUNT-1));\n\n }", "@Test\n public void removeNegativeIdItemTest() {\n List<Item> items = itemSrv.getAllItems();\n Assert.assertNotNull(\"List of items is null\", items);\n\n Assert.assertEquals(\"Wrong initial size of the list, should be 0\", 0, items.size());\n\n Assert.assertEquals(\"Should have returned REMOVE_NON_EXISTENT code\", ErrCode.REMOVE_NON_EXISTENT, itemSrv.removeItemById(-1L));\n Assert.assertEquals(\"Negative and non-existing item deletion was attempted, count should be still 0\", 0, itemSrv.getAllItems().size());\n }", "@Test\n void deleteSuccess() {\n genericDao.delete(genericDao.getById(3));\n assertNull(genericDao.getById(3));\n }", "public boolean deleteItem (int custId, int itemId, int statusId){\n\t\tboolean deleted = orderItemsRepo.deleteItem(custId, itemId, statusId);\t\n\t\treturn deleted;\n\t}", "@Test\n public void myNeighboursList_deleteAction_shouldRemoveItem() {\n // Given : We remove the element at position 2\n onView(allOf(ViewMatchers.withId(R.id.list_neighbours),isDisplayed()))\n .check(withItemCount(ITEMS_COUNT));\n // When perform a click on a delete icon\n onView(allOf(ViewMatchers.withId(R.id.list_neighbours),isDisplayed()))\n .perform(RecyclerViewActions.actionOnItemAtPosition(1, new DeleteViewAction()));\n // Then : the number of element is 11\n onView(allOf(ViewMatchers.withId(R.id.list_neighbours),isDisplayed())).check(withItemCount(ITEMS_COUNT-1));\n }", "@Override\n\tpublic void deleteItem(Object toDelete) {}", "@Override\n public boolean deleteFridgeItem(String fridgeItemId) {\n return false;\n }", "@Test\n public void testDeleteNegativeBillIsNull() throws Exception{\n String name = null;\n itemDao.delete(name);\n }", "public void delete(ItemsPk pk) throws ItemsDaoException;", "@SmallTest\n public void testDelete() {\n int result = -1;\n if (this.entity != null) {\n result = (int) this.adapter.remove(this.entity.getId());\n Assert.assertTrue(result >= 0);\n }\n }", "@Test\n void deleteSuccess() {\n genericDAO.delete(genericDAO.getByID(2));\n assertNull(genericDAO.getByID(2));\n }", "@Test(expected = BusinessException.class)\n public void unarchiveDeleted() throws BusinessException {\n final ProductService productService = new ProductService();\n\n final Long pProductId = 1L;\n\n new Expectations() {\n\n {\n\n Deencapsulation.setField(productService, \"productDAO\", mockProductDAO);\n\n ProductBO productBO = new ProductBO();\n productBO.setStatus(Status.DELETED);\n mockProductDAO.get(1L);\n times = 1;\n returns(productBO);\n }\n };\n\n productService.unarchive(pProductId);\n }", "@Test\n public void isFillCartDeleteSingleCartItemSuccessful() throws InterruptedException {\n // Primary Menu\n onView(withId(R.id.foodMenuButton))\n .perform(click());\n Thread.sleep(500);\n\n // Food Menu / Activity Browse Menu\n Thread.sleep(1000);\n onView(allOf(ViewMatchers.withId(R.id.addToCart), hasSibling(withText(\"Sausage Roll\"))))\n .perform(click());\n\n //AddToCartActivity\n Thread.sleep(500);\n onView(withId(R.id.addToCartButton))\n .perform(click());\n\n Thread.sleep(500);\n onView(withId(R.id.cartButton))\n .perform(click());\n\n //Cart Activity\n Thread.sleep(1000);\n onView(allOf(ViewMatchers.withId(R.id.deleteCartItem), hasSibling(withText(\"Sausage Roll\"))))\n .perform(click());\n\n //Cart Activity\n Thread.sleep(1000);\n onView(allOf(ViewMatchers.withId(R.id.deleteCartItem), hasSibling(withText(\"Sausage Roll\"))))\n .check(doesNotExist());\n\n }", "@DeleteMapping(\"/deleteACarryBoxItem/{emailId}/{itemId}\")\n\tpublic ResponseEntity<Boolean> deleteACarryBoxItem(@PathVariable String emailId,@PathVariable int itemId)\n\t{\n\t\tlogger.trace(\"Requested to delete an item from carry box\");\n\t\tboolean returnedValue= service.deleteACarryBoxItem(emailId,itemId);\n\t\tlogger.trace(\"Completed request to delete an item from carry box\");\n\t\treturn ResponseEntity.ok(returnedValue);\n\n\t}", "@Test\r\n public void testDelete() {\r\n assertTrue(false);\r\n }" ]
[ "0.8221381", "0.78238595", "0.7811078", "0.75750095", "0.7524319", "0.74137574", "0.74055564", "0.73427993", "0.72979057", "0.7274842", "0.7258394", "0.7179679", "0.7066568", "0.7047497", "0.703303", "0.6945744", "0.6935872", "0.6916322", "0.68847895", "0.6861349", "0.68599075", "0.6829219", "0.68244976", "0.6820531", "0.68107784", "0.6796281", "0.67888474", "0.6786508", "0.6784923", "0.67612725", "0.67538434", "0.67486537", "0.67408204", "0.6723276", "0.67136455", "0.67095226", "0.66975003", "0.6689112", "0.66465694", "0.6639624", "0.66343635", "0.66303825", "0.66288733", "0.6622663", "0.66200733", "0.6616969", "0.6608978", "0.6603843", "0.6600841", "0.6597327", "0.6596515", "0.6589212", "0.65875876", "0.6580013", "0.65790576", "0.6564059", "0.65575767", "0.6542302", "0.65395147", "0.6533051", "0.65127105", "0.65021247", "0.6498989", "0.6491196", "0.6472729", "0.6471355", "0.64607984", "0.6456989", "0.6452359", "0.6451223", "0.64355016", "0.64307845", "0.64232755", "0.6422824", "0.6407973", "0.6406319", "0.64017224", "0.6396778", "0.6395884", "0.63872176", "0.6384544", "0.63810337", "0.6371711", "0.63668585", "0.6366754", "0.63644844", "0.636193", "0.63599044", "0.63582087", "0.6353333", "0.6348556", "0.6343971", "0.63362616", "0.63247186", "0.63099617", "0.63036066", "0.6299397", "0.6293592", "0.6290202", "0.62856835" ]
0.8605222
0
/ Test clearing the whole basket
@Test public void testClearBasket() throws Exception { BBBRequest request = BBBRequestFactory.getInstance().createClearBasketRequest(); String expectedUrl = AccountHelper.constructUrl(BBBRequestFactory.getInstance().getHostBasket(), PATH_MY_BASKETS); assertEquals(expectedUrl, request.getUrl()); BBBResponse response = BBBRequestManager.getInstance().executeRequestSynchronously(request); if(response.getResponseCode() != HttpURLConnection.HTTP_OK) { fail("Error: "+response.toString()); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void emptyBasket() {\n balls.clear();\n }", "public void clearCart() {\n this.items.clear();\n }", "public void emptyCart() {\n cart.clear();\n total = 0;\n }", "@Test\n\t\tpublic void testEmptyTheCart() {\n\t\t\tProduct hamburger = new Product(\"burger\", 10);\n\t\t\t\n\t\t\tcart.addItem(phone);\n\t\t\tcart.addItem(hamburger);\n\t\t\t\n\t\t\t// 3.Get rid of all items in the cart\n\t\t\tcart.empty();\n\t\t\t\n\t\t\t// 4. Check num items in cart === E = 0\n\t\t\tassertEquals(0, cart.getItemCount());\n\t\t}", "private void checkoutNotEmptyBag() {\n\t\tSystem.out.println(\"Checking out \" + bag.getSize() + \" items.\");\n\t\tbag.print();\n\t\tDecimalFormat df = new DecimalFormat(\"0.00\");\n\t\tdouble salesPrice = bag.salesPrice();\n\t\tSystem.out.println(\"*Sales total: $\" + df.format(salesPrice));\n\t\tdouble salesTax = bag.salesTax();\n\t\tSystem.out.println(\"*Sales tax: $\" + df.format(salesTax));\n\t\tdouble totalPrice = salesPrice + salesTax;\n\t\tSystem.out.println(\"*Total amount paid: $\" + df.format(totalPrice));\n\t\tbag = new ShoppingBag(); // Empty bag after checking out.\n\t}", "public static void emptyCart() {\n click(SHOPPING_CART_UPPER_MENU);\n click(REMOVE_FROM_CART_BUTTON);\n Browser.driver.navigate().refresh();\n }", "@Test\n public void testIsEmpty() {\n ShoppingCart instance = new ShoppingCart();\n Product p1 = new Product(\"Galletas\", 1.2);\n Product p2 = new Product(\"Raton\", 85.6);\n \n instance.addItem(p1);\n instance.addItem(p2);\n \n instance.empty();\n \n assertTrue(instance.isEmpty());\n \n instance.addItem(p1);\n instance.addItem(p2);\n \n try {\n instance.removeItem(p1);\n instance.removeItem(p2);\n } catch (ProductNotFoundException ex) {\n Logger.getLogger(ShoppingCartTest.class.getName()).log(Level.SEVERE, null, ex);\n }\n \n assertTrue(instance.isEmpty());\n \n \n }", "public void clear() {\r\n myShoppingCart = new HashMap<Item, BigDecimal>();\r\n }", "private void deleteCartAll() {\n cartTable.getItems().removeAll(componentsCart);\n\n //Clear ComponentsCart List\n componentsCart.clear();\n updateTotal();\n }", "@Test\n public void testEmpty() {\n \n ShoppingCart instance = new ShoppingCart();\n Product p1 = new Product(\"Galletas\", 1.2);\n Product p2 = new Product(\"Raton\", 85.6);\n Product p3 = new Product(\"Teclado\", 5.5);\n Product p4 = new Product(\"Monitor 4K\", 550.6);\n \n instance.addItem(p1);\n instance.addItem(p2);\n instance.addItem(p3);\n instance.addItem(p4);\n \n try{\n \n instance.empty();\n \n } catch(Exception e){\n \n }\n \n assertEquals(instance.getItemCount(), 0, 0.0);\n \n }", "@AfterEach\n public void afterEach() {\n testBasket = null;\n }", "@Test\r\n\tpublic void remove_items() {\r\n//Go to http://www.automationpractice.com\r\n//Mouse hover on product one\r\n//Click 'Add to Cart'\r\n//Click 'Continue shopping' button\r\n//Verify Cart has text '1 Product'\r\n//Mouse hover over 'Cart 1 product' button\r\n//Verify product listed\r\n//Now mouse hover on another product\r\n//click 'Add to cart' button\r\n//Click on Porceed to checkout\r\n//Mouse hover over 'Cart 2 product' button\r\n//Verify 2 product listed now\r\n//click 'X'button for first product\r\n//Verify 1 product deleted and other remain\r\n\r\n\t}", "@Test\n void deletePermanentlyTest() {\n Product product = new Product(\"Apple\", 10, 4);\n shoppingCart.addProducts(product.getName(), product.getPrice(), product.getQuantity());\n //when deletes four apples\n boolean result = shoppingCart.deleteProducts(product.getName(), 4);\n //then basket does not contain any apple\n int appleNb = shoppingCart.getQuantityOfProduct(\"Apple\");\n assertTrue(result);\n assertEquals(0, appleNb);\n }", "public void clearAll() {\n if (orderId != null) {\n BouquetOrder order = orderDAO.get(orderId);\n order.getBouquets().clear();\n orderDAO.update(order);\n sendMessage(orderId);\n }\n }", "public void Clearcartitems(){\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:- Items in the cart should be removed\");\r\n\t\ttry{\r\n\t\t\tif(!getText(locator_split(\"lnkShoppingCart\")).equalsIgnoreCase(\"0\")){\r\n\t\t\t\t//sleep(4000);\r\n\t\t\t\t//waitforElementVisible(locator_split(\"lnkShoppingCart\"));\r\n\t\t\t\tclick(locator_split(\"lnkShoppingCart\"));\r\n\t\t\t\tList<WebElement> elements = listofelements(By.linkText(getValue(\"Trash\")));\r\n\t\t\t\tfor(int i=0; i<elements.size(); i++){\r\n\t\t\t\t\tsleep(1000);\r\n\t\t\t\t\tclick(By.linkText(getValue(\"Trash\")));;\r\n\t\t\t\t\twaitForPageToLoad(70);\r\n\r\n\t\t\t\t}\r\n\t\t\t\tSystem.out.println(\"Items are removed from cart\");\r\n\t\t\t\tReporter.log(\"PASS_MESSAGE:- Items in the cart are removed\");\r\n\t\t\t}else{\r\n\t\t\t\tSystem.out.println(\"No items are present in the cart\");\r\n\t\t\t\tReporter.log(\"PASS_MESSAGE:- No Items are present in the cart\");\r\n\t\t\t}\r\n\t\t}\r\n\t\tcatch(Exception e){\r\n\t\t\tReporter.log(\"FAIL_MESSAGE:- Items in the cart are not removed\");\r\n\t\t\tthrow new NoSuchElementException(\"The element with \"\r\n\t\t\t\t\t+ elementProperties.getProperty(\"lnkShoppingCart\").toString().replace(\"By.\", \" \")+\" \"\r\n\t\t\t\t\t+ elementProperties.getProperty(\"returnByValue()\").toString().replace(\"By.\", \" \")+\" \"\r\n\t\t\t\t\t+ \" not found\");\r\n\r\n\t\t}\r\n\t}", "public void resetSaleAndCostTracking() {\n for (int i = 0; i < stockList.size(); i++) {\r\n // If the beanBag object at the current position is \"isSold\" bool is true.\r\n if (((BeanBag) stockList.get(i)).isSold()) {\r\n // Remove beanBag object at that position from the \"stockList\".\r\n stockList.remove(i);\r\n }\r\n }\r\n }", "@Test\n public void testClearOnEmpty() {\n this.iPQ.clear();\n assertTrue(\"Clear on empty is empty: \",\n this.iPQ.isEmpty());\n this.sPQ.clear();\n assertTrue(\"Clear on empty is empty: \",\n this.sPQ.isEmpty());\n }", "public void clearItems(){\n\t\tinnerItemShippingStatusList.clear();\n\t}", "public void clear(){\n this.items.clear();\n }", "public void testDelete() {\n TDelete_Return[] Basket_delete_out = basketService.delete(new String[] { BasketPath });\n assertNoError(Basket_delete_out[0].getError());\n }", "@Test\n public void testClear() {\n System.out.println(\"clear\");\n instance = new Stack();\n instance.push(30);\n instance.push(40);\n instance.push(50);\n instance.clear();\n assertTrue(instance.isEmpty());\n for (int i = 0; i < 10; i++) {\n instance.push(i);\n }\n instance.clear();\n assertTrue(instance.isEmpty());\n }", "public void testClear() {\r\n list.add(\"A\");\r\n list.clear();\r\n assertEquals(0, list.size());\r\n }", "public void empty() {\n int StartSize = stockList.size();\r\n // While array is not empty.\r\n while (stockList.size() > 0) {\r\n // For every item in the \"stockList\" array.\r\n for (int i = 0; i < StartSize; i++) {\r\n // Remove the beanBag object at the current position in the \"stockList\".\r\n stockList.remove(i);\r\n // Set the global int \"nextReservationNumber\" to 0.\r\n nextReservationNum = 0;\r\n }\r\n }\r\n }", "public void clear() { this.store.clear(); }", "public void clear() {\n\t\tList<CartLine> cartLines = getCartLineList();\n\t\tcartLines.clear();\n\t}", "private void clear() {\n transactionalHooks.clearTransaction();\n transactionDeques.remove();\n }", "private void checkout() {\n\t\tif (bag.getSize() == 0) {\n\t\t\tSystem.out.println(\"Unable to check out, the bag is empty!\");\n\t\t} else {\n\t\t\tcheckoutNotEmptyBag();\n\t\t}\n\t}", "public void reset() {\n \titems.clear();\n \tsetProcessCount(0);\n }", "@Test\r\n public void testResetInventory2()\r\n {\r\n testLongTermStorage.addItem(item2, testLongTermStorage.getCapacity() / item2.getVolume());\r\n testLongTermStorage.resetInventory();\r\n assertEquals(\"Storage should be empty\", new HashMap<>(), testLongTermStorage.getInventory());\r\n }", "public void clearAll()\r\n {\r\n if(measurementItems!=null) measurementItems.clear();\r\n itemsQuantity=(measurementItems!=null)?measurementItems.size():0;\r\n }", "@Test\n public void testRemoveItem() throws Exception {\n \n System.out.println(\"RemoveItem\");\n \n /*ShoppingCart instance = new ShoppingCart();\n Product p1 = new Product(\"Galletas\", 1.2);\n Product p2 = new Product(\"Raton\", 85.6);\n Product p3 = new Product(\"Teclado\", 5.5);\n Product p4 = new Product(\"Monitor 4K\", 550.6);\n \n instance.addItem(p1);\n instance.addItem(p2);\n instance.addItem(p3);\n instance.addItem(p4);\n \n try{\n \n instance.removeItem(p1);\n \n } catch(Exception e){\n \n fail(\"No existe\");\n \n }*/\n \n /*---------------------------------------------*/\n \n ShoppingCart instance = new ShoppingCart();\n Product p1 = new Product(\"Galletas\", 1.2);\n \n instance.addItem(p1);\n \n try{\n \n instance.removeItem(p1);\n \n } catch(Exception e){\n \n assertTrue(instance.isEmpty());\n \n }\n \n }", "@Test \n\tpublic void testDeleteBasketItem() throws Exception {\n\t\tBBBBasket basket = AccountHelper.getInstance().getBasket();\n\t\t\n\t\tif(basket == null || basket.items == null || basket.items.length < 1) {\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tString id = basket.items[0].id;\n\t\t\n\t\tBBBRequest request = BBBRequestFactory.getInstance().createDeleteBasketItemRequest(id);\n\t\tString expectedUrl = AccountHelper.constructUrl(BBBRequestFactory.getInstance().getHostBasket(), String.format(PATH_MY_BASKETS_ITEMS_, id) );\n\t\tassertEquals(expectedUrl, request.getUrl());\n\t\t\n\t\tBBBResponse response = BBBRequestManager.getInstance().executeRequestSynchronously(request);\n\t\t\n\t\tif(response.getResponseCode() != HttpURLConnection.HTTP_OK) {\n\t\t\tfail(\"Error: \"+response.toString());\n\t\t}\n\t}", "void clear() throws PapooseException;", "public void reset() {\n itemCount = 0;\n stock = new VendItem[maxItems];\n totalMoney = 0;\n userMoney = 0;\n vmStatus = null;\n }", "public static int checkout(Basket basket) {\n\t\tfor (Map.Entry<StockItem, Integer> item : basket.Items().entrySet()) {\n\t\t\tString itemName = item.getKey().getName();\n\t\t\tStockItem stockItem = stockList.get(itemName);\n\t\t\tif (stockItem == null) {\n\t\t\t\tSystem.out.println(\"We don't sell \" + itemName);\n\t\t\t\treturn 0;\n\t\t\t}\n\t\t\tstockList.sellStock(itemName);\n\t\t}\n\t\tbasket.clear();\n\t\treturn 0;\n\t}", "private void EmptyCartButtonActionPerformed(java.awt.event.ActionEvent evt) {\n cartModel.removeAllElements(); // dmoore57\n // updates list on form to show that all items have been removed from list\n CartList.setModel(cartModel); // dmoore57\n }", "private void clear() {\n }", "public void shoppingCartCleanUp(){\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:- Shopping cart should be cleaned\");\r\n\t\ttry{\r\n\r\n\t\t\tsleep(1000);\r\n\t\t\tString aQty=getTextandreturn(locator_split(\"lnkShoppingCart\"));\r\n\t\t\tint iQty=Integer.parseInt(aQty);\r\n\t\t\tSystem.out.println(iQty);\r\n\t\t\tsleep(1000);\r\n\t\t\tif(iQty!=0){\r\n\t\t\t\t//click(locator_split(\"lnkShoppingCart\"));\r\n\t\t\t\tclickSpecificElement(returnByValue(getValue(\"TrashLinkText\")),0);\r\n\t\t\t\tshoppingCartCleanUp(); \t\r\n\t\t\t} \r\n\r\n\t\t\tReporter.log(\"PASS_MESSAGE:- Removed the Cart Item(s)\");\r\n\r\n\t\t}\r\n\t\tcatch(Exception e){\r\n\t\t\tReporter.log(\"FAIL_MESSAGE:- Shopping cart is not cleaned or Error in removing the items from shpping cart\");\r\n\t\t\tthrow new NoSuchElementException(\"The element with\"\r\n\t\t\t\t\t+ elementProperties.getProperty(\"lnkShoppingCart\")\r\n\t\t\t\t\t+ \" not found\");\r\n\r\n\t\t}\r\n\t}", "void delete(ShoppingBasket shoppingBasket);", "public void removeOrder(){\n foods.clear();\n price = 0;\n }", "public static void clearReceipt()\r\n\t{\r\n\t\tlistModel.removeAllElements();\r\n\t\tsubtotalAmount = 0;\r\n\t\ttaxAmount = 0;\r\n\t\ttotalAmount = 0;\r\n\t}", "@Test\r\n\tpublic void testEmptyContents() throws Exception {\n\t\tassertThat(this.basket.getContents().count(), is(0L));\r\n\t}", "private void clearBid() {\n \n bid_ = 0;\n }", "public void clearItems(){\n items.clear();\n }", "public void clearBids(){\n this.bids.clear();\n setRequested();\n }", "protected abstract void clearAll();", "public void clearRandomItems();", "@Override\n\tpublic void delete(Iterable<? extends Basket> arg0) {\n\t\t\n\t}", "public void clearAll();", "public void clearAll();", "void clearAll();", "void clearAll();", "public void empty() {\n _items.clear();\n }", "@Test\n public void testClear_WithItems() {\n Map<String, String> toAdd = fillMap(1, 10);\n\n map.putAll(toAdd);\n\n configureAnswer();\n\n testObject.clear();\n\n for (Entry<String, String> entry : toAdd.entrySet()) {\n verify(helper).fireRemove(entry);\n }\n verifyNoMoreInteractions(helper);\n }", "public void clearAll() {\n bikeName = \"\";\n bikeDescription = \"\";\n bikePrice = \"\";\n street = \"\";\n zipcode = \"\";\n city = \"\";\n bikeImagePath = null;\n }", "@Test\r\n public void testResetInventory1()\r\n {\r\n testLongTermStorage.resetInventory();\r\n assertEquals(\"Storage should be empty\", new HashMap<>(), testLongTermStorage.getInventory());\r\n }", "public void clear() {\n items.clear();\n update();\n }", "public void clear() {\r\n\t\titems.clear();\r\n\t}", "public void checkout() {\n\t\t// checkout and reset the quantity in global product list\n\t\tfor (CartProduct product : Admin.products) {\n\t\t\ttry {\n\t\t\t\tfor (CartProduct cartProduct : cart.getProducts()) {\n\t\t\t\t\tif (product.getDescription().equals(cartProduct.getDescription())) {\n\t\t\t\t\t\tif(product.getQuantity() >= 1) {\n\t\t\t\t\t\t\tproduct.setQuantity(product.getQuantity() - 1); \n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} catch (Exception e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\t\tcart.deleteCart();\n\t}", "public void clearItems() {\n grabbedItems.clear();\n }", "public void reset() {\r\n\t\t//begin\r\n\t\tproducerList.clear();\r\n\t\tretailerList.clear();\r\n\t\tBroker.resetLists();\r\n\t\t//end\r\n\t}", "@Test\n public void testClear() {\n SegmentedOasisList<Integer> instance = new SegmentedOasisList<>();\n Collection c = Arrays.asList(1, 1, 1, 1, 1, 1, 1);\n instance.addAll(c);\n instance.clear();\n\n assertTrue(instance.isEmpty());\n\n }", "@Test\n public void clearForEmptyList() {\n myList.clear();\n\n //then\n assertTrue(myList.isEmpty());\n assertEquals(\"[]\", myList.toString());\n }", "void resetTesting() {\r\n\t\tcompanyCars.clear();\r\n\t\trentDetails.clear();\r\n\t}", "private void clearData() {}", "public void clear() \r\n\t{\r\n\t\ttotal = 0;\r\n\t\thistory = \"\";\r\n\t}", "@Test\r\n\tpublic void testClear() {\r\n\t\tlist.clear();\r\n\t\tAssert.assertNull(list.getFirst());\r\n\t\tAssert.assertEquals(0, list.size());\r\n\t}", "public void clear();", "public void clear();", "public void clear();", "public void clear();", "public void clear();", "public void clear();", "public void clear();", "public void clear();", "public void clear();", "public void clear();", "public void clear();", "public void clear();", "public void clear();", "public void clear();", "public void clear();", "public void clear();", "public void clear();", "public void clear();", "public void clear();", "public void clear();", "public void clear();", "public void clear();", "public void clear();", "public void clear();", "public void clear();", "public void clear();", "public void clear();", "public void clear();", "public void clear();", "public void clear();", "public void clear();", "public void clear();", "public void clear();" ]
[ "0.7774713", "0.71371704", "0.6848777", "0.6833519", "0.6742688", "0.6696179", "0.6677125", "0.655147", "0.6522898", "0.651004", "0.64243054", "0.64140457", "0.64123434", "0.63519496", "0.6348832", "0.6334742", "0.63213086", "0.63211685", "0.6273422", "0.62728", "0.62523645", "0.6249531", "0.6248826", "0.6244886", "0.62311614", "0.6228033", "0.6218442", "0.62133366", "0.62115204", "0.62027055", "0.6195008", "0.6192897", "0.6178264", "0.6174778", "0.616495", "0.61587596", "0.6157115", "0.61456835", "0.6142454", "0.61278355", "0.61236185", "0.6112275", "0.611022", "0.6109904", "0.61053324", "0.6104462", "0.61042666", "0.610277", "0.6096139", "0.6096139", "0.60941505", "0.60941505", "0.6089361", "0.60594606", "0.6052211", "0.60509604", "0.60438406", "0.60361433", "0.60351217", "0.60320985", "0.601843", "0.60161245", "0.6015985", "0.60133934", "0.59856915", "0.598384", "0.5969927", "0.5963096", "0.5963096", "0.5963096", "0.5963096", "0.5963096", "0.5963096", "0.5963096", "0.5963096", "0.5963096", "0.5963096", "0.5963096", "0.5963096", "0.5963096", "0.5963096", "0.5963096", "0.5963096", "0.5963096", "0.5963096", "0.5963096", "0.5963096", "0.5963096", "0.5963096", "0.5963096", "0.5963096", "0.5963096", "0.5963096", "0.5963096", "0.5963096", "0.5963096", "0.5963096", "0.5963096", "0.5963096", "0.5963096" ]
0.750051
1
don't want to overwrite the current drawable, so do nothing here.
@Override public void setLoadingDrawable(ImageView imageView, Drawable drawable) { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void setBackgroundDrawable(Drawable d) {\n if (d != getBackground()) {\n super.setBackgroundDrawable(d);\n }\n }", "@Override\n public void excute() {\n drawable.setColor(color);\n }", "@Override\n public void invalidateDrawable(Drawable drawable) {\n ShortcutInfo mShortcutInfo = (ShortcutInfo) getTag();\n boolean isInHotseatOrHideseat = mMode == Mode.HIDESEAT || mMode == Mode.HOTSEAT;\n\n /* YUNOS BEGIN */\n // ##date:2014/12/19 ##author:zhanggong.zg ##BugID:5581407,5587224\n Drawable icon = getIconDrawable();\n /* YUNOS END */\n if (icon != drawable) {\n super.invalidateDrawable(drawable);\n return;\n }\n if (drawable instanceof FancyDrawable) {\n String label = ((FancyDrawable) drawable).getVariableString(\"app_label\");\n if (label != null) {\n // ##date:2015/1/30 ##author:zhanggong.zg ##BugID:5751734\n if (mShortcutInfo != null) {\n BubbleController.updateIndicator(this);\n BubbleController.updateTitle(this);\n } else {\n setText(label);\n }\n } else if (mShortcutInfo != null) {\n BubbleController.updateIndicator(this);\n BubbleController.updateTitle(this);\n }\n }\n if (getWindowToken() == null ) {\n FolderInfo info = Launcher.findFolderInfo(mShortcutInfo.container);\n if (info != null)\n info.invalidate(this, mShortcutInfo);\n } else if (mSupportCard && !isInHotseatOrHideseat && mCardBackground != null) {\n invalidate();\n } else if (drawable instanceof FancyDrawable) {\n // ##date:2014/12/19 ##author:zhanggong.zg ##BugID:5587224\n invalidate();\n } else {\n super.invalidateDrawable(drawable);\n }\n }", "@Override\n public void setImageDrawable(@Nullable Drawable drawable) {\n mOriginalDrawable = drawable;\n setImageWhenReady();\n }", "public void onResourceCleared(Drawable drawable) {\n }", "@Override\n public Drawable mutate() {\n return patternDrawable.mutate();\n }", "@Override\n\tpublic Drawable background() {\n\t\treturn null;\n\t}", "@Override\n public void getDrawable(Drawable drawable) {\n imageView.setImageDrawable(drawable);\n }", "@Override\n\t\tpublic void draw(Canvas canvas) {\n\t\t\tif(drawable != null) {\n\t\t\t\tdrawable.draw(canvas);\n\t\t\t}\n\t\t}", "@Override\n\tpublic void draw(Canvas canvas) {\n\t\tif (drawable != null) {\n\t\t\tdrawable.draw(canvas);\n\t\t}\n\t}", "@Override\n public void draw(Canvas canvas) {\n if(drawable != null) {\n drawable.draw(canvas);\n }\n }", "@Override\n public void dispose(GLAutoDrawable drawable) { }", "@Override\n public void dispose(GLAutoDrawable drawable) { }", "private void drawNone(){\n drawAbstract(R.color.white);\n }", "@Override\n public void dispose(GLAutoDrawable drawable) {\n }", "private void toggleDrawable(TextView textView, boolean pressed){\n\n if(pressed){ // a textView Drawable is pressed\n\n if(mIncrement){\n\n //change the drawable on the textView\n //1st param is drawable we are to use for drawableLeft\n //2nd param is drawable to use for drawableTop\n //3rd param is drawable to use for drawableRight\n //4th param is drawable to use for drawableBottom\n //note that we are changing the drawable to be up_pressed for the drawableTop.\n textView.setCompoundDrawablesWithIntrinsicBounds(0, R.drawable.up_pressed, 0, R.drawable.down_normal);\n\n\n }\n if(mDecrement){\n\n //1st param is drawable we are to use for drawableLeft\n //2nd param is drawable to use for drawableTop\n //3rd param is drawable to use for drawableRight\n //4th param is drawable to use for drawableBottom\n //note that we are changing the drawable to be up_pressed for the drawableTop.\n textView.setCompoundDrawablesWithIntrinsicBounds(0, R.drawable.up_normal, 0, R.drawable.down_pressed);\n\n\n }\n\n }\n else{ // a textView Drawable is not pressed\n\n //1st param is drawable we are to use for drawableLeft\n //2nd param is drawable to use for drawableTop\n //3rd param is drawable to use for drawableRight\n //4th param is drawable to use for drawableBottom\n //note that we are changing the drawable to be up_pressed for the drawableTop.\n textView.setCompoundDrawablesWithIntrinsicBounds(0, R.drawable.up_normal, 0, R.drawable.down_normal);\n\n\n }\n }", "private void addLeftDrawable() {\n\n// mBusinessTitle.setCompoundDrawables(getDrawable(R.drawable.ic_assignment_black_24dp), null, null, null );\n//\n// mBusinessPhone.setCompoundDrawables(getDrawable(R.drawable.ic_settings_phone_black_24dp), null, null, null );\n//\n// mBusinessEmail.setCompoundDrawables(getDrawable(R.drawable.ic_mail_black_24dp), null, null, null );\n\n //change menu item save changes icon\n doneDrawable = getDrawable(R.drawable.ic_done_black_24dp);\n\n //change menu item reload icon\n updateDrawable = getDrawable(R.drawable.ic_edit_black_24dp);\n\n //add location drawable\n updateDrawable = new IconicsDrawable(this)\n .icon(GoogleMaterial.Icon.gmd_location_on)\n .color(getResources().getColor(R.color.editProfile_icon))\n .sizeDp(20);\n mAddLocation.setCompoundDrawables(getDrawable(R.drawable.ic_edit_black_24dp), null, null, null );\n\n mClearLocation.setBackground(getDrawable(R.drawable.ic_edit_black_24dp));\n }", "@Override\n public void dispose(GLAutoDrawable drawable) {\n }", "@SuppressWarnings(\"MissingSuperCall\")\n @Override\n public void onResourceLoading(@Nullable Drawable placeholder) {\n // Avoid calling super.\n }", "@Override\r\n\tpublic void dispose(GLAutoDrawable drawable) {\n\t\t\r\n\t}", "@Override\n\t\t\t\tpublic void onObtainDrawable(Drawable drawable, ImageView imageView) {\n\t\t\t\t}", "@Override\r\n public void dispose(GLAutoDrawable drawable) {\n }", "@Override\n\tpublic void setBackgroundDrawable(Drawable d) {\n\t\t\n\t}", "public void setDrawable(Drawable drawable)\n\t {\n\t this.drawable=drawable;\n\t }", "private void configDefaultDrawable() {\n drawableResId().open = R.drawable.sms_add_btn;\n drawableResId().close = R.drawable.sms_close_btn;\n drawableResId().gotoEmotion = R.drawable.sms_kaomoji_btn;\n drawableResId().keyboard = R.drawable.sms_keyboard;\n drawableResId().voiceNormal = R.drawable.sms_voice_btn;\n drawableResId().voicePressed = R.drawable.sms_voice_btn_p;\n }", "@Override\n protected void onDetachedFromWindow() {\n setImageDrawable(null);\n super.onDetachedFromWindow();\n }", "protected void mo3468a(Drawable drawable) {\n mo3470b();\n }", "@Override\n protected void drawableStateChanged() {\n super.drawableStateChanged();\n\n for(int x : getBackground().getState())\n if(x != android.R.attr.state_pressed)\n if(isRecording())\n stopTalking();\n }", "public void supressDraw() {\n this.m_canDraw = false;\n }", "@Override\n public void draw(Canvas canvas) {\n System.out.println(\"TintedDrawable.draw state=\" + Arrays.toString(getState()));\n patternDrawable.draw(canvas);\n }", "public interface RemoveNeeded {\n\t/** \n\t * This method is called once the drawable is not needed.\n\t * It should remove all auxiliary objects of this drawable. \n\t */\n\tpublic void remove();\n}", "private void refreshImage() {\n Bitmap image = drawableToBitmap(getDrawable());\n int canvasSize = Math.min(canvasWidth, canvasHeight);\n if (canvasSize > 0 && image != null) {\n //Preserve image ratio if it is not square\n BitmapShader shader = new BitmapShader(ThumbnailUtils.extractThumbnail(image, canvasSize, canvasSize),\n Shader.TileMode.CLAMP, Shader.TileMode.CLAMP);\n mPaint.setShader(shader);\n }\n }", "private void m1688a(Resources resources) {\n WrappedDrawableState wrappedDrawableState = this.f1994b;\n if (wrappedDrawableState != null && wrappedDrawableState.f2002b != null) {\n setWrappedDrawable(this.f1994b.f2002b.newDrawable(resources));\n }\n }", "public CommonPopWindow setBackgroundDrawable(Drawable drawable) {\n/* 152 */ this.mDrawable = drawable;\n/* 153 */ return this;\n/* */ }", "@Override\n void draw(Canvas canvas) {\n canvas.drawBitmap(appearance, getX(), getY(), null);\n }", "@Override\n\tpublic void init(GLAutoDrawable drawable) {\n\n\t}", "public boolean isActiveLayerDrawable() {\n\t\treturn false;\n\t}", "private void updateBackgroundID() {\n if ((x + 1) % 2 == (y + 1) % 2) {\n switch (c) {\n case BLACK:\n background = R.drawable.pawngame_black_black;\n break;\n case WHITE:\n background = R.drawable.pawngame_black_white;\n break;\n default:\n background = R.drawable.pawngame_black_empty;\n }\n } else {\n switch (c) {\n case BLACK:\n background = R.drawable.pawngame_white_black;\n break;\n case WHITE:\n background = R.drawable.pawngame_white_white;\n break;\n default:\n background = R.drawable.pawngame_white_empty;\n }\n }\n }", "protected void onPostExecute(Drawable result) {\n\t\tif(result != null){\n\t\t\tholdMe.setBackground(result);\n\t\t}\n }", "@Override\n protected void onDraw(Canvas canvas) {\n if(d==null){\n return;\n }\n\n int width=getMeasuredWidth();\n int height=getMeasuredHeight();\n Bitmap bitmap;\n if(d instanceof GifDrawable){\n bitmap= ((GifDrawable) d).getFirstFrame();\n }else if(d instanceof ColorDrawable){\n bitmap = Bitmap.createBitmap(width,height,\n Bitmap.Config.ARGB_8888);\n bitmap.eraseColor(((ColorDrawable) d).getColor());\n } else {\n bitmap=((BitmapDrawable) d).getBitmap();\n }\n\n if(bitmap==null){\n bitmap = Bitmap.createBitmap(width,height,\n Bitmap.Config.ARGB_8888);\n bitmap.eraseColor(Color.parseColor(\"#eeeeee\"));\n }\n Rect rectSrc=new Rect(0,0, bitmap.getWidth(), bitmap.getHeight());\n Rect rectDst=new Rect(0,0,width,height);\n\n Paint paint=new Paint();\n final float roundPx = ConvertUtils.dp2px(5);\n paint.setAntiAlias(true);\n paint.setColor(bgColor);\n int canvasWidth = canvas.getWidth();\n int canvasHeight = canvas.getHeight();\n\n\n int layerId = canvas.saveLayer(0, 0, canvasWidth, canvasHeight, null, Canvas.ALL_SAVE_FLAG);\n canvas.drawRoundRect(new RectF(rectDst), roundPx, roundPx , paint);\n canvas.drawRect(new RectF(0,height/2,width,height), paint);\n paint.setXfermode(new PorterDuffXfermode(PorterDuff.Mode.SRC_IN));\n canvas.drawBitmap(bitmap, rectSrc, rectDst, paint);\n\n\n// canvas.drawBitmap(bitmapColor, rectSrc, rectDst, paint);\n //最后将画笔去除Xfermode\n paint.setXfermode(null);\n canvas.restoreToCount(layerId);\n\n\n }", "public RippleDrawableCompat newDrawable() {\n return new RippleDrawableCompat(new C1269b(this));\n }", "public void dispose( GLAutoDrawable drawable ) {\n }", "@Override\n\t\tpublic void run() {\n\t\t\tsuper.run();\n\t\t\tpreserved(bitmap);\n\t\t}", "@Override\n\tprotected void onDraw(Canvas canvas) {\n\t\tsuper.onDraw(canvas);\n\n\t\tcanvas.drawBitmap(bitmap_new, 0, 0, paint);\n\t}", "@Override\r\n\tprotected void onDraw(Canvas canvas) {\n\t\tsuper.onDraw(canvas);\r\n\t\tcanvas.drawBitmap(mStarting, 0, 0, null);\r\n\t}", "private void recreateBitmap() {\n if (sprite != null) {\n sprite.recycle();\n }\n sprite = Bitmap.createBitmap(specState.targetWidth,\n specState.targetHeight,\n Bitmap.Config.ARGB_8888);\n spriteDrawable = new BitmapDrawable(getResources(), sprite);\n spriteDrawable.getPaint().setFilterBitmap(false);\n preview.setImageDrawable(spriteDrawable);\n }", "public void setDrawable(Drawable drawable) {\n this.mDrawable = drawable;\n }", "public void setDrawable(Drawable drawable) {\n this.mDrawable = drawable;\n }", "private void changeImage(int pos){\n switch(pos){\n case 0:\n view.setImageDrawable(getResources().getDrawable(R.drawable.card_blue));\n cancelButton.setBackground(getResources().getDrawable(R.drawable.memory_boarder_blue));\n saveButton.setBackground(getResources().getDrawable(R.drawable.memory_boarder_blue));\n spinner.setBackground(getResources().getDrawable(R.drawable.memory_boarder_blue));\n saveTheme = R.drawable.card_blue;\n color = R.color.blue;\n boarder = R.drawable.memory_boarder_blue;\n style = R.style.BlueTheme;\n break;\n case 1:\n view.setImageDrawable(getResources().getDrawable(R.drawable.card_brown));\n cancelButton.setBackground(getResources().getDrawable(R.drawable.memory_boarder_brown));\n saveButton.setBackground(getResources().getDrawable(R.drawable.memory_boarder_brown));\n spinner.setBackground(getResources().getDrawable(R.drawable.memory_boarder_brown));\n saveTheme = R.drawable.card_brown;\n color = R.color.brown;\n boarder = R.drawable.memory_boarder_brown;\n style = R.style.BrownTheme;\n break;\n case 2:\n view.setImageDrawable(getResources().getDrawable(R.drawable.card_dark_blue));\n cancelButton.setBackground(getResources().getDrawable(R.drawable.memory_boarder_darkblue));\n saveButton.setBackground(getResources().getDrawable(R.drawable.memory_boarder_darkblue));\n spinner.setBackground(getResources().getDrawable(R.drawable.memory_boarder_darkblue));\n saveTheme = R.drawable.card_dark_blue;\n color = R.color.dark_blue;\n boarder = R.drawable.memory_boarder_darkblue;\n style = R.style.DarkBlueTheme;\n break;\n case 3:\n view.setImageDrawable(getResources().getDrawable(R.drawable.card_green));\n cancelButton.setBackground(getResources().getDrawable(R.drawable.memory_boarder_green));\n saveButton.setBackground(getResources().getDrawable(R.drawable.memory_boarder_green));\n spinner.setBackground(getResources().getDrawable(R.drawable.memory_boarder_green));\n saveTheme = R.drawable.card_green;\n color = R.color.green;\n boarder = R.drawable.memory_boarder_green;\n style = R.style.GreenTheme;\n break;\n case 4:\n view.setImageDrawable(getResources().getDrawable(R.drawable.card_grey));\n cancelButton.setBackground(getResources().getDrawable(R.drawable.memory_boarder_grey));\n saveButton.setBackground(getResources().getDrawable(R.drawable.memory_boarder_grey));\n spinner.setBackground(getResources().getDrawable(R.drawable.memory_boarder_grey));\n saveTheme = R.drawable.card_grey;\n color = R.color.grey;\n boarder = R.drawable.memory_boarder_grey;\n style = R.style.GreyTheme;\n break;\n case 5:\n view.setImageDrawable(getResources().getDrawable(R.drawable.card_lime));\n cancelButton.setBackground(getResources().getDrawable(R.drawable.memory_boarder_lime));\n saveButton.setBackground(getResources().getDrawable(R.drawable.memory_boarder_lime));\n spinner.setBackground(getResources().getDrawable(R.drawable.memory_boarder_lime));\n saveTheme = R.drawable.card_lime;\n color = R.color.lime;\n boarder = R.drawable.memory_boarder_lime;\n style = R.style.LimeTheme;\n break;\n case 6:\n view.setImageDrawable(getResources().getDrawable(R.drawable.card_orange));\n cancelButton.setBackground(getResources().getDrawable(R.drawable.memory_boarder_orange));\n saveButton.setBackground(getResources().getDrawable(R.drawable.memory_boarder_orange));\n spinner.setBackground(getResources().getDrawable(R.drawable.memory_boarder_orange));\n saveTheme = R.drawable.card_orange;\n color = R.color.orange;\n boarder = R.drawable.memory_boarder_orange;\n style = R.style.OrangeTheme;\n break;\n case 7:\n view.setImageDrawable(getResources().getDrawable(R.drawable.card_pink));\n cancelButton.setBackground(getResources().getDrawable(R.drawable.memory_boarder_pink));\n saveButton.setBackground(getResources().getDrawable(R.drawable.memory_boarder_pink));\n spinner.setBackground(getResources().getDrawable(R.drawable.memory_boarder_pink));\n saveTheme = R.drawable.card_pink;\n color = R.color.pink;\n boarder = R.drawable.memory_boarder_pink;\n style = R.style.PinkTheme;\n break;\n case 8:\n view.setImageDrawable(getResources().getDrawable(R.drawable.card_purple));\n cancelButton.setBackground(getResources().getDrawable(R.drawable.memory_boarder_purple));\n saveButton.setBackground(getResources().getDrawable(R.drawable.memory_boarder_purple));\n spinner.setBackground(getResources().getDrawable(R.drawable.memory_boarder_purple));\n saveTheme = R.drawable.card_purple;\n color = R.color.purple;\n boarder = R.drawable.memory_boarder_purple;\n style = R.style.PurpleTheme;\n break;\n case 9:\n view.setImageDrawable(getResources().getDrawable(R.drawable.card_purple_spotted));\n cancelButton.setBackground(getResources().getDrawable(R.drawable.memory_boarder_purplespotted));\n saveButton.setBackground(getResources().getDrawable(R.drawable.memory_boarder_purplespotted));\n spinner.setBackground(getResources().getDrawable(R.drawable.memory_boarder_purplespotted));\n saveTheme = R.drawable.card_purple_spotted;\n color = R.color.purple_spotted;\n boarder = R.drawable.memory_boarder_purplespotted;\n style = R.style.PurpleSpottedTheme;\n break;\n case 10:\n view.setImageDrawable(getResources().getDrawable(R.drawable.card_rainbow));\n cancelButton.setBackground(getResources().getDrawable(R.drawable.memory_boarder_rainbow));\n saveButton.setBackground(getResources().getDrawable(R.drawable.memory_boarder_rainbow));\n spinner.setBackground(getResources().getDrawable(R.drawable.memory_boarder_rainbow));\n saveTheme = R.drawable.card_rainbow;\n color = R.color.rainbow;\n boarder = R.drawable.memory_boarder_rainbow;\n style = R.style.RainbowTheme;\n break;\n case 11:\n view.setImageDrawable(getResources().getDrawable(R.drawable.card_red_pink));\n cancelButton.setBackground(getResources().getDrawable(R.drawable.memory_boarder_redpink));\n saveButton.setBackground(getResources().getDrawable(R.drawable.memory_boarder_redpink));\n spinner.setBackground(getResources().getDrawable(R.drawable.memory_boarder_redpink));\n saveTheme = R.drawable.card_red_pink;\n color = R.color.red_pink;\n boarder = R.drawable.memory_boarder_redpink;\n style = R.style.RedPinkTheme;\n break;\n case 12:\n view.setImageDrawable(getResources().getDrawable(R.drawable.card_teal));\n cancelButton.setBackground(getResources().getDrawable(R.drawable.memory_boarder_teal));\n saveButton.setBackground(getResources().getDrawable(R.drawable.memory_boarder_teal));\n spinner.setBackground(getResources().getDrawable(R.drawable.memory_boarder_teal));\n saveTheme = R.drawable.card_teal;\n color = R.color.teal;\n boarder = R.drawable.memory_boarder_teal;\n style = R.style.TealTheme;\n break;\n case 13:\n view.setImageDrawable(getResources().getDrawable(R.drawable.card_white_green));\n cancelButton.setBackground(getResources().getDrawable(R.drawable.memory_boarder_whitegreen));\n saveButton.setBackground(getResources().getDrawable(R.drawable.memory_boarder_whitegreen));\n spinner.setBackground(getResources().getDrawable(R.drawable.memory_boarder_whitegreen));\n saveTheme = R.drawable.card_white_green;\n color = R.color.white_green;\n boarder = R.drawable.memory_boarder_whitegreen;\n style = R.style.WhiteGreenTheme;\n break;\n }\n }", "public void dispose(GLAutoDrawable drawable) {\n }", "public void newDrawing()\n {\n //clear the current canvas\n canvas.drawColor(0, PorterDuff.Mode.CLEAR);\n //reprint the screen\n invalidate();\n }", "public void recycle() {\n Drawable drawable = this.view.getDrawable();\n if (drawable != null && (drawable instanceof BitmapDrawable)) {\n ((BitmapDrawable) drawable).getBitmap().recycle();\n }\n }", "void withDraw() {\n if (this.pointer != 0) {\n this.pointer--;\n }\n }", "public void drawableStateChanged() {\n super.drawableStateChanged();\n Drawable drawable = this.mMarginDrawable;\n if (drawable != null && drawable.isStateful()) {\n drawable.setState(getDrawableState());\n }\n }", "@Override\n\tpublic void animate(GLAutoDrawable drawable) {\n\n\t}", "public void mo18696a(Drawable resource) {\n ((ImageView) this.f10538c).setImageDrawable(resource);\n }", "private void unhighlightView(AdapterList.ViewHolder holder) {\n holder.checkIcon.setImageResource(R.drawable.right_arrow_go);\n }", "public void startNew(){\n action = true;\n started = false;\n drawCanvas.drawColor(0, PorterDuff.Mode.CLEAR);\n invalidate();\n }", "public void becomeEaten(){\n\t\tthis.setIcon(null);\n\t}", "public void init(GLAutoDrawable drawable) {}", "void invalidatePalette();", "@Override\npublic void dispose(GLAutoDrawable arg0) {\n\t\n}", "public RippleDrawableCompat mutate() {\n this.f9050a = new C1269b(this.f9050a);\n return this;\n }", "@Override\r\n public void onPrepareLoad(Drawable arg0) {\n\r\n }", "public void dispose(GLAutoDrawable drawable) {\n\t\t\n\t}", "@Override\n\tpublic void dispose(GLAutoDrawable arg0) {\n\n\t}", "@Override\n\tpublic void dispose(GLAutoDrawable arg0) {\n\t\t\n\t}", "@Override\n\tprotected void onDraw(Canvas canvas) {\n\t\tsuper.onDraw(canvas);\n\t\tint count = canvas.saveLayer(0, 0, this.getWidth(), this.getHeight(), null, Canvas.ALL_SAVE_FLAG);\n\t\tcanvas.translate(0, original_view.getBottom() + reflection_spacing);\n\t\tif (!missing) {\n\t\t\tcanvas.save();\n\t\t\tcanvas.translate(original_view.getLeft(), original_view.getHeight());\n\t\t\tMatrix matrix = new Matrix();\n\t\t\tmatrix.postScale(scale, scale);\n\t\t\tmatrix.postScale(1, -1, -1, 1);\n\t\t\tcanvas.drawBitmap(original_bitmap, matrix, null);\n\t\t\tcanvas.restore();\n\t\t\tPaint paint = new Paint();\n\t\t\tpaint.setAntiAlias(false);\n\t\t\tfloat line_scale = large ? 1f / anim_scale : 1f;\n\t\t\tLinearGradient shader = new LinearGradient(0, 0, 0, original_view.getHeight() * reflection_scale\n\t\t\t\t\t* line_scale, 0x70ffffff, 0x00ffffff, TileMode.MIRROR);\n\t\t\t// 设置阴影\n\t\t\tpaint.setShader(shader);\n\t\t\tpaint.setXfermode(new PorterDuffXfermode(android.graphics.PorterDuff.Mode.DST_IN));\n\t\t\t// 用已经定义好的画笔构建一个矩形阴影渐变效果\n\t\t\tcanvas.drawRect(original_view.getLeft(), original_view.getTop(),\n\t\t\t\t\toriginal_view.getWidth(), original_view.getHeight()\n\t\t\t\t\t\t\t* reflection_scale, paint);\n\t\t}\n\t\tcanvas.restoreToCount(count);\n\t}", "@Override\npublic void dispose(GLAutoDrawable arg0) {\n \n}", "@Override\n public void refreshDrawable() {\n for(Drawable d : Scene.objects) {\n if(d.getName().equals(this.name)) {\n Scene.objects.set(Scene.objects.indexOf(d), new Draw_Tunnel(this));\n }\n }\n }", "public void setDropDownBackgroundDrawable(Drawable d) {\n/* 277 */ throw new RuntimeException(\"Stub!\");\n/* */ }", "private void updateBaseIcon() {\n this.squareIcon.setDecoratedIcon( getSelectedBaseIcon() );\n this.radialIcon.setDecoratedIcon( getSelectedBaseIcon() );\n }", "private void themeDynamicAdd() {\n try {\n Background=getBitmapFromURL(base_image);\n Drawable dr = new BitmapDrawable((Background));\n test_rules_background.setBackgroundDrawable(dr);\n\n Bitmap back_bitmap;\n String back_shrd= AarambhThemeSharedPrefreence.loadBackArrowIconFromPreference(this);\n back_bitmap = getBitmapFromURL(back_shrd);\n Drawable dr1 = new BitmapDrawable((back_bitmap));\n back_btn_test_rules.setBackgroundDrawable(dr1);\n }catch (Exception e){\n e.printStackTrace();\n }\n\n }", "@Override\n public void setDrawableResource(int resId) {\n ivColorSet.setBackgroundResource(resId);\n }", "private void unbindDrawables(View view) {\n if (view.getBackground() != null) {\n view.getBackground().setCallback(null);\n }\n if (view instanceof ViewGroup) {\n for (int i = 0; i < ((ViewGroup) view).getChildCount(); i++) {\n unbindDrawables(((ViewGroup) view).getChildAt(i));\n }\n try\n {\n ((ViewGroup) view).removeAllViews();\n }\n catch(UnsupportedOperationException ignore)\n {\n //if can't remove all view (e.g. adapter view) - no problem \n }\n }\n }", "public void undo() {\n firePropertyChange(\"undo\", null, \"enable\");\n final Drawing removeMe = myDrawingArray.get(myDrawingArray.size() - 1);\n myDrawingArray.remove(removeMe);\n myUndoStack.push(removeMe);\n myCurrentShape = new Drawing(new Line2D.Double(), Color.WHITE, 0);\n if (myDrawingArray.isEmpty()) {\n firePropertyChange(\"stack\", null, EMPTY_STRING);\n }\n repaint();\n }", "public Drawable getDrawable()\n\t {\n\t return drawable;\n\t }", "public boolean Drawable();", "@Override\n public void setNormal()\n {\n setImage(\"Minus.png\");\n }", "public void clear() {\n\t\tsetImageResource(R.drawable.barcode);\n\t\tthis.setScaleType(ScaleType.CENTER);\n\t}", "public void onDraw(Displayer displayer) {\n // Do nothing\n }", "@Override\n\t\t\t\t\tpublic Drawable getDrawable() {\n\t\t\t\t\t\treturn getWeightDrawable(id,width,height);\n\t\t\t\t\t}", "public RoundedColorDrawable(){\n super();\n }", "@Override\n\t\t\t\tpublic void onClick(View arg0) {\n\t\t\t\t\tdrawView.setDrawingCacheEnabled(true);\n\t\t\t\t\tString imgSaved = MediaStore.Images.Media.insertImage(\n\t\t\t\t\t\t\tgetContentResolver(), drawView.getDrawingCache(),\n\t\t\t\t\t\t\tUUID.randomUUID().toString() + \".png\", \"drawing\");\n\t\t\t\t\tSystem.out.println(\"the string uri:\" + imgSaved);\n\n\t\t\t\t\tif (imgSaved != null) {\n\t\t\t\t\t\tToast savedToast = Toast\n\t\t\t\t\t\t\t\t.makeText(getApplicationContext(),\n\t\t\t\t\t\t\t\t\t\t\"Drawing saved to Gallery!\",\n\t\t\t\t\t\t\t\t\t\tToast.LENGTH_SHORT);\n\t\t\t\t\t\t// savedToast.show();\n\t\t\t\t\t\tdrawView.destroyDrawingCache();\n\t\t\t\t\t} else {\n\t\t\t\t\t\tToast unsavedToast = Toast.makeText(\n\t\t\t\t\t\t\t\tgetApplicationContext(),\n\t\t\t\t\t\t\t\t\"Oops! Image could not be saved.\",\n\t\t\t\t\t\t\t\tToast.LENGTH_SHORT);\n\t\t\t\t\t\t// unsavedToast.show();\n\t\t\t\t\t}\n\n\t\t\t\t\tdialog.dismiss();\n\t\t\t\t}", "public void onDraw(Canvas canvas) {\n float f = 1.0f;\n if (SharedDocumentCell.this.thumbImageView.getImageReceiver().hasBitmapImage()) {\n f = 1.0f - SharedDocumentCell.this.thumbImageView.getImageReceiver().getCurrentAlpha();\n }\n SharedDocumentCell.this.extTextView.setAlpha(f);\n SharedDocumentCell.this.placeholderImageView.setAlpha(f);\n super.onDraw(canvas);\n }", "private void drawNoxItemDrawable(Canvas canvas, int left, int top, Drawable drawable) {\n if (drawable != null) {\n int itemSize = (int) noxConfig.getNoxItemSize();\n drawable.setBounds(left, top, left + itemSize, top + itemSize);\n drawable.draw(canvas);\n }\n }", "@Override\n\tpublic void init(GLAutoDrawable arg0) {\n\t\t\n\t}", "public void onDraw(Canvas canvas) {\n super.onDraw(canvas);\n Bitmap bitmap = this.mBitmap;\n if (bitmap != null) {\n canvas.drawBitmap(bitmap, 0.0f, 0.0f, (Paint) null);\n }\n }", "@Override\n\tprotected void onDraw(Canvas canvas) {\n\t\tsuper.onDraw(canvas);\n\t\tBitmap b = null;\n\t\tfor (int i = 0; i < mViewNum; i++) {\n\t\t\tif (i == mCurrSelectIndex) {\n\t\t\t\tb = BitmapFactory.decodeResource(getResources(), R.mipmap.pic_select_point);\n\t\t\t} else {\n\t\t\t\tb = BitmapFactory.decodeResource(getResources(), R.mipmap.pic_noselect_point);\n\t\t\t}\n\t\t\tfloat vl = (float) getMeasuredWidth() / 2 - (float) (mViewNum * b.getWidth() + (mViewNum - 1) * b.getWidth()) / 2;\n\t\t\tvl = vl + (float) i * 2 * b.getWidth();\n\t\t\tcanvas.drawBitmap(b, vl, getMeasuredHeight() - 2 * b.getHeight(), null);\n\t\t}\n\t}", "@Override\r\n \t\t\tpublic void display(GLAutoDrawable drawable) {\n \t\t\t\tif (w != drawable.getWidth() || h != drawable.getHeight() && w != -1) {\r\n \t\t\t\t\tw = drawable.getWidth();\r\n \t\t\t\t\th = drawable.getHeight();\r\n\t\t\t\t\tfireReshape(drawable, 0, 0, drawable.getWidth(), drawable.getHeight());\r\n \t\t\t\t}\r\n \t\t\t\tfireDisplay(drawable);\r\n \t\t\t}", "public Graphics setOffScreen() {\n\t\tjava.awt.Image tempSignal;\n\t\tGraphics g;\n\n\t\ttempSignal = image;\n\t\timage = this.createImage(image.getWidth(this), image.getHeight(this));\n\t\tg = image.getGraphics();\n\t\tg.drawImage(tempSignal, 0, 0, this);\n\n\t\treturn g;\n\n\t}", "@Override\n\tpublic void onPrepareLoad(Drawable arg0) {\n\t\t\n\t}", "void reDraw();", "@Override\n\t\tprotected void onDraw(Canvas canvas) {\n\t\t\tsuper.onDraw(canvas);\n\t\t\tLog.e(\"FYF\", getId() + \" ImageView onDraw\");\n\t\t}", "@Override\r\n\tprotected void onDraw() {\n\t\t\r\n\t}", "private void unsetWorking(){\n\t\tcalibrationButtonImageView.setClickable(true);\n\t\tcalibrationButtonImageView.setEnabled(true);\n progressDialog.dismiss();\n\t}", "private void clearPainting()\r\n\t{\r\n\t\tdockableDragPainter.clear();\r\n\t}", "@Test\n public void editPicture_NotNull(){\n Bitmap originalImage = BitmapFactory.decodeResource(appContext.getResources(),R.drawable.ic_add);\n testRecipe.setImage(originalImage, appContext);\n Bitmap newImage = BitmapFactory.decodeResource(appContext.getResources(),R.drawable.ic_cart);\n testRecipe.setImage(newImage, appContext);\n assertNotEquals(\"editPicture - New Image Not Null\", null, testRecipe.getImage(appContext));\n }", "public void run() {\n sight.setImageBitmap(bmp);\n // old = null;\n }", "private void activeDrawEffects() {\n }" ]
[ "0.67786646", "0.6743884", "0.6678951", "0.66634345", "0.65283704", "0.6340017", "0.62284046", "0.6226154", "0.6192913", "0.61843985", "0.6166612", "0.61550236", "0.61550236", "0.61530125", "0.61371744", "0.6116776", "0.61056674", "0.6099158", "0.60882527", "0.6074515", "0.60695046", "0.60444367", "0.6023793", "0.60165113", "0.60151964", "0.5977079", "0.59682536", "0.59425175", "0.5939199", "0.5883054", "0.58674157", "0.5856298", "0.58442074", "0.583529", "0.58303756", "0.5828174", "0.5804875", "0.57947564", "0.57720035", "0.57628894", "0.57583183", "0.57548577", "0.57350737", "0.57332724", "0.572832", "0.57256913", "0.57069004", "0.57069004", "0.5689473", "0.5676374", "0.56720394", "0.5672005", "0.5671411", "0.5664196", "0.56559676", "0.56535643", "0.5645652", "0.56385267", "0.56270766", "0.56248397", "0.56209254", "0.5619789", "0.5617114", "0.5612168", "0.5602998", "0.559813", "0.5580981", "0.5573342", "0.55667603", "0.5548656", "0.554526", "0.5544864", "0.55268043", "0.55158556", "0.55088234", "0.5502676", "0.55014783", "0.5500966", "0.550074", "0.5495572", "0.54951876", "0.5492326", "0.5491611", "0.54901516", "0.5471133", "0.54679847", "0.5456301", "0.5445606", "0.54376906", "0.54364306", "0.54322153", "0.5430279", "0.54298705", "0.5424535", "0.5419683", "0.54175085", "0.54147035", "0.5414444", "0.5413239", "0.53962654" ]
0.5804919
36
/ JADX WARNING: Removed duplicated region for block: B:47:0x00ba / JADX WARNING: Removed duplicated region for block: B:76:0x016f / JADX WARNING: Removed duplicated region for block: B:73:0x0133
public final android.os.Bundle a(java.lang.String r10, android.os.Bundle r11, @android.support.annotation.Nullable java.util.List<java.lang.String> r12, boolean r13, boolean r14) { /* r9 = this; r0 = 0; if (r11 == 0) goto L_0x0174; L_0x0003: r7 = new android.os.Bundle; r7.<init>(r11); r0 = 0; r1 = r11.keySet(); r8 = r1.iterator(); r6 = r0; L_0x0012: r0 = r8.hasNext(); if (r0 == 0) goto L_0x0173; L_0x0018: r2 = r8.next(); r2 = (java.lang.String) r2; r0 = 0; if (r12 == 0) goto L_0x0027; L_0x0021: r1 = r12.contains(r2); if (r1 != 0) goto L_0x003d; L_0x0027: if (r13 == 0) goto L_0x0032; L_0x0029: r0 = "event param"; r0 = r9.a(r0, r2); if (r0 != 0) goto L_0x005b; L_0x0031: r0 = 3; L_0x0032: if (r0 != 0) goto L_0x003d; L_0x0034: r0 = "event param"; r0 = r9.c(r0, r2); if (r0 != 0) goto L_0x0075; L_0x003c: r0 = 3; L_0x003d: if (r0 == 0) goto L_0x008f; L_0x003f: r1 = a(r7, r0); if (r1 == 0) goto L_0x0057; L_0x0045: r1 = 40; r3 = 1; r1 = a(r2, r1, r3); r3 = "_ev"; r7.putString(r3, r1); r1 = 3; if (r0 != r1) goto L_0x0057; L_0x0054: a(r7, r2); L_0x0057: r7.remove(r2); goto L_0x0012; L_0x005b: r0 = "event param"; r1 = 0; r0 = r9.a(r0, r1, r2); if (r0 != 0) goto L_0x0067; L_0x0064: r0 = 14; goto L_0x0032; L_0x0067: r0 = "event param"; r1 = 40; r0 = r9.a(r0, r1, r2); if (r0 != 0) goto L_0x0073; L_0x0071: r0 = 3; goto L_0x0032; L_0x0073: r0 = 0; goto L_0x0032; L_0x0075: r0 = "event param"; r1 = 0; r0 = r9.a(r0, r1, r2); if (r0 != 0) goto L_0x0081; L_0x007e: r0 = 14; goto L_0x003d; L_0x0081: r0 = "event param"; r1 = 40; r0 = r9.a(r0, r1, r2); if (r0 != 0) goto L_0x008d; L_0x008b: r0 = 3; goto L_0x003d; L_0x008d: r0 = 0; goto L_0x003d; L_0x008f: r4 = r11.get(r2); r9.c(); if (r14 == 0) goto L_0x00f4; L_0x0098: r1 = "param"; r0 = r4 instanceof android.os.Parcelable[]; if (r0 == 0) goto L_0x00e4; L_0x009e: r0 = r4; r0 = (android.os.Parcelable[]) r0; r0 = r0.length; L_0x00a2: r3 = 1000; // 0x3e8 float:1.401E-42 double:4.94E-321; if (r0 <= r3) goto L_0x00f2; L_0x00a6: r3 = r9.zzge(); r3 = r3.u(); r5 = "Parameter array is too long; discarded. Value kind, name, array length"; r0 = java.lang.Integer.valueOf(r0); r3.a(r5, r1, r2, r0); r0 = 0; L_0x00b8: if (r0 != 0) goto L_0x00f4; L_0x00ba: r0 = 17; L_0x00bc: if (r0 == 0) goto L_0x012d; L_0x00be: r1 = "_ev"; r1 = r1.equals(r2); if (r1 != 0) goto L_0x012d; L_0x00c6: r0 = a(r7, r0); if (r0 == 0) goto L_0x00df; L_0x00cc: r0 = 40; r1 = 1; r0 = a(r2, r0, r1); r1 = "_ev"; r7.putString(r1, r0); r0 = r11.get(r2); a(r7, r0); L_0x00df: r7.remove(r2); goto L_0x0012; L_0x00e4: r0 = r4 instanceof java.util.ArrayList; if (r0 == 0) goto L_0x00f0; L_0x00e8: r0 = r4; r0 = (java.util.ArrayList) r0; r0 = r0.size(); goto L_0x00a2; L_0x00f0: r0 = 1; goto L_0x00b8; L_0x00f2: r0 = 1; goto L_0x00b8; L_0x00f4: r0 = r9.o(); r1 = r9.f(); r1 = r1.s(); r0 = r0.f(r1); if (r0 == 0) goto L_0x010c; L_0x0106: r0 = h(r10); if (r0 != 0) goto L_0x0112; L_0x010c: r0 = h(r2); if (r0 == 0) goto L_0x0120; L_0x0112: r1 = "param"; r3 = 256; // 0x100 float:3.59E-43 double:1.265E-321; r0 = r9; r5 = r14; r0 = r0.a(r1, r2, r3, r4, r5); L_0x011c: if (r0 == 0) goto L_0x012b; L_0x011e: r0 = 0; goto L_0x00bc; L_0x0120: r1 = "param"; r3 = 100; r0 = r9; r5 = r14; r0 = r0.a(r1, r2, r3, r4, r5); goto L_0x011c; L_0x012b: r0 = 4; goto L_0x00bc; L_0x012d: r0 = a(r2); if (r0 == 0) goto L_0x016f; L_0x0133: r0 = r6 + 1; r1 = 25; if (r0 <= r1) goto L_0x0170; L_0x0139: r1 = 48; r3 = new java.lang.StringBuilder; r3.<init>(r1); r1 = "Event can't contain more than 25 params"; r1 = r3.append(r1); r1 = r1.toString(); r3 = r9.zzge(); r3 = r3.r(); r4 = r9.k(); r4 = r4.a(r10); r5 = r9.k(); r5 = r5.a(r11); r3.a(r1, r4, r5); r1 = 5; a(r7, r1); r7.remove(r2); r6 = r0; goto L_0x0012; L_0x016f: r0 = r6; L_0x0170: r6 = r0; goto L_0x0012; L_0x0173: r0 = r7; L_0x0174: return r0; */ throw new UnsupportedOperationException("Method not decompiled: com.google.android.gms.internal.measurement.ie.a(java.lang.String, android.os.Bundle, java.util.List, boolean, boolean):android.os.Bundle"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test (timeout=180000)\n public void testDegenerateRegions() throws Exception {\n TableName table = TableName.valueOf(\"tableDegenerateRegions\");\n try {\n setupTable(table);\n assertNoErrors(doFsck(conf,false));\n assertEquals(ROWKEYS.length, countRows());\n\n // Now let's mess it up, by adding a region with a duplicate startkey\n HRegionInfo hriDupe =\n createRegion(tbl.getTableDescriptor(), Bytes.toBytes(\"B\"), Bytes.toBytes(\"B\"));\n TEST_UTIL.getHBaseCluster().getMaster().assignRegion(hriDupe);\n TEST_UTIL.getHBaseCluster().getMaster().getAssignmentManager()\n .waitForAssignment(hriDupe);\n ServerName server = regionStates.getRegionServerOfRegion(hriDupe);\n TEST_UTIL.assertRegionOnServer(hriDupe, server, REGION_ONLINE_TIMEOUT);\n\n HBaseFsck hbck = doFsck(conf,false);\n assertErrors(hbck, new ERROR_CODE[] { ERROR_CODE.DEGENERATE_REGION, ERROR_CODE.DUPE_STARTKEYS,\n ERROR_CODE.DUPE_STARTKEYS });\n assertEquals(2, hbck.getOverlapGroups(table).size());\n assertEquals(ROWKEYS.length, countRows());\n\n // fix the degenerate region.\n doFsck(conf,true);\n\n // check that the degenerate region is gone and no data loss\n HBaseFsck hbck2 = doFsck(conf,false);\n assertNoErrors(hbck2);\n assertEquals(0, hbck2.getOverlapGroups(table).size());\n assertEquals(ROWKEYS.length, countRows());\n } finally {\n cleanupTable(table);\n }\n }", "public void cleanupOldBlocks (long threshTime) ;", "@Test (timeout=180000)\n public void testDupeRegion() throws Exception {\n TableName table =\n TableName.valueOf(\"tableDupeRegion\");\n try {\n setupTable(table);\n assertNoErrors(doFsck(conf, false));\n assertEquals(ROWKEYS.length, countRows());\n\n // Now let's mess it up, by adding a region with a duplicate startkey\n HRegionInfo hriDupe =\n createRegion(tbl.getTableDescriptor(), Bytes.toBytes(\"A\"), Bytes.toBytes(\"B\"));\n\n TEST_UTIL.getHBaseCluster().getMaster().assignRegion(hriDupe);\n TEST_UTIL.getHBaseCluster().getMaster().getAssignmentManager()\n .waitForAssignment(hriDupe);\n ServerName server = regionStates.getRegionServerOfRegion(hriDupe);\n TEST_UTIL.assertRegionOnServer(hriDupe, server, REGION_ONLINE_TIMEOUT);\n\n // Yikes! The assignment manager can't tell between diff between two\n // different regions with the same start/endkeys since it doesn't\n // differentiate on ts/regionId! We actually need to recheck\n // deployments!\n while (findDeployedHSI(getDeployedHRIs((HBaseAdmin) admin), hriDupe) == null) {\n Thread.sleep(250);\n }\n\n LOG.debug(\"Finished assignment of dupe region\");\n\n // TODO why is dupe region different from dupe start keys?\n HBaseFsck hbck = doFsck(conf, false);\n assertErrors(hbck, new ERROR_CODE[] { ERROR_CODE.DUPE_STARTKEYS,\n ERROR_CODE.DUPE_STARTKEYS});\n assertEquals(2, hbck.getOverlapGroups(table).size());\n assertEquals(ROWKEYS.length, countRows()); // seems like the \"bigger\" region won.\n\n // fix the degenerate region.\n doFsck(conf,true);\n\n // check that the degenerate region is gone and no data loss\n HBaseFsck hbck2 = doFsck(conf,false);\n assertNoErrors(hbck2);\n assertEquals(0, hbck2.getOverlapGroups(table).size());\n assertEquals(ROWKEYS.length, countRows());\n } finally {\n cleanupTable(table);\n }\n }", "public int numberOfBlocksToRemove() {\r\n return 105;\r\n }", "int numberOfBlocksToRemove();", "private void repairGenome() {\n if (checkGenome(this.code)) {\n return;\n }\n int[] counters = new int[8];\n for (int c : code) { counters[c]++; }\n for (int i = 0; i < 8; ++i) {\n if (counters[i] == 0) {\n while (true) {\n int newPos = r.nextInt(GENOME_SIZE);\n if (counters[this.code[newPos]] > 1) {\n counters[this.code[newPos]]--;\n this.code[newPos] = i;\n break;\n }\n }\n }\n }\n }", "@Test\n public void testNonConsecutiveBlocks()\n {\n long blockSize = 1000;\n int noOfBlocks = (int)((testMeta.dataFile.length() / blockSize)\n + (((testMeta.dataFile.length() % blockSize) == 0) ? 0 : 1));\n\n testMeta.blockReader.beginWindow(1);\n\n for (int i = 0; i < 10; i++) {\n for (int j = 0; j < Math.ceil(noOfBlocks / 10.0); j++) {\n int blockNo = 10 * j + i;\n if (blockNo >= noOfBlocks) {\n continue;\n }\n BlockMetadata.FileBlockMetadata blockMetadata = new BlockMetadata.FileBlockMetadata(s3Directory + FILE_1,\n blockNo, blockNo * blockSize,\n blockNo == noOfBlocks - 1 ? testMeta.dataFile.length() : (blockNo + 1) * blockSize,\n blockNo == noOfBlocks - 1, blockNo - 1, testMeta.dataFile.length());\n testMeta.blockReader.blocksMetadataInput.process(blockMetadata);\n }\n }\n\n testMeta.blockReader.endWindow();\n\n List<Object> messages = testMeta.messageSink.collectedTuples;\n Assert.assertEquals(\"No of records\", testMeta.messages.size(), messages.size());\n\n Collections.sort(testMeta.messages, new Comparator<String[]>()\n {\n @Override\n public int compare(String[] rec1, String[] rec2)\n {\n return compareStringArrayRecords(rec1, rec2);\n }\n });\n\n Collections.sort(messages, new Comparator<Object>()\n {\n @Override\n public int compare(Object object1, Object object2)\n {\n String[] rec1 = new String((byte[])object1).split(\",\");\n String[] rec2 = new String((byte[])object2).split(\",\");\n return compareStringArrayRecords(rec1, rec2);\n }\n });\n for (int i = 0; i < messages.size(); i++) {\n byte[] msg = (byte[])messages.get(i);\n Assert.assertTrue(\"line \" + i, Arrays.equals(new String(msg).split(\",\"), testMeta.messages.get(i)));\n }\n }", "int regionSplitBits4DownSampledTable();", "@Test (timeout=180000)\n public void testRegionHole() throws Exception {\n TableName table =\n TableName.valueOf(\"tableRegionHole\");\n try {\n setupTable(table);\n assertEquals(ROWKEYS.length, countRows());\n\n // Mess it up by leaving a hole in the assignment, meta, and hdfs data\n admin.disableTable(table);\n deleteRegion(conf, tbl.getTableDescriptor(), Bytes.toBytes(\"B\"),\n Bytes.toBytes(\"C\"), true, true, true);\n admin.enableTable(table);\n\n HBaseFsck hbck = doFsck(conf, false);\n assertErrors(hbck, new ERROR_CODE[] {\n ERROR_CODE.HOLE_IN_REGION_CHAIN});\n // holes are separate from overlap groups\n assertEquals(0, hbck.getOverlapGroups(table).size());\n\n // fix hole\n doFsck(conf, true);\n\n // check that hole fixed\n assertNoErrors(doFsck(conf,false));\n assertEquals(ROWKEYS.length - 2 , countRows()); // lost a region so lost a row\n } finally {\n cleanupTable(table);\n }\n }", "public void handlesBlockingRegionDrag() {\r\n \t\tObject[] cells = graph.getDescendants(graph.getSelectionCells());\r\n \t\t// Put cells not in a blocking region to back\r\n \t\tHashSet<Object> putBack = new HashSet<Object>();\r\n \t\tfor (Object cell2 : cells) {\r\n \t\t\tif (cell2 instanceof JmtCell && ((JmtCell) cell2).parentChanged()) {\r\n \t\t\t\t// This cell was moved in, out or between blocking regions\r\n \t\t\t\tJmtCell cell = (JmtCell) cell2;\r\n \t\t\t\tObject key = ((CellComponent) cell.getUserObject()).getKey();\r\n \t\t\t\tObject oldRegionKey, newRegionKey;\r\n \t\t\t\tif (!(cell.getParent() instanceof BlockingRegion)) {\r\n \t\t\t\t\t// Object removed from blocking region\r\n \t\t\t\t\tputBack.add(cell2);\r\n \t\t\t\t\toldRegionKey = ((BlockingRegion) cell.getPrevParent()).getKey();\r\n \t\t\t\t\tmodel.removeRegionStation(oldRegionKey, key);\r\n \t\t\t\t\t// If region is empty, removes region too\r\n \t\t\t\t\tif (model.getBlockingRegionStations(oldRegionKey).size() == 0) {\r\n \t\t\t\t\t\tmodel.deleteBlockingRegion(oldRegionKey);\r\n \t\t\t\t\t}\r\n \t\t\t\t\t// Allow adding of removed objects to a new blocking region\r\n \t\t\t\t\tenableAddBlockingRegion(true);\r\n \t\t\t\t} else if (cell.getPrevParent() instanceof BlockingRegion) {\r\n \t\t\t\t\t// Object changed blocking region\r\n \t\t\t\t\toldRegionKey = ((BlockingRegion) cell.getPrevParent()).getKey();\r\n \t\t\t\t\tmodel.removeRegionStation(oldRegionKey, key);\r\n \t\t\t\t\t// If region is empty, removes region too\r\n \t\t\t\t\tif (model.getBlockingRegionStations(oldRegionKey).size() == 0) {\r\n \t\t\t\t\t\tmodel.deleteBlockingRegion(oldRegionKey);\r\n \t\t\t\t\t}\r\n \t\t\t\t\tnewRegionKey = ((BlockingRegion) cell.getParent()).getKey();\r\n \t\t\t\t\tmodel.addRegionStation(newRegionKey, key);\r\n \t\t\t\t} else {\r\n \t\t\t\t\t// Object added to a blocking region\r\n \t\t\t\t\tnewRegionKey = ((BlockingRegion) cell.getParent()).getKey();\r\n \t\t\t\t\tif (!model.addRegionStation(newRegionKey, key)) {\r\n \t\t\t\t\t\t// object cannot be added to blocking region (for\r\n \t\t\t\t\t\t// example it's a source)\r\n \t\t\t\t\t\tcell.removeFromParent();\r\n \t\t\t\t\t\tgraph.getModel().insert(new Object[] { cell }, null, null, null, null);\r\n \t\t\t\t\t\tputBack.add(cell);\r\n \t\t\t\t\t}\r\n \t\t\t\t\t// Doesn't allow adding of selected objects to a new\r\n \t\t\t\t\t// blocking region\r\n \t\t\t\t\tenableAddBlockingRegion(false);\r\n \t\t\t\t}\r\n \t\t\t\t// Resets parent for this cell\r\n \t\t\t\tcell.resetParent();\r\n \t\t\t}\r\n \t\t\t// Avoid insertion of a blocking region in an other\r\n \t\t\telse if (cell2 instanceof BlockingRegion) {\r\n \t\t\t\tBlockingRegion region = (BlockingRegion) cell2;\r\n \t\t\t\tif (region.getParent() != null) {\r\n \t\t\t\t\tregion.removeFromParent();\r\n \t\t\t\t\tgraph.getModel().insert(new Object[] { region }, null, null, null, null);\r\n \t\t\t\t}\r\n \t\t\t}\r\n \t\t}\r\n \t\t// Puts cells removed from blocking regiont on background\r\n \t\tgraph.getModel().toBack(putBack.toArray());\r\n \t}", "public boolean IsDisappearing(){\r\n for (int i = 2; i < 10; i++) {\r\n ArrayList<Block> blocks = blockList.GetBlockList(i);//get all blocks\r\n int[] indexI = new int[blocks.size()], indexJ = new int[blocks.size()];\r\n //put i and j of All blocks with same color on i&j arrays\r\n for (int j = 0; j < indexI.length; j++) {\r\n indexI[j] = blocks.get(j).getI();\r\n indexJ[j] = blocks.get(j).getJ();\r\n }\r\n //check if 2 block beside each other if yes return true\r\n if (CheckBoom(indexI, indexJ))\r\n return true;\r\n else if (blocks.size() == 3) {//else check if there is another block have same color if yes swap on i,j array\r\n int temp = indexI[2];\r\n indexI[2] = indexI[1];\r\n indexI[1] = temp;\r\n temp = indexJ[2];\r\n indexJ[2] = indexJ[1];\r\n indexJ[1] = temp;\r\n if (CheckBoom(indexI, indexJ))//check\r\n return true;\r\n else {//else check from another side\r\n temp = indexI[0];\r\n indexI[0] = indexI[2];\r\n indexI[2] = temp;\r\n temp = indexJ[0];\r\n indexJ[0] = indexJ[2];\r\n indexJ[2] = temp;\r\n if (CheckBoom(indexI, indexJ))//check\r\n return true;\r\n }\r\n }\r\n }\r\n //if not return true so its false\r\n return false;\r\n }", "@Test(timeout=120000)\n public void testMissingFirstRegion() throws Exception {\n TableName table = TableName.valueOf(\"testMissingFirstRegion\");\n try {\n setupTable(table);\n assertEquals(ROWKEYS.length, countRows());\n\n // Mess it up by leaving a hole in the assignment, meta, and hdfs data\n admin.disableTable(table);\n deleteRegion(conf, tbl.getTableDescriptor(), Bytes.toBytes(\"\"), Bytes.toBytes(\"A\"), true,\n true, true);\n admin.enableTable(table);\n\n HBaseFsck hbck = doFsck(conf, false);\n assertErrors(hbck, new ERROR_CODE[] { ERROR_CODE.FIRST_REGION_STARTKEY_NOT_EMPTY });\n // fix hole\n doFsck(conf, true);\n // check that hole fixed\n assertNoErrors(doFsck(conf, false));\n } finally {\n cleanupTable(table);\n }\n }", "void scanunique() {\n\t\tint oldline, newline;\n\t\tnode psymbol;\n\n\t\tfor (newline = 1; newline <= newinfo.maxLine; newline++) {\n\t\t\tpsymbol = newinfo.symbol[newline];\n\t\t\tif (psymbol.symbolIsUnique()) { // 1 use in each file\n\t\t\t\toldline = psymbol.linenum;\n\t\t\t\tnewinfo.other[newline] = oldline; // record 1-1 map\n\t\t\t\toldinfo.other[oldline] = newline;\n\t\t\t}\n\t\t}\n\t\tnewinfo.other[0] = 0;\n\t\toldinfo.other[0] = 0;\n\t\tnewinfo.other[newinfo.maxLine + 1] = oldinfo.maxLine + 1;\n\t\toldinfo.other[oldinfo.maxLine + 1] = newinfo.maxLine + 1;\n\t}", "public final synchronized void mo5320b() {\n /* JADX: method processing error */\n/*\nError: java.lang.NullPointerException\n*/\n /*\n r6 = this;\n monitor-enter(r6);\n r0 = r6.f24853c;\t Catch:{ all -> 0x004c }\n r1 = 0;\t Catch:{ all -> 0x004c }\n r2 = 0;\t Catch:{ all -> 0x004c }\n if (r0 == 0) goto L_0x0046;\t Catch:{ all -> 0x004c }\n L_0x0007:\n r0 = r6.f24851a;\t Catch:{ all -> 0x004c }\n if (r0 != 0) goto L_0x0013;\t Catch:{ all -> 0x004c }\n L_0x000b:\n r0 = r6.f24854d;\t Catch:{ all -> 0x004c }\n r3 = r6.f24853c;\t Catch:{ all -> 0x004c }\n r0.deleteFile(r3);\t Catch:{ all -> 0x004c }\n goto L_0x0046;\t Catch:{ all -> 0x004c }\n L_0x0013:\n r0 = com.google.android.m4b.maps.cg.bx.m23058b();\t Catch:{ all -> 0x004c }\n r3 = r6.f24854d;\t Catch:{ IOException -> 0x0032, all -> 0x002f }\n r4 = r6.f24853c;\t Catch:{ IOException -> 0x0032, all -> 0x002f }\n r3 = r3.openFileOutput(r4, r1);\t Catch:{ IOException -> 0x0032, all -> 0x002f }\n r4 = r6.f24851a;\t Catch:{ IOException -> 0x0033 }\n r4 = r4.m20837d();\t Catch:{ IOException -> 0x0033 }\n r3.write(r4);\t Catch:{ IOException -> 0x0033 }\n com.google.android.m4b.maps.cg.bx.m23057a(r0);\t Catch:{ all -> 0x004c }\n L_0x002b:\n com.google.android.m4b.maps.ap.C4655c.m20770a(r3);\t Catch:{ all -> 0x004c }\n goto L_0x0046;\n L_0x002f:\n r1 = move-exception;\n r3 = r2;\n goto L_0x003f;\n L_0x0032:\n r3 = r2;\n L_0x0033:\n r4 = r6.f24854d;\t Catch:{ all -> 0x003e }\n r5 = r6.f24853c;\t Catch:{ all -> 0x003e }\n r4.deleteFile(r5);\t Catch:{ all -> 0x003e }\n com.google.android.m4b.maps.cg.bx.m23057a(r0);\t Catch:{ all -> 0x004c }\n goto L_0x002b;\t Catch:{ all -> 0x004c }\n L_0x003e:\n r1 = move-exception;\t Catch:{ all -> 0x004c }\n L_0x003f:\n com.google.android.m4b.maps.cg.bx.m23057a(r0);\t Catch:{ all -> 0x004c }\n com.google.android.m4b.maps.ap.C4655c.m20770a(r3);\t Catch:{ all -> 0x004c }\n throw r1;\t Catch:{ all -> 0x004c }\n L_0x0046:\n r6.f24851a = r2;\t Catch:{ all -> 0x004c }\n r6.f24852b = r1;\t Catch:{ all -> 0x004c }\n monitor-exit(r6);\n return;\n L_0x004c:\n r0 = move-exception;\n monitor-exit(r6);\n throw r0;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.google.android.m4b.maps.cg.q.b():void\");\n }", "int regionSplitBits4PVTable();", "public void collapseBlocks() {\n // Create it if it's null\n if (graph_bcc == null) {\n // Create graph parametrics (Only add linear time algorithms here...)\n graph_bcc = new BiConnectedComponents(graph);\n graph2p_bcc = new BiConnectedComponents(new UniTwoPlusDegreeGraph(graph));\n }\n BiConnectedComponents bcc = graph_bcc, bcc_2p = graph2p_bcc; if (bcc != null && bcc_2p != null) {\n // Get the vertex to block lookup\n Map<String,Set<MyGraph>> v_to_b = bcc.getVertexToBlockMap();\n // Go through the entities and accumulate the positions\n Map<MyGraph,Double> x_sum = new HashMap<MyGraph,Double>(), y_sum = new HashMap<MyGraph,Double>();\n Iterator<String> it_e = entity_to_wxy.keySet().iterator();\n while (it_e.hasNext()) {\n String entity = it_e.next(); Point2D pt = entity_to_wxy.get(entity);\n\tif (v_to_b.containsKey(entity)) {\n\t Iterator<MyGraph> it_mg = v_to_b.get(entity).iterator();\n\t while (it_mg.hasNext()) {\n\t MyGraph mg = it_mg.next();\n\t if (x_sum.containsKey(mg) == false) { x_sum.put(mg,0.0); y_sum.put(mg,0.0); }\n\t x_sum.put(mg,x_sum.get(mg)+pt.getX()); y_sum.put(mg,y_sum.get(mg)+pt.getY());\n\t }\n } else System.err.println(\"Vertex To Block Lookup missing \\\"\" + entity + \"\\\"\");\n }\n // Now position those entities that aren't cut vertices at the center of the graph\n it_e = entity_to_wxy.keySet().iterator();\n while (it_e.hasNext()) {\n String entity = it_e.next(); Point2D pt = entity_to_wxy.get(entity);\n\tif (v_to_b.containsKey(entity) && bcc.getCutVertices().contains(entity) == false) {\n MyGraph mg = v_to_b.get(entity).iterator().next();\n\t entity_to_wxy.put(entity, new Point2D.Double(x_sum.get(mg)/mg.getNumberOfEntities(),y_sum.get(mg)/mg.getNumberOfEntities()));\n\t transform(entity);\n\t}\n }\n // Re-render\n zoomToFit(); repaint();\n }\n }", "@Test (timeout=180000)\n public void testSidelineOverlapRegion() throws Exception {\n TableName table =\n TableName.valueOf(\"testSidelineOverlapRegion\");\n try {\n setupTable(table);\n assertEquals(ROWKEYS.length, countRows());\n\n // Mess it up by creating an overlap\n MiniHBaseCluster cluster = TEST_UTIL.getHBaseCluster();\n HMaster master = cluster.getMaster();\n HRegionInfo hriOverlap1 =\n createRegion(tbl.getTableDescriptor(), Bytes.toBytes(\"A\"), Bytes.toBytes(\"AB\"));\n master.assignRegion(hriOverlap1);\n master.getAssignmentManager().waitForAssignment(hriOverlap1);\n HRegionInfo hriOverlap2 =\n createRegion(tbl.getTableDescriptor(), Bytes.toBytes(\"AB\"), Bytes.toBytes(\"B\"));\n master.assignRegion(hriOverlap2);\n master.getAssignmentManager().waitForAssignment(hriOverlap2);\n\n HBaseFsck hbck = doFsck(conf, false);\n assertErrors(hbck, new ERROR_CODE[] {ERROR_CODE.DUPE_STARTKEYS,\n ERROR_CODE.DUPE_STARTKEYS, ERROR_CODE.OVERLAP_IN_REGION_CHAIN});\n assertEquals(3, hbck.getOverlapGroups(table).size());\n assertEquals(ROWKEYS.length, countRows());\n\n // mess around the overlapped regions, to trigger NotServingRegionException\n Multimap<byte[], HbckInfo> overlapGroups = hbck.getOverlapGroups(table);\n ServerName serverName = null;\n byte[] regionName = null;\n for (HbckInfo hbi: overlapGroups.values()) {\n if (\"A\".equals(Bytes.toString(hbi.getStartKey()))\n && \"B\".equals(Bytes.toString(hbi.getEndKey()))) {\n regionName = hbi.getRegionName();\n\n // get an RS not serving the region to force bad assignment info in to META.\n int k = cluster.getServerWith(regionName);\n for (int i = 0; i < 3; i++) {\n if (i != k) {\n HRegionServer rs = cluster.getRegionServer(i);\n serverName = rs.getServerName();\n break;\n }\n }\n\n HBaseFsckRepair.closeRegionSilentlyAndWait((HConnection) connection,\n cluster.getRegionServer(k).getServerName(), hbi.getHdfsHRI());\n admin.offline(regionName);\n break;\n }\n }\n\n assertNotNull(regionName);\n assertNotNull(serverName);\n try (Table meta = connection.getTable(TableName.META_TABLE_NAME, tableExecutorService)) {\n Put put = new Put(regionName);\n put.add(HConstants.CATALOG_FAMILY, HConstants.SERVER_QUALIFIER,\n Bytes.toBytes(serverName.getHostAndPort()));\n meta.put(put);\n }\n\n // fix the problem.\n HBaseFsck fsck = new HBaseFsck(conf, hbfsckExecutorService);\n fsck.connect();\n fsck.setDisplayFullReport(); // i.e. -details\n fsck.setTimeLag(0);\n fsck.setFixAssignments(true);\n fsck.setFixMeta(true);\n fsck.setFixHdfsHoles(true);\n fsck.setFixHdfsOverlaps(true);\n fsck.setFixHdfsOrphans(true);\n fsck.setFixVersionFile(true);\n fsck.setSidelineBigOverlaps(true);\n fsck.setMaxMerge(2);\n fsck.onlineHbck();\n fsck.close();\n\n // verify that overlaps are fixed, and there are less rows\n // since one region is sidelined.\n HBaseFsck hbck2 = doFsck(conf,false);\n assertNoErrors(hbck2);\n assertEquals(0, hbck2.getOverlapGroups(table).size());\n assertTrue(ROWKEYS.length > countRows());\n } finally {\n cleanupTable(table);\n }\n }", "public void a()\r\n/* 49: */ {\r\n/* 50: 64 */ HashSet<BlockPosition> localHashSet = Sets.newHashSet();\r\n/* 51: */ \r\n/* 52: 66 */ int m = 16;\r\n/* 53: 67 */ for (int n = 0; n < 16; n++) {\r\n/* 54: 68 */ for (int i1 = 0; i1 < 16; i1++) {\r\n/* 55: 69 */ for (int i2 = 0; i2 < 16; i2++) {\r\n/* 56: 70 */ if ((n == 0) || (n == 15) || (i1 == 0) || (i1 == 15) || (i2 == 0) || (i2 == 15))\r\n/* 57: */ {\r\n/* 58: 74 */ double d1 = n / 15.0F * 2.0F - 1.0F;\r\n/* 59: 75 */ double d2 = i1 / 15.0F * 2.0F - 1.0F;\r\n/* 60: 76 */ double d3 = i2 / 15.0F * 2.0F - 1.0F;\r\n/* 61: 77 */ double d4 = Math.sqrt(d1 * d1 + d2 * d2 + d3 * d3);\r\n/* 62: */ \r\n/* 63: 79 */ d1 /= d4;\r\n/* 64: 80 */ d2 /= d4;\r\n/* 65: 81 */ d3 /= d4;\r\n/* 66: */ \r\n/* 67: 83 */ float f2 = this.i * (0.7F + this.d.rng.nextFloat() * 0.6F);\r\n/* 68: 84 */ double d6 = this.e;\r\n/* 69: 85 */ double d8 = this.f;\r\n/* 70: 86 */ double d10 = this.g;\r\n/* 71: */ \r\n/* 72: 88 */ float f3 = 0.3F;\r\n/* 73: 89 */ while (f2 > 0.0F)\r\n/* 74: */ {\r\n/* 75: 90 */ BlockPosition localdt = new BlockPosition(d6, d8, d10);\r\n/* 76: 91 */ Block localbec = this.d.getBlock(localdt);\r\n/* 77: 93 */ if (localbec.getType().getMaterial() != Material.air)\r\n/* 78: */ {\r\n/* 79: 94 */ float f4 = this.h != null ? this.h.a(this, this.d, localdt, localbec) : localbec.getType().a((Entity)null);\r\n/* 80: 95 */ f2 -= (f4 + 0.3F) * 0.3F;\r\n/* 81: */ }\r\n/* 82: 98 */ if ((f2 > 0.0F) && ((this.h == null) || (this.h.a(this, this.d, localdt, localbec, f2)))) {\r\n/* 83: 99 */ localHashSet.add(localdt);\r\n/* 84: */ }\r\n/* 85:102 */ d6 += d1 * 0.300000011920929D;\r\n/* 86:103 */ d8 += d2 * 0.300000011920929D;\r\n/* 87:104 */ d10 += d3 * 0.300000011920929D;\r\n/* 88:105 */ f2 -= 0.225F;\r\n/* 89: */ }\r\n/* 90: */ }\r\n/* 91: */ }\r\n/* 92: */ }\r\n/* 93: */ }\r\n/* 94:111 */ this.j.addAll(localHashSet);\r\n/* 95: */ \r\n/* 96:113 */ float f1 = this.i * 2.0F;\r\n/* 97: */ \r\n/* 98:115 */ int i1 = MathUtils.floor(this.e - f1 - 1.0D);\r\n/* 99:116 */ int i2 = MathUtils.floor(this.e + f1 + 1.0D);\r\n/* 100:117 */ int i3 = MathUtils.floor(this.f - f1 - 1.0D);\r\n/* 101:118 */ int i4 = MathUtils.floor(this.f + f1 + 1.0D);\r\n/* 102:119 */ int i5 = MathUtils.floor(this.g - f1 - 1.0D);\r\n/* 103:120 */ int i6 = MathUtils.floor(this.g + f1 + 1.0D);\r\n/* 104:121 */ List<Entity> localList = this.d.b(this.h, new AABB(i1, i3, i5, i2, i4, i6));\r\n/* 105:122 */ Vec3 localbrw = new Vec3(this.e, this.f, this.g);\r\n/* 106:124 */ for (int i7 = 0; i7 < localList.size(); i7++)\r\n/* 107: */ {\r\n/* 108:125 */ Entity localwv = (Entity)localList.get(i7);\r\n/* 109:126 */ if (!localwv.aV())\r\n/* 110: */ {\r\n/* 111:129 */ double d5 = localwv.f(this.e, this.f, this.g) / f1;\r\n/* 112:131 */ if (d5 <= 1.0D)\r\n/* 113: */ {\r\n/* 114:132 */ double d7 = localwv.xPos - this.e;\r\n/* 115:133 */ double d9 = localwv.yPos + localwv.getEyeHeight() - this.f;\r\n/* 116:134 */ double d11 = localwv.zPos - this.g;\r\n/* 117: */ \r\n/* 118:136 */ double d12 = MathUtils.sqrt(d7 * d7 + d9 * d9 + d11 * d11);\r\n/* 119:137 */ if (d12 != 0.0D)\r\n/* 120: */ {\r\n/* 121:141 */ d7 /= d12;\r\n/* 122:142 */ d9 /= d12;\r\n/* 123:143 */ d11 /= d12;\r\n/* 124: */ \r\n/* 125:145 */ double d13 = this.d.a(localbrw, localwv.getAABB());\r\n/* 126:146 */ double d14 = (1.0D - d5) * d13;\r\n/* 127:147 */ localwv.receiveDamage(DamageSource.a(this), (int)((d14 * d14 + d14) / 2.0D * 8.0D * f1 + 1.0D));\r\n/* 128: */ \r\n/* 129:149 */ double d15 = EnchantmentProtection.a(localwv, d14);\r\n/* 130:150 */ localwv.xVelocity += d7 * d15;\r\n/* 131:151 */ localwv.yVelocity += d9 * d15;\r\n/* 132:152 */ localwv.zVelocity += d11 * d15;\r\n/* 133:154 */ if ((localwv instanceof EntityPlayer)) {\r\n/* 134:155 */ this.k.put((EntityPlayer)localwv, new Vec3(d7 * d14, d9 * d14, d11 * d14));\r\n/* 135: */ }\r\n/* 136: */ }\r\n/* 137: */ }\r\n/* 138: */ }\r\n/* 139: */ }\r\n/* 140: */ }", "void ompleBlocsHoritzontals() {\r\n\r\n for (int i = 0; i < N; i = i + SRN) // for diagonal box, start coordinates->i==j \r\n {\r\n ompleBloc(i, i);\r\n }\r\n }", "@Test\n public void tesInvalidateMissingBlock() throws Exception {\n long blockSize = 1024;\n int heatbeatInterval = 1;\n HdfsConfiguration c = new HdfsConfiguration();\n c.setInt(DFSConfigKeys.DFS_HEARTBEAT_INTERVAL_KEY, heatbeatInterval);\n c.setLong(DFS_BLOCK_SIZE_KEY, blockSize);\n MiniDFSCluster cluster = new MiniDFSCluster.Builder(c).\n numDataNodes(1).build();\n try {\n cluster.waitActive();\n DFSTestUtil.createFile(cluster.getFileSystem(), new Path(\"/a\"),\n blockSize, (short)1, 0);\n\n String bpid = cluster.getNameNode().getNamesystem().getBlockPoolId();\n DataNode dn = cluster.getDataNodes().get(0);\n FsDatasetImpl fsdataset = (FsDatasetImpl) dn.getFSDataset();\n List<ReplicaInfo> replicaInfos = fsdataset.getFinalizedBlocks(bpid);\n assertEquals(1, replicaInfos.size());\n\n ReplicaInfo replicaInfo = replicaInfos.get(0);\n String blockPath = replicaInfo.getBlockURI().getPath();\n String metaPath = replicaInfo.getMetadataURI().getPath();\n File blockFile = new File(blockPath);\n File metaFile = new File(metaPath);\n\n // Mock local block file not found when disk with some exception.\n fsdataset.invalidateMissingBlock(bpid, replicaInfo);\n\n // Assert local block file wouldn't be deleted from disk.\n assertTrue(blockFile.exists());\n // Assert block info would be removed from ReplicaMap.\n assertEquals(\"null\",\n fsdataset.getReplicaString(bpid, replicaInfo.getBlockId()));\n BlockManager blockManager = cluster.getNameNode().\n getNamesystem().getBlockManager();\n GenericTestUtils.waitFor(() ->\n blockManager.getLowRedundancyBlocksCount() == 1, 100, 5000);\n\n // Mock local block file found when disk back to normal.\n FsVolumeSpi.ScanInfo info = new FsVolumeSpi.ScanInfo(\n replicaInfo.getBlockId(), blockFile.getParentFile().getAbsoluteFile(),\n blockFile.getName(), metaFile.getName(), replicaInfo.getVolume());\n fsdataset.checkAndUpdate(bpid, info);\n GenericTestUtils.waitFor(() ->\n blockManager.getLowRedundancyBlocksCount() == 0, 100, 5000);\n } finally {\n cluster.shutdown();\n }\n }", "@Override\r\n public int numberOfBlocksToRemove() {\r\n return blocks().size();\r\n }", "@Test (timeout=180000)\n public void testMissingRegionInfoQualifier() throws Exception {\n Connection connection = ConnectionFactory.createConnection(conf);\n TableName table = TableName.valueOf(\"testMissingRegionInfoQualifier\");\n try {\n setupTable(table);\n\n // Mess it up by removing the RegionInfo for one region.\n final List<Delete> deletes = new LinkedList<Delete>();\n Table meta = connection.getTable(TableName.META_TABLE_NAME, hbfsckExecutorService);\n MetaScanner.metaScan(connection, new MetaScanner.MetaScannerVisitor() {\n\n @Override\n public boolean processRow(Result rowResult) throws IOException {\n HRegionInfo hri = MetaTableAccessor.getHRegionInfo(rowResult);\n if (hri != null && !hri.getTable().isSystemTable()) {\n Delete delete = new Delete(rowResult.getRow());\n delete.addColumn(HConstants.CATALOG_FAMILY, HConstants.REGIONINFO_QUALIFIER);\n deletes.add(delete);\n }\n return true;\n }\n\n @Override\n public void close() throws IOException {\n }\n });\n meta.delete(deletes);\n\n // Mess it up by creating a fake hbase:meta entry with no associated RegionInfo\n meta.put(new Put(Bytes.toBytes(table + \",,1361911384013.810e28f59a57da91c66\")).add(\n HConstants.CATALOG_FAMILY, HConstants.SERVER_QUALIFIER, Bytes.toBytes(\"node1:60020\")));\n meta.put(new Put(Bytes.toBytes(table + \",,1361911384013.810e28f59a57da91c66\")).add(\n HConstants.CATALOG_FAMILY, HConstants.STARTCODE_QUALIFIER, Bytes.toBytes(1362150791183L)));\n meta.close();\n\n HBaseFsck hbck = doFsck(conf, false);\n assertTrue(hbck.getErrors().getErrorList().contains(ERROR_CODE.EMPTY_META_CELL));\n\n // fix reference file\n hbck = doFsck(conf, true);\n\n // check that reference file fixed\n assertFalse(hbck.getErrors().getErrorList().contains(ERROR_CODE.EMPTY_META_CELL));\n } finally {\n cleanupTable(table);\n }\n connection.close();\n }", "public void testConstructors()\n throws IOException\n {\n HeaderBlockWriter block = new HeaderBlockWriter();\n ByteArrayOutputStream output = new ByteArrayOutputStream(512);\n\n block.writeBlocks(output);\n byte[] copy = output.toByteArray();\n byte[] expected =\n {\n ( byte ) 0xD0, ( byte ) 0xCF, ( byte ) 0x11, ( byte ) 0xE0,\n ( byte ) 0xA1, ( byte ) 0xB1, ( byte ) 0x1A, ( byte ) 0xE1,\n ( byte ) 0x00, ( byte ) 0x00, ( byte ) 0x00, ( byte ) 0x00,\n ( byte ) 0x00, ( byte ) 0x00, ( byte ) 0x00, ( byte ) 0x00,\n ( byte ) 0x00, ( byte ) 0x00, ( byte ) 0x00, ( byte ) 0x00,\n ( byte ) 0x00, ( byte ) 0x00, ( byte ) 0x00, ( byte ) 0x00,\n ( byte ) 0x3B, ( byte ) 0x00, ( byte ) 0x03, ( byte ) 0x00,\n ( byte ) 0xFE, ( byte ) 0xFF, ( byte ) 0x09, ( byte ) 0x00,\n ( byte ) 0x06, ( byte ) 0x00, ( byte ) 0x00, ( byte ) 0x00,\n ( byte ) 0x00, ( byte ) 0x00, ( byte ) 0x00, ( byte ) 0x00,\n ( byte ) 0x00, ( byte ) 0x00, ( byte ) 0x00, ( byte ) 0x00,\n ( byte ) 0x00, ( byte ) 0x00, ( byte ) 0x00, ( byte ) 0x00,\n ( byte ) 0xFE, ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF,\n ( byte ) 0x00, ( byte ) 0x00, ( byte ) 0x00, ( byte ) 0x00,\n ( byte ) 0x00, ( byte ) 0x10, ( byte ) 0x00, ( byte ) 0x00,\n ( byte ) 0xFE, ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF,\n ( byte ) 0x00, ( byte ) 0x00, ( byte ) 0x00, ( byte ) 0x00,\n ( byte ) 0xFE, ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF,\n ( byte ) 0x00, ( byte ) 0x00, ( byte ) 0x00, ( byte ) 0x00,\n ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF,\n ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF,\n ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF,\n ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF,\n ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF,\n ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF,\n ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF,\n ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF,\n ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF,\n ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF,\n ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF,\n ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF,\n ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF,\n ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF,\n ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF,\n ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF,\n ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF,\n ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF,\n ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF,\n ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF,\n ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF,\n ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF,\n ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF,\n ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF,\n ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF,\n ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF,\n ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF,\n ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF,\n ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF,\n ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF,\n ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF,\n ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF,\n ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF,\n ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF,\n ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF,\n ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF,\n ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF,\n ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF,\n ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF,\n ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF,\n ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF,\n ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF,\n ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF,\n ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF,\n ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF,\n ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF,\n ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF,\n ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF,\n ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF,\n ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF,\n ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF,\n ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF,\n ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF,\n ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF,\n ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF,\n ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF,\n ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF,\n ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF,\n ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF,\n ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF,\n ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF,\n ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF,\n ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF,\n ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF,\n ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF,\n ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF,\n ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF,\n ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF,\n ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF,\n ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF,\n ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF,\n ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF,\n ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF,\n ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF,\n ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF,\n ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF,\n ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF,\n ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF,\n ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF,\n ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF,\n ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF,\n ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF,\n ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF,\n ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF,\n ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF,\n ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF,\n ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF,\n ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF,\n ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF,\n ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF,\n ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF,\n ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF,\n ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF,\n ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF,\n ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF,\n ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF,\n ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF,\n ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF,\n ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF,\n ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF,\n ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF,\n ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF,\n ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF,\n ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF,\n ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF,\n ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF,\n ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF,\n ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF,\n ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF\n };\n\n assertEquals(expected.length, copy.length);\n for (int j = 0; j < 512; j++)\n {\n assertEquals(\"testing byte \" + j, expected[ j ], copy[ j ]);\n }\n\n // verify we can read a 'good' HeaderBlockWriter (also test\n // getPropertyStart)\n block.setPropertyStart(0x87654321);\n output = new ByteArrayOutputStream(512);\n block.writeBlocks(output);\n assertEquals(0x87654321,\n new HeaderBlockReader(new ByteArrayInputStream(output\n .toByteArray())).getPropertyStart());\n }", "void m63702c() {\n for (C17455a c17455a : this.f53839c) {\n c17455a.f53844b.clear();\n }\n }", "@Test\n public void testColocatedPartitionedRegion_NoFullPath() throws Throwable {\n createCacheInAllVms();\n redundancy = 0;\n localMaxmemory = 50;\n totalNumBuckets = 11;\n\n regionName = \"A\";\n colocatedWith = null;\n isPartitionResolver = Boolean.TRUE;\n attributeObjects = new Object[] {regionName, redundancy, localMaxmemory, totalNumBuckets,\n colocatedWith, isPartitionResolver};\n createPartitionedRegion(attributeObjects);\n\n regionName = \"B\";\n colocatedWith = \"A\";\n isPartitionResolver = Boolean.TRUE;\n attributeObjects = new Object[] {regionName, redundancy, localMaxmemory, totalNumBuckets,\n colocatedWith, isPartitionResolver};\n createPartitionedRegion(attributeObjects);\n\n regionName = \"C\";\n colocatedWith = \"A\";\n isPartitionResolver = Boolean.TRUE;\n attributeObjects = new Object[] {regionName, redundancy, localMaxmemory, totalNumBuckets,\n colocatedWith, isPartitionResolver};\n createPartitionedRegion(attributeObjects);\n\n regionName = \"D\";\n colocatedWith = \"B\";\n attributeObjects = new Object[] {regionName, redundancy, localMaxmemory, totalNumBuckets,\n colocatedWith, isPartitionResolver};\n createPartitionedRegion(attributeObjects);\n\n regionName = \"E\";\n colocatedWith = \"B\";\n isPartitionResolver = Boolean.TRUE;\n attributeObjects = new Object[] {regionName, redundancy, localMaxmemory, totalNumBuckets,\n colocatedWith, isPartitionResolver};\n createPartitionedRegion(attributeObjects);\n\n regionName = \"F\";\n colocatedWith = \"B\";\n isPartitionResolver = Boolean.TRUE;\n attributeObjects = new Object[] {regionName, redundancy, localMaxmemory, totalNumBuckets,\n colocatedWith, isPartitionResolver};\n createPartitionedRegion(attributeObjects);\n\n regionName = \"G\";\n colocatedWith = \"C\";\n isPartitionResolver = Boolean.TRUE;\n attributeObjects = new Object[] {regionName, redundancy, localMaxmemory, totalNumBuckets,\n colocatedWith, isPartitionResolver};\n createPartitionedRegion(attributeObjects);\n\n regionName = \"H\";\n colocatedWith = \"C\";\n isPartitionResolver = Boolean.TRUE;\n attributeObjects = new Object[] {regionName, redundancy, localMaxmemory, totalNumBuckets,\n colocatedWith, isPartitionResolver};\n createPartitionedRegion(attributeObjects);\n\n regionName = \"I\";\n colocatedWith = \"C\";\n isPartitionResolver = Boolean.TRUE;\n attributeObjects = new Object[] {regionName, redundancy, localMaxmemory, totalNumBuckets,\n colocatedWith, isPartitionResolver};\n createPartitionedRegion(attributeObjects);\n\n regionName = \"J\";\n colocatedWith = \"D\";\n isPartitionResolver = Boolean.TRUE;\n attributeObjects = new Object[] {regionName, redundancy, localMaxmemory, totalNumBuckets,\n colocatedWith, isPartitionResolver};\n createPartitionedRegion(attributeObjects);\n\n regionName = \"K\";\n colocatedWith = \"D\";\n isPartitionResolver = Boolean.TRUE;\n attributeObjects = new Object[] {regionName, redundancy, localMaxmemory, totalNumBuckets,\n colocatedWith, isPartitionResolver};\n createPartitionedRegion(attributeObjects);\n\n regionName = \"L\";\n colocatedWith = \"E\";\n isPartitionResolver = Boolean.TRUE;\n attributeObjects = new Object[] {regionName, redundancy, localMaxmemory, totalNumBuckets,\n colocatedWith, isPartitionResolver};\n createPartitionedRegion(attributeObjects);\n\n regionName = \"M\";\n colocatedWith = \"F\";\n isPartitionResolver = Boolean.TRUE;\n attributeObjects = new Object[] {regionName, redundancy, localMaxmemory, totalNumBuckets,\n colocatedWith, isPartitionResolver};\n createPartitionedRegion(attributeObjects);\n\n regionName = \"N\";\n colocatedWith = \"G\";\n isPartitionResolver = Boolean.TRUE;\n attributeObjects = new Object[] {regionName, redundancy, localMaxmemory, totalNumBuckets,\n colocatedWith, isPartitionResolver};\n createPartitionedRegion(attributeObjects);\n\n regionName = \"O\";\n colocatedWith = \"I\";\n isPartitionResolver = Boolean.TRUE;\n attributeObjects = new Object[] {regionName, redundancy, localMaxmemory, totalNumBuckets,\n colocatedWith, isPartitionResolver};\n createPartitionedRegion(attributeObjects);\n\n accessor.invoke(() -> PRColocationDUnitTest.validateColocatedRegions(\"A\"));\n\n accessor.invoke(() -> PRColocationDUnitTest.validateColocatedRegions(\"D\"));\n\n accessor.invoke(() -> PRColocationDUnitTest.validateColocatedRegions(\"H\"));\n\n accessor.invoke(() -> PRColocationDUnitTest.validateColocatedRegions(\"B\"));\n\n accessor.invoke(() -> PRColocationDUnitTest.validateColocatedRegions(\"K\"));\n }", "public static void fix(World world) {\n \t\tFile regionFolder = new File(Bukkit.getWorldContainer() + File.separator + world.getName() + File.separator + \"region\");\r\n \t\tif (regionFolder.exists()) {\r\n \t\t\t// Loop through all region files of the world\r\n \t\t\tint dx, dz;\r\n \t\t\tint rx, rz;\r\n \t\t\tfor (String regionFileName : regionFolder.list()) {\r\n \t\t\t\t// Validate file\r\n \t\t\t\tFile file = new File(regionFolder + File.separator + regionFileName);\r\n \t\t\t\tif (!file.isFile() || !file.exists()) {\r\n \t\t\t\t\tcontinue;\r\n \t\t\t\t}\r\n \t\t\t\tString[] parts = regionFileName.split(\"\\\\.\");\r\n \t\t\t\tif (parts.length != 4 || !parts[0].equals(\"r\") || !parts[3].equals(\"mca\")) {\r\n \t\t\t\t\tcontinue;\r\n \t\t\t\t}\r\n \t\t\t\t// Obtain the chunk offset of this region file\r\n \t\t\t\ttry {\r\n \t\t\t\t\trx = Integer.parseInt(parts[1]) << 5;\r\n \t\t\t\t\trz = Integer.parseInt(parts[2]) << 5;\r\n \t\t\t\t} catch (Exception ex) {\r\n \t\t\t\t\tcontinue;\r\n \t\t\t\t}\r\n \r\n \t\t\t\t// Is it contained in the cache?\r\n \t\t\t\tReference<RegionFile> ref = RegionFileCacheRef.FILES.get(file);\r\n \t\t\t\tRegionFile reg = null;\r\n \t\t\t\tif (ref != null) {\r\n \t\t\t\t\treg = ref.get();\r\n \t\t\t\t}\r\n \t\t\t\tboolean closeOnFinish = false;\r\n \t\t\t\tif (reg == null) {\r\n \t\t\t\t\tcloseOnFinish = true;\r\n \t\t\t\t\t// Manually load this region file\r\n \t\t\t\t\treg = new RegionFile(file);\r\n \t\t\t\t}\r\n \t\t\t\t// Obtain all generated chunks in this region file\r\n \t\t\t\tfor (dx = 0; dx < 32; dx++) {\r\n \t\t\t\t\tfor (dz = 0; dz < 32; dz++) {\r\n \t\t\t\t\t\tif (reg.c(dx, dz)) {\r\n \t\t\t\t\t\t\t// Region file exists - add it\r\n\t\t\t\t\t\t\tfix(world, rx + dx, rz + dz, true);\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\tif (closeOnFinish) {\r\n \t\t\t\t\t// Close the region file stream - we are done with it\r\n \t\t\t\t\treg.c();\r\n \t\t\t\t}\r\n \t\t\t}\r\n\t\t} else {\r\n\t\t\tNoLagg.plugin.log(Level.WARNING, \"Failed to fix world '\" + world.getName() + \"': Region folder is missing!\");\r\n \t\t}\r\n \t}", "public void remove( int position )\n {\n caller = \"remove\";\n byte byteSize = memoryPool[position];\n Integer size = (int)byteSize;\n // remove the record starting at the given position\n for ( int i = 0; i < size; i++ )\n {\n memoryPool[position + i] = 0;\n }\n\n findBlock( position );\n freeBlock = new HashMap<Integer, Integer>( 1 );\n freeBlock.put( position, size );\n freeBlockList.add( freeBlock );\n Object[] keyArray =\n freeBlockList.getCurrentElement().keySet().toArray();\n int key = (Integer)keyArray[0];\n\n caller = \"check\";\n int currentValue = freeBlockList.getCurrentElement().get( key );\n int mergePoint1 = position + currentValue;\n int rightKeyMatch = findBlock( mergePoint1 );\n\n int mergePoint2 = position;\n int leftKeyMatch = -1;\n int priorValue = -1;\n int key2 = -1;\n if ( 1==1)\n {\n findBlock(mergePoint2);\n freeBlockList.previous();\n if ( !( freeBlockList.getCurrent().equals( freeBlockList.getHead() ) )\n && !( freeBlockList.getCurrent().equals( freeBlockList.getTail() ) ) &&\n !( freeBlockList.getCurrent().equals( null )))\n {\n Object[] keyArray2 =\n freeBlockList.getCurrentElement().keySet().toArray();\n key2 = (Integer)keyArray2[0];\n priorValue = freeBlockList.getCurrentElement().get( key2 );\n leftKeyMatch = key2 + priorValue;\n }\n\n }\n\n if ( rightKeyMatch == mergePoint1 )\n {\n findBlock(mergePoint1);\n freeBlockList.previous();\n freeBlockList.removeCurrent();\n int rightValue =\n freeBlockList.getCurrentElement().get( rightKeyMatch );\n\n freeBlockList.getCurrentElement().clear();\n freeBlockList.getCurrentElement().put(\n position,\n currentValue + rightValue );\n //if()\n }\n if(leftKeyMatch == mergePoint2) {\n findBlock(mergePoint2);\n freeBlockList.previous();\n freeBlockList.removeCurrent();\n int rightValue =\n freeBlockList.getCurrentElement().get(leftKeyMatch);\n\n freeBlockList.getCurrentElement().clear();\n freeBlockList.getCurrentElement().put(\n key2,\n priorValue + rightValue );\n }\n\n }", "@Test\r\n\t@Ignore\r\n\tpublic void shouldReturnLisOfBrokenByRegion() {\n\t}", "public abstract void removeBlock();", "public void MeasureMovement(int[] dupCellID, int numslices, int b){\r\n\t\tfor (int x = 1; x < b; x = x + 1){ \r\n\t\t\tIJ.selectWindow(dupCellID[x]);\r\n\t\t\tImagePlus TheDuplicate = WindowManager.getCurrentImage();\r\n\t\t\tIJ.run(\"Threshold...\",\"method='Default'\");\r\n\t\t\tnew WaitForUserDialog(\"Threshold\", \"Threshold yeast cell to select the nucleus, then click OK.\").show();\r\n\t\t\tResultsTable res = new ResultsTable();\r\n\t\t\tdouble[] SliceNumY = new double[numslices];\r\n\t\t\tdouble[] SliceNumX = new double[numslices];\r\n\t\t\t\tfor(int z = 1; z < numslices; z = z+1) {\r\n\t\t\t\t\tTheDuplicate.setSlice(z);\r\n\t\t\t\t\tIJ.run(TheDuplicate, \"Analyze Particles...\", \"size=100-550 pixel circularity=0.00-1.00 show=Nothing display clear include add slice\");\r\n\t\t\t\t\tres = Analyzer.getResultsTable();\r\n\t\t\t\t\t\r\n\t\t\t\t\tint MaxY = TheDuplicate.getHeight();\r\n\t\t\t\t\tint Midpoint = MaxY/2; \r\n\t\t\t\t\tint MaxCount = res.getCounter();\r\n\t\t\t\t\tdouble yVal = 0;\r\n\t\t\t\t\tdouble xVal = 0;\r\n\t\t\t\t\tif (MaxCount > 1){\r\n\t\t\t\t\t\tfor (int c = 0; c < (MaxCount - 1); c = c + 1){\r\n\t\t\t\t\t\t\tyVal = res.getValueAsDouble(7, c);\r\n\t\t\t\t\t\t\txVal = res.getValueAsDouble(6, c);\r\n\t\t\t\t\t\t\tif (Math.abs((yVal/0.13) - Midpoint) <= 10 ){\r\n\t\t\t\t\t\t\t\tyVal = res.getValueAsDouble(7, c);\r\n\t\t\t\t\t\t\t\txVal = res.getValueAsDouble(6, c);\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\t\t\r\n\t\t\t\t\t}\r\n\t\t\t\t\t/*\r\n\t\t\t\t\t * if statement to only record the centre X Y \r\n\t\t\t\t\t * coordinate of the nucleus when 1 object has \r\n\t\t\t\t\t * been found. If more than 1 object is identified\r\n\t\t\t\t\t * then the XY coordinates default to zero to prevent \r\n\t\t\t\t\t * other fluorescent cell components from skewing the data\r\n\t\t\t\t\t */\r\n\t\t\t\t\tif (MaxCount > 0 && MaxCount <2) {\r\n\t\t\t\t\t\tyVal = res.getValueAsDouble(7, 0);\r\n\t\t\t\t\t\txVal = res.getValueAsDouble(6, 0);\r\n\t\t\t\t\t\tSliceNumY[z] = yVal;\r\n\t\t\t\t\t\tSliceNumX[z] = xVal; \r\n\t\t\t\t\t}\r\n\t\t\t\t\telse{\r\n\t\t\t\t\t\tSliceNumY[z] = 0;\r\n\t\t\t\t\t\tSliceNumX[z] = 0;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\toutputinfo(SliceNumY, SliceNumX, numslices); //Write the results to text file\r\n\t\t\tTheDuplicate.changes = false;\t\r\n\t\t\tTheDuplicate.close();\r\n\t\t}\r\n\t}", "@Test\n\tpublic void testForwardNonFrameBlockSubstitution() throws InvalidGenomeChange {\n\t\tGenomeChange change1 = new GenomeChange(new GenomePosition(refDict, '+', 1, 6642114, PositionType.ZERO_BASED),\n\t\t\t\t\"TAAACA\", \"GTT\");\n\t\tAnnotation annotation1 = new BlockSubstitutionAnnotationBuilder(infoForward, change1).build();\n\t\tAssert.assertEquals(infoForward.accession, annotation1.transcript.accession);\n\t\tAssert.assertEquals(AnnotationLocation.INVALID_RANK, annotation1.annoLoc.rank);\n\t\tAssert.assertEquals(\"c.691-3_693delinsGTT\", annotation1.ntHGVSDescription);\n\t\tAssert.assertEquals(\"p.Trp231Val\", annotation1.aaHGVSDescription);\n\t\tAssert.assertEquals(ImmutableSortedSet.of(VariantType.NON_FS_SUBSTITUTION, VariantType.SPLICE_ACCEPTOR),\n\t\t\t\tannotation1.effects);\n\n\t\t// deletion of three codons, insertion of one\n\t\tGenomeChange change2 = new GenomeChange(new GenomePosition(refDict, '+', 1, 6642126, PositionType.ZERO_BASED),\n\t\t\t\t\"GTGGTTCAA\", \"ACC\");\n\t\tAnnotation annotation2 = new BlockSubstitutionAnnotationBuilder(infoForward, change2).build();\n\t\tAssert.assertEquals(infoForward.accession, annotation2.transcript.accession);\n\t\tAssert.assertEquals(2, annotation2.annoLoc.rank);\n\t\tAssert.assertEquals(\"c.700_708delinsACC\", annotation2.ntHGVSDescription);\n\t\tAssert.assertEquals(\"p.Val234_Gln236delinsThr\", annotation2.aaHGVSDescription);\n\t\tAssert.assertEquals(ImmutableSortedSet.of(VariantType.NON_FS_SUBSTITUTION), annotation2.effects);\n\n\t\t// deletion of three codons, insertion of one, includes truncation of replacement ref from the right\n\t\tGenomeChange change3 = new GenomeChange(new GenomePosition(refDict, '+', 1, 6642134, PositionType.ZERO_BASED),\n\t\t\t\t\"AGTGGAGGAT\", \"CTT\");\n\t\tAnnotation annotation3 = new BlockSubstitutionAnnotationBuilder(infoForward, change3).build();\n\t\tAssert.assertEquals(infoForward.accession, annotation3.transcript.accession);\n\t\tAssert.assertEquals(2, annotation3.annoLoc.rank);\n\t\tAssert.assertEquals(\"c.708_716delinsCT\", annotation3.ntHGVSDescription);\n\t\tAssert.assertEquals(\"p.Gln236Hisfs*16\", annotation3.aaHGVSDescription);\n\t\tAssert.assertEquals(ImmutableSortedSet.of(VariantType.FS_SUBSTITUTION), annotation3.effects);\n\t}", "public int getInternalBlockLength()\r\n/* 40: */ {\r\n/* 41: 95 */ return 32;\r\n/* 42: */ }", "public int getBlockID()\r\n/* 57: */ {\r\n/* 58: 46 */ return RedPowerMachine.blockFrame.cm;\r\n/* 59: */ }", "@Test (timeout=180000)\n public void testLingeringSplitParent() throws Exception {\n TableName table =\n TableName.valueOf(\"testLingeringSplitParent\");\n Table meta = null;\n try {\n setupTable(table);\n assertEquals(ROWKEYS.length, countRows());\n\n // make sure data in regions, if in wal only there is no data loss\n admin.flush(table);\n HRegionLocation location = tbl.getRegionLocation(\"B\");\n\n // Delete one region from meta, but not hdfs, unassign it.\n deleteRegion(conf, tbl.getTableDescriptor(), Bytes.toBytes(\"B\"),\n Bytes.toBytes(\"C\"), true, true, false);\n\n // Create a new meta entry to fake it as a split parent.\n meta = connection.getTable(TableName.META_TABLE_NAME, tableExecutorService);\n HRegionInfo hri = location.getRegionInfo();\n\n HRegionInfo a = new HRegionInfo(tbl.getName(),\n Bytes.toBytes(\"B\"), Bytes.toBytes(\"BM\"));\n HRegionInfo b = new HRegionInfo(tbl.getName(),\n Bytes.toBytes(\"BM\"), Bytes.toBytes(\"C\"));\n\n hri.setOffline(true);\n hri.setSplit(true);\n\n MetaTableAccessor.addRegionToMeta(meta, hri, a, b);\n meta.close();\n admin.flush(TableName.META_TABLE_NAME);\n\n HBaseFsck hbck = doFsck(conf, false);\n assertErrors(hbck, new ERROR_CODE[] {\n ERROR_CODE.LINGERING_SPLIT_PARENT, ERROR_CODE.HOLE_IN_REGION_CHAIN});\n\n // regular repair cannot fix lingering split parent\n hbck = doFsck(conf, true);\n assertErrors(hbck, new ERROR_CODE[] {\n ERROR_CODE.LINGERING_SPLIT_PARENT, ERROR_CODE.HOLE_IN_REGION_CHAIN });\n assertFalse(hbck.shouldRerun());\n hbck = doFsck(conf, false);\n assertErrors(hbck, new ERROR_CODE[] {\n ERROR_CODE.LINGERING_SPLIT_PARENT, ERROR_CODE.HOLE_IN_REGION_CHAIN});\n\n // fix lingering split parent\n hbck = new HBaseFsck(conf, hbfsckExecutorService);\n hbck.connect();\n hbck.setDisplayFullReport(); // i.e. -details\n hbck.setTimeLag(0);\n hbck.setFixSplitParents(true);\n hbck.onlineHbck();\n assertTrue(hbck.shouldRerun());\n hbck.close();\n\n Get get = new Get(hri.getRegionName());\n Result result = meta.get(get);\n assertTrue(result.getColumnCells(HConstants.CATALOG_FAMILY,\n HConstants.SPLITA_QUALIFIER).isEmpty());\n assertTrue(result.getColumnCells(HConstants.CATALOG_FAMILY,\n HConstants.SPLITB_QUALIFIER).isEmpty());\n admin.flush(TableName.META_TABLE_NAME);\n\n // fix other issues\n doFsck(conf, true);\n\n // check that all are fixed\n assertNoErrors(doFsck(conf, false));\n assertEquals(ROWKEYS.length, countRows());\n } finally {\n cleanupTable(table);\n IOUtils.closeQuietly(meta);\n }\n }", "@Test (timeout=180000)\n public void testHDFSRegioninfoMissing() throws Exception {\n TableName table = TableName.valueOf(\"tableHDFSRegioninfoMissing\");\n try {\n setupTable(table);\n assertEquals(ROWKEYS.length, countRows());\n\n // Mess it up by leaving a hole in the meta data\n admin.disableTable(table);\n deleteRegion(conf, tbl.getTableDescriptor(), Bytes.toBytes(\"B\"),\n Bytes.toBytes(\"C\"), true, true, false, true, HRegionInfo.DEFAULT_REPLICA_ID);\n TEST_UTIL.getHBaseAdmin().enableTable(table);\n\n HBaseFsck hbck = doFsck(conf, false);\n assertErrors(hbck, new ERROR_CODE[] {\n ERROR_CODE.ORPHAN_HDFS_REGION,\n ERROR_CODE.NOT_IN_META_OR_DEPLOYED,\n ERROR_CODE.HOLE_IN_REGION_CHAIN});\n // holes are separate from overlap groups\n assertEquals(0, hbck.getOverlapGroups(table).size());\n\n // fix hole\n doFsck(conf, true);\n\n // check that hole fixed\n assertNoErrors(doFsck(conf, false));\n assertEquals(ROWKEYS.length, countRows());\n } finally {\n cleanupTable(table);\n }\n }", "@Override\n \tpublic void regionsRemoved(RegionEvent evt) {\n \t\t\n \t}", "private final void verifyGhostRegionValues(ComputationalComposedBlock block) throws MPIException {\n\t\tBoundaryIterator boundaryIterator = block.getBoundaryIterator();\n\t\tBoundaryIterator expectedValuesIterator = block.getBoundaryIterator();\n\t\tBoundaryId boundary = new BoundaryId();\n\t\tfor (int d=0; d<2*DIMENSIONALITY; d++) {\n\t\t\tblock.receiveDoneAt(boundary);\n\t\t\tboundaryIterator.setBoundaryToIterate(boundary);\n\t\t\tBoundaryId oppositeBoundary = boundary.oppositeSide();\n\t\t\texpectedValuesIterator.setBoundaryToIterate(oppositeBoundary);\n\t\t\twhile (boundaryIterator.isInField()) {\n\t\t\t\t// Check the ghost values outside the current element.\n\t\t\t\tfor (int offset=1; offset<extent; offset++) {\n\t\t\t\t\tint neighborOffset = offset-1;\n\t\t\t\t\tint directedOffset = boundary.isLowerSide() ? -offset : offset;\n\t\t\t\t\tint directedNeighborOffset = boundary.isLowerSide() ? -neighborOffset : neighborOffset;\n\t\t\t\t\tdouble expected = expectedValuesIterator.currentNeighbor(boundary.getDimension(), directedNeighborOffset);\n\t\t\t\t\tdouble actual = boundaryIterator.currentNeighbor(boundary.getDimension(), directedOffset);\n\t\t\t\t\tassertEquals(expected, actual, 4*Math.ulp(expected));\n\t\t\t\t}\n\t\t\t\tboundaryIterator.next();\n\t\t\t\texpectedValuesIterator.next();\n\t\t\t}\n\t\t}\n\t}", "@Test(timeout = 30000)\n public void testMoveBlockFailure() {\n // Test copy\n testMoveBlockFailure(conf);\n // Test hardlink\n conf.setBoolean(DFSConfigKeys\n .DFS_DATANODE_ALLOW_SAME_DISK_TIERING, true);\n conf.setDouble(DFSConfigKeys\n .DFS_DATANODE_RESERVE_FOR_ARCHIVE_DEFAULT_PERCENTAGE, 0.5);\n testMoveBlockFailure(conf);\n }", "@Test\n public void testColocatedPartitionedRegion() throws Throwable {\n createCacheInAllVms();\n redundancy = 0;\n localMaxmemory = 50;\n totalNumBuckets = 11;\n\n regionName = \"A\";\n colocatedWith = null;\n isPartitionResolver = Boolean.TRUE;\n attributeObjects = new Object[] {regionName, redundancy, localMaxmemory, totalNumBuckets,\n colocatedWith, isPartitionResolver};\n createPartitionedRegion(attributeObjects);\n\n regionName = \"B\";\n colocatedWith = SEPARATOR + \"A\";\n isPartitionResolver = Boolean.TRUE;\n attributeObjects = new Object[] {regionName, redundancy, localMaxmemory, totalNumBuckets,\n colocatedWith, isPartitionResolver};\n createPartitionedRegion(attributeObjects);\n\n regionName = \"C\";\n colocatedWith = SEPARATOR + \"A\";\n isPartitionResolver = Boolean.TRUE;\n attributeObjects = new Object[] {regionName, redundancy, localMaxmemory, totalNumBuckets,\n colocatedWith, isPartitionResolver};\n createPartitionedRegion(attributeObjects);\n\n regionName = \"D\";\n colocatedWith = SEPARATOR + \"B\";\n attributeObjects = new Object[] {regionName, redundancy, localMaxmemory, totalNumBuckets,\n colocatedWith, isPartitionResolver};\n createPartitionedRegion(attributeObjects);\n\n regionName = \"E\";\n colocatedWith = SEPARATOR + \"B\";\n isPartitionResolver = Boolean.TRUE;\n attributeObjects = new Object[] {regionName, redundancy, localMaxmemory, totalNumBuckets,\n colocatedWith, isPartitionResolver};\n createPartitionedRegion(attributeObjects);\n\n regionName = \"F\";\n colocatedWith = SEPARATOR + \"B\";\n isPartitionResolver = Boolean.TRUE;\n attributeObjects = new Object[] {regionName, redundancy, localMaxmemory, totalNumBuckets,\n colocatedWith, isPartitionResolver};\n createPartitionedRegion(attributeObjects);\n\n regionName = \"G\";\n colocatedWith = SEPARATOR + \"C\";\n isPartitionResolver = Boolean.TRUE;\n attributeObjects = new Object[] {regionName, redundancy, localMaxmemory, totalNumBuckets,\n colocatedWith, isPartitionResolver};\n createPartitionedRegion(attributeObjects);\n\n regionName = \"H\";\n colocatedWith = SEPARATOR + \"C\";\n isPartitionResolver = Boolean.TRUE;\n attributeObjects = new Object[] {regionName, redundancy, localMaxmemory, totalNumBuckets,\n colocatedWith, isPartitionResolver};\n createPartitionedRegion(attributeObjects);\n\n regionName = \"I\";\n colocatedWith = SEPARATOR + \"C\";\n isPartitionResolver = Boolean.TRUE;\n attributeObjects = new Object[] {regionName, redundancy, localMaxmemory, totalNumBuckets,\n colocatedWith, isPartitionResolver};\n createPartitionedRegion(attributeObjects);\n\n regionName = \"J\";\n colocatedWith = SEPARATOR + \"D\";\n isPartitionResolver = Boolean.TRUE;\n attributeObjects = new Object[] {regionName, redundancy, localMaxmemory, totalNumBuckets,\n colocatedWith, isPartitionResolver};\n createPartitionedRegion(attributeObjects);\n\n regionName = \"K\";\n colocatedWith = SEPARATOR + \"D\";\n isPartitionResolver = Boolean.TRUE;\n attributeObjects = new Object[] {regionName, redundancy, localMaxmemory, totalNumBuckets,\n colocatedWith, isPartitionResolver};\n createPartitionedRegion(attributeObjects);\n\n regionName = \"L\";\n colocatedWith = SEPARATOR + \"E\";\n isPartitionResolver = Boolean.TRUE;\n attributeObjects = new Object[] {regionName, redundancy, localMaxmemory, totalNumBuckets,\n colocatedWith, isPartitionResolver};\n createPartitionedRegion(attributeObjects);\n\n regionName = \"M\";\n colocatedWith = SEPARATOR + \"F\";\n isPartitionResolver = Boolean.TRUE;\n attributeObjects = new Object[] {regionName, redundancy, localMaxmemory, totalNumBuckets,\n colocatedWith, isPartitionResolver};\n createPartitionedRegion(attributeObjects);\n\n regionName = \"N\";\n colocatedWith = SEPARATOR + \"G\";\n isPartitionResolver = Boolean.TRUE;\n attributeObjects = new Object[] {regionName, redundancy, localMaxmemory, totalNumBuckets,\n colocatedWith, isPartitionResolver};\n createPartitionedRegion(attributeObjects);\n\n regionName = \"O\";\n colocatedWith = SEPARATOR + \"I\";\n isPartitionResolver = Boolean.TRUE;\n attributeObjects = new Object[] {regionName, redundancy, localMaxmemory, totalNumBuckets,\n colocatedWith, isPartitionResolver};\n createPartitionedRegion(attributeObjects);\n\n accessor.invoke(() -> PRColocationDUnitTest.validateColocatedRegions(\"A\"));\n\n accessor.invoke(() -> PRColocationDUnitTest.validateColocatedRegions(\"D\"));\n\n accessor.invoke(() -> PRColocationDUnitTest.validateColocatedRegions(\"H\"));\n\n accessor.invoke(() -> PRColocationDUnitTest.validateColocatedRegions(\"B\"));\n\n accessor.invoke(() -> PRColocationDUnitTest.validateColocatedRegions(\"K\"));\n }", "void scanblocks() {\n\t\tint oldline, newline;\n\t\tint oldfront = 0; // line# of front of a block in old, or 0\n\t\tint newlast = -1; // newline's value during prev. iteration\n\n\t\tfor (oldline = 1; oldline <= oldinfo.maxLine; oldline++)\n\t\t\tblocklen[oldline] = 0;\n\t\tblocklen[oldinfo.maxLine + 1] = UNREAL; // starts a mythical blk\n\n\t\tfor (oldline = 1; oldline <= oldinfo.maxLine; oldline++) {\n\t\t\tnewline = oldinfo.other[oldline];\n\t\t\tif (newline < 0)\n\t\t\t\toldfront = 0; /* no match: not in block */\n\t\t\telse { /* match. */\n\t\t\t\tif (oldfront == 0)\n\t\t\t\t\toldfront = oldline;\n\t\t\t\tif (newline != (newlast + 1))\n\t\t\t\t\toldfront = oldline;\n\t\t\t\t++blocklen[oldfront];\n\t\t\t}\n\t\t\tnewlast = newline;\n\t\t}\n\t}", "public void RemoveBlock(int NumOfB,ArrayList<Block> blocks,int[] i,int[] j){\r\n try {\r\n //2 blocks\r\n if (NumOfB == 2) {\r\n //update BlockList and map matrix\r\n map[i[0]][j[0]] = '0';\r\n map[i[1]][j[1]] = '0';\r\n blockList.RemovBlock(blockList.getBlock(blocks.get(0).getTypeOfBlock(), i[1], j[1]), blocks.get(1).getTypeOfBlock());\r\n blockList.RemovBlock(blockList.getBlock(blocks.get(0).getTypeOfBlock(), i[0], j[0]), blocks.get(0).getTypeOfBlock());\r\n }\r\n //3 blocks\r\n else {\r\n //update BlockList and map matrix\r\n map[i[0]][j[0]] = '0';\r\n map[i[1]][j[1]] = '0';\r\n map[i[2]][j[2]] = '0';\r\n blockList.RemovBlock(blocks.get(2), blocks.get(2).getTypeOfBlock());\r\n blockList.RemovBlock(blocks.get(1), blocks.get(1).getTypeOfBlock());\r\n blockList.RemovBlock(blocks.get(0), blocks.get(0).getTypeOfBlock());\r\n }\r\n gamePage.Sounds(2);//remove sound\r\n MoveBlock(2);//check if there is block will move down\r\n }catch (ArrayIndexOutOfBoundsException e) {\r\n\r\n }\r\n }", "private void m29109d() {\n PersistentConfiguration cVar = this.f22554b;\n if (cVar != null) {\n if (C6804i.m29033a(cVar.getString(\"UTDID2\"))) {\n String string = this.f22554b.getString(\"UTDID\");\n if (!C6804i.m29033a(string)) {\n m29110f(string);\n }\n }\n boolean z = false;\n String str = \"DID\";\n if (!C6804i.m29033a(this.f22554b.getString(str))) {\n this.f22554b.remove(str);\n z = true;\n }\n String str2 = \"EI\";\n if (!C6804i.m29033a(this.f22554b.getString(str2))) {\n this.f22554b.remove(str2);\n z = true;\n }\n String str3 = \"SI\";\n if (!C6804i.m29033a(this.f22554b.getString(str3))) {\n this.f22554b.remove(str3);\n z = true;\n }\n if (z) {\n this.f22554b.commit();\n }\n }\n }", "@Override\n\tpublic int getReplaceBlock() {\n\t\treturn 0;\n\t}", "@Test\r\n public void testCheckCollisionTankBlocks() {\r\n System.out.println(\"checkCollisionTankBlocks\");\r\n Rectangle r3 = new Rectangle(10, 10, 10, 10);\r\n boolean result = CollisionUtility.checkCollisionTankBlocks(r3);\r\n assertEquals(true, result);\r\n inblocks.remove(0);\r\n result = CollisionUtility.checkCollisionTankBlocks(r3);\r\n assertEquals(false, result);\r\n }", "public static void neighborhoodMaxLowMem(String szinputsegmentation,String szanchorpositions,\n int nbinsize, int numleft, int numright, int nspacing, \n\t\t\t\t\tboolean busestrand, boolean busesignal, String szcolfields,\n\t\t\t\t\tint noffsetanchor, String szoutfile,Color theColor, \n\t\t\t\t\t String sztitle,String szlabelmapping, boolean bprintimage, \n boolean bstringlabels, boolean bbrowser) throws IOException\n {\n\n\n\tboolean bchrommatch = false;//added in 1.23 to check for chromosome matches\n\t//an array of chromosome names\n\tArrayList alchromindex = new ArrayList();\n\n\tString szLine;\n\n\t//stores the largest index value for each chromosome\n\tHashMap hmchromMax = new HashMap();\n\n\t//maps chromosome names to index values\n\tHashMap hmchromToIndex = new HashMap();\n\tHashMap hmLabelToIndex = new HashMap(); //maps label to an index\n\tHashMap hmIndexToLabel = new HashMap(); //maps index string to label\n\t//stores the maximum integer label value\n\tint nmaxlabel=0;\n\tString szlabel =\"\";\n\tBufferedReader brinputsegment = Util.getBufferedReader(szinputsegmentation);\n\n\tboolean busedunderscore = false;\n //the number of additional intervals to the left and right to include\n \n \t//the center anchor position\n\tint numintervals = 1+numleft+numright;\n\n\n\t//this loops reads in the segmentation \n\twhile ((szLine = brinputsegment.readLine())!=null)\n\t{\n\t //added v1.24\n\t if (bbrowser)\n\t {\n\t\tif ((szLine.toLowerCase(Locale.ENGLISH).startsWith(\"browser\"))||(szLine.toLowerCase(Locale.ENGLISH).startsWith(\"track\")))\n\t\t{\n\t\t continue;\n\t\t}\n\t }\n\n\t StringTokenizer st;\n\t if (bstringlabels)\n\t {\n\t st = new StringTokenizer(szLine,\"\\t\");\n\t }\n\t else\n\t {\n\t st = new StringTokenizer(szLine,\"\\t \");\n\t }\n\n\t //added in v1.24\n\t int numtokens = st.countTokens();\n\t if (numtokens == 0)\n\t { \n\t //skip blank lines\n\t continue;\n\t }\n\t else if (numtokens < 4)\n\t {\n\t throw new IllegalArgumentException(\"Line \"+szLine+\" in \"+szinputsegmentation+\" only had \"+numtokens+\" token(s). Expecting at least 4\");\n\t }\n\n\t String szchrom = st.nextToken().trim();\n //assumes segments are in standard bed format which to get to \n\t //0-based inclusive requires substract 1 from the end\n\t //int nbegin = Integer.parseInt(st.nextToken().trim())/nbinsize; \n\t st.nextToken().trim();\n\t int nend = (Integer.parseInt(st.nextToken().trim())-1)/nbinsize; \n\t szlabel = st.nextToken().trim();\n\t short slabel;\n\n\t if (bstringlabels)\n\t {\n\t int nunderscoreindex = szlabel.indexOf(\"_\");\n\n\t if (nunderscoreindex >=0)\n\t {\n\t String szprefix = szlabel.substring(0,nunderscoreindex);\n\n try\n\t\t {\n\t slabel = (short) (Short.parseShort(szprefix));\n\t\t if (slabel > nmaxlabel)\n\t\t {\n\t nmaxlabel = slabel;\n\t\t }\n\t\t busedunderscore = true;\n\t\t hmLabelToIndex.put(szlabel, Short.valueOf(slabel));\n\t\t hmIndexToLabel.put(\"\"+slabel, szlabel);\n\t\t }\n catch (NumberFormatException ex)\n\t\t {\n try\n\t\t {\n\t\t slabel = (short) (Short.parseShort(szprefix.substring(1)));\n\t\t if (slabel > nmaxlabel)\n\t\t {\n\t\t nmaxlabel = slabel;\n\t\t }\n\t\t busedunderscore = true;\n\t\t hmLabelToIndex.put(szlabel, Short.valueOf(slabel));\n\t\t hmIndexToLabel.put(\"\"+slabel, szlabel);\n\t\t }\n\t\t catch (NumberFormatException ex2)\n\t\t {\n\t\t if (busedunderscore)\n\t\t {\n\t\t throw new IllegalArgumentException(\"Not a valid ID before '_' in \"+szlabel+\", while valid ID found for other entries\");\n\t\t }\n\t\t }\n\t\t }\n\t }\n\n\t if (!busedunderscore)\n\t {\n\t //handle string labels\n\t Short objshort = (Short) hmLabelToIndex.get(szlabel);\n\n\t if (objshort == null)\n\t {\n\t\t nmaxlabel = hmLabelToIndex.size()+1;\n\t\t slabel = (short) nmaxlabel;\n\t\t hmLabelToIndex.put(szlabel, Short.valueOf(slabel));\n\t\t hmIndexToLabel.put(\"\"+nmaxlabel, szlabel);\n\t\t }\n\t }\n\t }\n\t else\n\t {\n try\n\t {\n\t slabel = (short) (Short.parseShort(szlabel));\n\t }\n\t catch (NumberFormatException ex)\n\t {\n try\n\t {\n slabel = (short) (Short.parseShort(szlabel.substring(1)));\n\t }\n\t catch (NumberFormatException ex2)\n\t {\n\t throw new IllegalArgumentException(\"In fourth column neither state number or ID found in segmentation file. Use '-labels' option to run overlap enrichment treating fourth column as labels\");\n\t }\n\t }\n\t \n\t //alsegments.add(new SegmentRec(szchrom,nbegin,nend,slabel));\n\n\t if (slabel > nmaxlabel)\n\t {\n\t nmaxlabel = slabel;\n\t }\n\t }\n\n\t Integer objMax = (Integer) hmchromMax.get(szchrom);\n\t if (objMax == null)\n\t {\n\t\t//System.out.println(\"on chrom \"+szchrom);\n\t\thmchromMax.put(szchrom,Integer.valueOf(nend));\n\t\thmchromToIndex.put(szchrom, Integer.valueOf(hmchromToIndex.size()));\n\t\talchromindex.add(szchrom);\n\t }\n\t else\n\t {\n\t\tint ncurrmax = objMax.intValue();\n\t\tif (ncurrmax < nend)\n\t\t{\n\t\t hmchromMax.put(szchrom, Integer.valueOf(nend));\t\t \n\t\t}\n\t }\n\t}\n\tbrinputsegment.close();\n\n\t//stores a tally for each position relative to an anchor how frequently the label was observed\n\tdouble[][] tallyoverlaplabel = new double[numintervals][nmaxlabel+1]; \n\n\t//stores a tally for the total signal associated with each anchor position\n\tdouble[] dsumoverlaplabel = new double[numintervals];\n\n //a tally on how frequently each label occurs\n double[] tallylabel = new double[nmaxlabel+1];\n\n\n\tint numchroms = alchromindex.size();\n\n //short[][] labels = new short[numchroms][];\n\n\t//allocates space store all the segment labels for each chromosome\n\tfor (int nchrom = 0; nchrom < numchroms; nchrom++)\n\t{\n \t //stores all the segments in the data\n\t //ArrayList alsegments = new ArrayList();\n\t brinputsegment = Util.getBufferedReader(szinputsegmentation);\n\t String szchromwant = (String) alchromindex.get(nchrom);\n\t //System.out.println(\"processing \"+szchromwant);\n\t int nsize = ((Integer) hmchromMax.get(alchromindex.get(nchrom))).intValue()+1;\n\t short[] labels = new short[nsize];\n\t //this loops reads in the segmentation \n\n\n\t //short[] labels_nchrom = labels[nchrom];\n\t for (int npos = 0; npos < nsize; npos++)\n {\n labels[npos] = -1;\n }\n\t\t\n\t while ((szLine = brinputsegment.readLine())!=null)\n\t {\n\t //int numlines = alsegments.size();\n\t StringTokenizer st;\n\t if (bstringlabels)\n\t {\n\t st = new StringTokenizer(szLine,\"\\t\");\n\t }\n\t else\n\t {\n\t st = new StringTokenizer(szLine,\"\\t \");\n\t }\n\n\t String szchrom = st.nextToken().trim();\n\t if (!szchromwant.equals(szchrom))\n\t\t continue;\n\n\t bchrommatch = true;\n //assumes segments are in standard bed format which to get to \n\t //0-based inclusive requires substract 1 from the end\n\t int nbegin = Integer.parseInt(st.nextToken().trim())/nbinsize;\n\t int nend = (Integer.parseInt(st.nextToken().trim())-1)/nbinsize; \n\t szlabel = st.nextToken().trim();\n\t short slabel = -1;\n\n\t if (bstringlabels)\n\t {\n\t int nunderscoreindex = szlabel.indexOf(\"_\");\n\n\t\t if (nunderscoreindex >=0)\n\t\t {\n\t\t String szprefix = szlabel.substring(0,nunderscoreindex);\n\n try\n\t\t {\n\t\t slabel = (short) (Short.parseShort(szprefix));\n\t\t busedunderscore = true;\n\t\t }\n catch (NumberFormatException ex)\n\t\t {\n try\n\t\t {\n\t\t slabel = (short) (Short.parseShort(szprefix.substring(1)));\n\t\t\t busedunderscore = true;\n\t\t }\n\t\t catch (NumberFormatException ex2)\n\t\t {\n\t\t\t if (busedunderscore)\n\t\t\t {\n\t\t\t throw new IllegalArgumentException(\"Not a valid ID before '_' in \"+szlabel+\", while valid ID found for other entries\");\n\t\t\t }\n\t\t }\n\t\t }\n\t\t }\n\n\t\t if (!busedunderscore)\n\t\t {\n\t //handle string labels\n\t\t Short objshort = (Short) hmLabelToIndex.get(szlabel);\n\t\t slabel = ((Short) objshort).shortValue();\n\t }\n\t }\n\t else\n\t {\n try\n\t {\n\t\t slabel = (short) (Short.parseShort(szlabel));\n\t }\n\t catch (NumberFormatException ex)\n\t {\n try\n\t\t {\n slabel = (short) (Short.parseShort(szlabel.substring(1)));\n\t\t }\n\t\t catch (NumberFormatException ex2)\n\t\t {\n\t\t throw new IllegalArgumentException(\"In fourth column neither state number or ID found in segmentation file. Use '-labels' option to run overlap enrichment treating fourth column as labels\");\n\t\t }\n\t }\n\t }\n\n\t //this loop stores into labels the full segmentation\n\t //and a count of how often each label occurs\n\t //for (int nindex = 0; nindex < numlines; nindex++)\n\t //{\n\t //SegmentRec theSegmentRec = (SegmentRec) alsegments.get(nindex);\n\t //int nchrom = ((Integer) hmchromToIndex.get(theSegmentRec.szchrom)).intValue();\n\t //short[] labels_nchrom = labels[nchrom];\n\t //int nbegin = theSegmentRec.nbegin;\n\t //int nend = theSegmentRec.nend;\n\t //short slabel = theSegmentRec.slabel;\n\t for (int npos = nbegin; npos <= nend; npos++)\n\t {\n\t labels[npos] = slabel;\n\t }\n\n\t if (slabel >= 0)\n\t {\n\t tallylabel[slabel]+=(nend-nbegin)+1; \n\t }\t \n\t }\n\t brinputsegment.close();\n\n\n\t RecAnchorIndex theAnchorIndex = getAnchorIndex(szcolfields, busestrand, busesignal);\n\n \t //reads in the anchor position \n BufferedReader brcoords = Util.getBufferedReader(szanchorpositions);\n\t while ((szLine = brcoords.readLine())!=null)\n {\n\t if (szLine.trim().equals(\"\")) continue;\n\t String[] szLineA = szLine.split(\"\\\\s+\");\n\n String szchrom = szLineA[theAnchorIndex.nchromindex]; \n\t if (!szchrom.equals(szchromwant)) \n continue;\n\n\t int nanchor = (Integer.parseInt(szLineA[theAnchorIndex.npositionindex])-noffsetanchor);\n\t boolean bposstrand = true;\n\t if (busestrand)\n\t {\n\t String szstrand = szLineA[theAnchorIndex.nstrandindex];\t \n\t if (szstrand.equals(\"+\"))\n\t {\n\t bposstrand = true;\n\t }\n else if (szstrand.equals(\"-\"))\n {\n \t bposstrand = false;\n\t }\n\t else\n\t {\n \t throw new IllegalArgumentException(szstrand +\" is an invalid strand. Strand should be '+' or '-'\");\n\t\t }\t \n\t }\n\n\t double damount;\n\n\t if ((busesignal)&&(theAnchorIndex.nsignalindex< szLineA.length))\n\t {\n\t damount = Double.parseDouble(szLineA[theAnchorIndex.nsignalindex]);\n\t }\n\t else\n {\n\t damount = 1;\n\t }\n\n\t //updates the tallys for the given anchor position\n\t //Integer objChrom = (Integer) hmchromToIndex.get(szchrom);\n //if (objChrom != null)\n\t //{\n\t // int nchrom = objChrom.intValue();\n\t\t //short[] labels_nchrom = labels[nchrom];\n\n\t if (bposstrand)\n\t {\n\t int ntallyindex = 0;\n\t for(int noffset= -numleft; noffset <= numright; noffset++)\n\t {\n\t\t int nposindex = (nanchor + nspacing*noffset)/nbinsize;\n\n\t\t if ((nposindex >=0)&&(nposindex < labels.length)&&(labels[nposindex]>=0))\n\t\t {\n\t tallyoverlaplabel[ntallyindex][labels[nposindex]] += damount;\t\t \n\t\t }\n\t\t ntallyindex++;\n\t\t }\n\t\t }\n\t else\n\t {\n\t int ntallyindex = 0;\n\t for(int noffset= numright; noffset >= -numleft; noffset--)\n\t {\n\t\t int nposindex = (nanchor + nspacing*noffset)/nbinsize;\n\n\t\t if ((nposindex >=0)&&(nposindex < labels.length)&&(labels[nposindex]>=0))\n\t\t {\n\t tallyoverlaplabel[ntallyindex][labels[nposindex]]+=damount;\t\t \n\t\t }\n\t\t ntallyindex++;\n\t\t }\n\t\t //}\n\t\t }\n\t }\n brcoords.close(); \t \n\t}\n\n\tif (!bchrommatch)\n\t{\n\t throw new IllegalArgumentException(\"No chromosome name matches found between \"+szanchorpositions+\n \" and those in the segmentation file.\");\n\t}\n\n\toutputneighborhood(tallyoverlaplabel,tallylabel,dsumoverlaplabel,szoutfile,nspacing,numright,\n numleft,theColor,ChromHMM.convertCharOrderToStringOrder(szlabel.charAt(0)),sztitle,0,\n szlabelmapping,szlabel.charAt(0), bprintimage, bstringlabels, hmIndexToLabel);\n }", "@Test\n public void writing()\n throws IOException, DbfLibException\n {\n final Ranges ignoredRangesDbf = new Ranges();\n ignoredRangesDbf.addRange(0x01, 0x03); // modified\n ignoredRangesDbf.addRange(0x1d, 0x1d); // language driver\n ignoredRangesDbf.addRange(0x1e, 0x1f); // reserved\n ignoredRangesDbf.addRange(0x2c, 0x2f); // field description \"address in memory\"\n ignoredRangesDbf.addRange(0x4c, 0x4f); // idem\n ignoredRangesDbf.addRange(0x6c, 0x6f); // idem\n ignoredRangesDbf.addRange(0x8c, 0x8f); // idem\n ignoredRangesDbf.addRange(0xac, 0xaf); // idem\n ignoredRangesDbf.addRange(0xcc, 0xcf); // idem\n ignoredRangesDbf.addRange(0x34, 0x34); // work area id\n ignoredRangesDbf.addRange(0x54, 0x54); // work area id\n ignoredRangesDbf.addRange(0x74, 0x74); // work area id\n ignoredRangesDbf.addRange(0x94, 0x94); // work area id\n ignoredRangesDbf.addRange(0xb4, 0xb4); // work area id\n ignoredRangesDbf.addRange(0xd4, 0xd4); // work area id\n ignoredRangesDbf.addRange(0x105, 0x10e); // block number in memo file\n // (in some versions padded with zeros, in other versions with spaces)\n\n ignoredRangesDbf.addRange(0x161, 0x16a); // idem\n\n /*\n * in Clipper5 there is so much garbage in the header area that from the field definitions\n * on all the data is skipped\n */\n if (version == Version.CLIPPER_5)\n {\n ignoredRangesDbf.addRange(0x20, 0xdf); // reserved/garbage\n }\n\n final Ranges ignoredRangesDbt = new Ranges();\n\n if (version == Version.DBASE_3)\n {\n ignoredRangesDbt.addRange(0x04, 0x1ff); // reserved/garbage\n ignoredRangesDbt.addRange(0x432, 0x5ff); // zero padding beyond dbase eof bytes\n }\n else if (version == Version.DBASE_4)\n {\n ignoredRangesDbt.addRange(0x438, 0x5ff); // zero padding beyond dbase eof bytes\n }\n else if (version == Version.DBASE_5)\n {\n ignoredRangesDbt.addRange(0x16, 0x1ff); // reserved/garbage\n }\n else if (version == Version.CLIPPER_5)\n {\n ignoredRangesDbt.addRange(0x04, 0x3ff); // reserved/garbage\n ignoredRangesDbt.addRange(0x4f5, 0x5ff); // garbage beyond eof bytes\n ignoredRangesDbt.addRange(0x631, 0x7ff); // zero padding beyond eof bytes\n }\n else if (version == Version.FOXPRO_26)\n {\n ignoredRangesDbt.addRange(0x08, 0x0f); // file name (not written in FoxPro)\n ignoredRangesDbt.addRange(0x2f6, 0x2fb); // garbage\n ignoredRangesDbt.addRange(0x438, 0x4fb); // garbage\n }\n\n UnitTestUtil.doCopyAndCompareTest(versionDirectory + \"/cars\", \"cars\", version, ignoredRangesDbf,\n ignoredRangesDbt);\n }", "public void onNeighborBlockChange(World var1, int var2, int var3, int var4, int var5)\n {\n byte var6 = 0;\n byte var7 = 1;\n\n if (var1.getBlockId(var2 - 1, var3, var4) == this.blockID || var1.getBlockId(var2 + 1, var3, var4) == this.blockID)\n {\n var6 = 1;\n var7 = 0;\n }\n\n int var8;\n\n for (var8 = var3; var1.getBlockId(var2, var8 - 1, var4) == this.blockID; --var8)\n {\n ;\n }\n\n if (var1.getBlockId(var2, var8 - 1, var4) != Block.glowStone.blockID)\n {\n var1.setBlock(var2, var3, var4, 0);\n } else\n {\n int var9;\n\n for (var9 = 1; var9 < 4 && var1.getBlockId(var2, var8 + var9, var4) == this.blockID; ++var9)\n {\n ;\n }\n\n if (var9 == 3 && var1.getBlockId(var2, var8 + var9, var4) == Block.glowStone.blockID)\n {\n boolean var10 = var1.getBlockId(var2 - 1, var3, var4) == this.blockID || var1.getBlockId(var2 + 1, var3, var4) == this.blockID;\n boolean var11 = var1.getBlockId(var2, var3, var4 - 1) == this.blockID || var1.getBlockId(var2, var3, var4 + 1) == this.blockID;\n\n if (var10 && var11)\n {\n var1.setBlock(var2, var3, var4, 0);\n } else if ((var1.getBlockId(var2 + var6, var3, var4 + var7) != Block.glowStone.blockID || var1.getBlockId(var2 - var6, var3, var4 - var7) != this.blockID) && (var1.getBlockId(var2 - var6, var3, var4 - var7) != Block.glowStone.blockID || var1.getBlockId(var2 + var6, var3, var4 + var7) != this.blockID))\n {\n var1.setBlock(var2, var3, var4, 0);\n }\n } else\n {\n var1.setBlock(var2, var3, var4, 0);\n }\n }\n }", "public void repair () {\n WriteableByteArray whole = new WriteableByteArray ();\n WriteableByteArray piece = new WriteableByteArray ();\n int [] offsets = new int [sequences.size ()];\n for (int index = 0;index < commonSequence.length;index++) {\n byte b = commonSequence [index];\n int i = 0;\n for (byte [] sequence : sequences)\n if (sequence [index + offsets [i++]] != b) {\n CommonSequence commonPiece = new CommonSequence ();\n i = 0;\n for (byte [] s : sequences) {\n piece.reset ();\n for (;;) {\n byte c = s [index + offsets [i]];\n if (c == b)\n break;\n piece.write (c);\n offsets [i]++;\n }\n commonPiece.add (piece.toByteArray ());\n i++;\n }\n whole.write (commonPiece.getCommonSequence ());\n break;\n }\n // all sequences now coincide at b\n whole.write (b);\n }\n commonSequence = whole.toByteArray ();\n matched = false;\n throw new NotTestedException ();\n }", "private void resetMBPattern()\n {\n codedBlockPattern = 0;\n }", "private void cleanProblematicOverlappedRegions(RegionLocations locations) {\n RegionInfo region = locations.getRegionLocation().getRegion();\n\n boolean isLast = isEmptyStopRow(region.getEndKey());\n\n while (true) {\n Map.Entry<byte[], RegionLocations> overlap =\n isLast ? cache.lastEntry() : cache.lowerEntry(region.getEndKey());\n if (\n overlap == null || overlap.getValue() == locations\n || Bytes.equals(overlap.getKey(), region.getStartKey())\n ) {\n break;\n }\n\n if (LOG.isDebugEnabled()) {\n LOG.debug(\n \"Removing cached location {} (endKey={}) because it overlaps with \"\n + \"new location {} (endKey={})\",\n overlap.getValue(),\n Bytes.toStringBinary(overlap.getValue().getRegionLocation().getRegion().getEndKey()),\n locations, Bytes.toStringBinary(locations.getRegionLocation().getRegion().getEndKey()));\n }\n\n cache.remove(overlap.getKey());\n }\n }", "public void Inverse_macroblock_partition_scanning_process(){\n\t\tx=InverseRasterScan(mbPartIdx, MbPartWidth(mb_type),MbPartHeight(mb_type),16,0);\n\t\ty=InverseRasterScan(mbPartIdx, MbPartWidth(mb_type),MbPartHeight(mb_type),16,1);\n\n\t}", "void reportSplit(HRegionInfo oldRegion, HRegionInfo newRegionA,\n HRegionInfo newRegionB) {\n \n outboundMsgs.add(new HMsg(HMsg.Type.MSG_REPORT_SPLIT, oldRegion,\n (oldRegion.getRegionNameAsString() + \" split; daughters: \" +\n newRegionA.getRegionNameAsString() + \", \" +\n newRegionB.getRegionNameAsString()).getBytes()));\n outboundMsgs.add(new HMsg(HMsg.Type.MSG_REPORT_OPEN, newRegionA));\n outboundMsgs.add(new HMsg(HMsg.Type.MSG_REPORT_OPEN, newRegionB));\n }", "private synchronized void m29549c() {\n /* JADX: method processing error */\n/*\nError: java.lang.NullPointerException\n*/\n /*\n r6 = this;\n monitor-enter(r6);\n r0 = r6.f24853c;\t Catch:{ all -> 0x0050 }\n if (r0 == 0) goto L_0x004b;\t Catch:{ all -> 0x0050 }\n L_0x0005:\n r0 = com.google.android.m4b.maps.cg.bx.m23056a();\t Catch:{ all -> 0x0050 }\n r1 = 0;\n r2 = r6.f24854d;\t Catch:{ IOException -> 0x0035, all -> 0x0030 }\n r3 = r6.f24853c;\t Catch:{ IOException -> 0x0035, all -> 0x0030 }\n r2 = r2.openFileInput(r3);\t Catch:{ IOException -> 0x0035, all -> 0x0030 }\n if (r2 == 0) goto L_0x0027;\n L_0x0014:\n r3 = new com.google.android.m4b.maps.ar.a;\t Catch:{ IOException -> 0x0036 }\n r4 = com.google.android.m4b.maps.de.af.f19891a;\t Catch:{ IOException -> 0x0036 }\n r3.<init>(r4);\t Catch:{ IOException -> 0x0036 }\n r6.f24851a = r3;\t Catch:{ IOException -> 0x0036 }\n r3 = r6.f24851a;\t Catch:{ IOException -> 0x0036 }\n r4 = com.google.android.m4b.maps.ap.C4655c.m20771a(r2);\t Catch:{ IOException -> 0x0036 }\n r3.m20819a(r4);\t Catch:{ IOException -> 0x0036 }\n goto L_0x0029;\t Catch:{ IOException -> 0x0036 }\n L_0x0027:\n r6.f24851a = r1;\t Catch:{ IOException -> 0x0036 }\n L_0x0029:\n com.google.android.m4b.maps.cg.bx.m23057a(r0);\t Catch:{ all -> 0x0050 }\n L_0x002c:\n com.google.android.m4b.maps.ap.C4655c.m20773b(r2);\t Catch:{ all -> 0x0050 }\n goto L_0x004b;\n L_0x0030:\n r2 = move-exception;\n r5 = r2;\n r2 = r1;\n r1 = r5;\n goto L_0x0044;\n L_0x0035:\n r2 = r1;\n L_0x0036:\n r6.f24851a = r1;\t Catch:{ all -> 0x0043 }\n r1 = r6.f24854d;\t Catch:{ all -> 0x0043 }\n r3 = r6.f24853c;\t Catch:{ all -> 0x0043 }\n r1.deleteFile(r3);\t Catch:{ all -> 0x0043 }\n com.google.android.m4b.maps.cg.bx.m23057a(r0);\t Catch:{ all -> 0x0050 }\n goto L_0x002c;\t Catch:{ all -> 0x0050 }\n L_0x0043:\n r1 = move-exception;\t Catch:{ all -> 0x0050 }\n L_0x0044:\n com.google.android.m4b.maps.cg.bx.m23057a(r0);\t Catch:{ all -> 0x0050 }\n com.google.android.m4b.maps.ap.C4655c.m20773b(r2);\t Catch:{ all -> 0x0050 }\n throw r1;\t Catch:{ all -> 0x0050 }\n L_0x004b:\n r0 = 1;\t Catch:{ all -> 0x0050 }\n r6.f24852b = r0;\t Catch:{ all -> 0x0050 }\n monitor-exit(r6);\n return;\n L_0x0050:\n r0 = move-exception;\n monitor-exit(r6);\n throw r0;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.google.android.m4b.maps.cg.q.c():void\");\n }", "@Test\n public void testWithAllCorruptReplicas() throws Exception {\n Configuration conf = new HdfsConfiguration();\n conf.setLong(DFSConfigKeys.DFS_BLOCKREPORT_INTERVAL_MSEC_KEY, 1000L);\n conf.set(DFSConfigKeys.DFS_NAMENODE_RECONSTRUCTION_PENDING_TIMEOUT_SEC_KEY, Integer.toString(2));\n MiniDFSCluster cluster = new MiniDFSCluster.Builder(conf).numDataNodes(3).build();\n FileSystem fs = cluster.getFileSystem();\n final FSNamesystem namesystem = cluster.getNamesystem();\n\n try {\n final Path fileName = new Path(\"/foo1\");\n DFSTestUtil.createFile(fs, fileName, 2, (short) 3, 0L);\n DFSTestUtil.waitReplication(fs, fileName, (short) 3);\n\n ExtendedBlock block = DFSTestUtil.getFirstBlock(fs, fileName);\n corruptBlock(cluster, fs, fileName, 0, block);\n\n corruptBlock(cluster, fs, fileName, 1, block);\n\n corruptBlock(cluster, fs, fileName, 2, block);\n\n // wait for 3 seconds so that all block reports are processed.\n try {\n Thread.sleep(3000);\n } catch (InterruptedException ignored) {\n }\n\n assertEquals(0, countReplicas(namesystem, block).liveReplicas());\n assertEquals(3, countReplicas(namesystem, block).corruptReplicas());\n\n namesystem.setReplication(fileName.toString(), (short) 1);\n\n // wait for 3 seconds so that all block reports are processed.\n try {\n Thread.sleep(3000);\n } catch (InterruptedException ignored) {\n }\n\n assertEquals(0, countReplicas(namesystem, block).liveReplicas());\n assertEquals(3, countReplicas(namesystem, block).corruptReplicas());\n\n } finally {\n cluster.shutdown();\n }\n }", "public void unifyAdjacentChests(World par1World, int par2, int par3, int par4) {\n\t\tif (!par1World.isRemote) {\n\t\t\tBlock l = par1World.getBlock(par2, par3, par4 - 1);\n\t\t\tBlock i1 = par1World.getBlock(par2, par3, par4 + 1);\n\t\t\tBlock j1 = par1World.getBlock(par2 - 1, par3, par4);\n\t\t\tBlock k1 = par1World.getBlock(par2 + 1, par3, par4);\n\t\t\tBlock l1;\n\t\t\tBlock i2;\n\n\t\t\tbyte b0;\n\t\t\tint j2;\n\n\t\t\tif (l != this && i1 != this) {\n\t\t\t\tif (j1 != this && k1 != this) {\n\t\t\t\t\tb0 = 3;\n\n\t\t\t\t\tif (l.func_149730_j() && !i1.func_149730_j()) {\n\t\t\t\t\t\tb0 = 3;\n\t\t\t\t\t}\n\n\t\t\t\t\tif (i1.func_149730_j() && !l.func_149730_j()) {\n\t\t\t\t\t\tb0 = 2;\n\t\t\t\t\t}\n\n\t\t\t\t\tif (j1.func_149730_j() && !k1.func_149730_j()) {\n\t\t\t\t\t\tb0 = 5;\n\t\t\t\t\t}\n\n\t\t\t\t\tif (k1.func_149730_j() && !j1.func_149730_j()) {\n\t\t\t\t\t\tb0 = 4;\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tl1 = par1World.getBlock(j1 == this ? par2 - 1 : par2 + 1, par3, par4 - 1);\n\t\t\t\t\ti2 = par1World.getBlock(j1 == this ? par2 - 1 : par2 + 1, par3, par4 + 1);\n\t\t\t\t\tb0 = 3;\n\n\t\t\t\t\tif (j1 == this) {\n\t\t\t\t\t\tj2 = par1World.getBlockMetadata(par2 - 1, par3, par4);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tj2 = par1World.getBlockMetadata(par2 + 1, par3, par4);\n\t\t\t\t\t}\n\n\t\t\t\t\tif (j2 == 2) {\n\t\t\t\t\t\tb0 = 2;\n\t\t\t\t\t}\n\n\t\t\t\t\tif ((l.func_149730_j() || l1.func_149730_j()) && !i1.func_149730_j() && !i2.func_149730_j()) {\n\t\t\t\t\t\tb0 = 3;\n\t\t\t\t\t}\n\n\t\t\t\t\tif ((i1.func_149730_j() || i2.func_149730_j()) && !l.func_149730_j() && !l1.func_149730_j()) {\n\t\t\t\t\t\tb0 = 2;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tl1 = par1World.getBlock(par2 - 1, par3, l == this ? par4 - 1 : par4 + 1);\n\t\t\t\ti2 = par1World.getBlock(par2 + 1, par3, l == this ? par4 - 1 : par4 + 1);\n\t\t\t\tb0 = 5;\n\n\t\t\t\tif (l == this) {\n\t\t\t\t\tj2 = par1World.getBlockMetadata(par2, par3, par4 - 1);\n\t\t\t\t} else {\n\t\t\t\t\tj2 = par1World.getBlockMetadata(par2, par3, par4 + 1);\n\t\t\t\t}\n\n\t\t\t\tif (j2 == 4) {\n\t\t\t\t\tb0 = 4;\n\t\t\t\t}\n\n\t\t\t\tif ((j1.func_149730_j() || l1.func_149730_j()) && !k1.func_149730_j() && !i2.func_149730_j()) {\n\t\t\t\t\tb0 = 5;\n\t\t\t\t}\n\n\t\t\t\tif ((k1.func_149730_j() || i2.func_149730_j()) && !j1.func_149730_j() && !l1.func_149730_j()) {\n\t\t\t\t\tb0 = 4;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tpar1World.setBlockMetadataWithNotify(par2, par3, par4, b0, 3);\n\t\t}\n\t}", "@Test\n public void undoCkpointTest() throws Exception {\n final int tableSize = PARAMETERS.NUM_ITERATIONS_LOW;\n final int trimPosition = tableSize / 2;\n final int snapshotPosition = trimPosition + 2;\n\n CountDownLatch latch = new CountDownLatch(1);\n\n t(1, () -> {\n\n CorfuRuntime rt = getNewRuntime();\n try {\n PersistentCorfuTable<String, Long> tableA = openTable(rt, streamNameA);\n\n // first, populate the map\n for (int i = 0; i < tableSize; i++) {\n tableA.insert(String.valueOf(i), (long) i);\n }\n\n // now, take a checkpoint and perform a prefix-trim\n MultiCheckpointWriter<PersistentCorfuTable<String, Long>> mcw1 = new MultiCheckpointWriter<>();\n mcw1.addMap(tableA);\n mcw1.appendCheckpoints(rt, author);\n\n // Trim the log\n Token token = new Token(rt.getLayoutView().getLayout().getEpoch(), trimPosition);\n rt.getAddressSpaceView().prefixTrim(token);\n rt.getAddressSpaceView().gc();\n rt.getAddressSpaceView().invalidateServerCaches();\n rt.getAddressSpaceView().invalidateClientCache();\n\n latch.countDown();\n } finally {\n rt.shutdown();\n }\n });\n\n AtomicBoolean trimExceptionFlag = new AtomicBoolean(false);\n\n // start a new runtime\n t(2, () -> {\n latch.await();\n CorfuRuntime rt = getNewRuntime();\n\n PersistentCorfuTable<String, Long> localm2A = openTable(rt, streamNameA);\n\n // start a snapshot TX at position snapshotPosition\n Token timestamp = new Token(0L, snapshotPosition - 1);\n rt.getObjectsView().TXBuild()\n .type(TransactionType.SNAPSHOT)\n .snapshot(timestamp)\n .build()\n .begin();\n\n // finally, instantiate the map for the snapshot and assert is has the right state\n try {\n localm2A.get(String.valueOf(0));\n } catch (TransactionAbortedException te) {\n assertThat(te.getAbortCause()).isEqualTo(AbortCause.TRIM);\n // this is an expected behavior!\n trimExceptionFlag.set(true);\n }\n\n try {\n if (!trimExceptionFlag.get()) {\n assertThat(localm2A.size())\n .isEqualTo(snapshotPosition);\n\n // check map positions 0..(snapshot-1)\n for (int i = 0; i < snapshotPosition; i++) {\n assertThat(localm2A.get(String.valueOf(i)))\n .isEqualTo(i);\n }\n\n // check map positions snapshot..(mapSize-1)\n for (int i = snapshotPosition; i < tableSize; i++) {\n assertThat(localm2A.get(String.valueOf(i))).isNull();\n }\n }\n } finally {\n rt.shutdown();\n }\n });\n }", "public abstract int[] findEmptyBlock(int processSize);", "@Test(timeout=120000)\n public void testMissingLastRegion() throws Exception {\n TableName table =\n TableName.valueOf(\"testMissingLastRegion\");\n try {\n setupTable(table);\n assertEquals(ROWKEYS.length, countRows());\n\n // Mess it up by leaving a hole in the assignment, meta, and hdfs data\n admin.disableTable(table);\n deleteRegion(conf, tbl.getTableDescriptor(), Bytes.toBytes(\"C\"), Bytes.toBytes(\"\"), true,\n true, true);\n admin.enableTable(table);\n\n HBaseFsck hbck = doFsck(conf, false);\n assertErrors(hbck, new ERROR_CODE[] { ERROR_CODE.LAST_REGION_ENDKEY_NOT_EMPTY });\n // fix hole\n doFsck(conf, true);\n // check that hole fixed\n assertNoErrors(doFsck(conf, false));\n } finally {\n cleanupTable(table);\n }\n }", "public boolean willOverlap() {\n/* 208 */ throw new RuntimeException(\"Stub!\");\n/* */ }", "void transform() {\n\t\tint oldline, newline;\n\t\tint oldmax = oldinfo.maxLine + 2; /* Count pseudolines at */\n\t\tint newmax = newinfo.maxLine + 2; /* ..front and rear of file */\n\n\t\tfor (oldline = 0; oldline < oldmax; oldline++)\n\t\t\toldinfo.other[oldline] = -1;\n\t\tfor (newline = 0; newline < newmax; newline++)\n\t\t\tnewinfo.other[newline] = -1;\n\n\t\tscanunique(); /* scan for lines used once in both files */\n\t\tscanafter(); /* scan past sure-matches for non-unique blocks */\n\t\tscanbefore(); /* scan backwards from sure-matches */\n\t\tscanblocks(); /* find the fronts and lengths of blocks */\n\t}", "@Test\n public void testSingleBlock()\n {\n BlockMetadata.FileBlockMetadata block = new BlockMetadata.FileBlockMetadata(s3Directory + FILE_1, 0L, 0L,\n testMeta.dataFile.length(), true, -1, testMeta.dataFile.length());\n\n testMeta.blockReader.beginWindow(1);\n testMeta.blockReader.blocksMetadataInput.process(block);\n testMeta.blockReader.endWindow();\n\n List<Object> actualMessages = testMeta.messageSink.collectedTuples;\n Assert.assertEquals(\"No of records\", testMeta.messages.size(), actualMessages.size());\n\n for (int i = 0; i < actualMessages.size(); i++) {\n byte[] msg = (byte[])actualMessages.get(i);\n Assert.assertTrue(\"line \" + i, Arrays.equals(new String(msg).split(\",\"), testMeta.messages.get(i)));\n }\n }", "protected int getChunkInRegion() {\n\t\treturn (rnd.nextInt(structurePosRange) + rnd.nextInt(structurePosRange)) / 2;\n\t}", "@Test (timeout=180000)\n public void testValidLingeringSplitParent() throws Exception {\n TableName table =\n TableName.valueOf(\"testLingeringSplitParent\");\n Table meta = null;\n try {\n setupTable(table);\n assertEquals(ROWKEYS.length, countRows());\n\n // make sure data in regions, if in wal only there is no data loss\n admin.flush(table);\n HRegionLocation location = tbl.getRegionLocation(Bytes.toBytes(\"B\"));\n\n meta = connection.getTable(TableName.META_TABLE_NAME, tableExecutorService);\n HRegionInfo hri = location.getRegionInfo();\n\n // do a regular split\n byte[] regionName = location.getRegionInfo().getRegionName();\n admin.splitRegion(location.getRegionInfo().getRegionName(), Bytes.toBytes(\"BM\"));\n TestEndToEndSplitTransaction.blockUntilRegionSplit(conf, 60000, regionName, true);\n\n // TODO: fixHdfsHoles does not work against splits, since the parent dir lingers on\n // for some time until children references are deleted. HBCK erroneously sees this as\n // overlapping regions\n HBaseFsck hbck = doFsck(\n conf, true, true, false, false, false, true, true, true, false, false, false, null);\n assertErrors(hbck, new ERROR_CODE[] {}); //no LINGERING_SPLIT_PARENT reported\n\n // assert that the split hbase:meta entry is still there.\n Get get = new Get(hri.getRegionName());\n Result result = meta.get(get);\n assertNotNull(result);\n assertNotNull(MetaTableAccessor.getHRegionInfo(result));\n\n assertEquals(ROWKEYS.length, countRows());\n\n // assert that we still have the split regions\n assertEquals(tbl.getStartKeys().length, SPLITS.length + 1 + 1); //SPLITS + 1 is # regions pre-split.\n assertNoErrors(doFsck(conf, false));\n } finally {\n cleanupTable(table);\n IOUtils.closeQuietly(meta);\n }\n }", "private void DeleteBurnInsOnPreviousSamples() {\n\t\tif (gibbs_sample_num <= num_gibbs_burn_in + 1 && gibbs_sample_num >= 2){\n\t\t\tgibbs_samples_of_bart_trees[gibbs_sample_num - 2] = null;\n\t\t}\n\t}", "@Test\n public void testSafeBlocks() {\n IntStream.iterate(0, i -> i + 1).limit(LevelImpl.LEVEL_MAX).forEach(k -> {\n terrain = terrainFactory.create(level.getBlocksNumber());\n /* use 0 and 1 position because the margin blocks are inserted initially*/\n assertEquals(new Position(3 * TerrainFactoryImpl.CELL_DIMENSION * ScreenToolUtils.SCALE, \n TerrainFactoryImpl.CELL_DIMENSION * ScreenToolUtils.SCALE), terrain.getBlocks().get(0).getPosition());\n assertEquals(new Position(TerrainFactoryImpl.CELL_DIMENSION * ScreenToolUtils.SCALE,\n 3 * TerrainFactoryImpl.CELL_DIMENSION * ScreenToolUtils.SCALE), terrain.getBlocks().get(1).getPosition());\n level.levelUp();\n });\n }", "@Test(timeout = 4000)\n public void test13() throws Throwable {\n DefaultNucleotideCodec defaultNucleotideCodec0 = DefaultNucleotideCodec.INSTANCE;\n byte[] byteArray0 = new byte[9];\n defaultNucleotideCodec0.toString(byteArray0);\n DefaultNucleotideCodec defaultNucleotideCodec1 = DefaultNucleotideCodec.INSTANCE;\n Nucleotide nucleotide0 = Nucleotide.Pyrimidine;\n Set<Nucleotide> set0 = nucleotide0.getBasesFor();\n byte[] byteArray1 = defaultNucleotideCodec1.encode((Collection<Nucleotide>) set0);\n DefaultNucleotideCodec defaultNucleotideCodec2 = DefaultNucleotideCodec.INSTANCE;\n defaultNucleotideCodec2.toString(byteArray1);\n defaultNucleotideCodec2.toString(byteArray1);\n // Undeclared exception!\n try { \n defaultNucleotideCodec0.getUngappedOffsetFor((byte[]) null, 12);\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"java.nio.ByteBuffer\", e);\n }\n }", "void combineAndCollectSnapshotBlocks(\n INode.ReclaimContext reclaimContext, INodeFile file, FileDiff removed) {\n BlockInfo[] removedBlocks = removed.getBlocks();\n if (removedBlocks == null) {\n FileWithSnapshotFeature sf = file.getFileWithSnapshotFeature();\n assert sf != null : \"FileWithSnapshotFeature is null\";\n if(sf.isCurrentFileDeleted())\n sf.collectBlocksAndClear(reclaimContext, file);\n return;\n }\n int p = getPrior(removed.getSnapshotId(), true);\n FileDiff earlierDiff = p == Snapshot.NO_SNAPSHOT_ID ? null : getDiffById(p);\n // Copy blocks to the previous snapshot if not set already\n if (earlierDiff != null) {\n earlierDiff.setBlocks(removedBlocks);\n }\n BlockInfo[] earlierBlocks =\n (earlierDiff == null ? new BlockInfoContiguous[]{} : earlierDiff.getBlocks());\n // Find later snapshot (or file itself) with blocks\n BlockInfo[] laterBlocks = findLaterSnapshotBlocks(removed.getSnapshotId());\n laterBlocks = (laterBlocks == null) ? file.getBlocks() : laterBlocks;\n // Skip blocks, which belong to either the earlier or the later lists\n int i = 0;\n for(; i < removedBlocks.length; i++) {\n if(i < earlierBlocks.length && removedBlocks[i] == earlierBlocks[i])\n continue;\n if(i < laterBlocks.length && removedBlocks[i] == laterBlocks[i])\n continue;\n break;\n }\n // Check if last block is part of truncate recovery\n BlockInfo lastBlock = file.getLastBlock();\n BlockInfo dontRemoveBlock = null;\n if (lastBlock != null && lastBlock.getBlockUCState().equals(\n HdfsServerConstants.BlockUCState.UNDER_RECOVERY)) {\n dontRemoveBlock = lastBlock.getUnderConstructionFeature()\n .getTruncateBlock();\n }\n // Collect the remaining blocks of the file, ignoring truncate block\n for (;i < removedBlocks.length; i++) {\n if(dontRemoveBlock == null || !removedBlocks[i].equals(dontRemoveBlock)) {\n reclaimContext.collectedBlocks().addDeleteBlock(removedBlocks[i]);\n }\n }\n }", "@Test(timeout=75000)\n public void testSplitDaughtersNotInMeta() throws Exception {\n TableName table = TableName.valueOf(\"testSplitdaughtersNotInMeta\");\n Table meta = connection.getTable(TableName.META_TABLE_NAME, tableExecutorService);\n try {\n setupTable(table);\n assertEquals(ROWKEYS.length, countRows());\n\n // make sure data in regions, if in wal only there is no data loss\n admin.flush(table);\n HRegionLocation location = tbl.getRegionLocation(Bytes.toBytes(\"B\"));\n\n HRegionInfo hri = location.getRegionInfo();\n\n // Disable CatalogJanitor to prevent it from cleaning up the parent region\n // after split.\n admin.enableCatalogJanitor(false);\n\n // do a regular split\n byte[] regionName = location.getRegionInfo().getRegionName();\n admin.splitRegion(location.getRegionInfo().getRegionName(), Bytes.toBytes(\"BM\"));\n TestEndToEndSplitTransaction.blockUntilRegionSplit(conf, 60000, regionName, true);\n\n PairOfSameType<HRegionInfo> daughters =\n MetaTableAccessor.getDaughterRegions(meta.get(new Get(regionName)));\n\n // Delete daughter regions from meta, but not hdfs, unassign it.\n Map<HRegionInfo, ServerName> hris = tbl.getRegionLocations();\n undeployRegion(connection, hris.get(daughters.getFirst()), daughters.getFirst());\n undeployRegion(connection, hris.get(daughters.getSecond()), daughters.getSecond());\n\n List<Delete> deletes = new ArrayList<>();\n deletes.add(new Delete(daughters.getFirst().getRegionName()));\n deletes.add(new Delete(daughters.getSecond().getRegionName()));\n meta.delete(deletes);\n\n // Remove daughters from regionStates\n RegionStates regionStates = TEST_UTIL.getMiniHBaseCluster().getMaster().\n getAssignmentManager().getRegionStates();\n regionStates.deleteRegion(daughters.getFirst());\n regionStates.deleteRegion(daughters.getSecond());\n\n HBaseFsck hbck = doFsck(conf, false);\n assertErrors(hbck,\n new ERROR_CODE[] { ERROR_CODE.NOT_IN_META_OR_DEPLOYED, ERROR_CODE.NOT_IN_META_OR_DEPLOYED,\n ERROR_CODE.HOLE_IN_REGION_CHAIN }); //no LINGERING_SPLIT_PARENT\n\n // now fix it. The fix should not revert the region split, but add daughters to META\n hbck = doFsck(\n conf, true, true, false, false, false, false, false, false, false, false, false, null);\n assertErrors(hbck,\n new ERROR_CODE[] { ERROR_CODE.NOT_IN_META_OR_DEPLOYED, ERROR_CODE.NOT_IN_META_OR_DEPLOYED,\n ERROR_CODE.HOLE_IN_REGION_CHAIN });\n\n // assert that the split hbase:meta entry is still there.\n Get get = new Get(hri.getRegionName());\n Result result = meta.get(get);\n assertNotNull(result);\n assertNotNull(MetaTableAccessor.getHRegionInfo(result));\n\n assertEquals(ROWKEYS.length, countRows());\n\n // assert that we still have the split regions\n assertEquals(tbl.getStartKeys().length, SPLITS.length + 1 + 1); //SPLITS + 1 is # regions pre-split.\n assertNoErrors(doFsck(conf, false)); //should be fixed by now\n } finally {\n admin.enableCatalogJanitor(true);\n meta.close();\n cleanupTable(table);\n }\n }", "private static void registerBlock(Block b)\n\t{\n\t}", "public static List<MemoryBlock> getStableMemoryConfiguration() {\n\n ArrayList<MemoryBlock> memoryBlocks = new ArrayList<MemoryBlock>();\n\n // Blocks 00, 01, 02, 03 are either RO of OTP so we don't write them\n\n /**\n * Blocks 04 to 09 are DATA blocks and are set such that the Tag is configured\n * as NFC-Forum Type 2 and contains one NDEF message of MIME-type plain/text\n * with content \"Hello World !\"\n */\n memoryBlocks.add(new MemoryBlock(\"04\", \"03 14 D1 01\"));\n memoryBlocks.add(new MemoryBlock(\"05\", \"10 54 02 66\"));\n memoryBlocks.add(new MemoryBlock(\"06\", \"72 48 65 6c\"));\n memoryBlocks.add(new MemoryBlock(\"07\", \"6C 6F 20 57\"));\n memoryBlocks.add(new MemoryBlock(\"08\", \"6F 72 6C 64\"));\n memoryBlocks.add(new MemoryBlock(\"09\", \"20 21 FE 00\"));\n\n for (int i = 10; i <= EEPROM_MAX_DATA_ADDRESS; i++) {\n memoryBlocks.add(new MemoryBlock(Utils.intToHexString(i), \"00 00 00 00\"));\n }\n\n // Blocks 7A and 7B are OTP so we don't write them\n\n /**\n * Block 7C contains the password for RF authentication. This block can only be written\n * in AUTHENTICATED mode (see page 33 of official AMS AS3955 datasheet)\n */\n //memoryBlocks.add(new MemoryBlock(\"7C\", \"00 00 00 00\"));\n memoryBlocks.add(new MemoryBlock(\"7E\", \"44 00 00 00\"));\n\n /**\n * By default from factory, the block 7F is 00 80 00 00\n * The advantage to put 00 A0 00 00 instead is that the \"auth_set\" bit is set to 1\n * which means that the Authentication Settings (i.e. block 7D) is WRITABLE through NFC\n * (see page 41 of the official AMS AS3955 datasheet)\n * That is why this MemoryBlock should be written BEFORE the MemoryBlock 7F\n */\n memoryBlocks.add(new MemoryBlock(\"7F\", \"3F A9 F9 FF\"));\n\n /**\n * This block is written at last so that we are sure that it is WRITABLE\n * (see comment on block 7F)\n */\n memoryBlocks.add(new MemoryBlock(\"7D\", \"00 77 FF 00\"));\n\n return memoryBlocks;\n }", "@Test\n public void testMetaBlocks() throws Exception {\n metablocks(\"none\");\n metablocks(\"gz\");\n }", "private void b()\r\n/* 67: */ {\r\n/* 68: 73 */ this.c.clear();\r\n/* 69: 74 */ this.e.clear();\r\n/* 70: */ }", "@Test (timeout=180000)\n public void testNotInHdfsWithReplicas() throws Exception {\n TableName table =\n TableName.valueOf(\"tableNotInHdfs\");\n HBaseAdmin admin = new HBaseAdmin(conf);\n try {\n HRegionInfo[] oldHris = new HRegionInfo[2];\n setupTableWithRegionReplica(table, 2);\n assertEquals(ROWKEYS.length, countRows());\n NavigableMap<HRegionInfo, ServerName> map = MetaScanner.allTableRegions(TEST_UTIL.getConnection(),\n tbl.getName());\n int i = 0;\n // store the HRIs of the regions we will mess up\n for (Map.Entry<HRegionInfo, ServerName> m : map.entrySet()) {\n if (m.getKey().getStartKey().length > 0 &&\n m.getKey().getStartKey()[0] == Bytes.toBytes(\"B\")[0]) {\n LOG.debug(\"Initially server hosting \" + m.getKey() + \" is \" + m.getValue());\n oldHris[i++] = m.getKey();\n }\n }\n // make sure data in regions\n TEST_UTIL.getHBaseAdmin().flush(table.getName());\n\n // Mess it up by leaving a hole in the hdfs data\n deleteRegion(conf, tbl.getTableDescriptor(), Bytes.toBytes(\"B\"),\n Bytes.toBytes(\"C\"), false, false, true); // don't rm meta\n\n HBaseFsck hbck = doFsck(conf, false);\n assertErrors(hbck, new ERROR_CODE[] {ERROR_CODE.NOT_IN_HDFS});\n\n // fix hole\n doFsck(conf, true);\n\n // check that hole fixed\n assertNoErrors(doFsck(conf,false));\n assertEquals(ROWKEYS.length - 2, countRows());\n\n // the following code checks whether the old primary/secondary has\n // been unassigned and the new primary/secondary has been assigned\n i = 0;\n HRegionInfo[] newHris = new HRegionInfo[2];\n // get all table's regions from meta\n map = MetaScanner.allTableRegions(TEST_UTIL.getConnection(), tbl.getName());\n // get the HRIs of the new regions (hbck created new regions for fixing the hdfs mess-up)\n for (Map.Entry<HRegionInfo, ServerName> m : map.entrySet()) {\n if (m.getKey().getStartKey().length > 0 &&\n m.getKey().getStartKey()[0] == Bytes.toBytes(\"B\")[0]) {\n newHris[i++] = m.getKey();\n }\n }\n // get all the online regions in the regionservers\n Collection<ServerName> servers = admin.getClusterStatus().getServers();\n Set<HRegionInfo> onlineRegions = new HashSet<HRegionInfo>();\n for (ServerName s : servers) {\n List<HRegionInfo> list = admin.getOnlineRegions(s);\n onlineRegions.addAll(list);\n }\n // the new HRIs must be a subset of the online regions\n assertTrue(onlineRegions.containsAll(Arrays.asList(newHris)));\n // the old HRIs must not be part of the set (removeAll would return false if\n // the set didn't change)\n assertFalse(onlineRegions.removeAll(Arrays.asList(oldHris)));\n } finally {\n cleanupTable(table);\n admin.close();\n }\n }", "@Test\n\tpublic void testForwardFrameShiftBlockSubstitution() throws InvalidGenomeChange {\n\t\tGenomeChange change1 = new GenomeChange(new GenomePosition(refDict, '+', 1, 6647537, PositionType.ZERO_BASED),\n\t\t\t\t\"TGCCCCACCT\", \"CCC\");\n\t\tAnnotation annotation1 = new BlockSubstitutionAnnotationBuilder(infoForward, change1).build();\n\t\tAssert.assertEquals(infoForward.accession, annotation1.transcript.accession);\n\t\tAssert.assertEquals(6, annotation1.annoLoc.rank);\n\t\tAssert.assertEquals(\"c.1225_1234delinsCCC\", annotation1.ntHGVSDescription);\n\t\tAssert.assertEquals(\"p.Cys409Profs*127\", annotation1.aaHGVSDescription);\n\t\tAssert.assertEquals(ImmutableSortedSet.of(VariantType.FS_SUBSTITUTION, VariantType.SPLICE_REGION),\n\t\t\t\tannotation1.effects);\n\t}", "@Test\n public void test131() throws Throwable {\n ErrorPage errorPage0 = new ErrorPage();\n Block block0 = (Block)errorPage0.legend();\n Block block1 = (Block)errorPage0.blockquote();\n Label label0 = (Label)errorPage0.del((Object) block1);\n assertEquals(\"wheel_ErrorPage\", errorPage0.getComponentId());\n assertTrue(block1._isGeneratedId());\n }", "private synchronized void m3985g() {\n /*\n r8 = this;\n monitor-enter(r8);\n r2 = java.lang.Thread.currentThread();\t Catch:{ all -> 0x0063 }\n r3 = r8.f2114f;\t Catch:{ all -> 0x0063 }\n r3 = r3.mo1186c();\t Catch:{ all -> 0x0063 }\n r2 = r2.equals(r3);\t Catch:{ all -> 0x0063 }\n if (r2 != 0) goto L_0x0021;\n L_0x0011:\n r2 = r8.f2114f;\t Catch:{ all -> 0x0063 }\n r2 = r2.mo1185b();\t Catch:{ all -> 0x0063 }\n r3 = new com.google.analytics.tracking.android.aa;\t Catch:{ all -> 0x0063 }\n r3.<init>(r8);\t Catch:{ all -> 0x0063 }\n r2.add(r3);\t Catch:{ all -> 0x0063 }\n L_0x001f:\n monitor-exit(r8);\n return;\n L_0x0021:\n r2 = r8.f2122n;\t Catch:{ all -> 0x0063 }\n if (r2 == 0) goto L_0x0028;\n L_0x0025:\n r8.m3999d();\t Catch:{ all -> 0x0063 }\n L_0x0028:\n r2 = com.google.analytics.tracking.android.ab.f1966a;\t Catch:{ all -> 0x0063 }\n r3 = r8.f2110b;\t Catch:{ all -> 0x0063 }\n r3 = r3.ordinal();\t Catch:{ all -> 0x0063 }\n r2 = r2[r3];\t Catch:{ all -> 0x0063 }\n switch(r2) {\n case 1: goto L_0x0036;\n case 2: goto L_0x006e;\n case 3: goto L_0x00aa;\n default: goto L_0x0035;\n };\t Catch:{ all -> 0x0063 }\n L_0x0035:\n goto L_0x001f;\n L_0x0036:\n r2 = r8.f2116h;\t Catch:{ all -> 0x0063 }\n r2 = r2.isEmpty();\t Catch:{ all -> 0x0063 }\n if (r2 != 0) goto L_0x0066;\n L_0x003e:\n r2 = r8.f2116h;\t Catch:{ all -> 0x0063 }\n r2 = r2.poll();\t Catch:{ all -> 0x0063 }\n r0 = r2;\n r0 = (com.google.analytics.tracking.android.af) r0;\t Catch:{ all -> 0x0063 }\n r7 = r0;\n r2 = \"Sending hit to store\";\n com.google.analytics.tracking.android.av.m3818e(r2);\t Catch:{ all -> 0x0063 }\n r2 = r8.f2112d;\t Catch:{ all -> 0x0063 }\n r3 = r7.m3743a();\t Catch:{ all -> 0x0063 }\n r4 = r7.m3744b();\t Catch:{ all -> 0x0063 }\n r6 = r7.m3745c();\t Catch:{ all -> 0x0063 }\n r7 = r7.m3746d();\t Catch:{ all -> 0x0063 }\n r2.mo1197a(r3, r4, r6, r7);\t Catch:{ all -> 0x0063 }\n goto L_0x0036;\n L_0x0063:\n r2 = move-exception;\n monitor-exit(r8);\n throw r2;\n L_0x0066:\n r2 = r8.f2121m;\t Catch:{ all -> 0x0063 }\n if (r2 == 0) goto L_0x001f;\n L_0x006a:\n r8.m3987h();\t Catch:{ all -> 0x0063 }\n goto L_0x001f;\n L_0x006e:\n r2 = r8.f2116h;\t Catch:{ all -> 0x0063 }\n r2 = r2.isEmpty();\t Catch:{ all -> 0x0063 }\n if (r2 != 0) goto L_0x00a0;\n L_0x0076:\n r2 = r8.f2116h;\t Catch:{ all -> 0x0063 }\n r2 = r2.peek();\t Catch:{ all -> 0x0063 }\n r0 = r2;\n r0 = (com.google.analytics.tracking.android.af) r0;\t Catch:{ all -> 0x0063 }\n r7 = r0;\n r2 = \"Sending hit to service\";\n com.google.analytics.tracking.android.av.m3818e(r2);\t Catch:{ all -> 0x0063 }\n r2 = r8.f2111c;\t Catch:{ all -> 0x0063 }\n r3 = r7.m3743a();\t Catch:{ all -> 0x0063 }\n r4 = r7.m3744b();\t Catch:{ all -> 0x0063 }\n r6 = r7.m3745c();\t Catch:{ all -> 0x0063 }\n r7 = r7.m3746d();\t Catch:{ all -> 0x0063 }\n r2.mo1204a(r3, r4, r6, r7);\t Catch:{ all -> 0x0063 }\n r2 = r8.f2116h;\t Catch:{ all -> 0x0063 }\n r2.poll();\t Catch:{ all -> 0x0063 }\n goto L_0x006e;\n L_0x00a0:\n r2 = r8.f2123o;\t Catch:{ all -> 0x0063 }\n r2 = r2.mo1198a();\t Catch:{ all -> 0x0063 }\n r8.f2109a = r2;\t Catch:{ all -> 0x0063 }\n goto L_0x001f;\n L_0x00aa:\n r2 = \"Need to reconnect\";\n com.google.analytics.tracking.android.av.m3818e(r2);\t Catch:{ all -> 0x0063 }\n r2 = r8.f2116h;\t Catch:{ all -> 0x0063 }\n r2 = r2.isEmpty();\t Catch:{ all -> 0x0063 }\n if (r2 != 0) goto L_0x001f;\n L_0x00b7:\n r8.m3991j();\t Catch:{ all -> 0x0063 }\n goto L_0x001f;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.google.analytics.tracking.android.y.g():void\");\n }", "private final com.google.android.p306h.p307a.p308a.C5685v m26927b(com.google.protobuf.nano.a r7) {\n /*\n r6 = this;\n L_0x0000:\n r0 = r7.a();\n switch(r0) {\n case 0: goto L_0x000d;\n case 8: goto L_0x000e;\n case 18: goto L_0x0043;\n case 24: goto L_0x0054;\n case 32: goto L_0x005f;\n case 42: goto L_0x006a;\n default: goto L_0x0007;\n };\n L_0x0007:\n r0 = super.m4918a(r7, r0);\n if (r0 != 0) goto L_0x0000;\n L_0x000d:\n return r6;\n L_0x000e:\n r1 = r7.o();\n r2 = r7.i();\t Catch:{ IllegalArgumentException -> 0x0034 }\n switch(r2) {\n case 0: goto L_0x003c;\n case 1: goto L_0x003c;\n case 2: goto L_0x003c;\n case 3: goto L_0x003c;\n case 4: goto L_0x003c;\n case 5: goto L_0x003c;\n case 101: goto L_0x003c;\n case 102: goto L_0x003c;\n case 103: goto L_0x003c;\n case 104: goto L_0x003c;\n case 105: goto L_0x003c;\n case 106: goto L_0x003c;\n case 107: goto L_0x003c;\n case 108: goto L_0x003c;\n case 201: goto L_0x003c;\n case 202: goto L_0x003c;\n case 203: goto L_0x003c;\n case 204: goto L_0x003c;\n case 205: goto L_0x003c;\n case 206: goto L_0x003c;\n case 207: goto L_0x003c;\n case 208: goto L_0x003c;\n case 209: goto L_0x003c;\n case 301: goto L_0x003c;\n case 302: goto L_0x003c;\n case 303: goto L_0x003c;\n case 304: goto L_0x003c;\n case 305: goto L_0x003c;\n case 306: goto L_0x003c;\n case 307: goto L_0x003c;\n case 401: goto L_0x003c;\n case 402: goto L_0x003c;\n case 403: goto L_0x003c;\n case 404: goto L_0x003c;\n case 501: goto L_0x003c;\n case 502: goto L_0x003c;\n case 503: goto L_0x003c;\n case 504: goto L_0x003c;\n case 601: goto L_0x003c;\n case 602: goto L_0x003c;\n case 603: goto L_0x003c;\n case 604: goto L_0x003c;\n case 605: goto L_0x003c;\n case 606: goto L_0x003c;\n case 607: goto L_0x003c;\n case 608: goto L_0x003c;\n case 609: goto L_0x003c;\n case 610: goto L_0x003c;\n case 611: goto L_0x003c;\n case 612: goto L_0x003c;\n case 613: goto L_0x003c;\n case 614: goto L_0x003c;\n case 615: goto L_0x003c;\n case 616: goto L_0x003c;\n case 617: goto L_0x003c;\n case 618: goto L_0x003c;\n case 619: goto L_0x003c;\n case 620: goto L_0x003c;\n case 621: goto L_0x003c;\n case 622: goto L_0x003c;\n case 623: goto L_0x003c;\n case 624: goto L_0x003c;\n case 625: goto L_0x003c;\n case 626: goto L_0x003c;\n case 627: goto L_0x003c;\n case 628: goto L_0x003c;\n case 629: goto L_0x003c;\n case 630: goto L_0x003c;\n case 631: goto L_0x003c;\n case 632: goto L_0x003c;\n case 633: goto L_0x003c;\n case 634: goto L_0x003c;\n case 635: goto L_0x003c;\n case 636: goto L_0x003c;\n case 637: goto L_0x003c;\n case 638: goto L_0x003c;\n case 639: goto L_0x003c;\n case 640: goto L_0x003c;\n case 641: goto L_0x003c;\n case 701: goto L_0x003c;\n case 702: goto L_0x003c;\n case 703: goto L_0x003c;\n case 704: goto L_0x003c;\n case 705: goto L_0x003c;\n case 706: goto L_0x003c;\n case 707: goto L_0x003c;\n case 708: goto L_0x003c;\n case 709: goto L_0x003c;\n case 710: goto L_0x003c;\n case 711: goto L_0x003c;\n case 712: goto L_0x003c;\n case 713: goto L_0x003c;\n case 714: goto L_0x003c;\n case 715: goto L_0x003c;\n case 716: goto L_0x003c;\n case 717: goto L_0x003c;\n case 718: goto L_0x003c;\n case 719: goto L_0x003c;\n case 720: goto L_0x003c;\n case 721: goto L_0x003c;\n case 722: goto L_0x003c;\n case 801: goto L_0x003c;\n case 802: goto L_0x003c;\n case 803: goto L_0x003c;\n case 901: goto L_0x003c;\n case 902: goto L_0x003c;\n case 903: goto L_0x003c;\n case 904: goto L_0x003c;\n case 905: goto L_0x003c;\n case 906: goto L_0x003c;\n case 907: goto L_0x003c;\n case 908: goto L_0x003c;\n case 909: goto L_0x003c;\n case 910: goto L_0x003c;\n case 911: goto L_0x003c;\n case 912: goto L_0x003c;\n case 1001: goto L_0x003c;\n case 1002: goto L_0x003c;\n case 1003: goto L_0x003c;\n case 1004: goto L_0x003c;\n case 1005: goto L_0x003c;\n case 1006: goto L_0x003c;\n case 1101: goto L_0x003c;\n case 1102: goto L_0x003c;\n case 1201: goto L_0x003c;\n case 1301: goto L_0x003c;\n case 1302: goto L_0x003c;\n case 1303: goto L_0x003c;\n case 1304: goto L_0x003c;\n case 1305: goto L_0x003c;\n case 1306: goto L_0x003c;\n case 1307: goto L_0x003c;\n case 1308: goto L_0x003c;\n case 1309: goto L_0x003c;\n case 1310: goto L_0x003c;\n case 1311: goto L_0x003c;\n case 1312: goto L_0x003c;\n case 1313: goto L_0x003c;\n case 1314: goto L_0x003c;\n case 1315: goto L_0x003c;\n case 1316: goto L_0x003c;\n case 1317: goto L_0x003c;\n case 1318: goto L_0x003c;\n case 1319: goto L_0x003c;\n case 1320: goto L_0x003c;\n case 1321: goto L_0x003c;\n case 1322: goto L_0x003c;\n case 1323: goto L_0x003c;\n case 1324: goto L_0x003c;\n case 1325: goto L_0x003c;\n case 1326: goto L_0x003c;\n case 1327: goto L_0x003c;\n case 1328: goto L_0x003c;\n case 1329: goto L_0x003c;\n case 1330: goto L_0x003c;\n case 1331: goto L_0x003c;\n case 1332: goto L_0x003c;\n case 1333: goto L_0x003c;\n case 1334: goto L_0x003c;\n case 1335: goto L_0x003c;\n case 1336: goto L_0x003c;\n case 1337: goto L_0x003c;\n case 1338: goto L_0x003c;\n case 1339: goto L_0x003c;\n case 1340: goto L_0x003c;\n case 1341: goto L_0x003c;\n case 1342: goto L_0x003c;\n case 1343: goto L_0x003c;\n case 1344: goto L_0x003c;\n case 1345: goto L_0x003c;\n case 1346: goto L_0x003c;\n case 1347: goto L_0x003c;\n case 1401: goto L_0x003c;\n case 1402: goto L_0x003c;\n case 1403: goto L_0x003c;\n case 1404: goto L_0x003c;\n case 1405: goto L_0x003c;\n case 1406: goto L_0x003c;\n case 1407: goto L_0x003c;\n case 1408: goto L_0x003c;\n case 1409: goto L_0x003c;\n case 1410: goto L_0x003c;\n case 1411: goto L_0x003c;\n case 1412: goto L_0x003c;\n case 1413: goto L_0x003c;\n case 1414: goto L_0x003c;\n case 1415: goto L_0x003c;\n case 1416: goto L_0x003c;\n case 1417: goto L_0x003c;\n case 1418: goto L_0x003c;\n case 1419: goto L_0x003c;\n case 1420: goto L_0x003c;\n case 1421: goto L_0x003c;\n case 1422: goto L_0x003c;\n case 1423: goto L_0x003c;\n case 1424: goto L_0x003c;\n case 1425: goto L_0x003c;\n case 1426: goto L_0x003c;\n case 1427: goto L_0x003c;\n case 1601: goto L_0x003c;\n case 1602: goto L_0x003c;\n case 1603: goto L_0x003c;\n case 1604: goto L_0x003c;\n case 1605: goto L_0x003c;\n case 1606: goto L_0x003c;\n case 1607: goto L_0x003c;\n case 1608: goto L_0x003c;\n case 1609: goto L_0x003c;\n case 1610: goto L_0x003c;\n case 1611: goto L_0x003c;\n case 1612: goto L_0x003c;\n case 1613: goto L_0x003c;\n case 1614: goto L_0x003c;\n case 1615: goto L_0x003c;\n case 1616: goto L_0x003c;\n case 1617: goto L_0x003c;\n case 1618: goto L_0x003c;\n case 1619: goto L_0x003c;\n case 1620: goto L_0x003c;\n case 1621: goto L_0x003c;\n case 1622: goto L_0x003c;\n case 1623: goto L_0x003c;\n case 1624: goto L_0x003c;\n case 1625: goto L_0x003c;\n case 1626: goto L_0x003c;\n case 1627: goto L_0x003c;\n case 1628: goto L_0x003c;\n case 1629: goto L_0x003c;\n case 1630: goto L_0x003c;\n case 1631: goto L_0x003c;\n case 1632: goto L_0x003c;\n case 1633: goto L_0x003c;\n case 1634: goto L_0x003c;\n case 1635: goto L_0x003c;\n case 1636: goto L_0x003c;\n case 1637: goto L_0x003c;\n case 1638: goto L_0x003c;\n case 1639: goto L_0x003c;\n case 1640: goto L_0x003c;\n case 1641: goto L_0x003c;\n case 1642: goto L_0x003c;\n case 1643: goto L_0x003c;\n case 1644: goto L_0x003c;\n case 1645: goto L_0x003c;\n case 1646: goto L_0x003c;\n case 1647: goto L_0x003c;\n case 1648: goto L_0x003c;\n case 1649: goto L_0x003c;\n case 1650: goto L_0x003c;\n case 1651: goto L_0x003c;\n case 1652: goto L_0x003c;\n case 1653: goto L_0x003c;\n case 1654: goto L_0x003c;\n case 1655: goto L_0x003c;\n case 1656: goto L_0x003c;\n case 1657: goto L_0x003c;\n case 1658: goto L_0x003c;\n case 1659: goto L_0x003c;\n case 1660: goto L_0x003c;\n case 1801: goto L_0x003c;\n case 1802: goto L_0x003c;\n case 1803: goto L_0x003c;\n case 1804: goto L_0x003c;\n case 1805: goto L_0x003c;\n case 1806: goto L_0x003c;\n case 1807: goto L_0x003c;\n case 1808: goto L_0x003c;\n case 1809: goto L_0x003c;\n case 1810: goto L_0x003c;\n case 1811: goto L_0x003c;\n case 1812: goto L_0x003c;\n case 1813: goto L_0x003c;\n case 1814: goto L_0x003c;\n case 1815: goto L_0x003c;\n case 1816: goto L_0x003c;\n case 1817: goto L_0x003c;\n case 1901: goto L_0x003c;\n case 1902: goto L_0x003c;\n case 1903: goto L_0x003c;\n case 1904: goto L_0x003c;\n case 1905: goto L_0x003c;\n case 1906: goto L_0x003c;\n case 1907: goto L_0x003c;\n case 1908: goto L_0x003c;\n case 1909: goto L_0x003c;\n case 2001: goto L_0x003c;\n case 2101: goto L_0x003c;\n case 2102: goto L_0x003c;\n case 2103: goto L_0x003c;\n case 2104: goto L_0x003c;\n case 2105: goto L_0x003c;\n case 2106: goto L_0x003c;\n case 2107: goto L_0x003c;\n case 2108: goto L_0x003c;\n case 2109: goto L_0x003c;\n case 2110: goto L_0x003c;\n case 2111: goto L_0x003c;\n case 2112: goto L_0x003c;\n case 2113: goto L_0x003c;\n case 2114: goto L_0x003c;\n case 2115: goto L_0x003c;\n case 2116: goto L_0x003c;\n case 2117: goto L_0x003c;\n case 2118: goto L_0x003c;\n case 2119: goto L_0x003c;\n case 2120: goto L_0x003c;\n case 2121: goto L_0x003c;\n case 2122: goto L_0x003c;\n case 2123: goto L_0x003c;\n case 2124: goto L_0x003c;\n case 2201: goto L_0x003c;\n case 2202: goto L_0x003c;\n case 2203: goto L_0x003c;\n case 2204: goto L_0x003c;\n case 2205: goto L_0x003c;\n case 2206: goto L_0x003c;\n case 2207: goto L_0x003c;\n case 2208: goto L_0x003c;\n case 2209: goto L_0x003c;\n case 2210: goto L_0x003c;\n case 2211: goto L_0x003c;\n case 2212: goto L_0x003c;\n case 2213: goto L_0x003c;\n case 2214: goto L_0x003c;\n case 2215: goto L_0x003c;\n case 2301: goto L_0x003c;\n case 2302: goto L_0x003c;\n case 2303: goto L_0x003c;\n case 2304: goto L_0x003c;\n case 2401: goto L_0x003c;\n case 2402: goto L_0x003c;\n case 2501: goto L_0x003c;\n case 2502: goto L_0x003c;\n case 2503: goto L_0x003c;\n case 2504: goto L_0x003c;\n case 2505: goto L_0x003c;\n case 2506: goto L_0x003c;\n case 2507: goto L_0x003c;\n case 2508: goto L_0x003c;\n case 2509: goto L_0x003c;\n case 2510: goto L_0x003c;\n case 2511: goto L_0x003c;\n case 2512: goto L_0x003c;\n case 2513: goto L_0x003c;\n case 2514: goto L_0x003c;\n case 2515: goto L_0x003c;\n case 2516: goto L_0x003c;\n case 2517: goto L_0x003c;\n case 2518: goto L_0x003c;\n case 2519: goto L_0x003c;\n case 2601: goto L_0x003c;\n case 2602: goto L_0x003c;\n case 2701: goto L_0x003c;\n case 2702: goto L_0x003c;\n case 2703: goto L_0x003c;\n case 2704: goto L_0x003c;\n case 2705: goto L_0x003c;\n case 2706: goto L_0x003c;\n case 2707: goto L_0x003c;\n case 2801: goto L_0x003c;\n case 2802: goto L_0x003c;\n case 2803: goto L_0x003c;\n case 2804: goto L_0x003c;\n case 2805: goto L_0x003c;\n case 2806: goto L_0x003c;\n case 2807: goto L_0x003c;\n case 2808: goto L_0x003c;\n case 2809: goto L_0x003c;\n case 2810: goto L_0x003c;\n case 2811: goto L_0x003c;\n case 2812: goto L_0x003c;\n case 2813: goto L_0x003c;\n case 2814: goto L_0x003c;\n case 2815: goto L_0x003c;\n case 2816: goto L_0x003c;\n case 2817: goto L_0x003c;\n case 2818: goto L_0x003c;\n case 2819: goto L_0x003c;\n case 2820: goto L_0x003c;\n case 2821: goto L_0x003c;\n case 2822: goto L_0x003c;\n case 2823: goto L_0x003c;\n case 2824: goto L_0x003c;\n case 2825: goto L_0x003c;\n case 2826: goto L_0x003c;\n case 2901: goto L_0x003c;\n case 2902: goto L_0x003c;\n case 2903: goto L_0x003c;\n case 2904: goto L_0x003c;\n case 2905: goto L_0x003c;\n case 2906: goto L_0x003c;\n case 2907: goto L_0x003c;\n case 3001: goto L_0x003c;\n case 3002: goto L_0x003c;\n case 3003: goto L_0x003c;\n case 3004: goto L_0x003c;\n case 3005: goto L_0x003c;\n default: goto L_0x0019;\n };\t Catch:{ IllegalArgumentException -> 0x0034 }\n L_0x0019:\n r3 = new java.lang.IllegalArgumentException;\t Catch:{ IllegalArgumentException -> 0x0034 }\n r4 = 41;\n r5 = new java.lang.StringBuilder;\t Catch:{ IllegalArgumentException -> 0x0034 }\n r5.<init>(r4);\t Catch:{ IllegalArgumentException -> 0x0034 }\n r2 = r5.append(r2);\t Catch:{ IllegalArgumentException -> 0x0034 }\n r4 = \" is not a valid enum EventType\";\n r2 = r2.append(r4);\t Catch:{ IllegalArgumentException -> 0x0034 }\n r2 = r2.toString();\t Catch:{ IllegalArgumentException -> 0x0034 }\n r3.<init>(r2);\t Catch:{ IllegalArgumentException -> 0x0034 }\n throw r3;\t Catch:{ IllegalArgumentException -> 0x0034 }\n L_0x0034:\n r2 = move-exception;\n r7.e(r1);\n r6.m4918a(r7, r0);\n goto L_0x0000;\n L_0x003c:\n r2 = java.lang.Integer.valueOf(r2);\t Catch:{ IllegalArgumentException -> 0x0034 }\n r6.f28837a = r2;\t Catch:{ IllegalArgumentException -> 0x0034 }\n goto L_0x0000;\n L_0x0043:\n r0 = r6.f28838b;\n if (r0 != 0) goto L_0x004e;\n L_0x0047:\n r0 = new com.google.android.h.a.a.u;\n r0.<init>();\n r6.f28838b = r0;\n L_0x004e:\n r0 = r6.f28838b;\n r7.a(r0);\n goto L_0x0000;\n L_0x0054:\n r0 = r7.j();\n r0 = java.lang.Long.valueOf(r0);\n r6.f28839c = r0;\n goto L_0x0000;\n L_0x005f:\n r0 = r7.j();\n r0 = java.lang.Long.valueOf(r0);\n r6.f28840d = r0;\n goto L_0x0000;\n L_0x006a:\n r0 = r6.f28841e;\n if (r0 != 0) goto L_0x0075;\n L_0x006e:\n r0 = new com.google.android.h.a.a.o;\n r0.<init>();\n r6.f28841e = r0;\n L_0x0075:\n r0 = r6.f28841e;\n r7.a(r0);\n goto L_0x0000;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.google.android.h.a.a.v.b(com.google.protobuf.nano.a):com.google.android.h.a.a.v\");\n }", "@Test(timeout=180000)\n public void testQuarantineMissingRegionDir() throws Exception {\n TableName table = TableName.valueOf(name.getMethodName());\n // inject a fault in the hfcc created.\n final FileSystem fs = FileSystem.get(conf);\n HBaseFsck hbck = new HBaseFsck(conf, hbfsckExecutorService) {\n @Override\n public HFileCorruptionChecker createHFileCorruptionChecker(boolean sidelineCorruptHFiles)\n throws IOException {\n return new HFileCorruptionChecker(conf, executor, sidelineCorruptHFiles) {\n AtomicBoolean attemptedFirstHFile = new AtomicBoolean(false);\n @Override\n protected void checkRegionDir(Path p) throws IOException {\n if (attemptedFirstHFile.compareAndSet(false, true)) {\n assertTrue(fs.delete(p, true)); // make sure delete happened.\n }\n super.checkRegionDir(p);\n }\n };\n }\n };\n doQuarantineTest(table, hbck, 3, 0, 0, 0, 1);\n hbck.close();\n }", "@Override\n \t/**\n \t * Called when the block is placed in the world.\n \t */\n \tpublic void auxiliaryOnBlockPlacedBy(TECarpentersBlock TE, World world, int x, int y, int z, EntityLivingBase entityLiving, ItemStack itemStack)\n \t{\n \t\tif (!entityLiving.isSneaking())\n \t\t{\n \t\t\t/* Match adjacent collapsible quadrant heights. */\n \t\t\t\n \t\t\tTECarpentersBlock TE_XN = world.getBlockId(x - 1, y, z) == blockID ? (TECarpentersBlock)world.getBlockTileEntity(x - 1, y, z) : null;\n \t\t\tTECarpentersBlock TE_XP = world.getBlockId(x + 1, y, z) == blockID ? (TECarpentersBlock)world.getBlockTileEntity(x + 1, y, z) : null;\n \t\t\tTECarpentersBlock TE_ZN = world.getBlockId(x, y, z - 1) == blockID ? (TECarpentersBlock)world.getBlockTileEntity(x, y, z - 1) : null;\n \t\t\tTECarpentersBlock TE_ZP = world.getBlockId(x, y, z + 1) == blockID ? (TECarpentersBlock)world.getBlockTileEntity(x, y, z + 1) : null;\n \n \t\t\tif (TE_XN != null) {\n \t\t\t\tCollapsible.setQuadHeight(TE, Collapsible.QUAD_XZNN, Collapsible.getQuadHeight(TE_XN, Collapsible.QUAD_XZPN));\n \t\t\t\tCollapsible.setQuadHeight(TE, Collapsible.QUAD_XZNP, Collapsible.getQuadHeight(TE_XN, Collapsible.QUAD_XZPP));\n \t\t\t}\n \t\t\tif (TE_XP != null) {\n \t\t\t\tCollapsible.setQuadHeight(TE, Collapsible.QUAD_XZPN, Collapsible.getQuadHeight(TE_XP, Collapsible.QUAD_XZNN));\n \t\t\t\tCollapsible.setQuadHeight(TE, Collapsible.QUAD_XZPP, Collapsible.getQuadHeight(TE_XP, Collapsible.QUAD_XZNP));\n \t\t\t}\n \t\t\tif (TE_ZN != null) {\n \t\t\t\tCollapsible.setQuadHeight(TE, Collapsible.QUAD_XZNN, Collapsible.getQuadHeight(TE_ZN, Collapsible.QUAD_XZNP));\n \t\t\t\tCollapsible.setQuadHeight(TE, Collapsible.QUAD_XZPN, Collapsible.getQuadHeight(TE_ZN, Collapsible.QUAD_XZPP));\n \t\t\t}\n \t\t\tif (TE_ZP != null) {\n \t\t\t\tCollapsible.setQuadHeight(TE, Collapsible.QUAD_XZNP, Collapsible.getQuadHeight(TE_ZP, Collapsible.QUAD_XZNN));\n \t\t\t\tCollapsible.setQuadHeight(TE, Collapsible.QUAD_XZPP, Collapsible.getQuadHeight(TE_ZP, Collapsible.QUAD_XZPN));\n \t\t\t}\n \t\t}\n \t}", "@Test (timeout=180000)\n public void testContainedRegionOverlap() throws Exception {\n TableName table =\n TableName.valueOf(\"tableContainedRegionOverlap\");\n try {\n setupTable(table);\n assertEquals(ROWKEYS.length, countRows());\n\n // Mess it up by creating an overlap in the metadata\n HRegionInfo hriOverlap =\n createRegion(tbl.getTableDescriptor(), Bytes.toBytes(\"A2\"), Bytes.toBytes(\"B\"));\n TEST_UTIL.getHBaseCluster().getMaster().assignRegion(hriOverlap);\n TEST_UTIL.getHBaseCluster().getMaster().getAssignmentManager()\n .waitForAssignment(hriOverlap);\n ServerName server = regionStates.getRegionServerOfRegion(hriOverlap);\n TEST_UTIL.assertRegionOnServer(hriOverlap, server, REGION_ONLINE_TIMEOUT);\n\n HBaseFsck hbck = doFsck(conf, false);\n assertErrors(hbck, new ERROR_CODE[] {\n ERROR_CODE.OVERLAP_IN_REGION_CHAIN });\n assertEquals(2, hbck.getOverlapGroups(table).size());\n assertEquals(ROWKEYS.length, countRows());\n\n // fix the problem.\n doFsck(conf, true);\n\n // verify that overlaps are fixed\n HBaseFsck hbck2 = doFsck(conf,false);\n assertNoErrors(hbck2);\n assertEquals(0, hbck2.getOverlapGroups(table).size());\n assertEquals(ROWKEYS.length, countRows());\n } finally {\n cleanupTable(table);\n }\n }", "public void free(Block b) {\n if(b.length <= 0) return;\n\n if (b.start + b.length > limit) limit = b.start + b.length; // grows with free\n\n // query adjacent blocks\n Block prev = freeSpace.floor(b);\n Block next = freeSpace.higher(b);\n\n if (prev != null && prev.start + prev.length > b.start) {\n throw new RuntimeException(\"Corrupted. DEBUG PRV \" + prev.start + \"+\" + prev.length + \">\" + b.start);\n }\n if (next != null && next.start < b.start + b.length) {\n throw new RuntimeException(\"Corrupted. DEBUG NEX \" + next.start + \"<\" + b.start + \"+\" + b.length);\n }\n\n // merge them if possible\n \n Block n = Block.mergeBlocks(b, prev);\n if(n != null) { freeSpace.remove(prev); b = n; }\n\n n = Block.mergeBlocks(b, next);\n if(n != null) { freeSpace.remove(next); b = n; }\n\n freeSpace.add(b);\n }", "public ByteBuf duplicate()\r\n/* 95: */ {\r\n/* 96:112 */ recordLeakNonRefCountingOperation(this.leak);\r\n/* 97:113 */ return super.duplicate();\r\n/* 98: */ }", "private void CheckStructureIntegrity() {\n int size = 0;\n for (Module mod : modules) {\n size += mod.getAddresses().size();\n logger.info(\"BBS : {} Module {}\", mod.getAddresses().size(), mod.getName());\n }\n logger.info(\"Total BBS : {}\", size);\n }", "public interface NoCopySpan\n/* */ {\n/* */ public static class Concrete\n/* */ implements NoCopySpan\n/* */ {\n/* */ public Concrete() {\n/* 37 */ throw new RuntimeException(\"Stub!\");\n/* */ }\n/* */ }\n/* */ }", "static void hardDrop(Block b) {\n int[] pos = b.pos;\n char[][] piece = b.piece;\n\n while (canPlace(pos[0] + 1, pos[1], piece))\n pos[0]++;\n\n place(pos[0], pos[1], piece);\n }", "public ByteBuf retainedDuplicate()\r\n/* 83: */ {\r\n/* 84:100 */ recordLeakNonRefCountingOperation(this.leak);\r\n/* 85:101 */ return super.retainedDuplicate();\r\n/* 86: */ }", "public void b(World paramaqu, Random paramRandom, BlockPosition paramdt, Block parambec)\r\n/* 77: */ {\r\n/* 78: 93 */ BlockPosition localdt1 = paramdt.up();\r\n/* 79: */ label260:\r\n/* 80: 95 */ for (int i = 0; i < 128; i++)\r\n/* 81: */ {\r\n/* 82: 96 */ BlockPosition localdt2 = localdt1;\r\n/* 83: 97 */ for (int j = 0; j < i / 16; j++)\r\n/* 84: */ {\r\n/* 85: 98 */ localdt2 = localdt2.offset(paramRandom.nextInt(3) - 1, (paramRandom.nextInt(3) - 1) * paramRandom.nextInt(3) / 2, paramRandom.nextInt(3) - 1);\r\n/* 86: 99 */ if ((paramaqu.getBlock(localdt2.down()).getType() != BlockList.grass) || (paramaqu.getBlock(localdt2).getType().blocksMovement())) {\r\n/* 87: */ break label260;\r\n/* 88: */ }\r\n/* 89: */ }\r\n/* 90:104 */ if (paramaqu.getBlock(localdt2).getType().material == Material.air)\r\n/* 91: */ {\r\n/* 92: */ Object localObject;\r\n/* 93:108 */ if (paramRandom.nextInt(8) == 0)\r\n/* 94: */ {\r\n/* 95:109 */ localObject = paramaqu.b(localdt2).a(paramRandom, localdt2);\r\n/* 96:110 */ avy localavy = ((EnumFlowerVariant)localObject).a().a();\r\n/* 97:111 */ Block localbec = localavy.instance().setData(localavy.l(), (Comparable)localObject);\r\n/* 98:112 */ if (localavy.f(paramaqu, localdt2, localbec)) {\r\n/* 99:113 */ paramaqu.setBlock(localdt2, localbec, 3);\r\n/* 100: */ }\r\n/* 101: */ }\r\n/* 102: */ else\r\n/* 103: */ {\r\n/* 104:116 */ localObject = BlockList.tallgrass.instance().setData(bbh.a, bbi.b);\r\n/* 105:117 */ if (BlockList.tallgrass.f(paramaqu, localdt2, (Block)localObject)) {\r\n/* 106:118 */ paramaqu.setBlock(localdt2, (Block)localObject, 3);\r\n/* 107: */ }\r\n/* 108: */ }\r\n/* 109: */ }\r\n/* 110: */ }\r\n/* 111: */ }", "phaseI.Hdfs.BlockLocations getNewBlock();", "void testBP()\n {\n try\n {\n init();\n accessComplete.reset();\n FormTestID(TestNo,SubNo++,\"FUN\");\n\n op1 = sequance.new Operation();\n addOpSequenceBP(op1,ACCESS_OPERATION_CODE.ACCESS_OPERATION_BLOCK_PERMALOCK );\n psLog.println(\"\\n<br><a>TestCase No:\"+TestID+\"</a> <br>\");\n psLog.println(\"\\n<b>Description</b>:\"+logText+\" \"+ACCESS_OPERATION_CODE.ACCESS_OPERATION_BLOCK_PERMALOCK);\n psLog.println(\"\\n<b> Expected: Block permalock memory Bank\"+\"</b><br>\");\n psLog.println(\"\\n<b> Actual Result is :</b><br>\");\n\n// //access sequence perform.\n// byte[] tp = { (byte)0xBE,(byte)0xDD};\n//\n// accessfilter.TagPatternA.setTagPattern(tp);\n\n reader.Actions.TagAccess.OperationSequence.performSequence(accessfilter, tInfo, antInfo);\n accessComplete.waitOne();\n int successCount[] = new int[1];int failureCount[] = new int[1];\n reader.Actions.TagAccess.getLastAccessResult(successCount, failureCount);\n reader.Actions.TagAccess.OperationSequence.delete(op1);\n if( successCount[0] == 0 )\n {\n psLog.println(\"\\n Test Result :PASS\");\n psResult.println(TestID+\" \"+logText+\" :PASS\");\n\n }\n else\n {\n psLog.println(\"\\n Test Result :FAIL\");\n psResult.println(TestID+\" \"+logText+\" :FAIL\");\n }\n if( ReadMemory() )\n {\n psLog.println(\"\\n Test Result :PASS\");\n psResult.println(TestID+\" \"+logText+\" :PASS\");\n// successCount++;\n }\n else\n {\n psLog.println(\"\\n Test Result :FAIL\");\n psResult.println(TestID+\" \"+logText+\" :FAIL\");\n// failureCount++;\n }\n }\n catch(InvalidUsageException exp)\n {\n System.out.print(\"\\nInvalidUsageException\"+exp.getInfo()+exp.getVendorMessage());\n }\n catch(OperationFailureException exp)\n {\n CleanupPendingSequence();\n System.out.print(\"\\nOperationFailureException\"+exp.getMessage()+exp.getStatusDescription());\n }\n catch(InterruptedException e)\n {\n\n }\n }", "public void uncoverContiguous( int r , int c )\n { \n \n Stack<MineTile> stack = new Stack<MineTile>();\n stack.add(mineField[r][c]);\n \n while(!stack.empty())\n {\n MineTile curTile = stack.pop();\n r = curTile.getRow();\n c = curTile.getCol();\n for(int i = r-1; i <= r+1; i++)\n {\n for(int j = c-1; j <= c+1; j++)\n {\n if(isValid(i, j))\n {\n if(mineField[i][j].isCovered() & mineField[i][j].getCount() == 0)\n {\n stack.add(mineField[i][j]);\n }\n mineField[i][j].uncover();\n }\n \n } \n \n }\n \n }\n }", "public LinearGenomeShrinkMutation(){\n\t\tnumberGenesToRemove = 1;\n\t}", "@Test (timeout=180000)\n public void testDupeStartKey() throws Exception {\n TableName table =\n TableName.valueOf(\"tableDupeStartKey\");\n try {\n setupTable(table);\n assertNoErrors(doFsck(conf, false));\n assertEquals(ROWKEYS.length, countRows());\n\n // Now let's mess it up, by adding a region with a duplicate startkey\n HRegionInfo hriDupe =\n createRegion(tbl.getTableDescriptor(), Bytes.toBytes(\"A\"), Bytes.toBytes(\"A2\"));\n TEST_UTIL.getHBaseCluster().getMaster().assignRegion(hriDupe);\n TEST_UTIL.getHBaseCluster().getMaster().getAssignmentManager()\n .waitForAssignment(hriDupe);\n ServerName server = regionStates.getRegionServerOfRegion(hriDupe);\n TEST_UTIL.assertRegionOnServer(hriDupe, server, REGION_ONLINE_TIMEOUT);\n\n HBaseFsck hbck = doFsck(conf, false);\n assertErrors(hbck, new ERROR_CODE[] { ERROR_CODE.DUPE_STARTKEYS,\n ERROR_CODE.DUPE_STARTKEYS});\n assertEquals(2, hbck.getOverlapGroups(table).size());\n assertEquals(ROWKEYS.length, countRows()); // seems like the \"bigger\" region won.\n\n // fix the degenerate region.\n doFsck(conf,true);\n\n // check that the degenerate region is gone and no data loss\n HBaseFsck hbck2 = doFsck(conf,false);\n assertNoErrors(hbck2);\n assertEquals(0, hbck2.getOverlapGroups(table).size());\n assertEquals(ROWKEYS.length, countRows());\n } finally {\n cleanupTable(table);\n }\n }", "@Test\n public void testInvalidICCSingleChunkBadSequence() throws IOException {\n\n JPEGImageReader reader = createReader();\n reader.setInput(ImageIO.createImageInputStream(getClassLoaderResource(\"/jpeg/invalid-icc-single-chunk-bad-sequence-number.jpg\")));\n\n assertEquals(1772, reader.getWidth(0));\n assertEquals(2126, reader.getHeight(0));\n\n ImageReadParam param = reader.getDefaultReadParam();\n param.setSourceRegion(new Rectangle(reader.getWidth(0), 8));\n\n IIOReadWarningListener warningListener = mock(IIOReadWarningListener.class);\n reader.addIIOReadWarningListener(warningListener);\n\n BufferedImage image = reader.read(0, param);\n\n assertNotNull(image);\n assertEquals(1772, image.getWidth());\n assertEquals(8, image.getHeight());\n\n verify(warningListener).warningOccurred(eq(reader), anyString());\n }", "public synchronized void m6495a(int r6, int r7) throws fr.pcsoft.wdjava.geo.C0918i {\n /* JADX: method processing error */\n/*\nError: jadx.core.utils.exceptions.JadxRuntimeException: Exception block dominator not found, method:fr.pcsoft.wdjava.geo.a.b.a(int, int):void. bs: [B:13:0x001d, B:18:0x0027, B:23:0x0031, B:28:0x003a, B:44:0x005d, B:55:0x006c, B:64:0x0079]\n\tat jadx.core.dex.visitors.regions.ProcessTryCatchRegions.searchTryCatchDominators(ProcessTryCatchRegions.java:86)\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/70807318.run(Unknown Source)\n*/\n /*\n r5 = this;\n r4 = 2;\n r1 = 0;\n r0 = 1;\n monitor-enter(r5);\n r5.m6487e();\t Catch:{ all -> 0x0053 }\n switch(r6) {\n case 2: goto L_0x0089;\n case 3: goto L_0x000a;\n case 4: goto L_0x0013;\n default: goto L_0x000a;\n };\t Catch:{ all -> 0x0053 }\n L_0x000a:\n r0 = f2486z;\t Catch:{ all -> 0x0053 }\n r1 = 3;\t Catch:{ all -> 0x0053 }\n r0 = r0[r1];\t Catch:{ all -> 0x0053 }\n r5.f2488b = r0;\t Catch:{ all -> 0x0053 }\n L_0x0011:\n monitor-exit(r5);\n return;\n L_0x0013:\n r3 = new android.location.Criteria;\t Catch:{ all -> 0x0053 }\n r3.<init>();\t Catch:{ all -> 0x0053 }\n r2 = r7 & 2;\n if (r2 != r4) goto L_0x0058;\n L_0x001c:\n r2 = 1;\n r3.setAccuracy(r2);\t Catch:{ i -> 0x0056 }\n L_0x0020:\n r2 = r7 & 128;\n r4 = 128; // 0x80 float:1.794E-43 double:6.32E-322;\n if (r2 != r4) goto L_0x0065;\n L_0x0026:\n r2 = 3;\n r3.setPowerRequirement(r2);\t Catch:{ i -> 0x0063 }\n L_0x002a:\n r2 = r7 & 8;\n r4 = 8;\n if (r2 != r4) goto L_0x007f;\n L_0x0030:\n r2 = r0;\n L_0x0031:\n r3.setAltitudeRequired(r2);\t Catch:{ i -> 0x0081 }\n r2 = r7 & 4;\n r4 = 4;\n if (r2 != r4) goto L_0x0083;\n L_0x0039:\n r2 = r0;\n L_0x003a:\n r3.setAltitudeRequired(r2);\t Catch:{ i -> 0x0085 }\n r2 = r7 & 16;\n r4 = 16;\n if (r2 != r4) goto L_0x0087;\n L_0x0043:\n r3.setAltitudeRequired(r0);\t Catch:{ all -> 0x0053 }\n r0 = 0;\t Catch:{ all -> 0x0053 }\n r0 = r5.m6485a(r0);\t Catch:{ all -> 0x0053 }\n r1 = 1;\t Catch:{ all -> 0x0053 }\n r0 = r0.getBestProvider(r3, r1);\t Catch:{ all -> 0x0053 }\n r5.f2488b = r0;\t Catch:{ all -> 0x0053 }\n goto L_0x0011;\n L_0x0053:\n r0 = move-exception;\n monitor-exit(r5);\n throw r0;\n L_0x0056:\n r0 = move-exception;\n throw r0;\t Catch:{ all -> 0x0053 }\n L_0x0058:\n r2 = r7 & 1;\n if (r2 != r0) goto L_0x0020;\n L_0x005c:\n r2 = 2;\n r3.setAccuracy(r2);\t Catch:{ i -> 0x0061 }\n goto L_0x0020;\n L_0x0061:\n r0 = move-exception;\n throw r0;\t Catch:{ all -> 0x0053 }\n L_0x0063:\n r0 = move-exception;\t Catch:{ all -> 0x0053 }\n throw r0;\t Catch:{ all -> 0x0053 }\n L_0x0065:\n r2 = r7 & 64;\n r4 = 64;\n if (r2 != r4) goto L_0x0072;\n L_0x006b:\n r2 = 2;\n r3.setPowerRequirement(r2);\t Catch:{ i -> 0x0070 }\n goto L_0x002a;\n L_0x0070:\n r0 = move-exception;\n throw r0;\t Catch:{ all -> 0x0053 }\n L_0x0072:\n r2 = r7 & 32;\n r4 = 32;\n if (r2 != r4) goto L_0x002a;\n L_0x0078:\n r2 = 1;\n r3.setPowerRequirement(r2);\t Catch:{ i -> 0x007d }\n goto L_0x002a;\n L_0x007d:\n r0 = move-exception;\n throw r0;\t Catch:{ all -> 0x0053 }\n L_0x007f:\n r2 = r1;\t Catch:{ all -> 0x0053 }\n goto L_0x0031;\t Catch:{ all -> 0x0053 }\n L_0x0081:\n r0 = move-exception;\t Catch:{ all -> 0x0053 }\n throw r0;\t Catch:{ all -> 0x0053 }\n L_0x0083:\n r2 = r1;\t Catch:{ all -> 0x0053 }\n goto L_0x003a;\t Catch:{ all -> 0x0053 }\n L_0x0085:\n r0 = move-exception;\t Catch:{ all -> 0x0053 }\n throw r0;\t Catch:{ all -> 0x0053 }\n L_0x0087:\n r0 = r1;\t Catch:{ all -> 0x0053 }\n goto L_0x0043;\t Catch:{ all -> 0x0053 }\n L_0x0089:\n r0 = f2486z;\t Catch:{ all -> 0x0053 }\n r1 = 2;\t Catch:{ all -> 0x0053 }\n r0 = r0[r1];\t Catch:{ all -> 0x0053 }\n r5.f2488b = r0;\t Catch:{ all -> 0x0053 }\n goto L_0x0011;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: fr.pcsoft.wdjava.geo.a.b.a(int, int):void\");\n }", "private android.graphics.Bitmap m14713a(com.clevertap.android.sdk.C3072b1 r18, com.clevertap.android.sdk.C3072b1 r19) {\n /*\n r17 = this;\n r0 = r17\n r1 = r18\n r2 = r19\n int[] r10 = r0.f10958m\n r11 = 0\n if (r2 != 0) goto L_0x000e\n java.util.Arrays.fill(r10, r11)\n L_0x000e:\n r12 = 3\n r13 = 2\n r14 = 1\n if (r2 == 0) goto L_0x005e\n int r3 = r2.f10976g\n if (r3 <= 0) goto L_0x005e\n if (r3 != r13) goto L_0x0037\n boolean r3 = r1.f10975f\n if (r3 != 0) goto L_0x002c\n com.clevertap.android.sdk.c1 r3 = r0.f10961p\n int r4 = r3.f11004l\n int[] r5 = r1.f10980k\n if (r5 == 0) goto L_0x0033\n int r3 = r3.f11002j\n int r5 = r1.f10977h\n if (r3 != r5) goto L_0x0033\n goto L_0x0032\n L_0x002c:\n int r3 = r0.f10959n\n if (r3 != 0) goto L_0x0032\n r0.f10969x = r14\n L_0x0032:\n r4 = 0\n L_0x0033:\n r0.m14716a(r10, r2, r4)\n goto L_0x005e\n L_0x0037:\n if (r3 != r12) goto L_0x005e\n android.graphics.Bitmap r3 = r0.f10963r\n if (r3 != 0) goto L_0x0041\n r0.m14716a(r10, r2, r11)\n goto L_0x005e\n L_0x0041:\n int r4 = r2.f10973d\n int r5 = r0.f10966u\n int r9 = r4 / r5\n int r4 = r2.f10971b\n int r7 = r4 / r5\n int r4 = r2.f10972c\n int r8 = r4 / r5\n int r2 = r2.f10970a\n int r6 = r2 / r5\n int r5 = r0.f10968w\n int r2 = r7 * r5\n int r4 = r2 + r6\n r2 = r3\n r3 = r10\n r2.getPixels(r3, r4, r5, r6, r7, r8, r9)\n L_0x005e:\n r17.m14715a(r18)\n int r2 = r1.f10973d\n int r3 = r0.f10966u\n int r2 = r2 / r3\n int r4 = r1.f10971b\n int r4 = r4 / r3\n int r5 = r1.f10972c\n int r5 = r5 / r3\n int r6 = r1.f10970a\n int r6 = r6 / r3\n r3 = 8\n int r7 = r0.f10959n\n if (r7 != 0) goto L_0x0077\n r7 = 1\n goto L_0x0078\n L_0x0077:\n r7 = 0\n L_0x0078:\n r3 = 0\n r8 = 1\n r9 = 8\n L_0x007c:\n if (r11 >= r2) goto L_0x0100\n boolean r15 = r1.f10974e\n if (r15 == 0) goto L_0x0098\n r15 = 4\n if (r3 < r2) goto L_0x0095\n int r8 = r8 + 1\n if (r8 == r13) goto L_0x0094\n if (r8 == r12) goto L_0x0091\n if (r8 == r15) goto L_0x008e\n goto L_0x0095\n L_0x008e:\n r3 = 1\n r9 = 2\n goto L_0x0095\n L_0x0091:\n r3 = 2\n r9 = 4\n goto L_0x0095\n L_0x0094:\n r3 = 4\n L_0x0095:\n int r15 = r3 + r9\n goto L_0x009a\n L_0x0098:\n r15 = r3\n r3 = r11\n L_0x009a:\n int r3 = r3 + r4\n int r12 = r0.f10967v\n if (r3 >= r12) goto L_0x00f0\n int r12 = r0.f10968w\n int r3 = r3 * r12\n int r16 = r3 + r6\n int r13 = r16 + r5\n int r14 = r3 + r12\n if (r14 >= r13) goto L_0x00ad\n int r13 = r3 + r12\n L_0x00ad:\n int r3 = r0.f10966u\n int r12 = r11 * r3\n int r14 = r1.f10972c\n int r12 = r12 * r14\n int r14 = r13 - r16\n int r14 = r14 * r3\n int r14 = r14 + r12\n r3 = r16\n L_0x00bc:\n if (r3 >= r13) goto L_0x00f0\n r19 = r2\n int r2 = r0.f10966u\n r16 = r4\n r4 = 1\n if (r2 != r4) goto L_0x00d2\n byte[] r2 = r0.f10957l\n byte r2 = r2[r12]\n r2 = r2 & 255(0xff, float:3.57E-43)\n int[] r4 = r0.f10946a\n r2 = r4[r2]\n goto L_0x00d8\n L_0x00d2:\n int r2 = r1.f10972c\n int r2 = r0.m14712a(r12, r14, r2)\n L_0x00d8:\n if (r2 == 0) goto L_0x00dd\n r10[r3] = r2\n goto L_0x00e6\n L_0x00dd:\n boolean r2 = r0.f10969x\n if (r2 != 0) goto L_0x00e6\n if (r7 == 0) goto L_0x00e6\n r2 = 1\n r0.f10969x = r2\n L_0x00e6:\n int r2 = r0.f10966u\n int r12 = r12 + r2\n int r3 = r3 + 1\n r2 = r19\n r4 = r16\n goto L_0x00bc\n L_0x00f0:\n r19 = r2\n r16 = r4\n int r11 = r11 + 1\n r2 = r19\n r3 = r15\n r4 = r16\n r12 = 3\n r13 = 2\n r14 = 1\n goto L_0x007c\n L_0x0100:\n boolean r2 = r0.f10964s\n if (r2 == 0) goto L_0x0123\n int r1 = r1.f10976g\n if (r1 == 0) goto L_0x010b\n r2 = 1\n if (r1 != r2) goto L_0x0123\n L_0x010b:\n android.graphics.Bitmap r1 = r0.f10963r\n if (r1 != 0) goto L_0x0115\n android.graphics.Bitmap r1 = r17.m14718q()\n r0.f10963r = r1\n L_0x0115:\n android.graphics.Bitmap r1 = r0.f10963r\n r3 = 0\n int r7 = r0.f10968w\n r5 = 0\n r6 = 0\n int r8 = r0.f10967v\n r2 = r10\n r4 = r7\n r1.setPixels(r2, r3, r4, r5, r6, r7, r8)\n L_0x0123:\n android.graphics.Bitmap r9 = r17.m14718q()\n r3 = 0\n int r7 = r0.f10968w\n r5 = 0\n r6 = 0\n int r8 = r0.f10967v\n r1 = r9\n r2 = r10\n r4 = r7\n r1.setPixels(r2, r3, r4, r5, r6, r7, r8)\n return r9\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.clevertap.android.sdk.C3068a1.m14713a(com.clevertap.android.sdk.b1, com.clevertap.android.sdk.b1):android.graphics.Bitmap\");\n }", "public static void scanDirty(List<Intersection> sections){\n for(int i = 0; i<sections.size(); i++){\n Intersection section = sections.get(i);\n if(section.dirty != 0){\n int startI = i;\n double min = Double.MAX_VALUE;\n for(int j = 0; j<sections.size(); j++){\n if(j == startI){\n continue;\n }\n Intersection other = sections.get(j);\n\n double m = Vector3DOps.mag(Vector3DOps.difference(other.location, section.location));\n if(m < min){\n min = m;\n }\n if( m < Math.abs(section.dirty) ){\n System.out.println(\"should take it: \" + other.dirty);\n //System.out.println(\"removing: \" + i + \", \" + m + \" < \" + section.dirty);\n //System.out.println(\"\\t by: \" + j + \" , \" + other.dirty);\n if(startI > i){\n continue;\n }\n sections.remove(i);\n i--;j--;\n }\n }\n if( startI > i){\n System.out.println(\"removed\");\n } else{\n System.out.println(\"left\");\n }\n }\n }\n\n\n }", "public void fragmentationOccured(ByteBufferWithInfo newFragment) {}", "public boolean[] map(LocusContext context, SAMRecord read) {\n boolean[] errorsPerCycle = new boolean[read.getReadLength() + 1];\n \n byte[] bases = read.getReadBases();\n byte[] contig = context.getReferenceContig().getBases();\n byte[] sq = (byte[]) read.getAttribute(\"SQ\");\n \n int totalMismatches = 0;\n \n for (int cycle = 0, offset = (int) context.getPosition(); cycle < bases.length; cycle++, offset++) {\n byte compBase;\n \n switch (contig[offset]) {\n case 'A':\n case 'a': compBase = 'A'; break;\n case 'C':\n case 'c': compBase = 'C'; break;\n case 'G':\n case 'g': compBase = 'G'; break;\n case 'T':\n case 't': compBase = 'T'; break;\n default: compBase = '.'; break;\n }\n \n if (compBase != '.') {\n if (useNextBestBase) {\n int nextBestBaseIndex = QualityUtils.compressedQualityToBaseIndex(sq[cycle]);\n byte nextBestBase;\n switch (nextBestBaseIndex) {\n case 0: nextBestBase = 'A'; break;\n case 1: nextBestBase = 'C'; break;\n case 2: nextBestBase = 'G'; break;\n case 3: nextBestBase = 'T'; break;\n default: nextBestBase = '.'; break;\n }\n \n if (nextBestBase != '.') {\n errorsPerCycle[cycle] = !(bases[cycle] == compBase || nextBestBase == compBase);\n totalMismatches = (!(bases[cycle] == compBase || nextBestBase == compBase)) ? 1 : 0;\n }\n } else {\n errorsPerCycle[cycle] = !(bases[cycle] == compBase);\n totalMismatches += (!(bases[cycle] == compBase)) ? 1 : 0;\n }\n }\n }\n \n /*\n if (totalMismatches > 4) {\n for (int cycle = 0; cycle < bases.length; cycle++) { System.out.print((char) bases[cycle]); } System.out.print(\"\\n\");\n for (int cycle = 0, offset = (int) context.getPosition(); cycle < bases.length; cycle++, offset++) { System.out.print((char) contig[offset]); } System.out.print(\"\\n\");\n System.out.println(totalMismatches + \"\\n\");\n }\n */\n\n // We encode that we saw a read in the last position of the array.\n // That way we know what to normalize by, and we get thread safety!\n errorsPerCycle[errorsPerCycle.length - 1] = true;\n \n return errorsPerCycle;\n }", "public XnRegion sharedRegion(TracePosition trace) {\n\tthrow new SubclassResponsibilityException();\n/*\nudanax-top.st:9681:OrglRoot methodsFor: 'accessing'!\n{XnRegion} sharedRegion: trace {TracePosition}\n\t\"Return a region for all the stuff in this orgl that can backfollow to trace.\"\n\tself subclassResponsibility!\n*/\n}", "private void checkSurroundingChunks()\n\t{\n\t\tcalculateChunkBounds();\n\n\t\tif (chunkBounds[BOUND_RIGHT] > prevChunkBounds[BOUND_RIGHT]) // +X load\n\t\t{\n\t\t\tfor (int c = prevChunkBounds[BOUND_RIGHT] + 1; c <= chunkBounds[BOUND_RIGHT]; c++)\n\t\t\t{\n\t\t\t\tproject.loadChunkColumn(c, chunkBounds[BOUND_BOTTOM], chunkBounds[BOUND_TOP], true);\n\t\t\t}\n\t\t}\n\t\telse if (chunkBounds[BOUND_RIGHT] < prevChunkBounds[BOUND_RIGHT]) // -X unload\n\t\t{\n\t\t\tfor (int c = prevChunkBounds[BOUND_RIGHT]; c > chunkBounds[BOUND_RIGHT]; c--)\n\t\t\t{\n\t\t\t\tproject.saveChunkColumn(c, chunkBounds[BOUND_BOTTOM], chunkBounds[BOUND_TOP], true, true);\n\t\t\t}\n\t\t}\n\n\t\tif (chunkBounds[BOUND_LEFT] < prevChunkBounds[BOUND_LEFT]) // -X load\n\t\t{\n\t\t\tfor (int c = prevChunkBounds[BOUND_LEFT] - 1; c >= chunkBounds[BOUND_LEFT]; c--)\n\t\t\t{\n\t\t\t\tproject.loadChunkColumn(c, chunkBounds[BOUND_BOTTOM], chunkBounds[BOUND_TOP], true);\n\t\t\t}\n\t\t}\n\t\telse if (chunkBounds[BOUND_LEFT] > prevChunkBounds[BOUND_LEFT]) // +X unload\n\t\t{\n\t\t\tfor (int c = prevChunkBounds[BOUND_LEFT]; c < chunkBounds[BOUND_LEFT]; c++)\n\t\t\t{\n\t\t\t\tproject.saveChunkColumn(c, chunkBounds[BOUND_BOTTOM], chunkBounds[BOUND_TOP], true, true);\n\t\t\t}\n\t\t}\n\n\t\tif (chunkBounds[BOUND_TOP] > prevChunkBounds[BOUND_TOP]) // +Y load\n\t\t{\n\t\t\tfor (int c = prevChunkBounds[BOUND_TOP] + 1; c <= chunkBounds[BOUND_TOP]; c++)\n\t\t\t{\n\t\t\t\tproject.loadChunkRow(c, chunkBounds[BOUND_LEFT], chunkBounds[BOUND_RIGHT], true);\n\t\t\t}\n\t\t}\n\t\telse if (chunkBounds[BOUND_TOP] < prevChunkBounds[BOUND_TOP]) // -Y unload\n\t\t{\n\t\t\tfor (int c = prevChunkBounds[BOUND_TOP]; c > chunkBounds[BOUND_TOP]; c--)\n\t\t\t{\n\t\t\t\tproject.saveChunkRow(c, chunkBounds[BOUND_LEFT], chunkBounds[BOUND_RIGHT], true, true);\n\t\t\t}\n\t\t}\n\n\t\tif (chunkBounds[BOUND_BOTTOM] < prevChunkBounds[BOUND_BOTTOM]) // -Y load\n\t\t{\n\t\t\tfor (int c = prevChunkBounds[BOUND_BOTTOM] - 1; c >= chunkBounds[BOUND_BOTTOM]; c--)\n\t\t\t{\n\t\t\t\tproject.loadChunkRow(c, chunkBounds[BOUND_LEFT], chunkBounds[BOUND_RIGHT], true);\n\t\t\t}\n\t\t}\n\t\telse if (chunkBounds[BOUND_BOTTOM] > prevChunkBounds[BOUND_BOTTOM]) // +Y unload\n\t\t{\n\t\t\tfor (int c = prevChunkBounds[BOUND_BOTTOM]; c < chunkBounds[BOUND_BOTTOM]; c++)\n\t\t\t{\n\t\t\t\tproject.saveChunkRow(c, chunkBounds[BOUND_LEFT], chunkBounds[BOUND_RIGHT], true, true);\n\t\t\t}\n\t\t}\n\n\t\tpersistChunkBounds();\n\t}", "public void prepareForSnapshot() {\n if (readMap != null)\n return;\n\n readMap = new TreeMap<>();\n\n for (Map.Entry<GroupPartitionId, PagesAllocationRange> entry : writeMap.entrySet()) {\n if (!skippedParts.contains(entry.getKey()))\n readMap.put(entry.getKey(), entry.getValue());\n }\n\n skippedParts.clear();\n writeMap.clear();\n }" ]
[ "0.59960264", "0.5826527", "0.5812728", "0.5679325", "0.56472206", "0.5538066", "0.55072904", "0.5425242", "0.5407311", "0.54045165", "0.53943646", "0.53784907", "0.53576726", "0.5304307", "0.52991486", "0.5284393", "0.5239532", "0.522024", "0.5203805", "0.5196874", "0.5195711", "0.5187543", "0.5173772", "0.51690626", "0.51689005", "0.5163528", "0.51535475", "0.51521045", "0.5149782", "0.51479065", "0.5134383", "0.5133848", "0.5129801", "0.51119965", "0.509701", "0.50955844", "0.5094304", "0.50878716", "0.5082077", "0.5079566", "0.50774294", "0.5073275", "0.5064569", "0.5064462", "0.50642186", "0.5059703", "0.5052889", "0.50511837", "0.50362784", "0.50286853", "0.5021402", "0.5010872", "0.49939013", "0.49920452", "0.4972123", "0.49709576", "0.49670166", "0.49665403", "0.49576655", "0.49574444", "0.49531546", "0.49485755", "0.49425393", "0.49347848", "0.4934581", "0.49151996", "0.49146977", "0.49121132", "0.4907385", "0.4903196", "0.49027944", "0.49006766", "0.48988336", "0.4898739", "0.48971096", "0.48831666", "0.48698136", "0.4868536", "0.48653793", "0.48646316", "0.48641258", "0.48607764", "0.48599812", "0.48597342", "0.4853994", "0.48475704", "0.4847362", "0.48442453", "0.48440343", "0.48426005", "0.4831078", "0.4827512", "0.48235554", "0.4821856", "0.4818504", "0.48141426", "0.4809611", "0.47995278", "0.47988254", "0.47959182", "0.4795737" ]
0.0
-1
TODO Autogenerated method stub
public void savePerson() { System.out.println("save person"); }
{ "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
Transfer as List and sort it
public static ArrayList<Entry<String, Double>> sortValue(HashMap<String, Double> t_e_f2){ ArrayList<Map.Entry<String, Double>> l = new ArrayList(t_e_f2.entrySet()); Collections.sort(l, new Comparator<Map.Entry<String, Double>>(){ public int compare(Map.Entry<String, Double> o1, Map.Entry<String, Double> o2) { return o1.getValue().compareTo(o2.getValue()); }}); Collections.reverse(l); // System.out.println(l); return l; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void listSort() {\n\t\tCollections.sort(cd);\n\t}", "protected void sort() {\n\n\t\tCollections.sort(this.myRRList);\n\t}", "public void sort() {\r\n Collections.sort(this.list, this);\r\n }", "public void sort(){\n Collections.sort(list, new SortBySpecies());\n }", "public List<ValueType> sort() {\r\n // TODO\r\n return null;\r\n }", "public SortingAlgorithmResult<E> sort(List<E> l);", "public void sortManlist(){\r\n\t\tCollections.sort(Manlist, new MySort());\r\n\t}", "public static void main(String[] args) {\n sortGeneric list = new sortGeneric();\n list.add(100);\n list.add(7);\n list.add(6);\n list.add(20);\n list.add(1);\n list.add(15);\n System.out.print(\"trc khi sap xep : \");\n for (int i = 0; i < list.size(); i++) {\n System.out.print(list.get(i) + \" \");\n }\n System.out.println();\n list.sort();\n System.out.print(\"sau khi sap xep: \");\n for (int i = 0; i < list.size(); i++) {\n System.out.print(list.get(i) + \" \");\n }\n System.out.println();\n\n\n }", "void sort();", "void sort();", "public void sortToDo(){\n\t\tCollections.sort(allToDoLists);\n\t}", "public void sort() {\n }", "public void sort() {\r\n\t\tCollections.sort(parts);\r\n\t}", "private static void sortingArrayList() {\n Collections.sort(allMapData, new Comparator<MapDataModel>() {\n public int compare(MapDataModel d1, MapDataModel d2) {\n return valueOf(d1.getDateTime().compareTo(d2.getDateTime()));\n }\n });\n }", "public void writeList() {\n\n HeapSort heapSort = new HeapSort();\n heapSort.sort(list);\n\n// QuickSort quickSort = new QuickSort();\n// quickSort.sort(list);\n\n// MergeSort mergeSort = new MergeSort();\n// mergeSort.sortNumbers(list);\n\n System.out.println(\"Result of sorting :\");\n list.stream().forEach(s -> System.out.println(s));\n }", "@Override\n public void sort(List<T> items) {\n }", "public static void sort(java.util.List arg0)\n { return; }", "@Override\n \tpublic void sort() {\n \t\tArrays.sort(data);\n \t}", "private void sortItems(List<Transaction> theList) {\n\t\tloadList(theList);\r\n\t\tCollections.sort(theList, new Comparator<Transaction>() {\r\n\t\t\tpublic int compare(Transaction lhs, Transaction rhs) {\r\n\t\t\t\t// String lhsName = lhs.getName();\r\n\t\t\t\t// String rhsName = rhs.getName();\r\n\r\n\t\t\t\treturn 0;\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t}", "public String doSort();", "public StringList createSorted() {\n StringList list = this.duplicate();\n list.sort();\n return list;\n }", "@Override\n public <T extends Comparable<? super T>> List<T> sort(List<T> list){\n return pool.invoke(new ForkJoinSorter<T>(list));\n }", "static /* synthetic */ List m17132a(List list) throws Exception {\n ArrayList arrayList = new ArrayList(list);\n Collections.sort(arrayList, f15631B0);\n return arrayList;\n }", "public void triCollection(){\r\n Collections.sort(collection);\r\n }", "public void sortObjectList(){\n\t\tint counter = gameObjectsList.size() - 1;\n\t\tif (gameObjectsList == null || gameObjectsList.size() == 0){\n\t\t\treturn;\n\t\t}\n\t\tquicksort(0, counter);\n\t}", "private void sortDateList(List<Date> dateList) {\n Collections.sort(dateList);\n }", "@Test\n public void testSort() {\n initialize();\n var realList = new HighScoreList();\n realList.setList(list);\n realList.sort();\n\n assertEquals(300, realList.getList().get(0).getScore());\n assertEquals(200, realList.getList().get(1).getScore());\n assertEquals(100, realList.getList().get(2).getScore());\n }", "static <T extends Comparable<T>> List<T> sort(List<T> list) {\n\t\tif (list == null || list.size() < 2) {\n\t\t\treturn list;\n\t\t}\n\t\tfor (int i = 1; i < list.size(); i++) {\n\t\t\t// the current is begin from index of 1\n\t\t\tT current = list.get(i);\n\t\t\tint j = i - 1;\n\t\t\tint origin = j;\n\t\t\twhile (j >= 0 && list.get(j).compareTo(current) > 0) {\n\t\t\t\t// insert into the head of the sorted list\n\t\t\t\t// or as the first element into an empty sorted list\n\t\t\t\t// last element of the sorted list\n\t\t\t\t// middle of the list\n\t\t\t\t// insert into middle of the sorted list or as the last element\n\t\t\t\tlist.set(j + 1, list.get(j));\n\t\t\t\tj--;\n\t\t\t}\n\t\t\tlist.set(j + 1, current);\n\t\t\tprintInsertionSortAnimation(list, current, j, origin);\n\t\t\tSystem.out.println();\n\t\t}\n\n\t\treturn list;\n\t}", "public static void sort(ArrayList<Number> list) {\r\n\t\t\t\t\tfor (int i = 0; i < list.size(); i++) {\r\n\t\t\t\t\t\tfor (int j = 0; j < list.size(); j++) {\r\n\t\t\t\t\t\t\t// Ako je vrijadnost elementa na idneksu i manja od vrijednosti\r\n\t\t\t\t\t\t\t// elementa na idneksu j, zamijeni im pozicije.\r\n\t\t\t\t\t\t\tif (list.get(i).doubleValue() < list.get(j).doubleValue()) {\r\n\t\t\t\t\t\t\t\t// Cuvamo elemenat sa drugog indeksa u temp varijabli.\r\n\t\t\t\t\t\t\t\tNumber temp = list.get(j);\r\n\t\t\t\t\t\t\t\t// Kopiramo elemenat sa prvog indeksa preko drugog elementa.\r\n\t\t\t\t\t\t\t\tlist.set(j, list.get(i));\r\n\t\t\t\t\t\t\t\t// Kopiramo temp (drugi elemenat) preko prvog elementa.\r\n\t\t\t\t\t\t\t\tlist.set(i, temp);\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\r\n\t\t}", "public void sort(){\n listOperation.sort(Comparator.comparingInt(Operation::getiStartTime));\n }", "private void sortMedApts(List<MedicationAppointment> medApts2) {\n \t}", "public void sortList() {\n Node3 current = front, index = null;\n student temp;\n\n if(front == null) {\n return;\n }\n else {\n while(current != null) {\n //Node index will point to node next to current\n index = current.getNext();\n\n while(index != null) {\n //If current node's data is greater than index's node data, swap the data between them\n if(current.getData().getRoll()> index.getData().getRoll()) {\n temp = current.getData();\n current.setData(index.getData());\n index.setData(temp);\n }\n index = index.getNext();\n }\n current = current.getNext();\n }\n }\n }", "private List<Integer> sort(List<Integer> list) {\n List<Integer> sorted = new ArrayList<Integer>();\n if (list.size() == 0) {\n return list;\n } else {\n List<Integer> l = new ArrayList<Integer>();\n Integer m = list.get(0);\n List<Integer> h = new ArrayList<Integer>();\n \n for(int i : list.subList(1, list.size())) {\n if (i > m)\n h.add(i);\n else\n l.add(i);\n }\n \n sorted.addAll(sort(l));\n sorted.add(m);\n sorted.addAll(sort(h));\n }\n return sorted;\n }", "public List<SortedArrayInfo> sortHistory();", "public static ArrayList<Process> sortList(ArrayList<Process> in, Process p) {\n\tProcess o1=in.get(0);\n\tint index=0;\n\tfor(int i=1; i<in.size();i++) {\n\t\tif(in.get(i).getCycleTracker()>p.getCycleTracker()) {\n\t\t\tindex=i;\n\t\t}\n\t\telse if(in.get(i).getCycleTracker()<p.getCycleTracker()) {\n\t\t\t//o1=in.get\n\t\t}\n\t\telse if(in.get(i).getCycleTracker()==p.getCycleTracker()){\n\t\t\tif(in.get(i).getA()> p.getA()) {\n\t\t\t\tindex=i;\n\t\t\t}\n\t\t\telse if(in.get(i).getA()==p.getA()) {\n\t\t\t\tif(in.get(i).getID()>p.getID()) {\n\t\t\t\t\tindex=i;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t}\n\t}\n\tin.add(index, p);\n\t\t\n\t\treturn in;\n\t\n}", "private void sort() {\n\t\tCollections.sort(this.entities, comparator);\n\t}", "public static void mySort(ArrayList<Integer> myList)\n {\n\n }", "public void sort(){\n ListNode t, x, b = new ListNode(null, null);\n while (firstNode != null){\n t = firstNode; firstNode = firstNode.nextNode;\n for (x = b; x.nextNode != null; x = x.nextNode) //b is the first node of the new sorted list\n if (cmp.compare(x.nextNode.data, t.data) > 0) break;\n t.nextNode = x.nextNode; x.nextNode = t;\n if (t.nextNode==null) lastNode = t;\n }\n firstNode = b.nextNode;\n }", "public void sort(){\r\n\t\t\t// we pass this doubly linked list's head to merge sort it\r\n\t\t\tthis.head = mergeSort(this.head);\r\n\t\t}", "@Override\n public void sort() {\n for (int i = 0; i < size; i++) {\n for (int j = i + 1; j < size; j++) {\n if (((Comparable) data[i]).compareTo(data[j]) > 0) {\n E c = data[i];\n data[i] = data[j];\n data[j] = c;\n\n }\n }\n }\n }", "public void sortCompetitors(){\n\t\t}", "@Override\r\n\tpublic List<T> sort(List<T> list) {\n\t\tassert list != null : \"list cannot be null\";\r\n\t\tfor(int i = 0; i < list.size() - 1; i ++){\r\n\t\t\tint min = i;\r\n\t\t\tfor(int j = i + 1; j < list.size(); j ++){\r\n\t\t\t\tint current = j;\r\n\t\t\t\tif(this.comparator.compare(list.get(min), list.get(current)) > 0){\r\n\t\t\t\t\tmin = current;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tswap(list, i, min);\r\n\t\t}\r\n\t\treturn list;\r\n\t}", "public void sort() {\n\tqsort(a,0,a.length-1);\n }", "public abstract void sort() throws RemoteException;", "private ArrayList<Task> sortByDate(ArrayList<Task> toSort) {\n ArrayList<Task> sorted = new ArrayList<>();\n\n toSort = removeNoTimeTask(toSort);\n\n int size = toSort.size();\n for (int i = 0; i < size; i++) {\n Date earliest = new Date(Long.MAX_VALUE);\n int earliestIndex = -1;\n for (int j = 0; j < toSort.size(); j++) {\n if (toSort.get(j).getClass().equals(Deadline.class)) {\n Deadline temp = (Deadline) toSort.get(j);\n if (temp.getTime().before(earliest)) {\n earliest = temp.getTime();\n earliestIndex = j;\n }\n } else if (toSort.get(j).getClass().equals(Event.class)) {\n Event temp = (Event) toSort.get(j);\n if (temp.getTime().before(earliest)) {\n earliest = temp.getTime();\n earliestIndex = j;\n }\n } else if (toSort.get(j).getClass().equals(Period.class)) {\n Period temp = (Period) toSort.get(j);\n if (temp.getStart().before(earliest)) {\n earliest = temp.getStart();\n earliestIndex = j;\n }\n }\n }\n\n sorted.add(toSort.get(earliestIndex));\n toSort.remove(earliestIndex);\n }\n return sorted;\n }", "static ArrayList<Card> sortCardArray(ArrayList<Card> c)\n {\n \n \n Collections.sort(c, new CardComparator());\n \n return c;\n }", "static List sort(String[] file){\n\t\tList main = new List();\n\t\t// appends the first item to the new list\n\t\tif(file.length > 0){\n\t\t\tmain.append(0);\t\n\t\t}\n\t\t// loops through input array\n\t\tfor(int i = 1; i<file.length; i++){\n\t\t\tString word = file[i];\n\t\t\tint cursor = i-1;\n\t\t\tmain.moveTo(cursor);\n\t\t\t// loops through each list and checks to see if the value is similar\n\t\t\twhile(cursor>-1 && word.compareTo(file[main.getElement()])<1){\n\t\t\t\tcursor--;\n\t\t\t\tmain.movePrev();\n\t\t\t}\n\t\t\t// if it makes it to the end of the list prepend it to the list, \n\t\t\t// but if it isn't insert it after the current element\n\t\t\tif(main.getIndex() == -1){\n\t\t\t\tmain.prepend(i);\n\t\t\t}else {\n\t\t\t\tmain.insertAfter(i);\n\t\t\t}\n\t\t}\n\t\t// returns the finished list\n\t\treturn main;\n\t}", "@Override\r\n\tpublic void sort() {\r\n\t\tint minpos;\r\n\t\tfor (int i = 0; i < elements.length-1; i++) {\r\n\t\t\tminpos=AuxMethods.minPos(elements, i);\r\n\t\t\telements=AuxMethods.swapElements(elements, i, minpos);\r\n\t\t\t\r\n\t\t}\r\n\t}", "public static void main(String[] args) {\n ArrayList<SortObjects> a = new ArrayList<SortObjects>();\n\n SortObjects o = new SortObjects(\"Latha\", 23, 26000);\n SortObjects o2= new SortObjects(\"Ramya\", 20, 11000);\n SortObjects o3= new SortObjects(\"Kalai\", 29, 30000);\n SortObjects o4= new SortObjects(\"Vidya\", 24, 25000);\n a.add(o);\n a.add(o2);\n a.add(o3);\n a.add(o4);\n SortComparator s = new SortComparator();\n a.sort(s);\n System.out.println(a);\n \n \n\n\t}", "private void sortEntities(){\n for (int i = 1; i < sorted.size; i++) {\n for(int j = i ; j > 0 ; j--){\n \tEntity e1 = sorted.get(j);\n \tEntity e2 = sorted.get(j-1);\n if(getRL(e1) < getRL(e2)){\n sorted.set(j, e2);\n sorted.set(j-1, e1);\n }\n }\n }\n }", "public static ArrayList<JsonNode> sortData(ArrayList<JsonNode> wordList) {\n Collections.sort( wordList, new Comparator<JsonNode>() {\n @Override\n public int compare(JsonNode a, JsonNode b) {\n int valA = Integer.parseInt(a.get(\"weight\").asText());\n int valB = Integer.parseInt(b.get(\"weight\").asText());\n return valB - valA; //Sort in order of largest to smallest\n }\n });\n\n return wordList;\n }", "private void orderList() {\n Iterator<PlanarShape> sort = unorderedList.iterator();\n\n while(sort.hasNext()) {\n orderedList.insertInOrder(sort.next());\n }\n }", "public static InventoryItem[] getSortedInventoryList(){\n InventoryItem[] originalInventoryList = \r\n VikingQuest.getCurrentGame().getItems();\r\n // Clone (make a copy) origionalList\r\n InventoryItem[] inventoryList = originalInventoryList.clone();\r\n \r\n // Using a BubbleSort to sort the list of inventoryList by name\r\n Item tempInventoryItem;\r\n for (int i=0; i<inventoryList.length-1; i++){\r\n for (int j=0; j<inventoryList.length-1-i; j++){\r\n if (inventoryList[j].getType().\r\n compareToIgnoreCase(inventoryList[j + 1].getType()) > 0){\r\n tempItem = inventoryList[j];\r\n inventoryList[j] = inventoryList[j+1];\r\n inventoryList[j+1] = tempItem;\r\n }\r\n }\r\n }\r\n return inventoryList; \r\n }", "public void sortareDesc(List<Autor> autoriList){\n\t\tboolean ok;\t\t\t\t \n\t\tdo { \n\t\t ok = true;\n\t\t for (int i = 0; i < autoriList.size() - 1; i++)\n\t\t if (autoriList.get(i).getNrPublicatii() < autoriList.get(i+1).getNrPublicatii()){ \n\t\t \t Autor aux = autoriList.get(i);\t\t//schimbarea intre autori\n\t\t \t Autor aux1 = autoriList.get(i+1);\t\n\t\t \t try {\n\t\t \t\t \trepo.schimbareAutori(aux,aux1);\n\t\t\t } catch (Exception e) {\n\t\t\t System.out.println(e.getMessage());\n\t\t\t }\n\t\t\t\t ok = false;\n\t\t\t}\n\t\t}\n\t while (!ok);\n\t }", "private List<Doctor> sortList(List<Doctor> l, Comparator<Doctor> c) {\n l.sort(c);\n return l;\n }", "void sortV();", "private static void sortList(ArrayList<ArrayList<Integer>> list){\n for (int i = 0; i < list.size(); i++) {\n for (int j = list.size() - 1; j > i; j--) {\n if ( (getCustomerArrivalTime(list.get(i)) == getCustomerArrivalTime(list.get(j)) && getCustomerIndex(list.get(i)) > getCustomerIndex(list.get(j)))\n || getCustomerArrivalTime(list.get(i)) > getCustomerArrivalTime(list.get(j))) {\n\n ArrayList<Integer> tmp = list.get(i);\n list.set(i,list.get(j)) ;\n list.set(j,tmp);\n }\n }\n }\n }", "public void sort()\n\t{\n\n\n\t\t// Sort the Product Inventory Array List (by Product Name)\n\t\tCollections.sort(myProductInventory);\n\n\n\n\n\t}", "private List<Article> orderArticles(List<Article> things){\n\t\t Comparator<Article> comparatorPrizes = new Comparator<Article>() {\n\t public int compare(Article x, Article y) {\n\t return (int) (x.getPrize() - y.getPrize());\n\t }\n\t };\n\t Collections.sort(things,comparatorPrizes); \n\t Collections.reverse(things);\n\t return things;\n\t }", "public static void main(String[] args) {\n List l = new ArrayList();\r\n\tl.add(Month.SEP);\r\n\tl.add(Month.MAR);\r\n\tl.add(Month.JUN);\r\n\tSystem.out.println(\"\\nList before sort : \\n\" + l);\r\n\tCollections.sort(l);\r\n\tSystem.out.println(\"\\nList after sort : \\n\" + l);\r\n }", "public List<Entry<String, Double>> sort()\n\t{\n\t\tList<Entry<String, Double>> list = new ArrayList<Entry<String, Double>>();\n\t\tfor(Entry<String, Double> entry : map.entrySet())\n\t\t{\n\t\t\tlist.add(entry);\n\t\t}\n\n\t\tComparator<Entry<String, Double>> compare = new Comparator<Entry<String, Double>>() {\n\t @Override\n\t public int compare(Entry<String, Double> first, Entry<String, Double> second)\n\t {\n\t \tif (first.getValue() > second.getValue())\n\t \t{\n\t return -1;\n\t }\n\t if (first.getValue() < second.getValue())\n\t {\n\t return 1;\n\t }\n\t return 0;\n\t }\n\t };\n\n\t Collections.sort(list, compare);\n return list;\n\t}", "public void sort() {\n documents.sort();\n }", "public static Object[] sortAndList() {\n int[] randomArr = randomNum();\n List<Integer> sortList = new ArrayList<Integer>();\n for(int i=0; i < randomArr.length; i++) {\n sortList.add(randomArr[i]);\n \n }\n \n Collections.sort(sortList);\n System.out.println(sortList);\n \n //max\n \n int max = sortList.get(0);\n for(int i=1; i<sortList.size(); i++){\n if (sortList.get(i) > max) {\n max = sortList.get(i);\n }\n }\n System.out.println(\"The maximum number is: \" + max);\n //min\n\n int min = sortList.get(0);\n for(int i=1; i<sortList.size(); i++){\n if (sortList.get(i) < min) {\n min = sortList.get(i);\n }\n }\n System.out.println(\"The minimum number is: \" + min);\n\n return sortList.toArray();\n }", "private static LinkedList<Integer> sortIntList(LinkedList<Integer> list)\n\t{\n\t\t// Sort LinkedList\n\t\tCollections.sort(list, new Comparator<Integer>()\n\t\t{\n\t\t\t @Override\n\t\t\t public int compare(Integer int1, Integer int2)\n\t\t\t {\n\t\t\t if(int1 < int2){\n\t\t\t return -1; \n\t\t\t }\n\t\t\t if(int1 > int2){\n\t\t\t return 1; \n\t\t\t }\n\t\t\t return 0;\n\t\t\t }\n\t\t});\n\t\treturn list;\n\t}", "public static void main(String[] args) {\n List<String> list = new ArrayList<String>();\n list.add(\"sss\");\n list.add(\"uuu\");\n list.add(\"ccc\");\n // Collections.sort(list);\n System.out.println(list);\n }", "public void sortDNAs() {\n DNAs = TLArrayList.sort(DNAs);\n }", "public ArrayList<ArrayList<String>> inputTestListAndSort (ArrayList<ArrayList<String>> testList){\n ArrayList<ArrayList<String>> testList1=new ArrayList<>(testList);\n Collections.sort(testList1, new SubClass_CompareItemsInTheRowsOfTheTimetable_in_TeachingOverlapAndHours());\n return testList1;\n }", "private void sortChanges(List changeList) {\r\n\t\tSortedSet changeSet = new TreeSet(ChangeComparator.INSTANCE);\r\n\t\tchangeSet.addAll(changeList);\r\n\t\tchangeList.clear();\r\n\t\tfor (Iterator iter = changeSet.iterator(); iter.hasNext();) {\r\n\t\t\tchangeList.add(iter.next());\r\n\t\t}\r\n\t}", "public void sort() {\n ListNode start = head;\n ListNode position1;\n ListNode position2;\n\n // Going through each element of the array from the second element to the end\n while (start.next != null) {\n start = start.next;\n position1 = start;\n position2 = position1.previous;\n // Checks if previous is null and keeps swapping elements backwards till there\n // is an element that is bigger than the original element\n while (position2 != null && (position1.data < position2.data)) {\n swap(position1, position2);\n numberComparisons++;\n position1 = position2;\n position2 = position1.previous;\n }\n }\n }", "public static ArrayList<Integer> sortArrayList (ArrayList<Integer> arrList) {\n\t Collections.sort(arrList);\n return arrList;\n}", "public List<E> sort()\n {\n ArrayList<E> answer = new ArrayList<>();\n \n while (root != null)\n {\n if(debug)\n System.out.println(\"root = \" + root);\n answer.add(root.value);\n root = root.promote();\n }\n return answer;\n }", "public void sort() {\n Collections.sort(tasks);\n }", "public void fletteSort(ArrayList<Integer> list) {\n\t\tmergesort(list, 0, list.size() - 1);\n\t}", "public ArrayList<String> sort (ArrayList<String> names) {\n Collections.sort(names);\n // return Arraylist\n return names;\n }", "a(List list) {\n super(1);\n this.$sortedList = list;\n }", "public static void main(String[] args) {\n\t\tint a[]= {4,5,5,5,4,6,9,6,4};\n\t ArrayList<Integer> al=new ArrayList<Integer>();\n\t \n\t for(int i=0;i<a.length;i++)\n\t {\n\t \t al.add(a[i]);\n\t }\n\t al.sort(null);\n\t \n\t System.out.println(al);\n\t}", "public void sort() {\r\n int k = start;\r\n for (int i = 0; i < size - 1; i++) {\r\n int p = (k + 1) % cir.length;\r\n for (int j = i + 1; j < size; j++) {\r\n if ((int) cir[p] < (int) cir[k % cir.length]) {\r\n Object temp = cir[k];\r\n cir[k] = cir[p];\r\n cir[p] = temp;\r\n }\r\n p = (p + 1) % cir.length;\r\n }\r\n k = (k + 1) % cir.length;\r\n }\r\n }", "@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 void sort() {\n\t\tArrays.sort(contactList, 0, contactCounter);\n\t}", "Vector<NewsArticle> insertionSort(Vector<NewsArticle> articles) {\n int i, j;\n int size = articles.size();\n NewsArticle sortedList[] = new NewsArticle[articles.size()];\n\n articles.copyInto(sortedList);\n NewsArticle temp;\n\n for (i = 1; i < size; i++) {\n temp = sortedList[i];\n\n j = i;\n while ((j > 0) && (sortedList[j - 1].getScore(filterType) < temp.getScore(filterType))) {\n sortedList[j] = sortedList[j - 1];\n j = j - 1;\n }\n sortedList[j] = temp;\n }\n Vector<NewsArticle> outList = new Vector<NewsArticle>();\n\n for (i = 0; i < size; i++) {\n temp = sortedList[i];\n outList.addElement(temp);\n }\n return outList;\n }", "public void sort(){\n ArrayList<Card> sortedCards = new ArrayList<Card>();\n ArrayList<Card> reds = new ArrayList<Card>();\n ArrayList<Card> yellows = new ArrayList<Card>();\n ArrayList<Card> greens = new ArrayList<Card>();\n ArrayList<Card> blues = new ArrayList<Card>();\n ArrayList<Card> specials = new ArrayList<Card>();\n for(int i = 0; i < cards.size(); i++){\n if(cards.get(i).getColor() == RED){\n reds.add(cards.get(i));\n }else if(cards.get(i).getColor() == YELLOW){\n yellows.add(cards.get(i));\n }else if(cards.get(i).getColor() == GREEN){\n greens.add(cards.get(i));\n }else if(cards.get(i).getColor() == BLUE){\n blues.add(cards.get(i));\n }else if(cards.get(i).getColor() == ALL){\n specials.add(cards.get(i));\n }\n }\n cards = new ArrayList<Card>();\n for(Card c: reds){\n sortedCards.add(c);\n }\n for(Card c: yellows){\n sortedCards.add(c);\n }\n for(Card c: greens){\n sortedCards.add(c);\n }\n for(Card c: blues){\n sortedCards.add(c);\n }\n for(Card c: specials){\n sortedCards.add(c);\n }\n for(Card c: sortedCards){\n cards.add(c);\n }\n }", "private void sort() {\n ScoreComparator comparator = new ScoreComparator();\n Collections.sort(scores, comparator);\n }", "public static void main(String[] args) {\n ArrayList<String> aList = new ArrayList();\n ArrayList<Integer> numList = new ArrayList();\n aList.add(\"Ram\");//0\n aList.add(\"Shyam\");//1\n aList.add(\"hari\");//2\n aList.add(\"Sita\");//3\n aList.add(\"Ram\");//4\n //System.out.println(aList); //[Ram, Shyam, hari, Sita, Ram]\n// System.out.println(aList.get(1)); //Shyam\n // for(ClassType/VariableType variableName : objectName)\n System.out.println(\"before adding\"); \n System.out.println(aList);\n aList.add(3,\"Ravi\");\n System.out.println(\"after adding\"); \n System.out.println(aList);\n aList.remove(3);\n System.out.println(\"after removing\"); \n System.out.println(aList);\n Collections.sort(aList);\n System.out.println(\"after sorting\");\n System.out.println(aList);\n \n }", "private Integer[] bubbleSortList() {\n\t\tInteger[] localList = new Integer[intList.size()];\n\t\tlocalList = intList.toArray(localList);\n\n\t\tint temp;\n\t\tfor (int i = 5; i >= 0; i--) {\n\t\t\tfor (int j = 0; j < 4; j++) {\n\t\t\t\tif (localList[j] > localList[j + 1]) {\n\t\t\t\t\ttemp = localList[j];\n\t\t\t\t\tlocalList[j] = localList[j + 1];\n\t\t\t\t\tlocalList[j + 1] = temp;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn localList;\n\t}", "private void sortDate()\n {\n for(int i = 0; i < movieList.size(); i++){\n for(int j = 1; j < movieList.size() - i; j++)\n {\n Movie a = movieList.get(j-1);\n Movie b = movieList.get(j);\n int result = a.getReleaseDate().compareTo(b.getReleaseDate());\n if( result < 0)\n {\n movieList.set(j-1, b);\n movieList.set(j, a);\n }\n else if(result == 0)\n {\n result = a.getTitle().compareTo(b.getTitle());\n if(result > 0)\n {\n movieList.set(j-1, b);\n movieList.set(j, a);\n }\n }\n }\n }\n }", "public void sort() {\n /*int jokers = this.getJokers();\n\t\tif (jokers > 0 && this.size() > 2) {\n\t\t\tArrayList<Tile> list = new ArrayList<>();\n for (int i=0; i<this.size(); i++) {\n\t\t\t\tif (this.get(i).getColour() == 'J') {\n\t\t\t\t\tTile joker = this.remove(this.get(i));\n\t\t\t\t\tlist.add(joker);\n\t\t\t\t\ti--;\n\t\t\t\t}\n\t\t\t}\n\t\t\tfor (Tile j : list) {\n\t\t\t\tthis.addInSort(j);\n\t\t\t}\n }*/\n \n\n //may need something in here to accomodate a joker changing its form\n\n if (tiles.size() > 1) { //will only sort a meld with any tiles in it\n //Override default comparator to compare by tile value (ints)\n Collections.sort(tiles, new Comparator<Tile>() {\n @Override \n public int compare(Tile t1, Tile t2) { \n if (t1.getColour() > t2.getColour()) {\n return 1;\n } else if (t1.getColour() < t2.getColour()) {\n return -1;\n }\n if (t1.getValue() > t2.getValue()) {\n return 1;\n } else if (t1.getValue() < t2.getValue()) {\n return -1;\n } else {\n return 0;\n }\n }\n });\n }\n\n }", "public static List<String> sortStringList(List<String> toSort) {\n int elements = toSort.size();\n for (int i = (elements - 1); i > 0; i--) {\n for (int j = 0; j < i; j++) {\n if (toSort.get(j).compareTo(toSort.get(j + 1)) > 0) {\n String inter = toSort.get(j);\n toSort.set(j, toSort.get(j + 1));\n toSort.set(j + 1,inter);\n }\n }\n }\n return toSort;\n }", "public void sort(LinkedList<FlightDetails> myList) {\r\n Collections.sort(myList, new Comparator<FlightDetails>() {\r\n public int compare(FlightDetails f1, FlightDetails f2) {\r\n int fare = (int) (f1.getFare() - f2.getFare());\r\n\r\n\r\n\r\n if (fare == 0) {\r\n return Double.compare(f1.getDuration(), f2.getDuration());\r\n } else {\r\n return fare;\r\n }\r\n }\r\n });\r\n }", "public Set<User> sort(List<User> list) {\n TreeSet result = new TreeSet();\n result.addAll(list);\n\n return result;\n }", "public static List<Integer> sort(List<Integer> input) {\n\t\tif (input.size() < 2)\n\t\t\treturn input;\n\n\t\tint pivot = input.get((input.size() - 1) / 2);\n\t\tList<Integer> less = input.stream().filter(x -> x < pivot).collect(Collectors.toList());\n\t\tList<Integer> greater = input.stream().filter(x -> x > pivot).collect(Collectors.toList());\n\t\tList<Integer> all = new ArrayList<>(sort(less));\n\t\tall.add(pivot);\n\t\tall.addAll(sort(greater));\n\t\treturn all;\n\t}", "@Override\n public void sortCurrentList(FileSortHelper sort) {\n }", "default List<Event> sort(List<Event> events, Comparator<Event> cmp) {\n\t\tCollections.sort(events, cmp);\n\t\treturn events;\n\t}", "public String sortBy();", "public void sortHand(){\n Arrays.sort(Hand);\n }", "public void sort() {\r\n // sort the process variables\r\n Arrays.sort(pvValues, categoryComparator);\r\n fireTableDataChanged();\r\n }", "@Override\r\n\tpublic void addSort() {\n\t\t\r\n\t}", "@Test\n\n public void student_Givenstudentobject_shouldbesorted() {\n Student s1 = new Student(1, \"shivani\", 24);\n Student s2 = new Student(2, \"madhuri\", 25);\n Student s3 = new Student(3, \"neha\", 24);\n Student s4 = new Student(4, \"shivani\", 22);\n Student s5 = new Student(5, \"minal\", 20);\n // list of type students\n ArrayList<Student> al = new ArrayList<Student>();\n al.add(s1);\n al.add(s2);\n al.add(s3);\n al.add(s4);\n al.add(s5);\n // store all list elements in list\n for (int i=0; i<al.size(); i++)\n System.out.println(al.get(i));\n Collections.sort(al, new StudentSorter());\n System.out.println(\"\\nSorted list\");\n for (int i=0; i<al.size(); i++)\n System.out.println(al.get(i));\n }", "public List<User> sortByAllFields(List<User> list) {\n Collections.sort(list, (user1, user2) -> {\n int result;\n result = user1.getName().compareTo(user2.getName());\n if (result == 0) {\n result = user1.getAge() - user2.getAge();\n }\n return result;\n });\n\n return list;\n\n }", "public ArrayList<Stream> sortedList(ArrayList<Stream> streamList) {\n ArrayList<Stream> streamingList = new ArrayList<>();\n ArrayList<Stream> historyList = new ArrayList<>();\n ArrayList<Stream> sortedList = new ArrayList<>();\n\n for (Stream stream : streamList) {\n switch (stream.getType()) {\n case Stream.Type.Streaming:\n streamingList.add(stream);\n break;\n case Stream.Type.History:\n historyList.add(stream);\n break;\n default:\n break;\n }\n }\n\n Collections.sort(streamingList);\n Collections.sort(historyList);\n\n sortedList.addAll(streamingList);\n sortedList.addAll(historyList);\n return sortedList;\n }", "public static void sort(java.util.List arg0, java.util.Comparator arg1)\n { return; }", "private List<Score> order(List<Score> s)\n {\n Collections.sort(s, new Comparator<Score>()\n {\n\n @Override\n public int compare(Score o1, Score o2) {\n // TODO Auto-generated method stub\n\n return o1.getSentId() - o2.getSentId();\n }\n });\n return s;\n }" ]
[ "0.7510931", "0.71441674", "0.710797", "0.7067694", "0.6986124", "0.69752586", "0.69391245", "0.6906628", "0.6903318", "0.6903318", "0.6847043", "0.6822655", "0.67683566", "0.6765436", "0.6764906", "0.67597103", "0.6752885", "0.6740968", "0.6734492", "0.67289084", "0.66695887", "0.6659242", "0.6652609", "0.6635653", "0.6591714", "0.6588395", "0.6570387", "0.65652925", "0.65647316", "0.6561648", "0.65603256", "0.6557104", "0.65524864", "0.6545248", "0.65176284", "0.6514651", "0.6506374", "0.6462027", "0.6456531", "0.64336747", "0.6425726", "0.6417208", "0.6403381", "0.63949686", "0.63926554", "0.63772905", "0.637572", "0.6374498", "0.6374275", "0.6371334", "0.636658", "0.63591504", "0.63567156", "0.6342969", "0.63409024", "0.6327101", "0.63227296", "0.63175696", "0.63150537", "0.6304101", "0.63014734", "0.62949014", "0.62842566", "0.62761706", "0.62682474", "0.62669426", "0.6264667", "0.6264073", "0.62638456", "0.6253168", "0.6246444", "0.624509", "0.62425566", "0.6228223", "0.62257034", "0.6224567", "0.6221901", "0.621681", "0.62079626", "0.6207382", "0.6204777", "0.6202174", "0.619828", "0.61982644", "0.6193822", "0.61842763", "0.618296", "0.61785793", "0.6176725", "0.6161815", "0.61577797", "0.6139759", "0.6133923", "0.61330265", "0.6129246", "0.61285645", "0.6119247", "0.6119043", "0.6118548", "0.6114992", "0.61046576" ]
0.0
-1
initialize at the beginning of each iteration
private void initialize() { for(String key: count_e_f.keySet()){ count_e_f.put(key, 0.0); } for(Integer key: total_f.keySet()){ total_f.put(key, 0.0); } //This code is not efficient. // for(Entry<String, Integer> german : mainIBM.gerWordsIdx.entrySet()){ // for(Entry<String, Integer> english : mainIBM.engWordsIdx.entrySet()){ // count_e_f.put(english.getValue() + "-" + german.getValue(), 0.0); // } // total_f.put(german.getValue(), 0.0); // } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void initialize() {\n counter = 0;\n }", "@Override\n public void initialize() {\n counter = 0;\n }", "private void initialize() {\n first = null;\n last = null;\n size = 0;\n dictionary = new Hashtable();\n }", "@Override public void init_loop() {\n loop_cnt_++;\n }", "public final void initialize() {\n initialize(0);\n }", "private void init() {\n\t\thead = -1;\n\t\tnumElements = 0;\n\t}", "public void initialize() {\n grow(0);\n }", "public void init() {\n for (Point[] p : prev) {\n Arrays.fill(p, null);\n }\n }", "public void resetIteration(){\n\t\titeration = 0;\n\t}", "protected void initialize(int position) {\n iterator = listIterator();\n\n if (position >= 0) {\n for (int i = 0; i <= position; i++) {\n next();\n }\n }\n }", "public void init()\n {\n list = new int[k];\n\n // Initialise my list of integers\n for (int i = 0; i < k; i++) {\n int b = 1;\n while (CommonState.r.nextBoolean())\n b++;\n list[i] = b;\n }\n }", "public static void initNext() { //ініціалізація лічильника нульовим значенням\n next = 0;\n }", "public void init() {\n l0 = new EmptyList();\n l1 = FListInteger.add(l0, new Integer(5));\n l2 = FListInteger.add(l1, new Integer(4));\n l3 = FListInteger.add(l2, new Integer(7));\n l4 = new EmptyList();\n l5 = FListInteger.add(l2, new Integer(7));\n }", "public void init() {\n for (int i = 1; i <= 20; i++) {\n List<Data> dataList = new ArrayList<Data>();\n if (i % 2 == 0 || (1 + i % 10) == _siteIndex) {\n dataList.add(new Data(i, 10 * i));\n _dataMap.put(i, dataList);\n }\n }\n }", "protected void reInitialize() {\n resetCurrent();\n incrementIterCount();\n setFirst(true);\n recoverRunningVersion();\n }", "private ValueIterator()\n {\n currentIndex = 0;\n numberLeft = numberOfEntries;\n }", "public void initialise() \n\t{\n\t\tthis.docids = scoresMap.keys();\n\t\tthis.scores = scoresMap.getValues();\n\t\tthis.occurrences = occurrencesMap.getValues();\t\t\n\t\tresultSize = this.docids.length;\n\t\texactResultSize = this.docids.length;\n\n\t\tscoresMap.clear();\n\t\toccurrencesMap.clear();\n\t\tthis.arraysInitialised = true;\n\t}", "private void initializeStats() {\n for (Stat stat:Stat.values()) {\n stats.put(stat, initialValue);\n }\n }", "public void initialize() {\n final Double optimismRate = new Double(0.0);\n _counts.clear();\n _values.clear();\n\n for (Integer index : Range.closed(0, _armsNo - 1).asSet(DiscreteDomains.integers())) {\n _counts.add(index, optimismRate.intValue());\n _values.add(index, optimismRate);\n }\n }", "public void init() {\n for (int i = 0; i < MAX_SCORES; i++) {\n highScores[i] = 0;\n names[i] = \"---\";\n }\n }", "public void init() {\n\t\tfor (Node node : nodes)\n\t\t\tnode.init();\n\t}", "public void clearInitialize(){\n index=0;\n for(int i =0; i < list.length;i++){\n list[i]=0;\n }\n hasFilled = false;\n\n }", "@Override\n public void initialize() {\n time = 0;\n //noinspection ConstantConditions\n this.runningTasks.addAll(getInitialNode().getTasks());\n for (Node node : nodes) {\n node.initialize();\n }\n }", "public void reset() {\n\t\tinit(0, 0, 1, false);\n\t}", "private\t\tvoid\t\tinitialize()\n\t\t{\n\t\tif (iterateThroughAllLayers && editor.hasLayers())\n\t\t\t{\n\t\t\thasLayers = true;\n\t\t\tif (!startAtTop)\n\t\t\t\tlayerNum = 0;\n\t\t\telse\n\t\t\t\tlayerNum = editor.getNumberOfLayers() - 1;\n\t\t\t\n\t\t\titerator = new MiContainerIterator(\n\t\t\t\teditor.getLayer(layerNum), !startAtTop, \n\t\t\t\titerateIntoPartsOfParts, iterateIntoAttachmentsOfParts);\n\t\t\t}\n\t\telse\n\t\t\t{\n\t\t\titerator = new MiContainerIterator(\n\t\t\t\teditor.getCurrentLayer(), !startAtTop, \n\t\t\t\titerateIntoPartsOfParts, iterateIntoAttachmentsOfParts);\n\t\t\t}\n\t\t}", "public void init() throws IOException {\n restart(scan.getStartRow());\n }", "public void setIteratorBegin() {\n iter = (next > 0 ? 0 : -1);\n }", "private void initialise() {\r\n\t\tfor(int i = 0; i < board.getWidth(); i++) {\r\n\t\t\tfor(int j = 0; j < board.getHeight(); j++) {\r\n\t\t\t\tboard.setSquare(new GridSquare(GridSquare.Type.EMPTY), i, j);\t\r\n\t\t\t}\r\n\t\t}\r\n\t}", "@Override\n\t\tpublic void reset(int iteration) {\n\t\t\t\n\t\t}", "protected void initialize() {\r\n x = 0;\r\n y = 0;\r\n driveTrain.reInit();\r\n }", "public void initialize() {\n\t\tinitialize(seedValue0, seedValue1);\n\t}", "public void init() {\n\t\tfor(int i = 0; i < 5; i++) {\n\t\t\tpageLists.add(new Page(i));\n\t\t}\n\t}", "@Override\r\n\tpublic void initialize() {\n\t\tRandom randomGenerator = new Random();\r\n\t\tthis.size = Helper.getRandomInRange(1, 9, randomGenerator);\r\n\t\tif (this.size % 2 == 0)\r\n\t\t\tthis.size--;\r\n\t}", "public void reset() {\n\t\tthis.count = 0;\n\t}", "private void init() {\n for (Node n : reader.getNodes().values()) {\n da_collegare.add(n);\n valori.put(n, Double.MAX_VALUE);\n precedenti.put(n, null);\n }\n valori.put(start_node, 0.0);\n da_collegare.remove(start_node);\n }", "protected void initialize() {\n \t\n \tstart_time = System.currentTimeMillis();\n \t\n \tgoal = start_time + duration;\n }", "@Override\n\tpublic void reset(int iteration) {\n\n\t}", "private void initValues() {\n \n }", "public void initialize() {\r\n\t\tremoveAllCards();\r\n\t\tfor (int i = 0; i < 4; i++) {\r\n\t\t\tfor (int j = 0; j < 13; j++) {\r\n\t\t\t\tBigTwoCard card = new BigTwoCard(i, j);\r\n\t\t\t\taddCard(card);\r\n\t\t\t}\r\n\t\t}\t\r\n\t}", "private void initialise() {\n \thashFamily = new Hash[this.r];\n for(int i= 0; i < this.r;i++)\n {\n \tthis.hashFamily[i] = new Hash(this.s * 2);\n }\n this.net = new OneSparseRec[this.r][this.s *2];\n for(int i = 0 ; i < this.r; i++)\n \tfor(int j =0 ; j< this.s * 2 ; j++)\n \t\tthis.net[i][j] = new OneSparseRec();\n \n }", "public void init() {\n initLayers();\n for (int i = 0; i < indivCount; i++) {\n ArrayList<Layer> iLayers = new ArrayList<>();\n for (Layer l : layers)\n iLayers.add(l.cloneSettings());\n individuals[i] = new Individual(iLayers);\n }\n }", "@SuppressWarnings(\"unchecked\")\n\t\tvoid init() {\n\t\t\tsetNodes(offHeapService.newArray(JudyIntermediateNode[].class, NODE_SIZE, true));\n\t\t}", "public void initialize() {\n // empty for now\n }", "protected void initialize() {\n\t\tright = left = throttle = turn = forward = 0;\n\t}", "protected void aInit()\n {\n \ta_available=WindowSize;\n \tLimitSeqNo=WindowSize*2;\n \ta_base=1;\n \ta_nextseq=1;\n }", "private void init() {\n clearCaches();\n }", "private void initialize() {\n\t\t\n\t}", "public void reset() {\n\t\tcount = 0;\n\t}", "@Override\n\tpublic void initIterator() {\n\t\tcurrentUser = 0;\n\t}", "void makeZero(){\n nnz = 0;\n for(int i=0; i<this.matrixSize; i++){\n this.rows[i] = new List();\n }\n }", "void initial()\n\t{\n\t\tint i;\n\t\tfor(i=0;i<FoodNumber;i++)\n\t\t{\n\t\tinit(i);\n\t\t}\n\t\tGlobalMin=f[0];\n\t for(i=0;i<D;i++)\n\t GlobalParams[i]=Foods[0][i];\n\n\n\t}", "private void initializeAll() {\n initialize(rows);\n initialize(columns);\n initialize(boxes);\n }", "private void initialize() {\n }", "@Before\n public void init() {\n this.queue.push(\"work1\");\n this.queue.push(\"work2\");\n this.queue.push(\"work3\");\n this.queue.push(\"work4\");\n this.it = queue.iterator();\n }", "@Override\r\n\tprotected void init() {\n\t\tupdateValues();\r\n\t}", "void initialise() {\n this.sleep = false;\n this.owner = this;\n renewNeighbourClusters();\n recalLocalModularity();\n }", "private void init() {\n\n\t}", "private void init() {\n }", "private void initData() {\n\t}", "private void initiliaze() {\r\n\t\tthis.inputFile = cd.getInputFile();\r\n\t\tthis.flowcell = cd.getFlowcell();\r\n\t\tthis.totalNumberOfTicks = cd.getOptions().getTotalNumberOfTicks();\r\n\t\tthis.outputFile = cd.getOutputFile();\r\n\t\tthis.statistics = cd.getStatistic();\r\n\t}", "private void init() {\n }", "private void init() {\n }", "private void init() {\n }", "private void init() {\n }", "private void init() {\n\n\n\n }", "public void reset() {\n initEntries();\n }", "public void initialize() {\r\n\t\tsetValue(initialValue);\r\n\t}", "private void setEverything(){\r\n int listLength = propertyList.length -1;\r\n arrayIterator = new ArrayIterator<>(propertyList, listLength+1);\r\n\r\n this.priceTree = new SearchTree<>(new PriceComparator());\r\n this.stockTree = new SearchTree<>(new StockComparator());\r\n this.ratingTree = new SearchTree<>(new RatingComparator());\r\n this.deliveryTree= new SearchTree<>(new DeliveryTimeComparator());\r\n\r\n this.foodArray = new ArrayQueue<>();\r\n this.restaurantArray = new ArrayQueue<>();\r\n\r\n // Fill arrays from property list.\r\n createFoodArray();\r\n arrayIterator.setCurrent(0); //Since the restaurantArray will use the same iterator\r\n createRestaurantArray();\r\n\r\n // Fill Binary Search Trees\r\n createFoodTrees();\r\n createRestaurantTrees();\r\n }", "public void reset() {\n next = 1000;\n }", "private KeyIterator()\n {\n currentIndex = 0;\n numberLeft = numberOfEntries;\n }", "private void initialize() {\n\n\t\tint totalSets, iSet;\n\t\tInformationSet infoSet = null;\n\t\tTreeNode treeNode = null;\n\n\t\tArrayList informationSetList = efg.getInformationSets(iPlayer);\n\n\t\ttotalSets = informationSetList.size();\n\n\t\tmovesLists = new ArrayList[totalSets];\n\t\tprobsLists = new ArrayList[totalSets];\n\n\t\tfor (iSet = 0; iSet < totalSets; iSet++) {\n\t\t\tmovesLists[iSet] = new ArrayList();\n\t\t\tprobsLists[iSet] = new ArrayList();\n\t\t}\n\n\t\tfor (iSet = 0; iSet < totalSets; iSet++) {\n\t\t\tinfoSet = (InformationSet) informationSetList.get(iSet);\n\t\t\ttreeNode = infoSet.getTreeNode(0);\n\t\t\tmovesLists[iSet] = treeNode.getMovesList();\n\t\t}\n\t}", "private void initialize() {\n\t}", "protected void runBeforeIteration() {}", "protected void reset(){\n inited = false;\n }", "public void init() {\r\n\r\n\t}", "public void init() {\r\n\t\tcards = new ArrayList<Card>();\r\n\t\tfor(Card card : Card.values()) {\r\n\t\t\tcards.add(card);\r\n\t\t}\r\n\t}", "void initLoop(){\n Context c = getContext();\n if (c == null){\n if (getLoop() > 0){\n setContext(new Context());\n initContext(getContext());\n }\n }\n else {\n initContext(getContext());\n }\n }", "public void init()\r\n {\r\n ;\r\n }", "protected void initialize() {\n\t\t//System.out.println(\"Cube collector is spitting\");\n\t}", "public void performInitialisation() {\n \t\t// subclasses can override the behaviour for this method\n \t}", "public void init()\n {\n this.tripDict = new HashMap<String, Set<Trip>>();\n this.routeDict = new HashMap<String, Double>();\n this.tripList = new LinkedList<Trip>();\n this.computeAllPaths();\n this.generateDictionaries();\n }", "protected void initialize() {\n\t\televator.zeroEncoder();\n\t}", "void init(){\n for(int i = 0; i<6; i++){\n counter[i] = 0;\n }\n\n // Initialising all isRecorded and loopExists booleans to false\n for(int j = 0; j<6; j++){\n isRecorded[j] = false;\n loopExists[j] = false;\n }\n\n // Creating a folder where temp loops can be stored\n File file = new File(Environment.getExternalStorageDirectory() + \"/Loop Box/Loops\");\n if(!file.exists()){\n boolean mkdir = file.mkdirs();\n if(!mkdir) {\n Toast.makeText(mContext, \"Directory creattion failed\", Toast.LENGTH_SHORT).show();\n }\n }\n }", "private void SetUp() {\n numbers.add(0);\n numbers.add(1);\n numbers.add(2);\n numbers.add(3);\n numbers.add(4);\n numbers.add(5);\n numbers.add(6);\n numbers.add(7);\n numbers.add(8);\n numbers.add(9);\n\n PuzzleSolve(10, empty, numbers);\n }", "void init() {\r\n \tfor (int i=0; i<SIZE; i++) {\r\n \t\tfor (int j=0; j<LEN; j++) {\r\n \t\t\tif (rnd.nextDouble() < 0.5)\r\n \t\t\t\toldpop[i][j] = 0;\r\n \t\t\telse\r\n \t\t\t\toldpop[i][j] = 1;\r\n \t\t}\r\n \t}\r\n \tfor (int j=0; j<LEN; j++) {\r\n \t\tcbest[j] = oldpop[0][j];\r\n \t}\r\n\t\tbest = fitness(0);\r\n }", "public void init() {\n\t\t}", "private void initData() {\n }", "protected void initialize() {\n \tsetSetpoint(0.0);\n }", "protected void initialize() {\n this.locals = Common.calculateSegmentSize(Common.NUM_CORES);\n this.drvrs = Common.calculateSegmentSize(Common.NUM_CORES);\n reports = new ArrayList<>();\n }", "@Override\r\n public void init_loop() {\r\n }", "@Override\r\n public void init_loop() {\r\n }", "public void reInitialize() {\n\n\t\tthis.myT = buildFromScratch();\n\n\t}", "private void reinit() {\n \tthis.showRowCount = false;\n this.tableCount = 0;\n this.nullString = \"\";\n\t}", "public void initialize() {\r\n }", "void reset() {\n count = 0;\n\n }", "public void reset() {\r\n\t\tfor (int i = 0; i < trees.length; i++)\r\n\t\t\ttrees[i] = new GameTree(i);\r\n\t\tprepare();\r\n\t}", "protected void initialize() { \tthePrintSystem.printWithTimestamp(getClass().getName()); \n\tthis.isDone = false;\n\t\n\ttheLoader.setSetpoint(1.5);\n\t\n }", "protected void aInit()\r\n {\r\n \t\t//state_sender = STATE_WAIT_FOR_CALL_0_FROM_ABOVE;\r\n \t\tpacketBufferAry = new Packet[LimitSeqNo];\r\n \t\twindow_base = FirstSeqNo;\r\n \t\tnext_seq_num = FirstSeqNo;\r\n \t\tSystem.out.println(\"|aInit| : window_base: \"+Integer.toString(window_base));\r\n \t\tSystem.out.println(\"|aInit| : next_seq_num: \"+Integer.toString(next_seq_num)); \t\t\r\n }", "public void init() {\n\r\n\t}", "public void init() {\n\r\n\t}" ]
[ "0.7454756", "0.7454756", "0.7304527", "0.7062571", "0.70592433", "0.7038347", "0.70215166", "0.6905453", "0.68617624", "0.6803858", "0.67966497", "0.67790204", "0.67484206", "0.67482024", "0.6747498", "0.67115295", "0.66847813", "0.66823757", "0.6645919", "0.6636593", "0.65986675", "0.659164", "0.6570555", "0.65682644", "0.6562202", "0.65613997", "0.6552824", "0.653479", "0.65208846", "0.6520742", "0.6520008", "0.6500096", "0.6451256", "0.6448869", "0.6424564", "0.641331", "0.64071435", "0.6406255", "0.63964826", "0.6394159", "0.6392739", "0.6392394", "0.6374619", "0.63635784", "0.6357258", "0.63485104", "0.6346352", "0.63387203", "0.63351613", "0.63208824", "0.6318611", "0.6311339", "0.62996584", "0.6299353", "0.6298868", "0.6298744", "0.6296554", "0.62888294", "0.62883306", "0.6280494", "0.62798977", "0.62798977", "0.62798977", "0.62798977", "0.6279805", "0.6278295", "0.6262576", "0.62609196", "0.6256636", "0.6255962", "0.62538743", "0.62460726", "0.62140894", "0.62136817", "0.6208857", "0.6208384", "0.62051606", "0.62029445", "0.6194929", "0.61924434", "0.6185893", "0.6176877", "0.6176816", "0.61643595", "0.61616343", "0.61555624", "0.6154615", "0.61536497", "0.61504024", "0.6146805", "0.6146805", "0.61467195", "0.6144939", "0.6138287", "0.61372423", "0.6133206", "0.6129836", "0.6123995", "0.6119591", "0.6119591" ]
0.655552
26
esto esta fallando ahora!!
@Test public void testtraerInfoParaCertificado() { Long idDeuda = 1l; String username = "alonsoir"; InfoCertificadoDeuda info = despachoService.traerInfoParaCertificado( idDeuda, username); // LOG.info(info.toString()); Assert.assertNotNull(info); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private static void cajas() {\n\t\t\n\t}", "private void limpiarDatos() {\n\t\t\n\t}", "@Override\r\n\tpublic void hacerSonido() {\n\t\tSystem.out.print(\"miau,miau -- o depende\");\r\n\t\t\r\n\t}", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "@Override\n public void inizializza() {\n\n super.inizializza();\n }", "@Override\n\tpublic void iniciar() {\n\t\t\n\t}", "@Override\n\tvoid geraDados() {\n\n\t}", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "public void verificar_que_se_halla_creado() {\n\t\t\n\t}", "void berechneFlaeche() {\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}", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "public void estiloAcierto() {\r\n\t\t /**Bea y Jose**/\t\t\r\n \r\n\t}", "@Override\n\tpublic void emprestimo() {\n\n\t}", "public void limpiar() {\n\t//txtBuscar.setText(\"\");\n\n\t// codTemporal.setText(\"\");\n\thabilita(true, false, false, false, false, true, false, true, true);\n }", "public void sendeSpielStarten();", "private void inizia() throws Exception {\n }", "public void orina() {\n System.out.println(\"Que bien me quedé! Deposito vaciado.\");\n }", "private void tallennaTiedostoon() {\n viitearkisto.tallenna();\n }", "@Override\r\n\tpublic void dormir() {\n\t\t\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 }", "private void poetries() {\n\n\t}", "private void inizia() throws Exception {\n /* variabili e costanti locali di lavoro */\n\n try { // prova ad eseguire il codice\n } catch (Exception unErrore) { // intercetta l'errore\n Errore.crea(unErrore);\n }// fine del blocco try-catch\n }", "public void aumentarMinas(){\n\r\n if(espM==false){\r\n minascerca++;\r\n }\r\n }", "@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}", "private void remplirUtiliseData() {\n\t}", "@Override\n\tpublic void preparar() {\n\t\tSystem.out.println(\"massa, presunto, queijo, calabreza e cebola\");\n\t\t\n\t}", "@Override\n\tpublic void trabajar() {\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 einkaufen() {\n\t}", "public void introducirhora(){\n int horadespertar; \n }", "@Override\r\n\tpublic void horario() {\n\t\t\r\n\t}", "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 inizia() throws Exception {\n try { // prova ad eseguire il codice\n } catch (Exception unErrore) { // intercetta l'errore\n Errore.crea(unErrore);\n }// fine del blocco try-catch\n }", "public void carroNoAgregado(){\n System.out.println(\"No hay un parqueo para su automovil\");\n }", "@Override\n\tpublic void checkeoDeBateria() {\n\n\t}", "public void jugar_con_el() {\n System.out.println(nombre + \" esta jugando contigo :D\");\n }", "@Override\n public void perish() {\n \n }", "public void atrapar() {\n if( una == false) {\n\t\tif ((app.mouseX > 377 && app.mouseX < 591) && (app.mouseY > 336 && app.mouseY < 382)) {\n\t\t\tint aleotoridad = (int) app.random(0, 4);\n\n\t\t\tif (aleotoridad == 3) {\n\n\t\t\t\tSystem.out.print(\"Lo atrapaste\");\n\t\t\t\tcambioEnemigo = 3;\n\t\t\t\tsuerte = true;\n\t\t\t\tuna = true;\n\t\t\t}\n\t\t\tif (aleotoridad == 1 || aleotoridad == 2 || aleotoridad == 0) {\n\n\t\t\t\tSystem.out.print(\"Mala Suerte\");\n\t\t\t\tcambioEnemigo = 4;\n\t\t\t\tmal = true;\n\t\t\t\tuna = true;\n\t\t\t}\n\n\t\t}\n }\n\t}", "private void peliLoppuuUfojenTuhoamiseen() {\n if (tuhotut == Ufolkm) {\n ingame = false;\n Loppusanat = \"STEVE HOLT!\";\n }\n }", "public void trykkPaa() throws TrykketPaaBombe {\n // Ingenting skal skje dersom en av disse er true;\n if (brettTapt || trykketPaa || flagget) {\n return;\n }\n\n // Om ruten er en bombe taper man brettet\n if (bombe) {\n trykketPaa = true;\n setText(\"x\");\n setBackground(new Background(new BackgroundFill(Color.RED, CornerRadii.EMPTY, Insets.EMPTY)));\n throw new TrykketPaaBombe();\n }\n // Om ruten har null naboer skal et stoerre omraade aapnes\n else if (bombeNaboer == 0) {\n Lenkeliste<Rute> besokt = new Lenkeliste<Rute>();\n Lenkeliste<Rute> aapneDisse = new Lenkeliste<Rute>();\n aapneDisse.leggTil(this);\n // Rekursiv metode som fyller aapneDisse med riktige ruter\n finnAapentOmraade(besokt, aapneDisse);\n for (Rute r : aapneDisse) {\n r.aapne();\n }\n } else {\n aapne();\n }\n }", "public void Ordenamiento() {\n\n\t}", "private void inizia() throws Exception {\n }", "private void inizia() throws Exception {\n }", "private void inizia() throws Exception {\n }", "private void inizia() throws Exception {\n }", "private void inizia() throws Exception {\n }", "public void changerJoueur() {\r\n\t\t\r\n\t}", "private void volverValoresADefault( )\n {\n if( sensorManag != null )\n sensorManag.unregisterListener(sensorListener);\n gameOn=false;\n getWindow().getDecorView().setBackgroundColor(Color.WHITE);\n pantallaEstabaTapada=false;\n ((TextView)findViewById(R.id.txtPredSeg)).setText(\"\");\n segundosTranscurridos=0;\n }", "@Override\r\n public void salir() {\n }", "public void estiloError() {\r\n /**Bea y Jose**/\r\n\t}", "void TaktImpulsAusfuehren ()\n {\n \n wolkebew();\n \n }", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "@Override\n\tpublic void bildir(){\n\t\tif(durum == true){\n\t\t\tSystem.out.println(\"Durum: Acik\");\t\n\t\t}\n\t\telse {\n\t\t\tSystem.out.println(\"Durum: Kapali\");\n\t\t}\n\t\t\n\t}", "public void selecao () {}", "public void llenarInformacion(){\n llenarDetalles();\n llenarLogros();\n }", "@Override\n public void memoria() {\n \n }", "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 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}", "private void inizia() throws Exception {\n this.setMessaggio(\"Addebiti in corso\");\n this.setBreakAbilitato(true);\n }", "public void avvia() {\n /* variabili e costanti locali di lavoro */\n\n try { // prova ad eseguire il codice\n getModuloRisultati().avvia();\n } catch (Exception unErrore) { // intercetta l'errore\n Errore.crea(unErrore);\n }// fine del blocco try-catch\n\n super.avvia();\n\n }", "public void verarbeite() {\n\t\t\r\n\t}", "public void uruchomGre()\n\t{\n\t\tustawPojazdNaPoczatek();\n\t\tplanszaWidokHND.repaint();\n\t\twToku = true;\n\t\tzegar.start();\n\t\tpauza = false;\n\t}", "public void PrepareNextJogada() {\n if (vez == listaJogadores.size() - 1) {\n vez = 0;\n\n } else {\n vez++;\n }\n }", "void entrerAuGarage();", "@Override\n\tpublic void atirou() {\n\n\t\t\tatirou=true;\n\t\t\t\n\t\t\n\t}", "@Override\n public void ejecutarFrame() {\n //INICIAMOS EL HILO\n try{\n Thread.sleep(250);\n }\n catch (InterruptedException ie){\n ie.printStackTrace();\n }\n\n //VAMOS CAMBIANDO EL COLOR DE LAS LETRAS DE LA PANTALLA DE INICIO\n colorLetra = colorLetra == Color.WHITE ? Color.LIGHT_GRAY : Color.WHITE;\n }", "@Override\n\tpublic void coba() {\n\t\t\n\t}", "private void BajarPiezaAlInstante() {\n int newY = posicionY;\r\n while (newY > 0) {\r\n if (!Mover(piezaActual, posicionX, newY - 1)) {\r\n break;\r\n }\r\n --newY;\r\n }\r\n BajarPieza1posicion();\r\n }", "private void inizia() throws Exception {\n /* variabili e costanti locali di lavoro */\n Dati dati;\n\n try { // prova ad eseguire il codice\n\n this.setMessaggio(\"Analisi in corso\");\n this.setBreakAbilitato(true);\n\n /* recupera e registra i dati delle RMP da elaborare */\n dati = getDatiRMP();\n this.setDati(dati);\n\n /* regola il fondo scala dell'operazione */\n this.setMax(dati.getRowCount());\n\n } catch (Exception unErrore) { // intercetta l'errore\n Errore.crea(unErrore);\n }// fine del blocco try-catch\n\n }", "public void baocun() {\n\t\t\n\t}", "private void esqueceu() {\n\n //Declaração de Objetos\n Veterinario veterinario = new Veterinario();\n\n //Declaração de Variaveis\n int crmv;\n String senha;\n\n //Atribuição de Valores\n try {\n crmv = Integer.parseInt(TextCrmv.getText());\n senha = TextSenha.getText();\n \n //Atualizando no Banco\n veterinario.Vdao.atualizarAnimalSenhaPeloCrmv(senha, crmv);\n \n } catch (NumberFormatException ex) {\n JOptionPane.showMessageDialog(null, \"APENAS NUMEROS NO CRMV!\");\n }\n JOptionPane.showMessageDialog(null, \"SUCESSO AO ALTERAR SENHA!\");\n\n }", "public String cargarDatos()\r\n/* 137: */ {\r\n/* 138:163 */ limpiar();\r\n/* 139:164 */ return \"\";\r\n/* 140: */ }", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "public void comenzarDiaLaboral() {\n\t\tSystem.out.println(\"AEROPUERTO: Inicio del dia laboral, se abren los puestos de informe, atención y freeshops al público, el conductor del tren llega a tiempo como siempre\");\n\t\tthis.turnoPuestoDeInforme.release();\n\t\t}", "public void ingresar_a_la_Opcion_de_eventos() {\n\t\t\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 trenneVerbindung();", "public void start() {\n Date dataCorr;\n\n try { // prova ad eseguire il codice\n for (int codConto : codiciConto) {\n quanti++;\n dataCorr = dataInizio;\n while (Lib.Data.isPrecedenteUguale(dataFine, dataCorr)) {\n creaAddebitiGiornoConto(dataCorr, codConto);\n dataCorr = Lib.Data.add(dataCorr, 1);\n\n /* interruzione nella superclasse */\n if (super.isInterrompi()) {\n break;\n }// fine del blocco if\n\n }// fine del blocco while\n }// fine del blocco for\n } catch (Exception unErrore) { // intercetta l'errore\n Errore.crea(unErrore);\n }// fine del blocco try-catch\n\n }", "private void aggiornamento()\n {\n\t gestoreTasti.aggiornamento();\n\t \n\t /*Se lo stato di gioco esiste eseguiamo il suo aggiornamento.*/\n if(Stato.getStato() != null)\n {\n \t Stato.getStato().aggiornamento();\n }\n }", "public void ausgabe() {\n\t\tthis.streamKoordinierung.koordiniereAnhandDerEingabedaten();\n\t\tthis.streamKoordinierung.schreibeEndtextInDatei();\n\t\tSystem.out.println(\"\\n\\nAlles erfolgreich abgelaufen, herzlichen Glueckwunsch!\");\n\t}", "public void anuncio() {\n\n\t\tapp.image(pantallaEncontrado, 197, 115, 300, 150);\n\n\t\tapp.image(botonContinuar, 253, 285);\n\n\t}", "@Override\n\tpublic void verkaufen() {\n\t}", "protected void aktualisieren() {\r\n\r\n\t}", "public void loescheEintrag() {\n\t\tzahl = 0;\n\t\tistEbenenStart = false;\n\t}", "public void cambioLigas(){\n\t\ttry{\n\t\t\tmodelo.updatePartidosEmaitzak(ligasel.getSelectionModel().getSelectedItem().getIdLiga());\n\t\t}catch(ManteniException e){\n\t\t\t\n\t\t}\n\t\t\n\t}", "public void generTirarDados() {\n\r\n\t}", "private void inizia() throws Exception {\n this.setClasse((new ArrayList<Boolean>()).getClass());\n this.setValoreVuoto(null);\n }", "private void inicializarJuego() {\n\t\tList<VerboIrregular> lista = utilService.getVerbosIrregulares(faciles, normales, dificiles);\n\n\t\trealmService.cambiarMostrarRespuestasVerbosIrregulares(lista, false);\n\n\t\tverbosIrregularesDesordenadas.clear();\n\n\t\tfor (VerboIrregular x : lista) {\n\t\t\tverbosIrregularesDesordenadas.add(x);\n\t\t}\n\n\t\tCollections.shuffle(verbosIrregularesDesordenadas);\n\t\t// --------------------------------------------------------------\n\n\t\t//------- Esto es por si el usuario quita una palabra problematica y se resetea el juego\n\t\tif (cantidadItems > verbosIrregularesDesordenadas.size()) {\n\t\t\tcantidadItems = verbosIrregularesDesordenadas.size();\n\t\t}\n\t\t// ---------------------------------------------------------------------------------\n\n\t\tverbosIrregularesDesordenadas = verbosIrregularesDesordenadas.subList(0, cantidadItems);\n\n\t\tindice = 0;\n\t\tsetearTitulo();\n\n\t\tbtRestart.setVisibility(View.INVISIBLE);\n\t\tivCongratulations.setVisibility(View.INVISIBLE);\n\t\tmbNext.setVisibility(View.VISIBLE);\n\t\tbtPrevious.setVisibility(View.INVISIBLE);\n\t\ttvJuegoCantidadPalabras.setVisibility(View.VISIBLE);\n\t\tbtMostrarRespuestaJuego.setVisibility(View.VISIBLE);\n\t\ttvInfinitivo.setVisibility(View.VISIBLE);\n\t\tbtDificultad.setVisibility(View.VISIBLE);\n\t\tlyRespuestaJuego.setVisibility(View.INVISIBLE);\n\t\tbtVolver.setVisibility(View.INVISIBLE);\n\n\t\tsetearTextoArribaYColorDeBoton();\n\t}", "public void sincronizza() {\n boolean abilita;\n\n super.sincronizza();\n\n try { // prova ad eseguire il codice\n\n /* abilitazione bottone Esegui */\n abilita = false;\n if (!Lib.Data.isVuota(this.getDataInizio())) {\n if (!Lib.Data.isVuota(this.getDataFine())) {\n if (Lib.Data.isSequenza(this.getDataInizio(), this.getDataFine())) {\n abilita = true;\n }// fine del blocco if\n }// fine del blocco if\n }// fine del blocco if\n this.getBottoneEsegui().setEnabled(abilita);\n\n } catch (Exception unErrore) { // intercetta l'errore\n Errore.crea(unErrore);\n }// fine del blocco try-catch\n\n }", "private void jogarIa() {\n\t\tia = new IA(this.mapa,false);\r\n\t\tia.inicio();\r\n\t\tthis.usouIa = true;\r\n\t\tatualizarBandeirasIa();//ATUALIZA AS BANDEIRAS PARA DEPOIS QUE ELA JOGOU\r\n\t\tatualizarNumeroBombas();//ATUALIZA O NUMERO DE BOMBAS PARA DPS QUE ELA JOGOU\r\n\t\tatualizarTela();\r\n\t\tif(ia.isTaTudoBem() == false)\r\n\t\t\tJOptionPane.showMessageDialog(this, \"IMPOSSIVEL PROSSEGUIR\", \"IMPOSSIVEL ENCONTRAR CASAS CONCLUSIVAS\", JOptionPane.INFORMATION_MESSAGE);\r\n\t}", "public void pedirValoresCabecera(){\n \r\n \r\n \r\n \r\n }", "protected boolean colaVacia() {\r\n return ini == -1;\r\n }", "@Override\n\tpublic void statusVomMenschen() {\n\t\tSystem.out.println(\"Sie wurden getroffen nun können Sie nicht mehr so schnell laufen!\");\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}", "private void esvaziaMensageiro() {\n\t\tMensageiro.arquivo=null;\n\t\tMensageiro.lingua = linguas.indexOf(lingua);\n\t\tMensageiro.linguas=linguas;\n\t\tMensageiro.nomeArquivo=null;\n\t}", "public void start() {\n\n System.out.println(\"Esto no debe salir por consola al sobreescribirlo\");\n\n }", "public void muere() {\n System.out.println(\"Ugh... Llegó mi hora... Adios.\");\n }" ]
[ "0.6898607", "0.6586228", "0.6437901", "0.6423511", "0.642269", "0.63917273", "0.6385232", "0.6381684", "0.6270706", "0.6164695", "0.61486876", "0.6147099", "0.6133089", "0.6125883", "0.6112931", "0.60996604", "0.60978824", "0.60782474", "0.6051348", "0.60481095", "0.60475963", "0.6021849", "0.60199124", "0.6016424", "0.6003593", "0.59780216", "0.59649086", "0.59540695", "0.59352434", "0.59330165", "0.59330165", "0.5927702", "0.5921323", "0.5920497", "0.59139794", "0.5904518", "0.590251", "0.5901573", "0.58987826", "0.5895131", "0.5891636", "0.587975", "0.5878666", "0.58774173", "0.5874188", "0.5874188", "0.5874188", "0.5874188", "0.5874188", "0.58713424", "0.58694196", "0.5868825", "0.5862647", "0.5851259", "0.5845237", "0.5844953", "0.5842422", "0.58416015", "0.5837391", "0.58211666", "0.58163923", "0.58161455", "0.58082217", "0.5805387", "0.58050436", "0.5800165", "0.5798022", "0.57905114", "0.5784337", "0.57804954", "0.577919", "0.5764427", "0.576402", "0.5752126", "0.5748306", "0.5746615", "0.5743607", "0.57406706", "0.5737883", "0.5737299", "0.57367253", "0.57356924", "0.57306594", "0.5723696", "0.5721956", "0.5715394", "0.57125944", "0.57117134", "0.5710964", "0.5709505", "0.57091963", "0.5705883", "0.5705837", "0.57057375", "0.56983614", "0.5696489", "0.56951004", "0.56951004", "0.56912744", "0.5691036", "0.56903034" ]
0.0
-1
esto esta fallando ahora!!
@Test public void testtraerCertificadosAdmin() { List<DatosDemandaAdmin> lista = despachoService .traerCertificadosAdmin(); Assert.assertNotNull(lista); Assert.assertTrue(lista.size() > 0); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private static void cajas() {\n\t\t\n\t}", "private void limpiarDatos() {\n\t\t\n\t}", "@Override\r\n\tpublic void hacerSonido() {\n\t\tSystem.out.print(\"miau,miau -- o depende\");\r\n\t\t\r\n\t}", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "@Override\n public void inizializza() {\n\n super.inizializza();\n }", "@Override\n\tpublic void iniciar() {\n\t\t\n\t}", "@Override\n\tvoid geraDados() {\n\n\t}", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "public void verificar_que_se_halla_creado() {\n\t\t\n\t}", "void berechneFlaeche() {\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}", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "public void estiloAcierto() {\r\n\t\t /**Bea y Jose**/\t\t\r\n \r\n\t}", "@Override\n\tpublic void emprestimo() {\n\n\t}", "public void limpiar() {\n\t//txtBuscar.setText(\"\");\n\n\t// codTemporal.setText(\"\");\n\thabilita(true, false, false, false, false, true, false, true, true);\n }", "public void sendeSpielStarten();", "private void inizia() throws Exception {\n }", "public void orina() {\n System.out.println(\"Que bien me quedé! Deposito vaciado.\");\n }", "private void tallennaTiedostoon() {\n viitearkisto.tallenna();\n }", "@Override\r\n\tpublic void dormir() {\n\t\t\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 }", "private void poetries() {\n\n\t}", "private void inizia() throws Exception {\n /* variabili e costanti locali di lavoro */\n\n try { // prova ad eseguire il codice\n } catch (Exception unErrore) { // intercetta l'errore\n Errore.crea(unErrore);\n }// fine del blocco try-catch\n }", "public void aumentarMinas(){\n\r\n if(espM==false){\r\n minascerca++;\r\n }\r\n }", "@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}", "private void remplirUtiliseData() {\n\t}", "@Override\n\tpublic void preparar() {\n\t\tSystem.out.println(\"massa, presunto, queijo, calabreza e cebola\");\n\t\t\n\t}", "@Override\n\tpublic void trabajar() {\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 einkaufen() {\n\t}", "public void introducirhora(){\n int horadespertar; \n }", "@Override\r\n\tpublic void horario() {\n\t\t\r\n\t}", "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 inizia() throws Exception {\n try { // prova ad eseguire il codice\n } catch (Exception unErrore) { // intercetta l'errore\n Errore.crea(unErrore);\n }// fine del blocco try-catch\n }", "public void carroNoAgregado(){\n System.out.println(\"No hay un parqueo para su automovil\");\n }", "@Override\n\tpublic void checkeoDeBateria() {\n\n\t}", "public void jugar_con_el() {\n System.out.println(nombre + \" esta jugando contigo :D\");\n }", "@Override\n public void perish() {\n \n }", "public void atrapar() {\n if( una == false) {\n\t\tif ((app.mouseX > 377 && app.mouseX < 591) && (app.mouseY > 336 && app.mouseY < 382)) {\n\t\t\tint aleotoridad = (int) app.random(0, 4);\n\n\t\t\tif (aleotoridad == 3) {\n\n\t\t\t\tSystem.out.print(\"Lo atrapaste\");\n\t\t\t\tcambioEnemigo = 3;\n\t\t\t\tsuerte = true;\n\t\t\t\tuna = true;\n\t\t\t}\n\t\t\tif (aleotoridad == 1 || aleotoridad == 2 || aleotoridad == 0) {\n\n\t\t\t\tSystem.out.print(\"Mala Suerte\");\n\t\t\t\tcambioEnemigo = 4;\n\t\t\t\tmal = true;\n\t\t\t\tuna = true;\n\t\t\t}\n\n\t\t}\n }\n\t}", "private void peliLoppuuUfojenTuhoamiseen() {\n if (tuhotut == Ufolkm) {\n ingame = false;\n Loppusanat = \"STEVE HOLT!\";\n }\n }", "public void trykkPaa() throws TrykketPaaBombe {\n // Ingenting skal skje dersom en av disse er true;\n if (brettTapt || trykketPaa || flagget) {\n return;\n }\n\n // Om ruten er en bombe taper man brettet\n if (bombe) {\n trykketPaa = true;\n setText(\"x\");\n setBackground(new Background(new BackgroundFill(Color.RED, CornerRadii.EMPTY, Insets.EMPTY)));\n throw new TrykketPaaBombe();\n }\n // Om ruten har null naboer skal et stoerre omraade aapnes\n else if (bombeNaboer == 0) {\n Lenkeliste<Rute> besokt = new Lenkeliste<Rute>();\n Lenkeliste<Rute> aapneDisse = new Lenkeliste<Rute>();\n aapneDisse.leggTil(this);\n // Rekursiv metode som fyller aapneDisse med riktige ruter\n finnAapentOmraade(besokt, aapneDisse);\n for (Rute r : aapneDisse) {\n r.aapne();\n }\n } else {\n aapne();\n }\n }", "public void Ordenamiento() {\n\n\t}", "private void inizia() throws Exception {\n }", "private void inizia() throws Exception {\n }", "private void inizia() throws Exception {\n }", "private void inizia() throws Exception {\n }", "private void inizia() throws Exception {\n }", "public void changerJoueur() {\r\n\t\t\r\n\t}", "private void volverValoresADefault( )\n {\n if( sensorManag != null )\n sensorManag.unregisterListener(sensorListener);\n gameOn=false;\n getWindow().getDecorView().setBackgroundColor(Color.WHITE);\n pantallaEstabaTapada=false;\n ((TextView)findViewById(R.id.txtPredSeg)).setText(\"\");\n segundosTranscurridos=0;\n }", "@Override\r\n public void salir() {\n }", "public void estiloError() {\r\n /**Bea y Jose**/\r\n\t}", "void TaktImpulsAusfuehren ()\n {\n \n wolkebew();\n \n }", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "@Override\n\tpublic void bildir(){\n\t\tif(durum == true){\n\t\t\tSystem.out.println(\"Durum: Acik\");\t\n\t\t}\n\t\telse {\n\t\t\tSystem.out.println(\"Durum: Kapali\");\n\t\t}\n\t\t\n\t}", "public void llenarInformacion(){\n llenarDetalles();\n llenarLogros();\n }", "public void selecao () {}", "@Override\n public void memoria() {\n \n }", "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 }", "private void inizia() throws Exception {\n this.setMessaggio(\"Addebiti in corso\");\n this.setBreakAbilitato(true);\n }", "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 avvia() {\n /* variabili e costanti locali di lavoro */\n\n try { // prova ad eseguire il codice\n getModuloRisultati().avvia();\n } catch (Exception unErrore) { // intercetta l'errore\n Errore.crea(unErrore);\n }// fine del blocco try-catch\n\n super.avvia();\n\n }", "public void uruchomGre()\n\t{\n\t\tustawPojazdNaPoczatek();\n\t\tplanszaWidokHND.repaint();\n\t\twToku = true;\n\t\tzegar.start();\n\t\tpauza = false;\n\t}", "public void verarbeite() {\n\t\t\r\n\t}", "public void PrepareNextJogada() {\n if (vez == listaJogadores.size() - 1) {\n vez = 0;\n\n } else {\n vez++;\n }\n }", "void entrerAuGarage();", "@Override\n\tpublic void atirou() {\n\n\t\t\tatirou=true;\n\t\t\t\n\t\t\n\t}", "@Override\n public void ejecutarFrame() {\n //INICIAMOS EL HILO\n try{\n Thread.sleep(250);\n }\n catch (InterruptedException ie){\n ie.printStackTrace();\n }\n\n //VAMOS CAMBIANDO EL COLOR DE LAS LETRAS DE LA PANTALLA DE INICIO\n colorLetra = colorLetra == Color.WHITE ? Color.LIGHT_GRAY : Color.WHITE;\n }", "@Override\n\tpublic void coba() {\n\t\t\n\t}", "private void BajarPiezaAlInstante() {\n int newY = posicionY;\r\n while (newY > 0) {\r\n if (!Mover(piezaActual, posicionX, newY - 1)) {\r\n break;\r\n }\r\n --newY;\r\n }\r\n BajarPieza1posicion();\r\n }", "private void inizia() throws Exception {\n /* variabili e costanti locali di lavoro */\n Dati dati;\n\n try { // prova ad eseguire il codice\n\n this.setMessaggio(\"Analisi in corso\");\n this.setBreakAbilitato(true);\n\n /* recupera e registra i dati delle RMP da elaborare */\n dati = getDatiRMP();\n this.setDati(dati);\n\n /* regola il fondo scala dell'operazione */\n this.setMax(dati.getRowCount());\n\n } catch (Exception unErrore) { // intercetta l'errore\n Errore.crea(unErrore);\n }// fine del blocco try-catch\n\n }", "public void baocun() {\n\t\t\n\t}", "private void esqueceu() {\n\n //Declaração de Objetos\n Veterinario veterinario = new Veterinario();\n\n //Declaração de Variaveis\n int crmv;\n String senha;\n\n //Atribuição de Valores\n try {\n crmv = Integer.parseInt(TextCrmv.getText());\n senha = TextSenha.getText();\n \n //Atualizando no Banco\n veterinario.Vdao.atualizarAnimalSenhaPeloCrmv(senha, crmv);\n \n } catch (NumberFormatException ex) {\n JOptionPane.showMessageDialog(null, \"APENAS NUMEROS NO CRMV!\");\n }\n JOptionPane.showMessageDialog(null, \"SUCESSO AO ALTERAR SENHA!\");\n\n }", "public String cargarDatos()\r\n/* 137: */ {\r\n/* 138:163 */ limpiar();\r\n/* 139:164 */ return \"\";\r\n/* 140: */ }", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "public void comenzarDiaLaboral() {\n\t\tSystem.out.println(\"AEROPUERTO: Inicio del dia laboral, se abren los puestos de informe, atención y freeshops al público, el conductor del tren llega a tiempo como siempre\");\n\t\tthis.turnoPuestoDeInforme.release();\n\t\t}", "public void ingresar_a_la_Opcion_de_eventos() {\n\t\t\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 start() {\n Date dataCorr;\n\n try { // prova ad eseguire il codice\n for (int codConto : codiciConto) {\n quanti++;\n dataCorr = dataInizio;\n while (Lib.Data.isPrecedenteUguale(dataFine, dataCorr)) {\n creaAddebitiGiornoConto(dataCorr, codConto);\n dataCorr = Lib.Data.add(dataCorr, 1);\n\n /* interruzione nella superclasse */\n if (super.isInterrompi()) {\n break;\n }// fine del blocco if\n\n }// fine del blocco while\n }// fine del blocco for\n } catch (Exception unErrore) { // intercetta l'errore\n Errore.crea(unErrore);\n }// fine del blocco try-catch\n\n }", "public void trenneVerbindung();", "private void aggiornamento()\n {\n\t gestoreTasti.aggiornamento();\n\t \n\t /*Se lo stato di gioco esiste eseguiamo il suo aggiornamento.*/\n if(Stato.getStato() != null)\n {\n \t Stato.getStato().aggiornamento();\n }\n }", "public void ausgabe() {\n\t\tthis.streamKoordinierung.koordiniereAnhandDerEingabedaten();\n\t\tthis.streamKoordinierung.schreibeEndtextInDatei();\n\t\tSystem.out.println(\"\\n\\nAlles erfolgreich abgelaufen, herzlichen Glueckwunsch!\");\n\t}", "public void anuncio() {\n\n\t\tapp.image(pantallaEncontrado, 197, 115, 300, 150);\n\n\t\tapp.image(botonContinuar, 253, 285);\n\n\t}", "@Override\n\tpublic void verkaufen() {\n\t}", "protected void aktualisieren() {\r\n\r\n\t}", "public void loescheEintrag() {\n\t\tzahl = 0;\n\t\tistEbenenStart = false;\n\t}", "public void cambioLigas(){\n\t\ttry{\n\t\t\tmodelo.updatePartidosEmaitzak(ligasel.getSelectionModel().getSelectedItem().getIdLiga());\n\t\t}catch(ManteniException e){\n\t\t\t\n\t\t}\n\t\t\n\t}", "public void generTirarDados() {\n\r\n\t}", "private void inicializarJuego() {\n\t\tList<VerboIrregular> lista = utilService.getVerbosIrregulares(faciles, normales, dificiles);\n\n\t\trealmService.cambiarMostrarRespuestasVerbosIrregulares(lista, false);\n\n\t\tverbosIrregularesDesordenadas.clear();\n\n\t\tfor (VerboIrregular x : lista) {\n\t\t\tverbosIrregularesDesordenadas.add(x);\n\t\t}\n\n\t\tCollections.shuffle(verbosIrregularesDesordenadas);\n\t\t// --------------------------------------------------------------\n\n\t\t//------- Esto es por si el usuario quita una palabra problematica y se resetea el juego\n\t\tif (cantidadItems > verbosIrregularesDesordenadas.size()) {\n\t\t\tcantidadItems = verbosIrregularesDesordenadas.size();\n\t\t}\n\t\t// ---------------------------------------------------------------------------------\n\n\t\tverbosIrregularesDesordenadas = verbosIrregularesDesordenadas.subList(0, cantidadItems);\n\n\t\tindice = 0;\n\t\tsetearTitulo();\n\n\t\tbtRestart.setVisibility(View.INVISIBLE);\n\t\tivCongratulations.setVisibility(View.INVISIBLE);\n\t\tmbNext.setVisibility(View.VISIBLE);\n\t\tbtPrevious.setVisibility(View.INVISIBLE);\n\t\ttvJuegoCantidadPalabras.setVisibility(View.VISIBLE);\n\t\tbtMostrarRespuestaJuego.setVisibility(View.VISIBLE);\n\t\ttvInfinitivo.setVisibility(View.VISIBLE);\n\t\tbtDificultad.setVisibility(View.VISIBLE);\n\t\tlyRespuestaJuego.setVisibility(View.INVISIBLE);\n\t\tbtVolver.setVisibility(View.INVISIBLE);\n\n\t\tsetearTextoArribaYColorDeBoton();\n\t}", "private void inizia() throws Exception {\n this.setClasse((new ArrayList<Boolean>()).getClass());\n this.setValoreVuoto(null);\n }", "private void jogarIa() {\n\t\tia = new IA(this.mapa,false);\r\n\t\tia.inicio();\r\n\t\tthis.usouIa = true;\r\n\t\tatualizarBandeirasIa();//ATUALIZA AS BANDEIRAS PARA DEPOIS QUE ELA JOGOU\r\n\t\tatualizarNumeroBombas();//ATUALIZA O NUMERO DE BOMBAS PARA DPS QUE ELA JOGOU\r\n\t\tatualizarTela();\r\n\t\tif(ia.isTaTudoBem() == false)\r\n\t\t\tJOptionPane.showMessageDialog(this, \"IMPOSSIVEL PROSSEGUIR\", \"IMPOSSIVEL ENCONTRAR CASAS CONCLUSIVAS\", JOptionPane.INFORMATION_MESSAGE);\r\n\t}", "public void sincronizza() {\n boolean abilita;\n\n super.sincronizza();\n\n try { // prova ad eseguire il codice\n\n /* abilitazione bottone Esegui */\n abilita = false;\n if (!Lib.Data.isVuota(this.getDataInizio())) {\n if (!Lib.Data.isVuota(this.getDataFine())) {\n if (Lib.Data.isSequenza(this.getDataInizio(), this.getDataFine())) {\n abilita = true;\n }// fine del blocco if\n }// fine del blocco if\n }// fine del blocco if\n this.getBottoneEsegui().setEnabled(abilita);\n\n } catch (Exception unErrore) { // intercetta l'errore\n Errore.crea(unErrore);\n }// fine del blocco try-catch\n\n }", "public void pedirValoresCabecera(){\n \r\n \r\n \r\n \r\n }", "protected boolean colaVacia() {\r\n return ini == -1;\r\n }", "@Override\n\tpublic void statusVomMenschen() {\n\t\tSystem.out.println(\"Sie wurden getroffen nun können Sie nicht mehr so schnell laufen!\");\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}", "private void esvaziaMensageiro() {\n\t\tMensageiro.arquivo=null;\n\t\tMensageiro.lingua = linguas.indexOf(lingua);\n\t\tMensageiro.linguas=linguas;\n\t\tMensageiro.nomeArquivo=null;\n\t}", "public void start() {\n\n System.out.println(\"Esto no debe salir por consola al sobreescribirlo\");\n\n }", "public void muere() {\n System.out.println(\"Ugh... Llegó mi hora... Adios.\");\n }" ]
[ "0.68987685", "0.65863866", "0.6438103", "0.6423337", "0.6422485", "0.6391242", "0.638527", "0.63813406", "0.6270209", "0.6164746", "0.61485654", "0.6147903", "0.61329186", "0.6125462", "0.61127406", "0.6100454", "0.60980165", "0.60779715", "0.60517466", "0.6048581", "0.6047331", "0.602224", "0.6020435", "0.60170615", "0.60027915", "0.59778345", "0.596444", "0.59544617", "0.5935375", "0.59330803", "0.59330803", "0.5927212", "0.59212446", "0.5920406", "0.5914553", "0.59048396", "0.5901906", "0.590151", "0.589867", "0.58946484", "0.5891659", "0.5880335", "0.58787256", "0.5877229", "0.5873862", "0.5873862", "0.5873862", "0.5873862", "0.5873862", "0.5871064", "0.58699477", "0.5868425", "0.58627087", "0.5851437", "0.5845479", "0.58451474", "0.5842299", "0.5841576", "0.583703", "0.58220065", "0.58166796", "0.5816383", "0.5808571", "0.58053386", "0.58050734", "0.5799996", "0.5797582", "0.5790354", "0.5784627", "0.5780206", "0.57792073", "0.5764862", "0.5763593", "0.5752491", "0.57481533", "0.5746249", "0.57445145", "0.5741319", "0.5738241", "0.5737258", "0.5737186", "0.5735223", "0.57311064", "0.5724589", "0.5721568", "0.5715191", "0.5712409", "0.5712083", "0.5711269", "0.5710412", "0.57095677", "0.570656", "0.57058907", "0.570543", "0.5698201", "0.56969565", "0.5694831", "0.5694831", "0.5692121", "0.56911457", "0.5690659" ]
0.0
-1
Handles requests to home page
@RequestMapping("/") public String home(ModelMap modelMap) { List<Gif> allGifs = gifRepo.getAllGifs(); modelMap.put("gifs", allGifs); return "home"; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@RequestMapping(value = \"home.do\", method = RequestMethod.GET)\n public String getHome(HttpServletRequest request, Model model) {\n logger.debug(\"Home page Controller:\");\n return \"common/home\";\n }", "@RequestMapping(value = \"/\")\r\n\tpublic ModelAndView home(HttpServletRequest request,\r\n\t\t\tHttpServletResponse response) throws IOException {\r\n\t\tSystem.out.println(\"------------ redirecting to home page -------------\");\r\n\t\tList<Employee> employees = dao.getEmployees();\r\n\t\trequest.setAttribute(\"employees\", employees);\r\n\t\treturn new ModelAndView(\"home\");\r\n\t}", "@RequestMapping(value = \"/home\", method = RequestMethod.GET)\n\tpublic String openhomePage() {\n/*\t\tlogger.debug(\"Inside Instruction page\");\n*/\t\treturn \"home\";\n\t}", "@RequestMapping(value = {\"/\", \"/home\"}, method = RequestMethod.GET)\n public String goHome(ModelMap model) {\n model.addAttribute(\"loggedinuser\", appService.getPrincipal());\n model.addAttribute(\"pagetitle\", \"Pand-Eco\");\n return \"view_landing_page\";\n }", "@RequestMapping(\"/\")\n\tpublic String homePage() {\n\t\tlogger.info(\"Index Page Loaded\");\n\t\treturn \"index\";\n\t}", "@RequestMapping(\"home\")\n public String loadHomePage( HttpServletRequest request, final HttpServletResponse response, Model model ) {\n response.setHeader( \"Cache-Control\", \"max-age=0, no-cache, no-store\" );\n\n // Get the title of the application in the request's locale\n model.addAttribute( \"title\", webapp.getMessage( \"webapp.subtitle\", null, request.getLocale() ) );\n\n return \"home\";\n }", "@GetMapping\n\tpublic String home() {\n\t\tSystem.out.println(\"Index page\");\n\t\treturn \"redirect:index.jsp\";\n\t}", "public void home_index()\n {\n Home.index(homer);\n }", "public static Result home() {\n Skier loggedInSkier = Session.authenticateSession(request().cookie(COOKIE_NAME));\n if(loggedInSkier==null)\n return redirect(\"/\");\n else\n return renderHome(loggedInSkier);\n }", "@RequestMapping(value = {\"/\", \"/homepage\"}, method = RequestMethod.GET)\n public String homePage(ModelMap model) {\n model.addAttribute(LOGGED_USER, userService.getPrincipal());\n return HOMEPAGE;\n }", "private void home(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\t\tresponse.sendRedirect(\"/WebBuyPhone/admin/darkboard.jsp\");\n\t}", "@GetMapping(\"/\")\n\tpublic String showHomePage() {\n\t\treturn \"home\";\n\t}", "@RequestMapping(value=\"/\", method=RequestMethod.GET)\n\tpublic String home() {\n\t\tlogger.info(\"Welcome home!\");\n\t\treturn \"home\";\n\t}", "protected void displayHome(HttpServletRequest request, HttpServletResponse response)\r\n\t\t\tthrows ServletException, IOException {\n\t\tArticleDAO articleDAO = ArticleDAO.getInstance();\r\n\r\n\t\t// Getting all the articles as a list\r\n\t\tList<Article> listOfArticles = articleDAO.getAll();\r\n\r\n\t\trequest.setAttribute(\"Articles\", listOfArticles);\r\n\r\n\t\tRequestDispatcher dispatcher = getServletContext().getRequestDispatcher(\"/home.jsp\");\r\n\t\tdispatcher.forward(request, response);\r\n\t}", "@RequestMapping(value = \"/home\")\n\tpublic String home() {\t\n\t\treturn \"index\";\n\t}", "@RequestMapping(value = \"/\", method = RequestMethod.GET)\n\n\t public String home()\n\t {\n\t return \"welcome\";\n\t }", "@RequestMapping(value = \"/\", method = RequestMethod.GET)\n\tpublic String home() {\n\t\treturn \"home\";\n\t}", "@RequestMapping(value = \"/\", method = RequestMethod.GET)\n\tpublic String home(Model model) {\n\t\t// logger.info(\"Welcome home! The client locale is {}.\", locale);\n\t\treturn \"home\";\n\t}", "private void back_home(HttpServletRequest request, HttpServletResponse response) throws IOException {\n\t\tresponse.sendRedirect(\"restaurant\");\n\t\treturn;\n\t}", "@Override\r\n\tpublic String executa(HttpServletRequest req, HttpServletResponse res) throws Exception {\n\t\treturn \"view/home.html\";\r\n\t}", "@Override\n protected ModelAndView handleRequestInternal(final HttpServletRequest\n request, final HttpServletResponse response) throws Exception {\n log.trace(\"Entering handleRequestInternal\");\n\n ModelAndView mav = new ModelAndView(\"home\");\n\n log.trace(\"Leaving handleRequestInternal\");\n return mav;\n }", "@RequestMapping(value=\"/\")\r\npublic ModelAndView homePage(ModelAndView model) throws IOException\r\n{\r\n\tmodel.setViewName(\"home\");\r\n\treturn model;\r\n}", "@RequestMapping(value = \"/homed\", method = RequestMethod.GET)\r\n public String homeDebug(HttpServletRequest request, ModelMap model) throws ServletException, IOException { \r\n return(renderPage(request, model, \"home\", null, null, null, true)); \r\n }", "@RequestMapping(value = {\"/\", \"/home\", \"/index\"})\n public ModelAndView index(Principal principal) {\n String userName = \"Guest\";\n if (principal != null) {\n userName = principal.getName();\n }\n logger.info(userName + \" entering method index()\");\n\n ModelAndView mav = new ModelAndView(\"master\");\n mav.addObject(\"title\", \"Home\");\n mav.addObject(\"stations\", stationService.getAllStations());\n mav.addObject(\"userClickHome\", true);\n return mav;\n }", "public void angelHomePage()\r\n\t{\r\n\t\tResultUtil.report(\"INFO\", \"AngelHomePage > angelHomePage\", driver);\r\n\t\tswitchFrameToAngelContent();\r\n\t\tif(Element.verify(\"Logged in Message\", driver, \"XPATH\", \"//span[@class='pageTitleSpan' and text()='Home']\"))\r\n\t\t{\r\n\t\t\tResultUtil.report(\"PASS\", \"Successfully logged in\", driver);\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\tResultUtil.report(\"FAIL\", \"Login failed\", driver);\r\n\t\t}\t\t\r\n\t}", "public void goHome();", "@GetMapping(\"/home\")\n\t//@ResponseBody\n\tpublic String home()\n\t{\n\t\treturn\"/first/home\";\n\t}", "public String processHomePage() {\n return \"success\";\n }", "@RequestMapping(\"/home\")\n\tpublic String home() throws FileNotFoundException, IOException {\n\t\tlog.info(\"accessed info\");\n\t\tlog.warn(\"accessed warn\");\n\t\tlog.error(\"accessed error\");\n\t\tlog.debug(\"accessed debug\");\n\t\tlog.trace(\"accessed trace\");\n\t\treturn \"home\";\n\n\t}", "@RequestMapping(value = \"/restricted\", method = RequestMethod.GET)\r\n public String homeRestricted(HttpServletRequest request, ModelMap model) throws ServletException, IOException {\r\n return(renderPage(request, model, \"home\", null, null, null, false)); \r\n }", "@RequestMapping(value = \"/\", method = RequestMethod.GET)\n\tpublic String home(Locale locale, HttpServletRequest request, Model model ) {\n\t\tlogger.info(\"Welcome home! The client locale is {}.\", locale);\n\t\treturn \"login\";\n\t}", "@Override\n\tpublic boolean goHomePage(PageContext context) {\n\t\treturn false;\n\t}", "@RequestMapping(method = RequestMethod.GET)\r\n public String home(ModelMap model) throws Exception\r\n {\t\t\r\n return \"Home\";\r\n }", "@RequestMapping(value = \"/userhomepage\", method = RequestMethod.GET)\n public ModelAndView displayUserHomepage() {\n return new ModelAndView(\"userhomepage\");\n }", "@RequestMapping(method = RequestMethod.GET)\n public ModelAndView home() {\n page = new ModelAndView();\n page.setViewName(\"Statistique\");\n page.addObject(\"resources\", resourceService.listMainMenu());\n page.addObject(\"proms\", articleService.getFiveLastProms());\n page.addObject(\"mostPlayedClasses\", statsService.listXMostPlayedClasses(5));\n page.addObject(\"mostPlayedRaces\", statsService.listXMostPlayedRaces(5));\n page.addObject(\"mostPlayedSpecializations\", statsService.listXMostPlayedSpecialization(5));\n page.addObject(\"usersWithoutAvatar\", statsService.listUsersWithoutAvatar());\n page.addObject(\"mostActiveUsers\", statsService.listMostActiveUsers(5));\n if (user != null)\n page.addObject(\"userResources\", resourceService.listUserResources(user.getGroup().getId()));\n return page;\n }", "public void home() {\n\t\tUserUI ui = new UserUI();\n\t\tui.start();\n\t}", "@GetMapping(\"/homePage\")\n public String homePage(final Model model) {\n LOGGER.debug(\"method homePage was invoked\");\n model.addAttribute(\"listCarMakes\", carMakeProvider.getCarMakes());\n return \"homepage\";\n }", "@RequestMapping(value = \"/\", method = RequestMethod.GET)\n\tpublic String home() {\n\t\treturn \"echo\";\n\t}", "public void gotoHome(){ application.gotoHome(); }", "@RequestMapping(\"/home\")\n\tpublic String showHome() {\n\t\treturn \"home\";\n\t}", "@RequestMapping(\"/\")\n\tpublic String home(Locale locale, Model model) {\n\t\tlogger.info(\"Welcome home! The client locale is {}.\", locale);\n\n\t\treturn \"redirect:main/home\";\n\t}", "@RequestMapping(\"/\")\n\t public String index(Model model){\n\t return \"homepage\";\n\t }", "protected void callHome() {\n\t\tIntent intent = new Intent(this, AdminHome.class);\r\n\t\tstartActivity(intent);\r\n\t}", "public String home()\n\t{\n\t\treturn SUCCESS;\n\t}", "@RequestMapping(method = RequestMethod.GET)\n\tpublic String home(Locale locale, Model model) {\n\t\t//System.out.println(Utils.getMessage(\"THING_NOT_FOUND\"));\n\t\treturn \"home\";\n\t}", "@RequestMapping(value = \"/index\", method = RequestMethod.GET)\n\tpublic String home(Model model) {\n\t\tlogger.info(\"Welcome home!\");\n\t\tmodel.addAttribute(\"controllerMessage\",\n\t\t\t\t\"This is the message from the controller!\");\n\t\treturn \"index\";\n\t}", "@RequestMapping(value = \"/newlogin\")\r\n\tpublic String dispatchTodefaultEntryPoint() {\r\n\t\tlogger.entry();\r\n\r\n\t\tsaveUserLoginInformation();\r\n\r\n\t\t// String defaultHome = \"redirect:/home\";\r\n\r\n\t\t// if (Utils.isUserInRole(getInternalUserRoles())) {\r\n\t\t//\r\n\t\t// } else {\r\n\t\t// throw new AccessDeniedException(\"User Role not found\");\r\n\t\t// }\r\n\r\n\t\tString homePage = \"forward:/\" + getHomePageByRole();\r\n\r\n\t\tlogger.exit();\r\n\r\n\t\treturn homePage;\r\n\t}", "@RequestMapping(value = {\"/\", \"/home\"}, method = RequestMethod.GET)\n public ModelAndView goToHome(Model m) {\n \tModelAndView mav = new ModelAndView(\"home\");\n \treturn mav;\n }", "@RequestMapping(\"/\")\r\n\t\r\n\tpublic String home()\r\n\t{\n\t\t \r\n\t\treturn \"index\";\r\n\t}", "@RequestMapping(value = \"/\", method = RequestMethod.GET)\r\n\tpublic String index(Model model) {\r\n\r\n\t\treturn \"home\";\r\n\t}", "public static Result index() {\n Skier loggedInSkier = Session.authenticateSession(request().cookie(COOKIE_NAME));\n if(loggedInSkier!=null)\n return redirect(\"/home\");\n else\n return ok(index.render(\"\"));\n }", "@Timed\n @RequestMapping(\n method = RequestMethod.GET,\n value = \"/\"\n )\n public String handleRoot(\n @Nonnull Model model\n ) {\n LOGGER.debug(\"handleRoot called\");\n return handleSinglePageApp(model);\n }", "@RequestMapping(value = \"/\", method = RequestMethod.GET)\n\tpublic String jumpTohome(Locale locale, Model model) {\n\t\tlogger.info(\"Welcome home! The client locale is {}.\", locale);\n\n\t\treturn \"redirect:/competitions/all/list\";\n\t}", "@RequestMapping(\"/\")\n public @ResponseBody String homePage()\n {\n return \"homePage\";\n }", "public void openHomePage() {\n\t\tlogger.info(\"Opening Home Page\");\n\t\tdriver.get(ReadPropertyFile.getConfigPropertyVal(\"homePageURL\"));\n\t\t\n\t}", "@RequestMapping(value=\"/homepage\")\r\npublic ModelAndView homePage1(ModelAndView model) throws IOException\r\n{\r\n model.setViewName(\"home\");\r\n\treturn model;\r\n}", "@RequestMapping(value = \"/\", method = RequestMethod.GET)\n\tpublic String home(Locale locale, Model model) {\n\t\t//info 정보 활용에 유용\n\t\tlogger.info(\"Welcome home! The client locale is {}.\", locale);\n\n\t\treturn \"home\";\n\t}", "@RequestMapping(value = \"/\", method = RequestMethod.GET)\r\n\tpublic String home(Locale locale, Model model) {\t\t\t\t\r\n\t\treturn \"index\";\r\n\t}", "@RequestMapping(value = { \"/broadband-user\", \"/broadband-user/login\" })\n\tpublic String userHome(Model model) {\n\t\tmodel.addAttribute(\"title\", \"CyberPark Broadband Manager System\");\n\t\treturn \"broadband-user/login\";\n\t}", "private void returnHome(){\n if (Boolean.toString(UpdatedHomePage.updatedHomeStarted).equals(\"false\")) {\n startActivity(new Intent(FinalPlan.this, Home.class));\n } else {\n Intent intent = new Intent(this, UpdatedHomePage.class);\n Bundle extras = new Bundle();\n extras.putBoolean(\"filtered\", true);\n intent.putExtras(extras);\n startActivity(intent);\n }\n }", "@RequestMapping(value = \"/\", method = RequestMethod.GET)\n\tpublic String home(Model model) {\n\t\tlogger.info(\"Welcome home!\");\n\t\tmodel.addAttribute(\"controllerMessage\",\n\t\t\t\t\"This is the message from the controller!\");\n\t\t\n\t\tAuthor author = new Author();\n\t\tauthor.setFirstName(\"fisseha\");\n\t\tauthor.setLastName(\"chari\");\n\t\treturn \"home\";\n\t}", "@RequestMapping(value = \"/\")\n\tpublic String home(Locale locale, Model model) {\n\t\treturn \"redirect:/loginPage\";\n\t}", "@Given(\"I am on Magalu HomePage\")\n\tpublic void i_am_on_the_homepage() {\n\t\tdriver.get(Homeurl);\n\t}", "private void HomePage(){\n Intent intent = new Intent();\n intent.setClass(FaultActivity.this, MainActivity.class);\n startActivity(intent);\n FaultActivity.this.finish();\n }", "@GetMapping(Mappings.HOME)\n\tpublic String showHome() {\n\n\t\treturn ViewNames.HOME;\n\t}", "@RequestMapping(value = \"/\", method = RequestMethod.GET)\n\tpublic String home(@RequestParam(defaultValue=\"1\") String menu, Locale locale, HomeBean home) {\n\t\tlogger.info(\"Welcome home! The client locale is {}.\", locale);\n\t\tint menuId = Integer.parseInt(menu); \n\t\thome.setMenus(menuService.listAllMenus());\n\t\thome.setAllCharacters(characterService.getAllCharacters(menuId));\n\t\thome.setContents(contentService.getContentListBy(ContentService.MENU,menuId));\n\t\t\n\t\treturn \"content/home\";\n\t}", "public void launchHomePage() {\n Intent intent = new Intent(LoginActivity.this, HomeActivity.class);\n startActivity(intent);\n }", "@Given(\"^User is on Home Page$\")\r\n\tpublic void user_is_on_Home_Page() throws Throwable {\n\t\tsetBrowser();\r\n\t\tsetBrowserConfig();\r\n\t\tdriver.get(\"http://demowebshop.tricentis.com/\");\r\n\t}", "@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n request.setAttribute(\"pageTitle\", \"Welcome\");\n request.getRequestDispatcher(\"/WEB-INF/pages/home.jsp\").forward(request, response);\n }", "@RequestMapping(value = \"/*/landingPage.do\", method = RequestMethod.GET)\n public String landingPageView(HttpServletRequest request, Model model) {\n logger.debug(\"SMNLOG:Landing page controller\");\n\n\n return \"admin/landingPage\";\n }", "@Override\n public boolean preHandle(HttpServletRequest request, HttpServletResponse response, Object handler) throws Exception {\n\tUser user = (User) request.getSession().getAttribute(\"loggedInUser\");\n\tif (user == null) {\n\t response.sendRedirect(\"/home.html\");\n\t return false;\n\t}\n\n\treturn true;\n\n }", "@RequestMapping(value = \"/home/{map}\", method = RequestMethod.GET)\r\n public String mapHome(HttpServletRequest request, @PathVariable(\"map\") String map, ModelMap model) throws ServletException, IOException { \r\n return(renderPage(request, model, \"map\", map, null, null, false));\r\n }", "@Override\n\tpublic void handleRequest(HttpServletRequest request,\n\t\t\tHttpServletResponse response, ServletContext context,\n\t\t\tRequestType type) {\n\t\tUserHomeControl control = new UserHomeControl();\n\t\tLayoutRoot lr = new LayoutRoot(context,request,response);\n\t\t\n\t\tlr.setTitle(\"User home\");\n\t\t\n\t\tif(control.isLoggedIn(request, response)){\n\t\t\tSimpleTemplate custLayout = new SimpleTemplate(context, \"UserHomeLayout.mustache\");\n\t\t\tSimpleTemplate adminLayout = new SimpleTemplate(context, \"UserHomeLayoutAdmin.mustache\");\n\t\t\tSimpleTemplate custMenu = new SimpleTemplate(context, \"UserHomeCustomer.mustache\");\n\t\t\tSimpleTemplate adminMenu = new SimpleTemplate(context, \"UserHomeAdmin.mustache\");\n\t\t\t\n\t\t\tif(control.isAdmin(request, response)){\n\t\t\t\tadminLayout.setVariable(\"user_menu\", custMenu.render());\n\t\t\t\tadminLayout.setVariable(\"admin_menu\", adminMenu.render());\n\t\t\t\tlr.setContent(adminLayout.render());\n\t\t\t\tlr.render(response);\n\t\t\t}else{\n\t\t\t\tcustLayout.setVariable(\"user_menu\", custMenu.render());\n\t\t\t\tlr.setContent(custLayout.render());\n\t\t\t\tlr.render(response);\n\t\t\t}\n\t\t}else{\n\t\t\ttry {\n\t\t\t\tresponse.sendRedirect(CarRentalServlet.getFullURL(context, \"/user/login\"));\n\t\t\t} catch (IOException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\t}", "@RequestMapping(value = \"/\", method = RequestMethod.GET)\n\tpublic String home(Locale locale, Model model) {\n\t\tlogger.info(\"홈페이지를 만듭니다\", locale);\n\t\treturn \"home\";\n\t}", "public void goToHome() throws IOException {\n\t\tFacesContext.getCurrentInstance().getExternalContext().redirect(\"index.xhtml\");\n\t}", "public static void goToHome(Context context){\n }", "public HomePage() {\n\t\tPageFactory.initElements(driver, this);\n\t\t\n\t}", "@RequestMapping(\"/\")\n\tString home() {\n\t\treturn \"Hello World!\";\n\t}", "@RequestMapping(value = \"/home.do\", method = RequestMethod.GET)\n\tpublic String home(Locale locale, Model model) throws Exception {\n\n\t\tMap<String, Object> map = new HashMap<String, Object>();\n\t\tString msg = this.kangService.getMessage(map);\n\n\t\tmodel.addAttribute(\"serverTime\", \"Hello 강석!!!\" + msg);\n\t\treturn PATH + \"/home\";\n\t}", "@When(\"I am on Home page\")\n public void homepage_i_am_on_home_page() {\n homePage = new HomePage(driver);\n homePage.check_page_title();\n }", "@RequestMapping(value = \"/\", method = RequestMethod.GET)\n\tpublic ModelAndView home(Locale locale, Model model) {\n\n\t\tlogger.info(\"Home page is requested\");\n\n\t\tDate date = new Date();\n\t\tDateFormat dateFormat = DateFormat.getDateTimeInstance(DateFormat.LONG, DateFormat.LONG, locale);\n\n\t\tString formattedDate = dateFormat.format(date);\n\n\t\tmodel.addAttribute(\"serverTime\", formattedDate);\n\n\t\treturn new ModelAndView(\"signin\");\n\t}", "@RequestMapping(value = \"/home\")\n\tpublic ModelAndView ictHome() {\n\t\tModelAndView mav = new ModelAndView(\"ict/home\");\n\t\tmav.addObject(\"disComList\", disS.findAll());\n\t\treturn mav;\n\t}", "@GetMapping(\"/\")\n\tpublic ResponseEntity<String> getHome() {\n\t\treturn new ResponseEntity<>(\"<h1>Welcome to the root of the Order Book Web Service</h1>\", HttpStatus.OK);\n\t}", "@RequestMapping(\"/\")\n public String home(HttpServletRequest request) {\n if(!request.isUserInRole(\"ROLE_ADMIN\")){\n return \"home\";\n }\n else {\n return \"redirect:/admin/pocetna\";\n }\n }", "@RequestMapping(value = \"/\", method = RequestMethod.GET)\n public ResponseEntity<?> home() {\n return new ResponseEntity<>(\"This is a new restful app\", HttpStatus.OK);\n }", "public void homeButtonClicked(ActionEvent event) throws IOException {\n Parent homeParent = FXMLLoader.load(getClass().getResource(\"Home.fxml\"));\n Scene homeScene = new Scene(homeParent, 1800, 700);\n\n //gets stage information\n Stage window = (Stage) ((Node) event.getSource()).getScene().getWindow();\n window.setTitle(\"Home Page\");\n window.setScene(homeScene);\n window.show();\n }", "private void openHome() {\n Intent intent = new Intent(this, WelcomeActivity.class);\n startActivity(intent);\n\n finish();\n }", "@RequestMapping(value= {\"/flight-home\",\"/\"})\n\tpublic ModelAndView flightSearchPage() {\n\t\treturn new ModelAndView (\"home\");\n\t}", "@RequestMapping(\"/\")\n public String home()\n {\n SecurityContext context = SecurityContextHolder.getContext();\n return \"redirect:swagger-ui.html\";\n }", "@Override\r\n\tpublic void index() {\n\t\trender(\"index.jsp\");\r\n\t}", "@RequestMapping(value = \"/\", method = RequestMethod.GET)\n\tpublic String home(Locale locale, Model model) {\n\t\tlogger.info(\"Welcome home! The client locale is {}.\", locale);\n\t\t\n\t\tDate date = new Date();\n\t\tDateFormat dateFormat = DateFormat.getDateTimeInstance(DateFormat.LONG, DateFormat.LONG, locale);\n\t\t\n\t\tString formattedDate = dateFormat.format(date);\n\t\t\n\t\tmodel.addAttribute(\"serverTime\", formattedDate );\n\t\t\n\t\t\n\t\t/*\n\t\t main.jsp에서 보여줄 1차 카테고리에 해당하는 상품 4개씩 각각출력하는 작업\n\t\t * */\n\t\t\n\t\t//Top카테고리에 해당하는 상품 4개출력작업\n\t\t\n\t\tList<ProductVO> hardList = service.mainProductList(1);\n\t\tList<ProductVO> softList = service.mainProductList(2);\n\t\tList<ProductVO> peripheralList = service.mainProductList(3);\n\t\tList<ProductVO> bestList = service.mainProductList(4);\n\t\t\n\t\tList<ProductVO> lastList = service.getLast();\n\n\t\t\n\t\tmodel.addAttribute(\"hardList\", hardList );\n\t\tmodel.addAttribute(\"softList\", softList );\n\t\tmodel.addAttribute(\"peripheralList\", peripheralList );\n\t\tmodel.addAttribute(\"bestList\",bestList );\n\t\tmodel.addAttribute(\"lastList\", lastList);\n\t\t\n\t\treturn \"main\";\n\t}", "@Then(\"^User is redirect on home page$\")\n\tpublic void redirectToHomePage() throws Throwable {\n\t\tThread.sleep(2000);\n\t\tisElementPresent(driver, By.className(\"user-menu\"));\n\t}", "@RequestMapping(value = \"/\", method = RequestMethod.GET)\n public String home(Locale locale, Model model)\n {\n System.out.println(\"Home \" + service.getName());\n model.addAttribute(\"name\", service.getName());\n return \"home\";\n }", "public void goToHomePage() {\n\n driver.get(HOME_PAGE_URL);\n driver.manage().deleteAllCookies();\n driver.manage().window().maximize();\n wait.forLoading(10);\n }", "@RequestMapping(\"/\")\n\tpublic String getMainPage() {\n\t\treturn \"main-menu\";\n\t}", "@RequestMapping(value = { \"/\", \"/home\", \"/index\" })\r\n\tpublic ModelAndView index() {\r\n\t\tModelAndView mv = new ModelAndView(\"page\");\r\n\t\tmv.addObject(\"greeting\", \"welcome to spring web mvc new way to done \");\r\n\t\treturn mv;\r\n\t}", "public static Result index() {\n // Check that the email matches a confirmed user before we redirect\n String email = ctx().session().get(\"email\");\n if (email != null) {\n User user = User.findByEmail(email);\n if (user != null && user.validated) {\n return GO_DASHBOARD;\n } else {\n Logger.debug(\"Clearing invalid session credentials\");\n session().clear();\n }\n }\n\n return GO_HOME;\n }", "@Override\r\n protected void doGet(HttpServletRequest request,\r\n HttpServletResponse response) throws ServletException, IOException {\r\n\r\n String path = request.getPathInfo();\r\n Map<String, Object> data = getDefaultData();\r\n Writer writer = response.getWriter();\r\n\r\n if (path == null) {\r\n throw new IOException(\"The associated path information is null\");\r\n }\r\n\r\n if (path.equals(\"/\")) {\r\n processTemplate(MAIN_SITE, data, writer);\r\n } else if (path.equals(\"/login\")) {\r\n processTemplate(LOGIN_SITE, data, writer);\r\n } else if (path.startsWith(\"/login/error\")) {\r\n data.put(\"hasLoginFailed\", true);\r\n AppServlet.processTemplate(LOGIN_SITE, data, response.getWriter());\r\n } else if (path.equals(\"/logout\")) {\r\n request.getSession().invalidate();\r\n response.sendRedirect(\"/login\");\r\n } else if (path.equals(\"/signup\")) {\r\n processTemplate(SIGNUP_SITE, data, response.getWriter());\r\n } else {\r\n processTemplate(NOT_FOUND_SITE, data, writer);\r\n }\r\n }", "public void homeButtonClicked(ActionEvent event) throws IOException {\n\t\tSystem.out.println(\"Loading Home...\");\n\t\tAnchorPane pane = FXMLLoader.load(getClass().getResource(\"HomeFXML.fxml\"));\n\t\trootPane.getChildren().setAll(pane);\n\t\t\n\t}", "public void homeClicked() {\r\n Pane newRoot = loadFxmlFile(Home.getHomePage());\r\n Home.getScene().setRoot(newRoot);\r\n }", "@RequestMapping(value = \"/\", method = RequestMethod.GET)\n\tString index() {\n\t\tif (StringUtil.isNullOrEmpty(configuration.getHue().getIp())\n\t\t\t\t|| StringUtil.isNullOrEmpty(configuration.getHue().getUser())) {\n\t\t\treturn \"redirect:/setup\";\n\t\t}\n\n\t\treturn \"redirect:/dailySchedules\";\n\t}" ]
[ "0.7292709", "0.72889745", "0.72628385", "0.71784455", "0.7137918", "0.7064675", "0.7036334", "0.699106", "0.6983865", "0.6978897", "0.6901915", "0.6890149", "0.6887485", "0.68644816", "0.6853239", "0.6818279", "0.6810525", "0.6762125", "0.669907", "0.6693323", "0.66823673", "0.6681013", "0.6647251", "0.66290706", "0.6624385", "0.66218823", "0.6614412", "0.66074574", "0.6581594", "0.6581311", "0.6534106", "0.65215033", "0.65085775", "0.6499563", "0.649338", "0.64851433", "0.6478937", "0.6470596", "0.64639765", "0.6414022", "0.6408673", "0.64043623", "0.6402128", "0.64016116", "0.6373096", "0.6364228", "0.6358919", "0.6351933", "0.6348915", "0.6345496", "0.6341272", "0.63408864", "0.6331215", "0.6319859", "0.6309648", "0.6301606", "0.6301433", "0.6288227", "0.6277674", "0.62694836", "0.6260219", "0.62564015", "0.623283", "0.62223566", "0.6217537", "0.6199938", "0.6191783", "0.61667806", "0.6161304", "0.6153746", "0.61329544", "0.6130938", "0.6114384", "0.6105354", "0.6095388", "0.60796195", "0.606414", "0.606125", "0.6054757", "0.60474116", "0.604355", "0.6035471", "0.60290825", "0.60262173", "0.6011805", "0.6010409", "0.6008551", "0.59841704", "0.5981756", "0.59795153", "0.59777445", "0.5970882", "0.59682995", "0.5966423", "0.595605", "0.5953636", "0.59526056", "0.5952343", "0.595144", "0.59478027", "0.5943215" ]
0.0
-1
Handles requests to favorites page
@RequestMapping("/favorites") public String favorites(ModelMap modelMap) { List<Gif> gifs = gifRepo.findFavorites(); modelMap.put("gifs", gifs); return "favorites"; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@RequestMapping(\"/favorites\")\n public String favorites(Model model) {\n // TODO: Get list of all GIFs marked as favorite\n List<Gif> faves = new ArrayList<>();\n\n model.addAttribute(\"gifs\", faves);\n model.addAttribute(\"username\", \"Chris Ramacciotti\"); // Static username\n return \"gif/favorites\";\n }", "@RequestMapping(value = \"home\", method = RequestMethod.GET)\n public String home(Model model, HttpServletRequest request){\n IronUser user = (IronUser)request.getSession().getAttribute(\"user\");\n\n Long usrId = user.getId();\n\n // get users favorites\n Set<Movie> favs = userRepository.findOne(usrId).getFavs();\n\n\n // put them in a model\n model.addAttribute(\"favs\", favs);\n\n // send them to the dam\n return \"home\";\n }", "@SuppressWarnings(\"unchecked\")\n\tprotected Map<String, List<PageViewVO>> processUserFavorites(ModuleVO mod) \n\t\t\tthrows ActionException {\n\t\tlog.debug(\"processUserFavorites...\");\n\t\tMap<String, List<PageViewVO>> pageMap = initializePageMap();\n\t\tif (mod.getErrorCondition()) return pageMap;\n\n\t\tList<FavoriteVO> favs = (List<FavoriteVO>)mod.getActionData();\n\n\t\tfor (FavoriteVO fav : favs) {\n\t\t\tlog.debug(\"found fav, typeCd | relId | uriTxt: \" + fav.getTypeCd() + \"|\" + fav.getRelId() + \"|\" + fav.getUriTxt());\n\t\t\tif (fav.getAsset() == null) continue; \n\t\t\tprocessFavorite(pageMap,fav);\n\t\t}\n\t\treturn pageMap;\n\t}", "private void getFavorites(HttpServletRequest req, HttpServletResponse res) throws ServletException, IOException {\n\t\ttry {\n\t\t\tnoticiasList.clear();\n\t\t\tLong userId = Long.parseLong(req.getParameter(Constants.USER_IDENTIFIER));\n\t\t\tPrintWriter out = res.getWriter();\n\t\t\tif (userId != null) {\n\t\t\t\tLOGGER.info(\"Los contenidos valorados por el usuario \" + UserDB.getnameOfUser(userId) + \" son:\");\n\t\t\t\tPreferenceArray preferencesUser = myRecommender.getPreferencesFromUser(userId);\n\t\t\t\tfor (int i = 0; i < preferencesUser.length(); i++) {\n\t\t\t\t\thave = \"1\";\n\t\t\t\t\tString content = ContentDB.getTitleOfContent(preferencesUser.getItemID(i));\n\t\t\t\t\tfloat value = preferencesUser.getValue(i);\n\n\t\t\t\t\tNoticia not = new Noticia(Long.toString(ContentDB.getContentId(content)), content,\n\t\t\t\t\t\t\tContentDB.getVideoOfContent(preferencesUser.getItemID(i)),\n\t\t\t\t\t\t\tContentDB.getCaptureOfContent(preferencesUser.getItemID(i)),\n\t\t\t\t\t\t\tContentDB.getDateOfContent(preferencesUser.getItemID(i)),\n\t\t\t\t\t\t\tContentDB.getContent(preferencesUser.getItemID(i)),\n\t\t\t\t\t\t\tContentDB.getAuthorOfContent(preferencesUser.getItemID(i)), have, Float.toString(value));\n\n\t\t\t\t\tnoticiasList.add(not);\n\n\t\t\t\t}\n\t\t\t\tconjunto = new Conjunto(noticiasList);\n\t\t\t\tout.print(gson.toJson(conjunto).subSequence(12, gson.toJson(conjunto).length() - 1));\n\t\t\t} else {\n\t\t\t\tLOGGER.warning(\"Usuario no encontrado\");\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t\tres.setStatus(HttpServletResponse.SC_SERVICE_UNAVAILABLE);\n\t\t}\n\t}", "public void backToPosters(){\n //check if favorite list is going to be displayed or if favorite list has changed\n if(mMovieType == PosterHelper.NAME_ID_FAVORITE && mFavoriteChanged){\n //refresh favorite list\n showMovieList(mMovieStaff.getMovies(PosterHelper.NAME_ID_FAVORITE),\n PosterHelper.NAME_ID_FAVORITE);\n }\n }", "private void setupFavoritesListView() {\n ListView listFavorites = (ListView) findViewById(R.id.list_favorites);\n try{\n PlayerDatabaseHelper PlayerDatabaseHelper = new PlayerDatabaseHelper(this);\n db = PlayerDatabaseHelper.getReadableDatabase();\n\n favoritesCursor = db.rawQuery(\"WITH sel_Players(P_id) As (Select player_id FROM SELECTION, USER WHERE NAME = ? AND _id = user_id) SELECT _id, NAME FROM PLAYER, sel_Players WHERE P_id = _id\", new String[] {User.getUName()});\n\n CursorAdapter favoriteAdapter =\n new SimpleCursorAdapter(TopLevelActivity.this,\n android.R.layout.simple_list_item_1,\n favoritesCursor,\n new String[]{\"NAME\"},\n new int[]{android.R.id.text1}, 0);\n listFavorites.setAdapter(favoriteAdapter);\n db.close();\n } catch(SQLiteException e) {\n Toast toast = Toast.makeText(this, \"Database unavailable\", Toast.LENGTH_SHORT);\n toast.show();\n }\n\n listFavorites.setOnItemClickListener(new AdapterView.OnItemClickListener() {\n @Override\n public void onItemClick(AdapterView<?> listView, View v, int position, long id) {\n Intent intent = new Intent(TopLevelActivity.this, forward.class);\n intent.putExtra(forward.EXTRA_PLAYERID, (int)id);\n startActivity(intent);\n }\n });\n }", "void favoriteView();", "public void favouriteUser() {\r\n\t\tif(favourited) {\r\n\t\t\tcurrentUser.unfavouriteUser(userToView.getUserID());\r\n\t\t\tfavouriteButton.setText(\"Favourite\");\r\n\t\t\tfavourited = false;\r\n\t\t} else if(currentUser.getUserID() != userToView.getUserID()){\r\n\t\t\tcurrentUser.favouriteUser(userToView.getUserID());\r\n\t\t\tfavouriteButton.setText(\"Unfavourite\");\r\n\t\t\tfavourited = true;\r\n\t\t} else {\r\n\t\t\tCONSTANTS.makeAlertWindow(\"warning\",\"You can not favorite yourself!\");\r\n\t\t}\r\n\t}", "protected void updateProfileFavorites(ActionRequest req, PageViewVO fav) throws ActionException {\n\t\tlog.debug(\"updateProfileFavorites...\");\n\n\t\tMyFavoritesAction mfa = new MyFavoritesAction(getActionInit());\n\t\tmfa.setAttributes(getAttributes());\n\t\tmfa.setDBConnection(dbConn);\n\n\t\tboolean isDelete = Convert.formatBoolean(req.getParameter(\"isDelete\"));\n\t\tif (isDelete) {\n\t\t\tmfa.deleteFavorite(req);\n\t\t} else {\n\t\t\t// set additional req params needed for inserts.\n\t\t\treq.setParameter(QuickLinksAction.PARAM_KEY_TYPE_CD, fav.getReferenceCode());\n\t\t\treq.setParameter(QuickLinksAction.PARAM_KEY_REL_ID, fav.getPageId());\n\t\t\tmfa.insertFavorite(req);\n\t\t}\n\n\t\tupdateSessionFavorites(req.getSession(),fav,isDelete);\n\n\t}", "protected void processFavorite(Map<String,List<PageViewVO>> pages, FavoriteVO fav) {\n\t\ttry {\n\t\t\tcheckCollectionKey(fav.getTypeCd());\n\t\t} catch (Exception e) {\n\t\t\t// this fav is not a 'Section' type so return.\n\t\t\treturn;\n\t\t}\n\t\t\n\t\t// convert favorite into a PageViewVO\n\t\tPageViewVO page = new PageViewVO();\n\t\tpage.setReferenceCode(fav.getTypeCd());\n\t\tpage.setPageId(fav.getRelId());\n\t\tpage.setRequestUri(fav.getUriTxt());\n\n\t\tif (fav.getAsset() != null) {\n\t\t\tSolrDocument sDoc = (SolrDocument)fav.getAsset();\n\t\t\tpage.setPageDisplayName(sDoc.getFieldValue(SearchDocumentHandler.TITLE).toString());\n\t\t}\n\n\t\tlog.debug(\"adding favorite: ref cd | pageId | uri | name: \" + page.getReferenceCode() +\"|\"+page.getPageId() +\"|\"+page.getRequestUri() +\"|\"+page.getPageDisplayName());\n\n\t\tList<PageViewVO>pList = pages.get(page.getReferenceCode());\n\t\tif (pList != null)\n\t\t\tpList.add(page);\n\t}", "private void retrieveFavoritePhotos() {\n showProgress(this.mProgressBar, this.mRlContent);\n this.mFavoritePhotosViewModel.retrievePhotos();\n }", "private void getFavData() {\n favouriteViewModel.getFavouritePostData().observe(this, result -> {\n if (result != null) {\n if (result.status == Status.SUCCESS) {\n if (this.getActivity() != null) {\n Utils.psLog(result.status.toString());\n favouriteViewModel.setLoadingState(false);\n itemViewModel.setItemDetailObj(itemViewModel.itemId, itemViewModel.historyFlag, loginUserId);\n }\n\n } else if (result.status == Status.ERROR) {\n if (this.getActivity() != null) {\n Utils.psLog(result.status.toString());\n favouriteViewModel.setLoadingState(false);\n }\n }\n }\n });\n }", "public void onFavButtonClicked(View view) {\n isFav = !isFav;\n toggleButtonText(isFav);\n \n // Update DB\n new OperateWithDBMovieAsyncTask().execute(isFav ? ADD_MOVIE : REMOVE_MOVIE);\n }", "public void getFavoriteEateries(Integer account_id){\r\n Map<String, String> params = new HashMap<>();\r\n params.put(\"account_id\", String.valueOf(account_id));\r\n String url = API_DOMAIN + ACCOUNT_EXT + GET_FAVORITES;\r\n this.makeVolleyRequest( url, params );\r\n }", "private void showFavouriteList() {\n setToolbarText(R.string.title_activity_fave_list);\n showFavouriteIcon(false);\n buildList(getFavourites());\n }", "@Override\n public void onFavouriteClick(int position) {\n int id = newLest2.get(position).getId();\n Bundle bundle = new Bundle();\n bundle.putInt(\"id\", id);\n bundle.putString(\"name\", newLest2.get(position).getName_en());\n bundle.putString(\"url\", newLest2.get(position).getImage());\n Navigation.findNavController(view).navigate(R.id.action_homeFragment_to_showItemInCategories, bundle);\n\n }", "@Override\n public void onClick(View view) {\n\n FirebaseUser user = FirebaseAuth.getInstance().getCurrentUser();\n\n if (favorited) {\n unFavorite(mangaID, user);\n } else {\n favorite(mangaID, mangaDetails.getTitle(), user);\n }\n\n }", "@Override\n\tpublic void onFavorite(User source, User target, Status favoritedStatus) {\n\n\t}", "@Override\n\t\tpublic void onFavorite(User arg0, User arg1, Status arg2) {\n\t\t\t\n\t\t}", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case R.id.action_favorite:\n ItemFavoriteUrl db = new ItemFavoriteUrl(webView.getTitle(), webView.getUrl());\n db.save();\n adapter.notifyDataSetChanged();\n //adapter.add(ItemFavoriteUrl.findById(ItemFavoriteUrl.class, ItemFavoriteUrl.count(ItemFavoriteUrl.class)));\n Toast.makeText(MainActivity.this, R.string.favorite_saved, Toast.LENGTH_SHORT).show();\n /*for (int i=0; i<ItemFavoriteUrl.count(ItemFavoriteUrl.class); i++) {\n db = ItemFavoriteUrl.find\n Log.d(\"db\", db.url);\n }*/\n Log.d(\"count\", adapter.getCount() + \"\");\n break;\n\n case R.id.action_clear:\n ItemFavoriteUrl.deleteAll(ItemFavoriteUrl.class);\n adapter.notifyDataSetChanged();\n Toast.makeText(MainActivity.this, R.string.clear, Toast.LENGTH_SHORT).show();\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public void onClick(View view) {\n Intent mainlistIntent = new Intent(FavoriteActivity.this, FavoriteActivity.class);\n startActivity(mainlistIntent);\n }", "private void initListFavorite() {\n favoritesList = mApiService.getFavorites();\n mRecyclerView.setAdapter(new MyNeighbourRecyclerViewAdapter(favoritesList, this));\n }", "public void onClicklistenerForFavorites(View view){\n if(isAlreadyFavorteis() == true){\n Boolean hasDeleted = dBhelper.deleteFavortiesByCategoryId(userAskAbout,inputSpinnerOne.getSelectedItemPosition(),inputSpinnertow.getSelectedItemPosition());\n if(hasDeleted == true) {\n Toast.makeText(getApplicationContext(), \"Your data has deleted in Favorties\", Toast.LENGTH_LONG).show();\n favortiesImageView.setBackgroundResource(R.drawable.ic_favourites);\n isAlreadyFavorties = false;\n }\n\n }else\n {\n favortiesMethed();\n isAlreadyFavorties = true;\n favortiesImageView.setBackgroundResource(R.drawable.ic_favourites_pressed);\n }\n\n }", "public void saveFavorite(){\n //make sure movie is NOT already a favorite\n if(!mMovieStaff.alreadyFavorite(mMovie.getTMDBId())){\n //is a new favorite, favorite movie list status has changed\n mFavoriteChanged = true;\n\n //set movie item favorite status as true\n mMovie.setFavorite(true);\n\n //save movie to favorite database table\n mMovieValet.saveFavorite(mMovie);\n\n //add movie to favorite movie list buffer\n mMovieStaff.addFavorite(mMovie);\n }\n\n //check if movie list type is display a favorite list and if the device is a tablet\n if(mMovieType == PosterHelper.NAME_ID_FAVORITE && mIsTablet){\n //both yes, get favorite movies to update poster fragment\n getMovieList(PosterHelper.NAME_ID_FAVORITE);\n }\n }", "@Subscribe\n public void onDeleteFavorite(DeleteFavoriteEvent event) {\n mApiService.deleteFavorite(event.neighbour);\n initListFavorite();\n }", "private void retrieveFavoritesCompleted(ArrayList<MovieItem> movies){\n //get number of favorite movies in the list\n int count = movies.size();\n\n //check if there are any movies\n if(count > 0){\n //save movies to buffer\n mMovieStaff.setMovies(movies, PosterHelper.NAME_ID_FAVORITE);\n }\n\n //check if the current poster fragment is displaying the user favorite list\n if(mMovieType == PosterHelper.NAME_ID_FAVORITE){\n //yes, show new movie list\n showMovieList(movies, PosterHelper.NAME_ID_FAVORITE);\n }\n }", "@Override\r\n public void onFavoriteClicked() {\r\n fragFav = new FragmentFavoritesList();\r\n FragmentTransaction transaction = getSupportFragmentManager().beginTransaction();\r\n // Replace whatever is in the fragment_container view with this fragment,\r\n // and add the transaction to the back stack so the user can navigate back\r\n if (getResources().getBoolean(R.bool.isTablet)) {\r\n transaction.add(R.id.listFrag_tab,fragFav, \"FragmentFavoritesList\");\r\n }else {\r\n transaction.add(R.id.activity_main_smart, fragFav, \"FragmentFavoritesList\");\r\n }\r\n transaction.addToBackStack(null);\r\n // Commit the transaction\r\n transaction.commit();\r\n }", "@RequestMapping(value = \"/gifs/{gifId}/favorite\", method = RequestMethod.POST)\n public String toggleFavorite(@PathVariable Long gifId, HttpServletRequest request) {\n Gif gif = gifService.findById(gifId);\n gifService.toggleFavorite(gif);\n return String.format(\"redirect:%s\", request.getHeader(\"referer\"));\n }", "@GetMapping(\"/favourite-songs\")\n @Timed\n public List<FavouriteSong> getAllFavouriteSongs() {\n log.debug(\"REST request to get all FavouriteSongs\");\n return favouriteSongRepository.findAll();\n }", "@RequestMapping(value = \"/simulator/favorites\", produces = \"application/json\")\n @ResponseBody\n public ResponseEntity<?> getFavorites() throws IOException {\n\n if (!simulated) {\n return new ResponseEntity<>(\"Simulated Data not available\", HttpStatus.FORBIDDEN);\n }\n\n final Resource resource = new ClassPathResource(\"data/dirtiescontext_favorites_2015-08-02.json\");\n return new ResponseEntity<>(IOUtils.toString(resource.getInputStream(), \"UTF-8\"), HttpStatus.OK);\n }", "private void addToFavorites() {\n\n favoriteBool = true;\n preferencesConfig.writeAddFavoriteTip(shownTipIndex);\n Toast.makeText(getContext(), \"Added to favorites.\", Toast.LENGTH_SHORT).show();\n\n }", "@Override\n protected void onActivityResult(int requestCode, int resultCode, Intent data) {\n if (resultCode == RESULT_OK) {\n String packageName = data.getStringExtra(\"packageName\");\n\n SharedPreferences sharedPref = this.getPreferences(Context.MODE_PRIVATE);\n SharedPreferences.Editor editor = sharedPref.edit();\n switch (requestCode) {\n case FAVOURITE_INDEX_1:\n setFavouriteButton(favourite1Button, packageName);\n editor.putString(PACKAGE_NAME_FAVOURITE_1, packageName);\n break;\n case FAVOURITE_INDEX_2:\n setFavouriteButton(favourite2Button, packageName);\n editor.putString(PACKAGE_NAME_FAVOURITE_2, packageName);\n break;\n case FAVOURITE_INDEX_3:\n setFavouriteButton(favourite3Button, packageName);\n editor.putString(PACKAGE_NAME_FAVOURITE_3, packageName);\n break;\n case FAVOURITE_INDEX_4:\n setFavouriteButton(favourite4Button, packageName);\n editor.putString(PACKAGE_NAME_FAVOURITE_4, packageName);\n break;\n }\n\n editor.commit();\n } else {\n Log.e(\"FavoritesActivity\", \"Failed to pick app\");\n }\n }", "@Override\n public void onResponse(ArrayList<Response> responseList) {\n\n if (responseList.size() > 0) {\n\n this.responseList.clear();\n\t\t\tArrayList<String> titles = RecipeDB.getInstance(getActivity()).getFavoritesTitle();\n for (Response response : responseList) {\n\t\t\t\tif(titles.contains(response.getTitle()))\n\t\t\t\t\tresponse.setFavorite(true);\n\n this.responseList.add(response);\n }\n searchAdapter.notifyDataSetChanged();\n } else {\n Toast toast = Toast.makeText(getActivity(),\n \"No results found\", Toast.LENGTH_SHORT);\n toast.setGravity(Gravity.CENTER, 0, 0);\n toast.show();\n }\n\n }", "public void clickFavoritesLink()\n\t{\n \telementUtils.performElementClick(wbFavoritesLink);\n\t}", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n //noinspection SimplifiableIfStatement\n if (id == R.id.action_fav) {\n FavoritesDataSource dataSource = new FavoritesDataSource(getBaseContext());\n dataSource.open();\n if(isFav){\n //remove from favorites\n dataSource.deleteFromFavorites(placeid);\n item.setIcon(R.drawable.ic_heart_outline_white);\n Toast.makeText(getBaseContext(),placeName+\" was removed from favorites\",Toast.LENGTH_SHORT).show();\n isFav = false;\n }else{\n //add to favorites\n Place place = new Place(placeid,placeName,address,true,picURL);\n dataSource.addToFavorites(place);\n item.setIcon(R.drawable.ic_heart_fill_white);\n Toast.makeText(getBaseContext(),placeName+\" was added to favorites\",Toast.LENGTH_SHORT).show();\n isFav = true;\n }\n dataSource.close();\n return true;\n }else if(id == R.id.action_share){\n //open twitter url\n String tweetParams = \"text=\"+ URLEncoder.encode(\"Check out \"+placeName+\" located at \"+address+\". Website \")+\"&url=\"+URLEncoder.encode(tweetURL)+\"&hashtags=TravelAndEntertainmentSearch\";\n Intent browserIntent = new Intent(Intent.ACTION_VIEW, Uri.parse(\"https://twitter.com/intent/tweet?\"+tweetParams));\n startActivity(browserIntent);\n return true;\n }else if(id == android.R.id.home){\n finish();\n }\n\n return super.onOptionsItemSelected(item);\n }", "@FXML\n private void chooseFavouritePhotoEvent() {\n if (!PhotoManager.getFavouriteList().isEmpty()) {\n User.setGalleryPhotos(PhotoManager.getFavouriteList());\n fadeOutEvent();\n }\n }", "@Override\n public void addProductToFavorites(View view, Intent intent) {\n try {\n if(iProduct != null && view != null && intent != null){\n Context context = view.getContext();\n String jsonProduct = intent.getStringExtra(CommonPresenter.DETAIL_PRODUCT);\n Product product = CommonPresenter.getProductFromJSON(jsonProduct);\n CRUDFavorite crudFavorite = new CRUDFavorite(context);\n boolean isProductExists = crudFavorite.isProductExists(product.getProductId());\n if(isProductExists){\n crudFavorite.deleteByProductId(product.getProductId());\n CommonPresenter.showSnackBarMessage(view, context.getString(R.string.lb_product_delete_to_favorite));\n iProduct.changeImageRightResource(R.drawable.ic_add_to_favorite_32dp);\n }\n else{\n crudFavorite.add(new Favorite(0, product));\n CommonPresenter.showSnackBarMessage(view, context.getString(R.string.lb_product_add_to_favorite));\n iProduct.changeImageRightResource(R.drawable.ic_favorite_32dp);\n }\n }\n }\n catch (Exception ex){\n Log.e(\"TAG_ERROR\", \"ProductPresenter-->addProductToFavorites() : \"+ex.getMessage());\n }\n }", "public void onFavouritesIconPressed() {\n if (currentAdvertIsFavourite()) {\n dataModel.removeFromFavourites(advertisement);\n view.setIsNotAFavouriteIcon();\n } else {\n dataModel.addToFavourites(advertisement);\n view.setIsAFavouriteIcon();\n }\n }", "public static void findFavourites() {\n DataManager.currentFavouritesList.clear();\n\n for (int i = 0; i < DataManager.fullFavouritesList.size(); i++) {\n Attraction attraction = DataManager.findAttractionByName(DataManager.fullFavouritesList.get(i));\n\n if (attraction != null) {\n DataManager.currentFavouritesList.add(attraction);\n }\n }\n\n FavouritesListFragment.backgroundLayout.setVisibility(DataManager.currentFavouritesList.size() == 0 ? View.VISIBLE : View.INVISIBLE);\n\n AttractionsListFragment.attractionsAdapter.notifyDataSetChanged();\n }", "@PostMapping(path = {\"/{id}\", \"/{id}/\"})\n public String favoriteGif(@PathVariable String id, @RequestHeader(\"Referer\") String referer) {\n val gif = gifService.findGifById(id);\n\n gifService.favoriteGifById(id);\n\n // Omit the \"/\" after redirect, as the referer is a fully-qualified URL\n return String.format(\"redirect:%s\", referer);\n }", "@Override\n\tpublic void getFavorit(int idUser) {\n\t\t\n\t}", "@Override\n public void FavouriteMovieSelected(View view) {\n if(view.getTag().equals(MovieDetailAdapter.FAVOURITE)) {\n StoreFavoriteMovieIntentService.startAction_ADD_FAV_MOVIE(getActivity(),\n mMovieItem,\n movieDeatailAdapter.getmMovieItemDetail());\n } else {\n StoreFavoriteMovieIntentService.removeFavriteMovie(getActivity(),mMovieItem.getId());\n }\n movieDeatailAdapter.notifyDataSetChanged();\n }", "private void populateFavoritesSections() {\n \tif (mUserProfile.userFavoriteAlbums != null && !Utils.isListEmpty(mUserProfile.userFavoriteAlbums.albums)) {\n \t\tmContainerFavoriteAlbums.setVisibility(View.VISIBLE);\n \t\t\n \t\tUserFavoriteAlbums userFavoriteAlbums = mUserProfile.userFavoriteAlbums;\n \t\tmTextFavoriteFavoriteAlbumsValue.setText(Integer.toString(userFavoriteAlbums.albumCount));\n \t\t\n \t\tStack<ImageView> favoriteAlbumsImages = new Stack<ImageView>();\n \t\tfavoriteAlbumsImages.add(mTextFavoriteFavoriteAlbum3);\n \t\tfavoriteAlbumsImages.add(mTextFavoriteFavoriteAlbum2);\n \t\tfavoriteAlbumsImages.add(mTextFavoriteFavoriteAlbum1);\n\n \t\tImageView albumImage = null;\n \t\t\n \t\tfor (MediaItem mediaItem : userFavoriteAlbums.albums) {\n \t\t\tif (favoriteAlbumsImages.isEmpty())\n \t\t\t\tbreak;\n \t\t\t\n \t\t\talbumImage = favoriteAlbumsImages.pop();\n \t\t\t\n \t\t\t//mImageFetcher.loadImage(mediaItem.getImageUrl(), albumImage);\n \t\t\t\n \t\t\tPicasso.with(getActivity()).cancelRequest(albumImage);\n \t\t\tif(getActivity() != null && mediaItem.getImageUrl() != null){\n \t\t\t\tPicasso.with(getActivity()).load(mediaItem.getImageUrl()).into(albumImage);\t\n \t\t\t}\n\t\t\t}\n \t\t\n \t} else {\n \t\tmContainerFavoriteAlbums.setVisibility(View.GONE);\n \t}\n \t\n \t// populates the favorite songs.\n \tif (mUserProfile.userFavoriteSongs != null && !Utils.isListEmpty(mUserProfile.userFavoriteSongs.songs)) {\n \t\tmContainerFavoriteSongs.setVisibility(View.VISIBLE);\n \t\t\n \t\tUserFavoriteSongs userFavoriteSongs = mUserProfile.userFavoriteSongs;\n \t\tmTextFavoriteSongsValue.setText(Integer.toString(userFavoriteSongs.songsCount));\n \t\t\n \t\tStack<TextView> favoriteSongsNames = new Stack<TextView>();\n \t\tfavoriteSongsNames.add(mTextFavoriteSong3Name);\n \t\tfavoriteSongsNames.add(mTextFavoriteSong2Name);\n \t\tfavoriteSongsNames.add(mTextFavoriteSong1Name);\n\n \t\tTextView songName = null;\n \t\t\n \t\tfor (MediaItem mediaItem : userFavoriteSongs.songs) {\n \t\t\tif (favoriteSongsNames.isEmpty())\n \t\t\t\tbreak;\n \t\t\t\n \t\t\tsongName = favoriteSongsNames.pop();\n \t\t\tsongName.setText(mediaItem.getTitle());\n\t\t\t}\n \t\t\n \t} else {\n \t\tmContainerFavoriteSongs.setVisibility(View.GONE);\n \t}\n \t\n \t// populates the favorite playlists.\n \tif (mUserProfile.userFavoritePlaylists != null && !Utils.isListEmpty(mUserProfile.userFavoritePlaylists.playlists)) {\n \t\tmContainerFavoritePlaylists.setVisibility(View.VISIBLE);\n \t\t\n \t\tUserFavoritePlaylists userFavoritePlaylists = mUserProfile.userFavoritePlaylists;\n \t\tmTextFavoritePlaylistValue.setText(Integer.toString(userFavoritePlaylists.playlistCount));\n \t\t\n \t\tStack<TextView> favoritePlaylistsNames = new Stack<TextView>();\n \t\tfavoritePlaylistsNames.add(mTextFavoritePlaylist3Name);\n \t\tfavoritePlaylistsNames.add(mTextFavoritePlaylist2Name);\n \t\tfavoritePlaylistsNames.add(mTextFavoritePlaylist1Name);\n\n \t\tTextView playlistsName = null;\n \t\t\n \t\tfor (MediaItem mediaItem : userFavoritePlaylists.playlists) {\n \t\t\tif (favoritePlaylistsNames.isEmpty())\n \t\t\t\tbreak;\n \t\t\t\n \t\t\tplaylistsName = favoritePlaylistsNames.pop();\n \t\t\tplaylistsName.setText(mediaItem.getTitle());\n\t\t\t}\n \t\t\n \t} else {\n \t\tmContainerFavoritePlaylists.setVisibility(View.GONE);\n \t}\n \t\n \t// populates the favorite videos.\n \tif (mUserProfile.userFavoriteVideos != null && !Utils.isListEmpty(mUserProfile.userFavoriteVideos.videos)) {\n \t\tmContainerFavoriteVideos.setVisibility(View.VISIBLE);\n \t\t\n \t\tUserFavoriteVideos userFavoriteVideos = mUserProfile.userFavoriteVideos;\n \t\tmTextFavoriteVideosValue.setText(Integer.toString(userFavoriteVideos.videoCount));\n \t\t\n \t\tStack<ImageView> favoriteVideosImages = new Stack<ImageView>();\n \t\tfavoriteVideosImages.add(mTextFavoriteVideo3);\n \t\tfavoriteVideosImages.add(mTextFavoriteVideo2);\n \t\tfavoriteVideosImages.add(mTextFavoriteVideo1);\n\n \t\tImageView videoImage = null;\n \t\t\n \t\tfor (MediaItem mediaItem : userFavoriteVideos.videos) {\n \t\t\tif (favoriteVideosImages.isEmpty())\n \t\t\t\tbreak;\n \t\t\t\n \t\t\tvideoImage = favoriteVideosImages.pop();\n \t\t\t\n \t\t\t//mImageFetcher.loadImage(mediaItem.getImageUrl(), videoImage);\n \t\t\t\n \t\t\tPicasso.with(getActivity()).cancelRequest(videoImage);\n \t\t\tif(getActivity() != null && !TextUtils.isEmpty(mediaItem.getImageUrl())){\n \t\t\t\tPicasso.with(getActivity()).load(mediaItem.getImageUrl()).into(videoImage); \t\t\t\t\n \t\t\t}\n\t\t\t}\n \t\t\n \t} else {\n \t\tmContainerFavoriteVideos.setVisibility(View.GONE);\n \t}\n\t}", "public interface FavoritesRetrievedListener {\n\n public void onFavoritesRetrieved(final List<Radio> radios);\n }", "protected void processRequest(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n response.setContentType(\"text/html;charset=UTF-8\");\n try {\n HttpSession session = request.getSession();\n UserDTO user = (UserDTO) session.getAttribute(\"USER\");\n List<Integer> listFoodId = FavoriteDAO.getFavoriteOfUser(user.getUserId());\n List<FoodDTO> listFood = new ArrayList<>();\n StringBuilder listFoodXML = new StringBuilder();\n listFoodXML.append(\"<foodlist>\");\n if (listFoodId.size() != 0) {\n for (int i = 0; i < listFoodId.size(); i++) {\n listFood.add(FoodDAO.getProductById(listFoodId.get(i)));\n listFoodXML.append(FoodDAO.getProductByIdXML(listFoodId.get(i)));\n }\n listFoodXML.append(\"</foodlist>\");\n request.setAttribute(\"LISTFOOD\", listFood);\n request.setAttribute(\"LISTFOODXML\", listFoodXML.toString());\n }\n request.getRequestDispatcher(\"myFavorite.jsp\").forward(request, response);\n } catch (Exception e) {\n e.printStackTrace();\n }\n }", "public void onLoadMenuMyFavoritesSelected();", "@GetMapping(\"/favourites\")\n public ResponseEntity<List<Favourite>> getAll() {\n\n\n logger.info(\"The Favourite List is Successfully found.\");\n\n return new ResponseEntity<>( favouriteDao.getAll(), HttpStatus.OK);\n }", "@Override\n public void onClick(View view) {\n Intent playlistIntent = new Intent(FavoriteActivity.this, PlaylistActivity.class);\n startActivity(playlistIntent);\n }", "public void setFavortieid(Integer favortieid) {\n this.favortieid = favortieid;\n }", "private void getAllFavorite(){\n\n\n MainViewModel viewModel = ViewModelProviders.of(this).get(MainViewModel.class);\n viewModel.getFavorite().observe(this, new Observer<List<FavoriteEntry>>() {\n @Override\n public void onChanged(@Nullable List<FavoriteEntry> imageEntries) {\n List<Movie> movies = new ArrayList<>();\n for (FavoriteEntry entry : imageEntries){\n Movie movie = new Movie();\n movie.setId(entry.getMovieid());\n movie.setOverview(entry.getOverview());\n movie.setOriginalTitle(entry.getTitle());\n movie.setPosterPath(entry.getPosterpath());\n movie.setVoteAverage(entry.getUserrating());\n movie.setReleaseDate(entry.getReleasedate());\n movies.add(movie);\n }\n\n adapter.setMovies(movies);\n }\n });\n }", "@FXML\n void favouriteSelected(ActionEvent event) {\n //gets artwork being sold by user's favourited sellers.\n String sqlSelect = \"Select distinct artworkid, typeofartwork, title, description, photo, nameofcreator, reservedprice, dateentered,\" +\n \"bidsallowed, mainmaterial, extraphotos, width, height, depth \" +\n \"from auction, artwork, favouriteuser where auction.auctionid = artwork.artworkid \" +\n \"and auction.seller in (select username2 from favouriteuser where username1 = '\"\n + this.username + \"');\";\n\n artworkTilePane.getChildren().clear(); //delete all previous artworks.\n getImages(FXCollections.observableArrayList(artworkDatabaseManager.getAllArtworks(sqlSelect)));\n }", "public void removeFavorite(){\n //check if movie is in the user favorite list\n if(mMovieStaff.alreadyFavorite(mMovie.getTMDBId())){\n //is in the favorite list, mark that list has changed\n mFavoriteChanged = true;\n\n //update movie item favorite status\n mMovie.setFavorite(false);\n\n //delete movie item from favorite database table\n mMovieValet.deleteFavorite(mMovie);\n\n //remove movie item from favorite movie list buffer\n mMovieStaff.removeFavorite(mMovie);\n }\n\n //check if movie list type is display a favorite list and if the device is a tablet\n if(mMovieType == PosterHelper.NAME_ID_FAVORITE && mIsTablet){\n //both yes, get favorite movies to update poster fragment\n getMovieList(PosterHelper.NAME_ID_FAVORITE);\n }\n }", "@GetMapping(\"/favourite-songs/{id}\")\n @Timed\n public ResponseEntity<FavouriteSong> getFavouriteSong(@PathVariable Long id) {\n log.debug(\"REST request to get FavouriteSong : {}\", id);\n FavouriteSong favouriteSong = favouriteSongRepository.findOne(id);\n return ResponseUtil.wrapOrNotFound(Optional.ofNullable(favouriteSong));\n }", "public void toggleFavorite() {\n\t\tsynchronized (this) {\n\t\t\tif (mFavoritesCache != null) {\n\t\t\t\tmFavoritesCache.toggleSong(getAudioId(), getTrackHost(),\n\t\t\t\t\t\tgetTrackName(), getAlbumName(), getArtistName());\n\t\t\t}\n\t\t}\n\t}", "public void addToFavorites() {\n\n // Create new content values object\n ContentValues contentValues = new ContentValues();\n\n contentValues.put(FavMovieEntry.COLUMN_MOVIE_ID, sMovie.getMovieId());\n contentValues.put(FavMovieEntry.COLUMN_MOVIE_TITLE, sMovie.getMovieTitle());\n contentValues.put(FavMovieEntry.COLUMN_MOVIE_ORIGINAL_TITLE, sMovie.getMovieOriginalTitle());\n contentValues.put(FavMovieEntry.COLUMN_POSTER_PATH, sMovie.getPoster());\n contentValues.put(FavMovieEntry.COLUMN_BACKDROP_PATH, sMovie.getMovieBackdrop());\n contentValues.put(FavMovieEntry.COLUMN_MOVIE_RELEASE_DATE, sMovie.getReleaseDate());\n contentValues.put(FavMovieEntry.COLUMN_MOVIE_RATING, sMovie.getVoteAverage());\n contentValues.put(FavMovieEntry.COLUMN_MOVIE_SYNOPSIS, sMovie.getPlotSynopsis());\n\n try {\n mCurrentMovieUri = getContentResolver().insert(FavMovieEntry.CONTENT_URI,\n contentValues);\n } catch (IllegalArgumentException e) {\n mCurrentMovieUri = null;\n Log.v(LOG_TAG, e.toString());\n }\n\n if (mCurrentMovieUri != null) {\n isAddedToFavorites();\n }\n\n }", "@Override\n public void onClick(View view) {\n isFavorite = !isFavorite;\n\n if (isFavorite) {\n Toast.makeText(ShowTeacherActivity.this,\n getString(R.string.message_teacher_add_to_favorites), Toast.LENGTH_SHORT)\n .show();\n presenter.saveFavorite(ShowTeacherActivity.this, teacher);\n ibFavorite.setImageResource(R.drawable.ic_favorite_full);\n } else {\n Toast.makeText(ShowTeacherActivity.this,\n getString(R.string.message_teacher_delete_from_favorites), Toast.LENGTH_SHORT)\n .show();\n presenter.deleteFavorite(ShowTeacherActivity.this, teacher.getId());\n ibFavorite.setImageResource(R.drawable.ic_favorite_border);\n }\n }", "public void toggleFavorites()\n {\n this.showFavorites = !this.showFavorites;\n this.setupMorphs(Morphing.get(this.mc.thePlayer));\n }", "public static void readFavorites(String userId, final ListView favoritesList, final Context context) {\n //get database reference\n DatabaseReference dbref = FirebaseDatabase.getInstance().getReference(\"users\").child(userId);\n //add eventlistener to reference\n dbref.child(\"favoritesList\").addValueEventListener(new ValueEventListener() {\n @Override\n public void onDataChange(DataSnapshot dataSnapshot) {\n\n\n ArrayList<String> favs = new ArrayList<>();\n\n for (DataSnapshot favDataSnapshot : dataSnapshot.getChildren()) {\n String fav = favDataSnapshot.getValue(String.class);\n favs.add(fav);\n }\n FoodController.readFavoriteFoods(favoritesList, context, favs);\n\n\n }\n\n @Override\n public void onCancelled(@NonNull DatabaseError databaseError) {\n\n }\n });\n }", "private ArrayList<MovieItem> getFavoriteMovies(){\n //get list of favorite movies from buffer\n ArrayList<MovieItem> movies = mMovieStaff.getMovies(PosterHelper.NAME_ID_FAVORITE);\n\n //check if favorite movie list has changed\n if(mFavoriteChanged){\n //list has changed, show new movie list\n showMovieList(movies, PosterHelper.NAME_ID_FAVORITE);\n }\n\n //return movie list\n return movies;\n }", "public void showFavorites() {\n System.out.println(\"Mina favoriter: \" + myFavorites.size());\n for (int i = 0; i < myFavorites.size(); i++) {\n System.out.println(\"\\n\" + (i + 1) + \". \" + myFavorites.get(i).getTitle() +\n \"\\nRegissör: \" + myFavorites.get(i).getDirector() + \" | \" +\n \"Genre: \" + myFavorites.get(i).getGenre() + \" | \" +\n \"År: \" + myFavorites.get(i).getYear() + \" | \" +\n \"Längd: \" + myFavorites.get(i).getDuration() + \" min | \" +\n \"Betyg: \" + myFavorites.get(i).getRating());\n }\n }", "public void onFavouritesPress(View view) {\n\n favouritesDBHandler.addGame(game);\n Toast.makeText(getContext(), game.getName() + \" has been added to your favourites!\", Toast.LENGTH_SHORT).show();\n\n }", "@Override\n public void onResume() {\n super.onResume();\n initListFavorite();\n }", "FavoriteQuestions() {\n list = SharedPrefs.getFavList();\n }", "@Override\n public void onItemClick(int position) {\n Gson gson = new Gson();\n String json = gson.toJson(favoritesList.get(position));\n Context context = getContext();\n Intent intent = new Intent(context, DetailsNeighbourActivity.class);\n intent.putExtra(\"json\", json);\n startActivity(intent);\n }", "private void updateFavoriteButtons() {\n new AsyncTask<Void, Void, Boolean>() {\n\n @Override\n protected Boolean doInBackground(Void... params) {\n return isFavorite();\n }\n\n @Override\n protected void onPostExecute(Boolean isFavorite) {\n if (isFavorite) {\n mButtonRemoveFavorites.setVisibility(View.VISIBLE);\n mButtonMarkAsFavorite.setVisibility(View.GONE);\n } else {\n mButtonMarkAsFavorite.setVisibility(View.VISIBLE);\n mButtonRemoveFavorites.setVisibility(View.GONE);\n }\n }\n }.executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR);\n\n mButtonMarkAsFavorite.setOnClickListener(\n new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n markAsFavorite();\n }\n });\n\n mButtonRemoveFavorites.setOnClickListener(\n new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n removeFromFavorites();\n }\n });\n }", "@Subscribe\n public void onFavoriteNeighbour(FavoriteNeighbourEvent event) {\n initFavoriteButtonUI();\n }", "private void getUsersFavorites(String user) throws TwitterException {\n System.out.println(\"##########Getting \".concat(user).concat(\" Likes##########\"));\n List<Status> tweets = twitter.getFavorites(user);\n List<User> topics = new LinkedList<>();\n for (Status status : tweets) {\n\n User userLike = status.getUser();\n if (!user.equals(userLike.getScreenName()))\n topics.add(status.getUser());\n\n }\n addEdgesToGraph(user, topics);\n }", "public boolean isAlreadyFavorited(){\r\n if(ui.isIsUserAuthenticated()){\r\n Users user = ui.getUser();\r\n if(user.getFavorites() != null){\r\n return user.getFavorites().contains(recipe);\r\n }\r\n else{\r\n return false;\r\n }\r\n }\r\n else{\r\n return false;\r\n }\r\n }", "@Subscribe\n public void handleUnfavoriteEvent(UnfavoriteEvent event) {\n Logger.d(\"UnfavoriteEvent\");\n DataHelper.setFavoriteVideo(getContentResolver(), event.getVideoId(), false);\n DataHelper.deleteFavorite(getContentResolver(), event.getVideoId());\n// DataHelper.setFavoriteVideo(getContentResolver(), event.getEventData().getEventData().getResponse().getVideoId(), false);\n }", "@SuppressWarnings(\"unchecked\")\n\tprotected void updateSessionFavorites(SMTSession session, PageViewVO fav, boolean isDelete) {\n\t\t// get the Favs map off of the session.\n\t\tMap<String,List<PageViewVO>> favMap = (Map<String,List<PageViewVO>>)session.getAttribute(MyFavoritesAction.MY_FAVORITES);\n\t\tList<PageViewVO> favs = favMap.get(fav.getReferenceCode());\n\t\tif (favs == null) favs = new ArrayList<>();\n\t\tif (isDelete) {\n\t\t\t// remove fav\n\t\t\tremoveFromSession(favs, fav.getPageId());\n\t\t} else {\n\t\t\t// add fav\n\t\t\tfavs.add(fav);\n\t\t}\n\t\t// replace the favs map on the session.\n\t\tsession.setAttribute(MyFavoritesAction.MY_FAVORITES, favMap);\n\t}", "@FXML\n private void selectedSong() {\n if(isFav){\n String s = songList.getSelectionModel().getSelectedItem(); // selection song from favorite playlist //\n songFile = FavoriteSong(s); \n } \n else{\n String s = songList.getSelectionModel().getSelectedItem(); // selection song from music playlist //\n if(s!=null && !s.isEmpty()){\n int selectedSong = songList.getSelectionModel().getSelectedIndex();\n songFile = songs[selectedSong];\n }\n }\n playButtonAction();\n }", "@Override\n\tpublic void addFavorit(FavorisImpl newfavorit) {\n\t\t\n\t}", "@Override\n public void onFavoriteDatabaseChanged() {\n //setCategoryCount(FileCategory.Favorite, mFavoriteList.getCount());\n }", "@Override\r\n\tprotected void onCreate(Bundle savedInstanceState) {\n\t\tsuper.onCreate(savedInstanceState);\r\n\t\tSharedPreferences pres = this.getSharedPreferences(\"parameters\",\r\n\t\t\t\tContext.MODE_PRIVATE);\r\n\t\tString sina_access_token = pres.getString(\"sina_access_token\", \"\");\r\n\t\tString sina_access_secret = pres.getString(\"sina_access_secret\", \"\");\r\n\t\tIntent intent = getIntent();\r\n\t\tString weiBoID = intent.getStringExtra(\"weiBoID\");\r\n\r\n\t\t// http://api.t.sina.com.cn/favorites/create.json\r\n\t\turl = \"http://api.t.sina.com.cn/favorites/create.json\";\r\n//\t\tOauthUtils.getInstance().initSinaData();\r\n//\t\tjsonData = new Weibo().addfavorite(url, httpMethod, sina_access_token,\r\n//\t\t\t\tsina_access_secret, weiBoID, null);\r\n\t\ttry {\r\n\t\t\tjsonObj = new JSONObject(jsonData);\r\n\t\t} catch (JSONException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\ttry {\r\n\t\t\tif (jsonObj.getString(\"id\").equals(weiBoID)) {\r\n\t\t\t\tsign = \"收藏成功!\";\r\n\t\t\t} else {\r\n\t\t\t\tsign = \"收藏失败!\";\r\n\t\t\t}\r\n\t\t} catch (JSONException e) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\tToast.makeText(FavoriteListActivity.this, sign, Toast.LENGTH_SHORT).show();\r\n\t\tfinish();\r\n\r\n\t}", "@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.action_settings) {\r\n if(item.getTitle().equals(\"Add to Favorites\")) {\r\n SharedPreferences commonpreferences = getSharedPreferences(\"Common\", Context.MODE_PRIVATE);\r\n SharedPreferences.Editor editor1 = commonpreferences.edit();\r\n\r\n String value1 = url_fav + \" \" + name_fav + \" \" + type_fav;\r\n\r\n\r\n editor1.putString(id_fav, value1);\r\n editor1.commit();\r\n if (type_fav.equals(\"Users\")) {\r\n SharedPreferences userpreferences = getSharedPreferences(\"Users\", Context.MODE_PRIVATE);\r\n SharedPreferences.Editor editor = userpreferences.edit();\r\n\r\n String value = url_fav + \" \" + name_fav + \" \" + type_fav;\r\n\r\n\r\n editor.putString(id_fav, value);\r\n editor.commit();\r\n } else if (type_fav.equals(\"Pages\")) {\r\n SharedPreferences pagepreferences = getSharedPreferences(\"Pages\", Context.MODE_PRIVATE);\r\n SharedPreferences.Editor editor = pagepreferences.edit();\r\n\r\n String value = url_fav + \" \" + name_fav + \" \" + type_fav;\r\n\r\n\r\n editor.putString(id_fav, value);\r\n editor.commit();\r\n } else if (type_fav.equals(\"Events\")) {\r\n SharedPreferences eventpreferences = getSharedPreferences(\"Events\", Context.MODE_PRIVATE);\r\n SharedPreferences.Editor editor = eventpreferences.edit();\r\n\r\n String value = url_fav + \" \" + name_fav + \" \" + type_fav;\r\n\r\n\r\n editor.putString(id_fav, value);\r\n editor.commit();\r\n } else if (type_fav.equals(\"Places\")) {\r\n SharedPreferences placepreferences = getSharedPreferences(\"Places\", Context.MODE_PRIVATE);\r\n SharedPreferences.Editor editor = placepreferences.edit();\r\n\r\n String value = url_fav + \" \" + name_fav + \" \" + type_fav;\r\n\r\n\r\n editor.putString(id_fav, value);\r\n editor.commit();\r\n } else if (type_fav.equals(\"Groups\")) {\r\n SharedPreferences grouppreferences = getSharedPreferences(\"Groups\", Context.MODE_PRIVATE);\r\n SharedPreferences.Editor editor = grouppreferences.edit();\r\n\r\n String value = url_fav + \" \" + name_fav + \" \" + type_fav;\r\n\r\n\r\n editor.putString(id_fav, value);\r\n editor.commit();\r\n }\r\n\r\n Toast.makeText(getApplicationContext(), \"Added to Favorites\", Toast.LENGTH_LONG).show();\r\n }\r\n else\r\n {\r\n SharedPreferences commonpreferences = getSharedPreferences(\"Common\", Context.MODE_PRIVATE);\r\n SharedPreferences.Editor editor1 = commonpreferences.edit();\r\n editor1.remove(id_fav);\r\n editor1.commit();\r\n\r\n if (type_fav.equals(\"Users\")) {\r\n SharedPreferences userpreferences = getSharedPreferences(\"Users\", Context.MODE_PRIVATE);\r\n SharedPreferences.Editor editor = userpreferences.edit();\r\n\r\n editor.remove(id_fav);\r\n editor.commit();\r\n } else if (type_fav.equals(\"Pages\")) {\r\n SharedPreferences pagepreferences = getSharedPreferences(\"Pages\", Context.MODE_PRIVATE);\r\n SharedPreferences.Editor editor = pagepreferences.edit();\r\n\r\n editor.remove(id_fav);\r\n editor.commit();\r\n } else if (type_fav.equals(\"Events\")) {\r\n SharedPreferences eventpreferences = getSharedPreferences(\"Events\", Context.MODE_PRIVATE);\r\n SharedPreferences.Editor editor = eventpreferences.edit();\r\n\r\n editor.remove(id_fav);\r\n editor.commit();\r\n } else if (type_fav.equals(\"Places\")) {\r\n SharedPreferences placepreferences = getSharedPreferences(\"Places\", Context.MODE_PRIVATE);\r\n SharedPreferences.Editor editor = placepreferences.edit();\r\n\r\n editor.remove(id_fav);\r\n editor.commit();\r\n } else if (type_fav.equals(\"Groups\")) {\r\n SharedPreferences grouppreferences = getSharedPreferences(\"Groups\", Context.MODE_PRIVATE);\r\n SharedPreferences.Editor editor = grouppreferences.edit();\r\n\r\n editor.remove(id_fav);\r\n editor.commit();\r\n }\r\n\r\n\r\n Toast.makeText(getApplicationContext(), \"Removed from Favorites\", Toast.LENGTH_LONG).show();\r\n }\r\n //SharedPreferences.Editor editor = sharedpreferences.edit();\r\n //editor.putString(\"Name\", \"Rachit\");\r\n //SharedPreferences events=getSharedPreferences(\"Events\", Context.MODE_PRIVATE);\r\n //String l=\"-1\";\r\n //String value=events.getString(id_fav,l);\r\n //editor.commit();\r\n return true;\r\n }\r\n else if (id == R.id.share) {\r\n if (ShareDialog.canShow(ShareLinkContent.class)) {\r\n ShareLinkContent linkContent = new ShareLinkContent.Builder()\r\n .setContentUrl(Uri.parse(\"http://developers.facebook.com/android\"))\r\n .build();\r\n shareDialog.show(linkContent);\r\n }\r\n\r\n }\r\n\r\n return super.onOptionsItemSelected(item);\r\n }", "public void fetchFavoritedMovies() {\n favoritesSelected = true;\n Cursor cursor =\n getActivity().getContentResolver().query(MovieContract.FavoriteMovieEntry.CONTENT_URI,\n null,\n null,\n null,\n null);\n ArrayList<MovieModel> movieModels = new ArrayList<>();\n if (cursor != null) {\n while (cursor.moveToNext()) {\n MovieModel movieModel = new MovieModel(getActivity(), cursor);\n // Get the trailers and reviews\n String movieId = cursor.getString(cursor.getColumnIndex(MovieContract.FavoriteMovieEntry._ID));\n Cursor trailerCursor =\n getActivity().getContentResolver().query(MovieContract.TrailerEntry.CONTENT_URI,\n null,\n MovieContract.TrailerEntry.COLUMN_MOVIE_KEY + \" = ?\",\n new String[]{movieId},\n null);\n Cursor reviewCursor =\n getActivity().getContentResolver().query(MovieContract.ReviewEntry.CONTENT_URI,\n null,\n MovieContract.ReviewEntry.COLUMN_MOVIE_KEY + \" = ?\",\n new String[]{movieId},\n null);\n ArrayList<MovieTrailerModel> movieTrailerModels = new ArrayList<>();\n ArrayList<MovieReviewModel> movieReviewModels = new ArrayList<>();\n if (trailerCursor != null) {\n while (trailerCursor.moveToNext()) {\n movieTrailerModels.add(new MovieTrailerModel(getActivity(), trailerCursor));\n }\n trailerCursor.close();\n }\n if (reviewCursor != null) {\n while (reviewCursor.moveToNext()) {\n movieReviewModels.add(new MovieReviewModel(getActivity(), reviewCursor));\n }\n reviewCursor.close();\n }\n movieModel.setReviews(movieReviewModels);\n movieModel.setTrailers(movieTrailerModels);\n movieModels.add(movieModel);\n }\n cursor.close();\n }\n movieGridAdapter.setMovieModels(movieModels);\n }", "public interface IFavoriteService {\n\n\tList<Favorite> getFavorites();\n\n\tList<Favorite> getFavoritesByGenre(GenreType genreType);\n\n\tList<Favorite> getFavoritesByParent(FavoriteCategory parent);\n\n\tList<Favorite> getFavoritesByParentId(int parentId);\n\n\tList<Favorite> getFavoritesByRate(int rate);\n\n\tList<Favorite> getFavoritesByBackupStatus(boolean isBackup);\n\n\tList<Favorite> getFavoritesByModifyStatus(boolean isModified);\n\n\tint getFavoriteCountInRate(int rate);\n\n\tint getFavoriteCountInCategory(int parentId);\n\n\tvoid delete(Favorite favorite);\n\n\tvoid delete(List<Favorite> favorites);\n\n\tvoid update(Favorite favorite);\n\n\tvoid update(List<Favorite> favorites);\n\n\tvoid insert(Favorite favorite);\n\n\tvoid insert(List<Favorite> favorites);\n\n\tList<FavoriteCategory> getFavoriteCategories();\n\n\tList<FavoriteCategory> getFavoriteCategoriesByRate(int rate);\n\n\tList<FavoriteCategory> getFavoriteCategoriesByBackupStatus(boolean isBackup);\n\n\tList<FavoriteCategory> getFavoriteCategoriesByModifyStatus(boolean isModified);\n\n\tvoid insertCategory(FavoriteCategory category);\n\n\tvoid insertCategory(List<FavoriteCategory> categories);\n\n\tvoid updateCategory(FavoriteCategory category);\n\n\tvoid updateCategories(List<FavoriteCategory> categories);\n\n\tvoid deleteCategory(FavoriteCategory category);\n\n\tvoid deleteCategories(List<FavoriteCategory> categories);\n}", "@Override\n protected void onActivityResult(int requestCode, int resultCode, Intent data) {\n if (requestCode == 1) {\n if (resultCode == Activity.RESULT_OK && currentSelection == 4 && data.getBooleanExtra(\"hovno\", false)) {\n new LoadFetchDbFavs(getApplicationContext(), new LoadFetchDbFavsCompleteListener()).execute();\n }\n }\n }", "public void setFavorite(boolean favorite) {\n this.favorite = favorite;\n }", "boolean isFavorite(int id);", "public Favorites_Adapter(Context context, ArrayList<POJOStoreInfo> FavouriteStoreDetails,String classname,String pageflag){\r\n\t\tFavoritesInflater = LayoutInflater.from(context);\r\n\t\tthis.FavoritesContext = context;\r\n\t\tthis.mFavouriteStoreList = FavouriteStoreDetails;\r\n\t\timageLoader=new ImageLoader(context);\r\n\t\tthis.mClassName=classname;\r\n\t\tthis.mPageFlag=pageflag;\r\n\t}", "public void onClickLike() {\r\n\t\ttry {\r\n\t\t\tJSONObject mChannelData = mListChannelsData.getJSONObject(mCurrentPosition);\r\n\t\t\tString channelId = mChannelData.getString(ListChannelsServices.id);\r\n\t\t\tString channelName = mChannelData.getString(ListChannelsServices.name);\r\n\t\t\tif (mDatabaseDAO.checkFavouriteChannelExist(channelId)) {\r\n\t\t\t\tmDatabaseDAO.deleteFavouriteChannel(channelId);\r\n\t\t\t\t((ImageView)mActivity.findViewById(R.id.img_like)).setImageResource(R.drawable.ic_like);\r\n\t\t\t\tUtils.toast(mActivity, getString(R.string.removed_from_favourite_channel));\r\n\t\t\t} else {\r\n\t\t\t\tmDatabaseDAO.insertFavouriteChannel(channelId, \"\", mChannelData.toString());\r\n\t\t\t\t((ImageView)mActivity.findViewById(R.id.img_like)).setImageResource(R.drawable.ic_like_yes);\r\n\t\t\t\tUtils.toast(mActivity, getString(R.string.added_to_favourite_channel));\r\n\t\t\t\t\r\n\t\t\t\t// Google Analytics\r\n\t\t\t\tString action = channelName;\r\n\t\t\t\tEasyTracker.getTracker().trackEvent(NameSpace.GA_CATEGORY_MOST_LIKED_CHANNELS, action, null, 1L);\r\n\t\t\t}\r\n\t\t} catch (Exception e) {\r\n\t\t\t// TODO: handle exception\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t}", "private boolean isAddedToFavorites() {\n boolean isFavorite = false;\n\n String[] projection = {FavMovieEntry.COLUMN_MOVIE_ID};\n String selection = FavMovieEntry.COLUMN_MOVIE_ID + \"=?\";\n String[] selectionArgs = new String[]{\n String.valueOf(sMovie.getMovieId())};\n\n Cursor cursor = this.getContentResolver().query(\n FavMovieEntry.CONTENT_URI,\n projection,\n selection,\n selectionArgs,\n null\n );\n\n if (cursor != null && cursor.moveToFirst()) {\n if (cursor.getCount() > 0) {\n isFavorite = true;\n long currentIndex = cursor.getLong(cursor.getColumnIndex(FavMovieEntry.COLUMN_MOVIE_ID));\n mCurrentMovieUri = ContentUris.withAppendedId(FavMovieEntry.CONTENT_URI, currentIndex);\n } else {\n isFavorite = false;\n\n mCurrentMovieUri = null;\n }\n cursor.close();\n }\n\n return isFavorite;\n }", "private Cursor loadFavorites() {\n PermissionUtils.checkPermissionsGranted(getContext(), new String[]{READ_CONTACTS}, true);\n String selection = ContactsCursorLoader.COLUMN_STARRED + \" = 1\";\n return getContext().getContentResolver().query(\n buildFavoritesUri(),\n getProjection(),\n selection,\n null,\n getSortOrder());\n }", "public final void resetFavorites() {\n Favorites favorites = Favorites.INSTANCE;\n favorites.clear();\n favorites.load(this.persistenceWrapper.readFavorites());\n }", "public void deliverResult(Cursor data) {\n favoriteIds = loadCursorDataArray(data);\n //check if the given movie is among them\n isFavorite = checkIfFavorite();\n movie.setFavorite(isFavorite);\n imageName = movie.getPosterPath();\n\n if (movie.isFavorite()) {\n star.setImageResource(R.drawable.ic_grade_yellow_36px);\n favoritesIdsData = data;\n super.deliverResult(data);\n\n } else {\n star.setImageResource(R.drawable.ic_grade_gray_36px);\n\n }\n }", "public void onConfirmFavouriteDeletion();", "public void writeFavorites() {\n ArrayList<String> favorites = new ArrayList<>();\n for(Landmark landmark : landmarks.getFavorites()) {\n favorites.add(landmark.toStringForOutput());\n }\n FileManager.writeLines(favoritesPath, favorites);\n }", "private void deleteFav() {\n\n // Call the ContentResolver to delete the favourite at the given content URI.\n // Pass in null for the selection and selection args because the mCurrentFavUri\n // content URI already identifies the fav that we want.\n int rowsDeleted = getContentResolver().delete(mCurrentFavUri, null, null);\n\n // Show a toast message depending on whether or not the delete was successful.\n if (rowsDeleted == 0) {\n // If no rows were deleted, then there was an error with the delete.\n Toast.makeText(this, getString(R.string.editor_delete_pet_failed),\n Toast.LENGTH_SHORT).show();\n } else {\n // Otherwise, the delete was successful and we can display a toast.\n Toast.makeText(this, getString(R.string.editor_delete_pet_successful),\n Toast.LENGTH_SHORT).show();\n }\n\n // Close the activity\n finish();\n }", "public int getNumOfFav() {\n return fullPhoto.getNumOfFav();\n }", "void addToFavorites(int recipeId);", "public void setFavorite(boolean favorite) {\n isFavorite = favorite;\n }", "public void requestWishList() {\n if (!hasInternetConnection()) {\n PromeetsDialog.show(this, getString(R.string.no_internet));\n } else {\n UserPOJO userPOJO = (UserPOJO) PromeetsUtils.getUserData(PromeetsPreferenceUtil.USER_OBJECT_KEY, UserPOJO.class);\n if (userPOJO == null) finish();\n String[] key = {Constant.USERID, Constant.PAGENUMBER};\n String[] value = {userPOJO.id + \"\", page + \"\"};\n\n PromeetsDialog.showProgress(this);\n HashMap<String, String> header = new HashMap<>();\n header.put(\"ptimestamp\", ServiceHeaderGeneratorUtil.getInstance().getPTimeStamp());\n header.put(\"promeetsT\", ServiceHeaderGeneratorUtil.getInstance().getPromeetsTHeader(Constant.FETCH_MY_WISH_LIST));\n header.put(\"accessToken\", ServiceHeaderGeneratorUtil.getInstance().getAccessToken());\n header.put(\"API_VERSION\", Utility.getVersionCode());\n new GenericServiceHandler(Constant.ServiceType.WISH_LIST, this, PromeetsUtils.buildURL(Constant.FETCH_MY_WISH_LIST, key, value), null, header, IServiceResponseHandler.GET, false, \"Please wait!\", \"Processing..\").execute();\n }\n }", "@Override\n public void gofavouritepage() {\n getSupportFragmentManager().beginTransaction().replace(R.id.fragment_container_home,new FavouriteFragment()).addToBackStack(\"Homepage\").commit();\n }", "@Override\n public int getProductFavouritesCount(Map<String, Object> params) {\n return yourFavouritesDetaildao.getProductFavouritesCount(params);\n }", "private void removeFromFavorites() {\n favoriteBool = false;\n preferencesConfig.writeRemoveFavoriteTip(shownTipIndex);\n Toast.makeText(getContext(), \"Removed from favorites\", Toast.LENGTH_SHORT).show();\n\n }", "@Nullable\r\n public static List<Product> getFavoriteProducts(final Context context)\r\n {\r\n final SharedPreferencesManager sharedPreferencesManager = new SharedPreferencesManager(context);\r\n\r\n final User user = sharedPreferencesManager.retrieveUser();\r\n\r\n final String fixedURL = Utils.fixUrl(\r\n Properties.SERVER_URL + \":\" + Properties.SERVER_SPRING_PORT + \"/users/favorites/\" + user.getId());\r\n\r\n Log.d(Properties.TAG, \"[REST_CLIENT_SINGLETON] Conectando con: \" + fixedURL + \" para otener los productos favoritos\");\r\n\r\n RequestFuture<JSONArray> future = RequestFuture.newFuture();\r\n\r\n // Creamos una peticion.\r\n JsonArrayRequest jsonObjReq = new JsonArrayRequest(Request.Method.GET\r\n , fixedURL\r\n , null\r\n , future\r\n , future);\r\n\r\n // La mandamos a la cola de peticiones.\r\n VolleySingleton.getInstance(context).addToRequestQueue(jsonObjReq);\r\n Log.d(Properties.TAG, \"[REST_CLIENT_SINGLENTON] Petición creada y enviada\");\r\n\r\n try\r\n {\r\n JSONArray response = future.get(20, TimeUnit.SECONDS);\r\n\r\n Log.d(Properties.TAG, \"[REST_CLIENT_SINGLENTON] Se parsean los JSONs recibidos\");\r\n List<Product> favorites = JSONParser.convertJSONsToProducts(response);\r\n Set<Long> userFavorites = new HashSet<>();\r\n for (Product favorite : favorites)\r\n {\r\n userFavorites.add(favorite.getId());\r\n }\r\n\r\n Log.d(Properties.TAG, \"[REST_CLIENT_SINGLENTON] Se actualiza la lista de favoritos del usuario\");\r\n user.setFavoriteProducts(userFavorites);\r\n sharedPreferencesManager.insertUser(user);\r\n\r\n return favorites;\r\n\r\n } catch (ExecutionException | InterruptedException | TimeoutException e) {\r\n Log.e(Properties.TAG, \"[REST_CLIENT_SINGLETON] Error conectando con el servidor: \" + e.getMessage());\r\n ExceptionPrinter.printException(\"REST_CLIENT_SINGLETON\", e);\r\n\r\n return null;\r\n\r\n } catch (JSONException e) {\r\n Log.e(Properties.TAG, \"[REST_CLIENT_SINGLETON] Error parseando los productos: \" + e.getMessage());\r\n ExceptionPrinter.printException(\"REST_CLIENT_SINGLETON\", e);\r\n\r\n return null;\r\n }\r\n }", "public static boolean checkForFavorite(Context context,String id){\n Set<String> setSavedFav = getAllFavorites(context);\n if(setSavedFav!=null){\n Log.v(TAG,\"SAVED ID: \"+setSavedFav);\n if(setSavedFav.contains(id))\n return true;\n }\n return false;\n }", "@RequestMapping(value = \"/list/\", method = RequestMethod.GET, produces = {\"application/hal+json\"})\n\tpublic List<FavouriteJobs> getAllFavJobs(){\n\t\tList<FavouriteJobs> favJobsList = null;\n\t\ttry {\n\t\t\tfavJobsList = favJobService.getAllFavJobs();\n\t\t} catch(Exception e) {\n\t\t\t//TODO: Exception Handle\n\t\t}\n\t\t\n\t\treturn favJobsList;\n\t}", "@Override\n public List<ProductPojo> getProductFavouritesList(Map<String, Object> params) {\n return yourFavouritesDetaildao.getProductFavouritesList(params);\n }" ]
[ "0.6910567", "0.6710623", "0.63564026", "0.6314854", "0.6314068", "0.6284689", "0.6258011", "0.6189846", "0.61865145", "0.6121911", "0.60870886", "0.6079946", "0.6015214", "0.59834886", "0.597886", "0.597282", "0.5966132", "0.59072566", "0.5888393", "0.5870886", "0.58697754", "0.58662117", "0.58535016", "0.5850544", "0.58364993", "0.5816803", "0.5793768", "0.5781165", "0.57633555", "0.5757221", "0.5736375", "0.57004136", "0.569979", "0.5663558", "0.56572926", "0.56528187", "0.56509846", "0.5639378", "0.5620952", "0.56160086", "0.561044", "0.5605007", "0.5591143", "0.5581751", "0.55815524", "0.55782527", "0.55764526", "0.5573713", "0.5572893", "0.55664355", "0.5538066", "0.5535397", "0.5533601", "0.5516024", "0.5496841", "0.54953736", "0.5490275", "0.5477822", "0.547649", "0.54737914", "0.544136", "0.54375446", "0.540702", "0.54067075", "0.53962004", "0.5374878", "0.5372478", "0.5354848", "0.53410447", "0.5340477", "0.5332166", "0.5329658", "0.5328918", "0.5326875", "0.53261524", "0.5317021", "0.5315215", "0.5304449", "0.5303279", "0.53031534", "0.5293758", "0.52878976", "0.52685165", "0.52675605", "0.52592194", "0.5258105", "0.5255653", "0.5229601", "0.5224994", "0.5215315", "0.5207006", "0.52042615", "0.519833", "0.5186946", "0.5186028", "0.5181237", "0.5165576", "0.5164809", "0.51518846", "0.5146826" ]
0.6514942
2
Handles requests to categories page
@RequestMapping("/categories") public String categories(ModelMap modelMap) { List<Category> categories = categoryRepository.getAllCategories(); modelMap.put("categories", categories); return "categories"; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@RequestMapping(\"\")\n\tpublic ModelAndView category(){\n\t\tJSONObject json = categoryService.getAllCategorys();\n\t\tModelAndView mv = new ModelAndView(\"category/category\");\n\t\tmv.addObject(\"categories\",json);\n\t\tmv.addObject(\"active\", \"2\");\n\t\treturn mv;\n\t}", "public String getManageCategories( HttpServletRequest request )\r\n {\r\n setPageTitleProperty( PAGE_TITLE_MANAGE_CATEGORY );\r\n\r\n CategoryFilter filter = getCategoryFilter( request );\r\n List<String> orderList = new ArrayList<String>( );\r\n orderList.add( BilletterieConstants.NAME );\r\n filter.setOrders( orderList );\r\n filter.setOrderAsc( true );\r\n\r\n // Fill the model\r\n Map<String, Object> model = new HashMap<String, Object>( );\r\n\r\n // Obtention des objets sauvegardés en session\r\n DataTableManager<ShowCategoryDTO> dataTableToUse = getDataTable( request, filter );\r\n model.put( MARK_DATA_TABLE_CATEGORY, dataTableToUse );\r\n\r\n model.put( TicketsConstants.MARK_NB_ITEMS_PER_PAGE, String.valueOf( _nItemsPerPage ) );\r\n model.put( TicketsConstants.MARK_FILTER, filter );\r\n\r\n HtmlTemplate template = AppTemplateService.getTemplate( TEMPLATE_MANAGE_CATEGORIES, getLocale( ), model );\r\n\r\n // opération nécessaire pour eviter les fuites de mémoires\r\n dataTableToUse.clearItems( );\r\n\r\n return getAdminPage( template.getHtml( ) );\r\n }", "private void loadCategories() {\n\t\tcategoryService.getAllCategories(new CustomResponseListener<Category[]>() {\n\t\t\t@Override\n\t\t\tpublic void onHeadersResponse(Map<String, String> headers) {\n\t\t\t}\n\n\t\t\t@Override\n\t\t\tpublic void onErrorResponse(VolleyError error) {\n\t\t\t\tLog.e(\"EditTeamProfileActivity\", \"Error while loading categories\", error);\n\t\t\t\tToast.makeText(EditTeamProfileActivity.this, \"Error while loading categories \" + error.getMessage(), Toast.LENGTH_LONG).show();\n\t\t\t}\n\n\t\t\t@Override\n\t\t\tpublic void onResponse(Category[] response) {\n\t\t\t\tCollections.addAll(categories, response);\n\n\t\t\t\tif (null != categoryRecyclerAdapter) {\n\t\t\t\t\tcategoryRecyclerAdapter.setSelected(0);\n\t\t\t\t\tcategoryRecyclerAdapter.notifyDataSetChanged();\n\t\t\t\t}\n\n\t\t\t\tupdateSelectedCategory();\n\t\t\t}\n\t\t});\n\t}", "@GetMapping(\"/categoriesfu\")\n public synchronized List<Category> getAllCategories() {\n log.debug(\"REST request to get a page of Categories\");\n //fu\n final String user =SecurityUtils.getCurrentUserLogin().get();\n final UserToRestaurant userToRestaurant=userToRestaurantRepository.findOneByUserLogin(user);\n final Restaurant restaurant=userToRestaurant.getRestaurant();\n return categoryRepository.findAllByRestaurant(restaurant);\n }", "public static void afficherCategories(HttpServletRequest request){\n\t\trequest.setAttribute(\"categories\", ManagerProduit.getCategories());\n\t}", "public String searchCategory()\n {\n logger.info(\"**** In searchCategory in Controller ****\");\n categoryList = categoryService.getCategories();\n return Constants.SEARCH_CATEGORY_VIEW;\n }", "@Override\n\n // If the request is succesfull\n public void onResponse(JSONObject response) {\n try {\n JSONArray categoriesArray = response.getJSONArray(\"categories\");\n for (int i = 0; i < categoriesArray.length(); i++){\n categories.add(categoriesArray.getString(i));\n }\n }\n catch (JSONException e) {\n Log.e(\"Request\", e.getMessage());\n }\n activity.gotCategories(categories);\n }", "@RequestMapping(value = \"/allCategory\", method = RequestMethod.POST)\r\n\tpublic ModelAndView loadallCategory() {\r\n\t\tModelAndView modelAndView = null;\r\n\t\tList<Category> categoryObjLst = chooseAssessmentService.fetchAssessmentCategory();\r\n\t\tChooseAssessment assessment = new ChooseAssessment();\r\n\t\tassessment.setCategoryObjList(categoryObjLst);\r\n\t\tmodelAndView = new ModelAndView(\"attemptsQuestionsPage\", \"assessment\", assessment);\r\n\r\n\t\tmodelAndView.addObject(\"categoryObjs\", categoryObjLst);\r\n\t\treturn modelAndView;\r\n\t}", "public static void loopCategories() throws IOException {\n //If all of the categories haven't been checked yet check the response at the current index (count).\n if (count < CATEGORY_ARRAY_SIZE) {\n //If that response if equal to TRUE (1).\n if (currentUser.getSingleCategory(count) == TRUE) {\n //Adjust the start index.\n startIndex = count * LOCATIONS_PER_CATEGORY;\n //Call the locaitons view.\n Main.FxmlLoader(LOCATIONS_PATH);\n }\n //Otherwise increment count and check the next index recursively.\n else {\n count++;\n loopCategories();\n }\n }\n }", "private void renderCategories(){\n int[] arr = {1, 3, 6, 8, 10};\r\n for (int i : arr) requestQueue.add(getDataFromServer(webURL, String.valueOf(i)));\r\n }", "@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n String pageId = request.getParameter(\"pageid\");\n\n // return the pageId if number or return 0\n long id = pageId != null && Helper.isNumber(pageId) ? Long.parseLong(pageId) : 0;\n\n if (id != 0) {\n // get categoryItems with dessending order\n List<Item> categoryItems = new CategoryDaoImpl(getServletContext()).getCategoryItems(id, \"DESC\");\n\n // set categoryItems to request\n request.setAttribute(\"categoryItems\", categoryItems);\n\n // forword request to show category items page\n Helper.forwardRequest(request, response, ViewPath.show_category);\n } else {\n Helper.redriectToPrevPage(request, response, \"You Must Add Page ID\", true);\n }\n }", "ListCategoryResponse listCategories(ListCategoryRequest request);", "private void getCategoryList() {\n jsonArray = dataBaseHelper.getCategoriesFromDB();\n if (jsonArray != null && jsonArray.length() > 0) {\n rvCategories.setVisibility(View.VISIBLE);\n setupCategoryListAdapter(jsonArray);\n }else {\n rvCategories.setVisibility(View.GONE);\n Toast.makeText(getActivity(), Constants.ERR_NO_CATEGORY_FOUND, Toast.LENGTH_SHORT).show();\n }\n }", "public void setCategories(Categories categories) {\n this.categories = categories;\n }", "private void loadCategories(CategoriesCallback callback) {\n CheckItemsActivity context = this;\n makeRestGetRequest(RestClient.CATEGORIES_URL, (success, response) -> {\n if (!success) {\n Toast.makeText(context, LOAD_CATEGORIES_FAIL, Toast.LENGTH_SHORT).show();\n // TODO: finish activity\n } else {\n try {\n categories = ModelsBuilder.getCategoriesFromJSON(response);\n // set categories list to spinner (common category spinner) and listener for it\n ArrayAdapter<String> spinnerAdapter = new ArrayAdapter<>(context,\n android.R.layout.simple_spinner_item,\n categories);\n spinnerAdapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);\n categorySpinner.setAdapter(spinnerAdapter);\n categorySpinner.setOnItemSelectedListener(new OnCommonCategorySelected());\n } catch (JSONException e) {\n success = false;\n Log.d(DEBUG_TAG, \"Load categories parsing fail\");\n }\n }\n // inform waiting entities (e.g. waiting for items list loading start)\n callback.onLoadedCategories(success);\n });\n }", "@GetMapping(\"/category\")\n\t public ResponseEntity<List<Category>> getcategorys() {\n\n\t List<Category> list = categoryService.getAllcategorys();\n\t if (list.size() <= 0) {\n\t return ResponseEntity.status(HttpStatus.NOT_FOUND).build();\n\t }\n\t return ResponseEntity.status(HttpStatus.CREATED).body(list);\n\t }", "private void populateCategories() {\n\n AsyncHttpClient client = new AsyncHttpClient();\n client.addHeader(\"Authorization\", \"Token token=\" + user.getToken().getAccess_token());\n client.get(LoginActivity.API_ROOT + \"events/\" + currEvent.getId() + \"/categories\",\n new BaseJsonHttpResponseHandler<Category[]>() {\n @Override\n public void onSuccess(int statusCode, Header[] headers, String rawJsonResponse,\n Category[] response) {\n categories_lv = (ListView) findViewById(R.id.categories_lv);\n// categoriesArr = response;\n\n // Make the first Category as \"All\" so that all teams can be shown\n // All retrieved categories will be put after \"All\"\n categoriesArr = new Category[response.length + 1];\n categoriesArr[0] = new Category(0, currEvent.getId(), \"All\", null, 0, null,\n teamsArr);\n System.arraycopy(response, 0, categoriesArr, 1, response.length);\n\n categories_lv.setAdapter(new CategoryAdapter(SelectionActivity.this,\n categoriesArr));\n categories_lv.setOnItemClickListener(new CategoryClickListener());\n\n Log.d(\"GET CATEGORIES\", \"success\");\n }\n\n @Override\n public void onFailure(int statusCode, Header[] headers, Throwable error,\n String rawJsonData, Category[] errorResponse) {\n Log.d(\"GET CATEGORIES\", \"failure\");\n }\n\n @Override\n protected Category[] parseResponse(String rawJsonData, boolean isFailure)\n throws Throwable {\n\n if (!isFailure) {\n // Need to extract array from the first/outer JSON object\n JSONArray teamsJSONArr = new JSONObject(rawJsonData)\n .getJSONArray(\"event_categories\");\n return new Gson().fromJson(teamsJSONArr.toString(), Category[].class);\n } else return null;\n }\n });\n }", "@RequestMapping(value = \"/categories\", method = RequestMethod.GET, produces = \"application/json\")\n public Collection<String> getCategories() {\n return this.datasetService.getCategories();\n }", "@RequestMapping(value = \"category\", method = RequestMethod.GET)\n public String category(Model model, @RequestParam int id){\n Category cat = categoryDao.findOne(id);\n List<Recipe> recipes = cat.getRecipes();\n model.addAttribute(\"recipes\", recipes);\n model.addAttribute(\"title\", cat.getCategoryName() + \" recipes\");\n return \"recipe/list-under\";\n }", "@RequestMapping(value=\"getAllCategories\", method=RequestMethod.GET)\n\tpublic String getAllCategories(Model m, HttpServletRequest request){\n\t\t\n\t\tList<Category> categories = sr.getAllCategories();\n\t\t\n\t\trequest.getSession().setAttribute(\"categories\", categories);\n\t\tm.addAttribute(\"categories\", categories);\n\t\t\n\t\treturn \"Song/addSong\";\n\t}", "public void Categories() {\n final ProgressDialog dialog = new ProgressDialog(getActivity());\n dialog.setCanceledOnTouchOutside(false);\n dialog.setMessage(\"Please Wait...\");\n dialog.show();\n\n Call<Categories> logincall = apiInterface.categoriespojo();\n logincall.enqueue(new Callback<Categories>() {\n @Override\n public void onResponse(Call<Categories> call, Response<Categories> response) {\n dialog.dismiss();\n if (response.body().getStatus() == 1) {\n if (Constants.categoriesData != null) {\n Constants.categoriesData.clear();\n }\n if (!Constants.categoriesData.equals(\"\") && Constants.categoriesData != null) {\n Constants.categoriesData.addAll(response.body().getData());\n CategoryAdapter adapter = new CategoryAdapter(getActivity());\n recycler_view.setAdapter(adapter);\n if (adapter != null)\n adapter.notifyDataSetChanged();\n } else {\n Toast.makeText(getActivity(), response.body().getMsg(), Toast.LENGTH_SHORT).show();\n }\n }\n }\n\n @Override\n public void onFailure(Call<Categories> call, Throwable t) {\n dialog.dismiss();\n Helper.showToastMessage(activity, \"No Internet Connection\");\n }\n });\n }", "public void getCategories(io.reactivesw.catalog.grpc.Empty request,\n io.grpc.stub.StreamObserver<io.reactivesw.catalog.grpc.CategoryList> responseObserver) {\n asyncUnaryCall(\n getChannel().newCall(METHOD_GET_CATEGORIES, getCallOptions()), request, responseObserver);\n }", "@GET\n @Path(\"/list\")\n @Consumes(MediaType.APPLICATION_JSON)\n @Produces(MediaType.APPLICATION_JSON)\n public Response getCategories(@javax.ws.rs.core.Context UriInfo uriInfo) {\n List categoryList = categoryRepository.selectAllVisible();\n Category category;\n SuccessMessage successMessage = new SuccessMessage();\n successMessage.setCode(Response.Status.OK.getStatusCode());\n successMessage.setStatus(\"success\");\n String url = uriInfo.getAbsolutePath().toString();\n successMessage.addLink(url, \"self\");\n\n if (categoryList.size() != 0) {\n successMessage.setMessage(\"categories retrieved\");\n for (int i = 0; i < categoryList.size(); i++) {\n JSONObject jsonObject = new JSONObject();\n category = (Category) categoryList.get(i);\n jsonObject.put(\"name\", category.getCategoryName());\n jsonObject.put(\"description\", category.getCatDescription());\n successMessage.addData(jsonObject);\n successMessage.addLink(BASE_URL + \"subcategories/category/\" + category.getCategoryName().replaceAll(\" \", \"%20\"), \"subcategories of \" + category.getCategoryName().toString());\n }\n } else {\n successMessage.setMessage(\"no categories to retrieve\");\n }\n return Response.status(Response.Status.OK).entity(successMessage)\n .header(\"Access-Control-Allow-Origin\", propertyReader.readProperty(\"Access-Control-Allow-Origin\"))\n .build();\n }", "@Override\n public void gotCategories(ArrayList<String> categories) {\n ArrayAdapter<String> categoryAdapter = new ArrayAdapter<>(this,\n android.R.layout.simple_list_item_1 , categories);\n categoriesListView.setAdapter(categoryAdapter);\n }", "@Test\n public void testGetCategoriesAction() throws ClientException, IOException, ProcessingException {\n CloudResponse response = this.actions.getCategoriesAction(\"{sort}\", -1, -1, \"{type}\", -1);\n List<Integer> expectedResults = Arrays.asList(200);\n LOG.info(\"Got status {}\", response.getStatusLine());\n Assert.assertTrue(expectedResults.contains(response.getStatusLine().getStatusCode()));\n\n if(response.getStatusLine().getStatusCode() == 200) {\n this.actions.checkResponseJSONSchema(\"#/definitions/PagedResponseCategory\", response.getContent());\n }\n \n }", "@Override\n\tpublic void deleteCategory(HttpServletRequest request,\n\t\t\tHttpServletResponse response) {\n\n\t}", "public List<Categorie> getAllCategories();", "List<Category> getCategories() throws DAOExceptionHandler;", "@GetMapping(\"category\")\n\t\tpublic List<String> getCategory(){\n\t\t\tList<String> list = repo.findByCat();\n\t\t\treturn list;\n\t\t\t\n\t\t\t\n\t\t}", "public void getCategories(io.reactivesw.catalog.grpc.Empty request,\n io.grpc.stub.StreamObserver<io.reactivesw.catalog.grpc.CategoryList> responseObserver) {\n asyncUnimplementedUnaryCall(METHOD_GET_CATEGORIES, responseObserver);\n }", "public void doGet(HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException\n {\n ServletPrinter sp = null;\n String region;\n String username=null, password=null;\n Context initialContext = null;\n\n sp = new ServletPrinter(response, \"BrowseCategories\", getServletContext());\n sp.printHTMLheader(\"RUBiS available categories\");\n sp.printHTML(\"<h2>Currently available categories</h2><br>\");\n try\n {\n initialContext = new InitialContext();\n } \n catch (Exception e) \n {\n printError(\"Cannot get initial context for JNDI: \" +e+\"<br>\", sp);\n return ;\n }\n\n region = request.getParameter(\"region\");\n username = request.getParameter(\"nickname\");\n password = request.getParameter(\"password\");\n \n\n SB_BrowseCategories sb_browseCategories = null;\n try \n {\n sb_browseCategories = (SB_BrowseCategories)PortableRemoteObject.narrow(initialContext.lookup(\"SB_BrowseCategoriesBean\"), SB_BrowseCategories.class);\n } \n catch (Exception e)\n {\n printError(\"Cannot lookup SB_BrowseCategories: \" +e+\"<br>\", sp);\n return ;\n }\n String list;\n try \n {\n list = sb_browseCategories.getCategories(region, username, password);\n } \n catch (Exception e)\n {\n printError(\"Cannot get the list of categories: \" +e+\"<br>\", sp);\n return ;\n }\n\n sp.printHTML(list);\n sp.printHTMLfooter();\n }", "private void lanzarListadoCategorias() {\n\t\tIntent i = new Intent(this, ListCategorias.class);\n\t\tstartActivity(i);\n\t\t\n\t}", "List<Category> getAllCategories();", "public void selectCategory() {\n\t\t\r\n\t}", "@RequestMapping(\"/top/{id}\")\n\tpublic ModelAndView listCategory (@PathVariable(value = \"id\") long categoryId) {\n\t\tModelAndView model = new ModelAndView();\n\t\tAuthentication auth = SecurityContextHolder.getContext().getAuthentication();\n\n\t\tif (!(auth instanceof AnonymousAuthenticationToken)) {\n\n\t\t\tUserDetails userDetail = (UserDetails) auth.getPrincipal();\n\t\t\tArrayList<UserRole> roles = new ArrayList<UserRole>();\n\t\t\tUser user = myService.findUserByUsername(userDetail.getUsername());\n\n\t\t\tfor (Iterator<UserRole> iterator = user.getUserRole().iterator(); iterator.hasNext();){\n\t\t\t\troles.add(iterator.next());\n\t\t\t}\n\n\t\t\tif (roles.get(0).getRole().equals(\"ROLE_USER\")) {\n\t\t\t\tCategory category = myService.find(categoryId);\n\t\t\t\tmodel.addObject(\"cat\",category);\n\n\n\t\t\t\tmodel.addObject(\"products\", myService.listProducts(category));\n\t\t\t\tmodel.addObject(\"categories\", myService.listGroups());\n\t\t\t\tmodel.setViewName(\"userview\");\n\n\n\n\t\t\t}\n\t\t} else\n\n\t\t{\n\t\t\tmodel.setViewName(\"anonview\");\n\t\t\tCategory category = myService.find(categoryId);\n\t\t\tmodel.addObject(\"cat\",category);\n\t\t\tmodel.addObject(\"products\", myService.listProducts(category));\n\t\t\tmodel.addObject(\"categories\", myService.listGroups());\n\n\t\t}\n\t\treturn model;\n\t}", "@RequestMapping(value = \"/kategorien\", method = RequestMethod.POST)\n @ResponseBody\n public void kategorien(\n HttpServletResponse response) throws IOException {\n\n try {\n List<Kategorie> kategorien = kategorieDao.findRootKategorien();\n kategorien.addAll(kategorieDao.getKategorien());\n sendOk(response, mapper.writeValueAsString(kategorien));\n } catch (Exception ex) {\n java.util.logging.Logger.getLogger(BackendController.class.getName()).log(Level.SEVERE, null, ex);\n sendError(response, ex);\n }\n }", "@GetMapping(\"/list\")\n public String listCategories(Model theModel) {\n List<Categories> theCategories = categoriesService.getCategories();\n theModel.addAttribute(\"categories\", theCategories);\n return \"loaisanpham-list\"; }", "private void getAnimalCategory() {\n mProgressBar.setVisibility(View.VISIBLE);\n VolleyInvokeWebService volleyClient = new VolleyInvokeWebService(this, VolleyInvokeWebService.JSON_TYPE_REQUEST, this, Request.Method.GET);\n volleyClient.hitWithOutTokenService(Constants.GET_ANIMAL_CATEGORY, null, GET_ANIMAL_CATEGORY_TAG);\n }", "@Override\n public void loadCategories() {\n loadCategories(mFirstLoad, true);\n mFirstLoad = false;\n }", "void getCategories(Callback activity){\n this.activity = activity;\n String url = \"https://resto.mprog.nl/categories\";\n\n RequestQueue queue = Volley.newRequestQueue(context);\n try {\n JsonObjectRequest jsonObjectRequest = new JsonObjectRequest(url, null, this, this);\n queue.add(jsonObjectRequest);\n }\n catch (Exception error){\n\n // Return an error message if the request is not succesfull\n Log.e(\"Request\", error.getMessage());\n }\n }", "public void onCategoryClicked(String category){\n\t\tfor(int i = 0 ; i < mData.getStatistics().size(); i++){\r\n\t\t\tif(mData.getStatistics().get(i).getCategory().equals(category)){\r\n\t\t\t\tif(mData.getStatistics().get(i).getDueChallenges() == 0){\r\n\t\t\t\t\tmGui.showToastNoDueChallenges(mData.getActivity());\r\n\t\t\t\t} else {\r\n\t\t\t\t\t//Start activity challenge (learn session) with category and user \t\r\n\t\t\t\t\tNavigation.startActivityChallenge(mData.getActivity(), mData.getUser(), category);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\t\t\t\r\n\t}", "public com.google.common.util.concurrent.ListenableFuture<io.reactivesw.catalog.grpc.CategoryList> getCategories(\n io.reactivesw.catalog.grpc.Empty request) {\n return futureUnaryCall(\n getChannel().newCall(METHOD_GET_CATEGORIES, getCallOptions()), request);\n }", "public void setCategory(String category){\n this.category = category;\n }", "@Override\n\tprotected void doGet(SlingHttpServletRequest request, SlingHttpServletResponse response)\n\t\t\tthrows ServletException, IOException {\n\t\t logger.error(\"BISHUNNN CALLED\");\n\t\tString category = request.getParameter(\"category\").trim();\n\t\tGetHttpCall getHttpCall = new GetHttpCall();\n\t\turl = APIConstants.baseURL+category.toLowerCase();\n\t\tresponseString = getHttpCall.execute(url);\n\t\tresponse.getWriter().write(responseString);\n\t}", "@RequestMapping(value = { \"/addcategory\" })\r\n\tpublic ModelAndView getAddCategoryPage(@RequestParam(name = \"op\", required = false) String operation,\r\n\t\t\t@RequestParam(name = \"status\", required = false) String status,\r\n\t\t\t@RequestParam(name = \"id\", required = false) String id) {\r\n\t\tModelAndView modelAndView = new ModelAndView(\"page\");\r\n\t\tmodelAndView.addObject(\"category\", new Category());\r\n\t\tmodelAndView.addObject(\"title\", \"Add Category\");\r\n\t\tmodelAndView.addObject(\"categories\", categoryDAO.list());\r\n\t\tmodelAndView.addObject(\"ifUserClickedAddCategory\", true);\r\n\t\tif (operation != null) {\r\n\t\t\tif (operation.equals(\"add\") && status.equals(\"success\")) {\r\n\t\t\t\tmodelAndView.addObject(\"successMsg\", \"Category Added Successfully!\");\r\n\t\t\t} else if (operation.equals(\"delete\") && status.equals(\"success\") && id != \"0\") {\r\n\t\t\t\tmodelAndView.addObject(\"successMsg\", \"Category Deleted Successfully!\");\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn modelAndView;\r\n\t}", "@GetMapping(\"/categorie/getallcategories\")\n Page<CategorieProduit> getAllCategories(Pageable pageable) {\n return categorieProduitMetier.getAllCategorie(pageable);\n }", "@GetMapping(\"/categories\")\n public String gifCategories(ModelMap modelMap){\n List<Category> categoryList = categoryRepository.getAllCategories();\n //2. Przekazanie obiektów do widoku\n modelMap.put(\"categories\", categoryList);\n //3. Wyswietlenie widoku\n return \"categories\";\n }", "private void addNewCategory() {\n Utils.replaceFragment(getActivity(),new AddCategoriesFragment());\n }", "public void setCategory(Category cat) {\n this.category = cat;\n }", "List<Category> lisCat() {\n return dao.getAll(Category.class);\n }", "@GetMapping\n\t@ResponseStatus(code = HttpStatus.OK)\n\tpublic List<CategoryDTO> viewCategory() throws ServiceException {\n\t\tList<CategoryDTO> viewResponse = categoryService.listCategory();\n\t\treturn viewResponse;\n\t\t\n\t}", "public io.reactivesw.catalog.grpc.CategoryList getCategories(io.reactivesw.catalog.grpc.Empty request) {\n return blockingUnaryCall(\n getChannel(), METHOD_GET_CATEGORIES, getCallOptions(), request);\n }", "public void getCategorory(){\n\t\tDynamicQuery dynamicQuery = DynamicQueryFactoryUtil.forClass(AssetCategory.class, \"category\", PortalClassLoaderUtil.getClassLoader());\n\t\ttry {\n\t\t\tList<AssetCategory> assetCategories = AssetCategoryLocalServiceUtil.dynamicQuery(dynamicQuery);\n\t\t\tfor(AssetCategory category : assetCategories){\n\t\t\t\tlog.info(category.getName());\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\t// TODO: handle exception\n\t\t}\n\t}", "@RequestMapping(\"/fashionCategories\")\r\n public ResponseEntity<List> listFashionCategories() {\r\n\t\tSystem.out.println(\"*************************************ListAllItems\");\r\n\t\tDBConnection db = new DBConnection();\r\n \tList<Advertisment> categories = \tdb.getAllAdsByCategory(\"Fashion\");\r\n\t\t//List<String> categories = itemService.populateAllCategories(); \r\n\t\t\r\n\t\tSystem.out.println(\"*************************************ListAllItems1111\");\r\n if(categories.isEmpty()){\r\n return new ResponseEntity<List>(HttpStatus.NO_CONTENT);//You many decide to return HttpStatus.NOT_FOUND\r\n }\r\n return new ResponseEntity<List>(categories, HttpStatus.OK);\r\n }", "@GetMapping(\"/category\")\n @TokenRequired\n @ApiOperation(value = \"Gets a Category\", httpMethod = \"GET\")\n public ServiceResponse<CategoryDto> getCategory(@RequestParam(value = \"categoryId\", required = false) String categoryId,\n @RequestParam(value = \"slug\", required = false) String slug,\n HttpServletResponse response) {\n ServiceResponse<CategoryDto> serviceResponse = new ServiceResponse<>();\n ServiceRequest<CategoryDto> serviceRequest = new ServiceRequest<>();\n try {\n checkRequiredParameters(categoryId, slug);\n serviceRequest.setParameter(createDto(categoryId, slug));\n Category categoryResult = categoryService.getCategoryByIdOrSlug(convertToEntity(serviceRequest.getParameter()));\n handleResponse(serviceResponse, convertToDto(categoryResult), response, true);\n } catch (Exception e) {\n exceptionHandler.handleControllerException(serviceResponse, serviceRequest, e, getMethodName(), response);\n }\n return serviceResponse;\n }", "@Override\r\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\r\n throws ServletException, IOException {\r\n try {\r\n int idcategoria = Integer.parseInt(request.getParameter(\"idcategoria\"));\r\n CategoriaDAO ctDAO = new CategoriaDAO();\r\n if (request.getParameter(\"acao\").equals(\"alterar\")) {\r\n if(GerenciarLogin.verificarPermissao(request, response)){\r\n Categoria ct = ctDAO.getCategoriaPorIdcategoria(idcategoria);\r\n if (ct.getIdcategoria() > 0) {\r\n RequestDispatcher disp = getServletContext().getRequestDispatcher(\"/form_categoria.jsp\");\r\n request.setAttribute(\"ct\", ct);\r\n disp.forward(request, response);\r\n } else {\r\n PrintWriter out = response.getWriter();\r\n out.println(\"<script type='text/javascript'>\");\r\n out.println(\"alert('Categoria não encontrado!');\");\r\n out.println(\"location.href='listar_categoria.jsp';\");\r\n out.println(\"</script>\");\r\n }\r\n }else{\r\n PrintWriter out = response.getWriter();\r\n out.println(\"<script type='text/javascript'>\");\r\n out.println(\"alert('Acesso Negado!');\");\r\n out.println(\"location.href='listar_categoria.jsp';\");\r\n out.println(\"</script>\");\r\n }\r\n }\r\n if (request.getParameter(\"acao\").equals(\"excluir\")){\r\n if(GerenciarLogin.verificarPermissao(request, response)){\r\n PrintWriter out = response.getWriter();\r\n if (ctDAO.excluir(idcategoria)) {\r\n out.println(\"<script type='text/javascript'>\");\r\n out.println(\"alert('Categoria excluido com sucesso!');\");\r\n out.println(\"location.href='listar_categoria.jsp';\");\r\n out.println(\"</script>\");\r\n } else {\r\n out.println(\"<script type='text/javascript'>\");\r\n out.println(\"alert('Não foi possível excluir Categoria!');\");\r\n out.println(\"location.href='listar_categoria.jsp';\");\r\n out.println(\"</script>\");\r\n }\r\n }else{\r\n PrintWriter out = response.getWriter();\r\n out.println(\"<script type='text/javascript'>\");\r\n out.println(\"alert('Acesso Negado!');\");\r\n out.println(\"location.href='listar_categoria.jsp';\");\r\n out.println(\"</script>\");\r\n }\r\n }\r\n } catch (Exception e) {\r\n System.out.println(\"Erro ao recuperar dados!\");\r\n }\r\n }", "@RequestMapping(value=\"/{categoryId}\",\n\t\t\tmethod=RequestMethod.GET, \n\t\t\tproduces = MediaType.APPLICATION_JSON_VALUE)\n\tpublic ResponseEntity<Category> getCategoryById(@PathVariable(\"categoryId\") Long categoryId){\n\t\t\n\t\tCategory category = categoryService.findById(categoryId);\n\t\tif (category == null) {\n\t\t\treturn new ResponseEntity<Category>(HttpStatus.NOT_FOUND);\n\t\t}\n\t\t\n\t\treturn new ResponseEntity<Category>(category, HttpStatus.OK);\n\t}", "protected void processRequest(HttpServletRequest request, HttpServletResponse response)\r\n throws ServletException, IOException {\r\n response.setContentType(\"text/html;charset=UTF-8\");\r\n DBConnection db = new DBConnection();\r\n CategoryDAO dao = new CategoryDAO(db);\r\n try (PrintWriter out = response.getWriter()) {\r\n /* TODO output your page here. You may use following sample code. */\r\n\r\n String service = request.getParameter(\"service\");\r\n // null pointer exception\r\n if (service == null) {\r\n service = \"listCategory\";\r\n }\r\n if (service.equalsIgnoreCase(\"insertCategory\")) {\r\n\r\n //getdata\r\n String catID = request.getParameter(\"catID\");\r\n String catName = request.getParameter(\"catName\");\r\n\r\n //check data\r\n //proccess: add customer\r\n Category cat = new Category(catID, catName);\r\n String sql = \"select * from category where catid='\" + catID + \"'\";\r\n ResultSet rs = db.getData(sql);\r\n if (rs.next()) {\r\n out.print(\"Category exists\");\r\n }\r\n int n = dao.insertCategory(cat);\r\n response.sendRedirect(\"CategoryController?service=listCategory\");\r\n// if (n > 0) {\r\n// out.print(\"inserted\");\r\n// }\r\n }\r\n if (service.equalsIgnoreCase(\"listCategory\")) {\r\n String sql = \"select * from Category\";\r\n ResultSet rs = db.getData(sql);\r\n request.setAttribute(\"kq\", rs);\r\n request.setAttribute(\"title\", \"Category Manager\");\r\n //call view\r\n //set view: JSP \r\n RequestDispatcher dis = request.getRequestDispatcher(\"/Server/Category.jsp\");\r\n //run\r\n dis.forward(request, response);\r\n// out.print(\" <table border=\\\"1\\\">\\n\"\r\n// + \" <caption>CategoryList</caption>\\n\"\r\n// + \" <tr>\\n\"\r\n// + \" <th>ID</th>\\n\"\r\n// + \" <th>Name</th>\\n\"\r\n// + \" <th>Status</th>\\n\"\r\n// + \" <th>Update</th>\\n\"\r\n// + \" <th>Delete</th>\\n\"\r\n// + \" <th> Change status\"\r\n// + \" </tr>\");\r\n// while (rs.next()) {\r\n// out.print(\"<tr>\");\r\n// out.print(\" <td>\" + rs.getString(1) + \"</td>\");\r\n// out.print(\" <td>\" + rs.getString(2) + \"</td>\");\r\n// out.print(\" <td>\" + (rs.getInt(3) == 1 ? \"Active\" : \"Deactive\") + \"</td>\");\r\n// out.print(\" <td><a href=CategoryController?service=preupdate&catid=\" + rs.getString(1) + \">update</a></td>\");\r\n// out.print(\" <td><a href=CategoryController?service=delete&catid=\" + rs.getString(1) + \">remove</a></td>\");\r\n// out.print(\" <td><a href=CategoryController?service=changeStatus&catid=\" + rs.getString(1) + \">Change Status</a></td>\");\r\n// out.print(\"</tr>\");\r\n// }\r\n//\r\n// out.print(\"</table>\");\r\n }\r\n if (service.equalsIgnoreCase(\"preupdate\")) {\r\n String catID = request.getParameter(\"catid\");\r\n out.print(\"<form action=\\\"CategoryController\\\" method=\\\"POST\\\">\\n\"\r\n + \"<table border=\\\"0\\\">\\n\"\r\n + \"<tr>\\n\"\r\n + \"<th>Category ID</th>\\n\"\r\n + \"<th><input type=\\\"text\\\" name=\\\"catid\\\" value=\\\"\" + catID + \"\\\" readonly /></th></tr>\\n\"\r\n + \"<tr><th>Category Name: </th><th> <input type=\\\"text\\\" name=\\\"catName\\\" id=\\\"catName\\\" > </th></tr> \"\r\n + \" <input type=\\\"hidden\\\" name=\\\"service\\\" value=\\\"updateCategory\\\">\"\r\n + \" <th><input type=\\\"submit\\\" value=\\\"Update\\\"></th>\"\r\n + \"</table></form>\");\r\n }\r\n if (service.equalsIgnoreCase(\"updateCategory\")) {\r\n String catID = request.getParameter(\"catid\");\r\n String catName = request.getParameter(\"catName\");\r\n dao.updateCategory(catID, catName);\r\n response.sendRedirect(\"CategoryController\");\r\n }\r\n if (service.equalsIgnoreCase(\"changeStatus\")) {\r\n String catID = request.getParameter(\"catid\");\r\n dao.changeStatus(catID);\r\n response.sendRedirect(\"CategoryController\");\r\n }\r\n } catch (SQLException ex) {\r\n Logger.getLogger(ProductController.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n }", "@PreAuthorize(\"hasRole('ROLE_ADMIN')\")\n @RequestMapping(method = RequestMethod.GET)\n public ResponseEntity<Page<CategoryDTO>> getAllCategories(Pageable pageable) {\n \t\n \tPage<Category> page = catService.findAll(pageable);\n //List<Category> categories = catService.findAll();\n \tList<CategoryDTO> categoryDTOS = toCategoryDTOList(page.toList());\n Page<CategoryDTO> pageCategoryDTOS = new PageImpl<>(categoryDTOS,page.getPageable(),page.getTotalElements());\n\n \n return new ResponseEntity<>(pageCategoryDTOS, HttpStatus.OK);\n }", "@RequestMapping(\"/subcategoryrequest\")\r\n\t\tpublic String getCategoryView(ModelMap map) {\r\n\t\t\t// return the category DO object\r\n\t\t\tmap.addAttribute(\"subcate\", new SubCategory());\r\n\t\t\t// return value true validated in view(admin.jsp)\r\n\t\t\tmap.addAttribute(\"subcategoryrequest\", true);\r\n\t\t\tmap.addAttribute(\"savesubcate\", true);\r\n\t\t\tString category_list=prod.getCategoryList(new Category());\r\n\t map.addAttribute(\"cate_list\",category_list);\r\n\r\n\t\t\tString cate_list=subcatdao.getCategoryList(new SubCategory());\r\n\t map.addAttribute(\"subcate_list\",cate_list);\r\n\t\t\treturn \"admin\";\r\n\r\n\t\t}", "@RequestMapping(method=RequestMethod.GET,\n\t\t\tproduces = MediaType.APPLICATION_JSON_VALUE)\n\tpublic ResponseEntity<Collection<Category>> getCategories(@RequestParam(value = \"categoryName\", required = false) String categoryName){\n\t\t\n\t\tCollection<Category> categories = new ArrayList<>();\n\t\tif (categoryName != null) {\n\t\t\tCategory category = categoryService.findByName(categoryName);\n\t\t\tcategories.add(category);\n\t\t} else {\n\t\t\tCollection<Category> allCategories = categoryService.findAll();\n\t\t\tcategories.addAll(allCategories);\n\t\t}\n\t\treturn new ResponseEntity<Collection<Category>>(categories, HttpStatus.OK);\n\t\t\n\t}", "@RequestMapping(value = \"/kategorie\", method = RequestMethod.POST)\n @ResponseBody\n public void kategorie(\n @RequestParam(value = \"id\") Integer id,\n HttpServletResponse response) throws IOException {\n\n try {\n Kategorie kategorie = kategorieDao.findKategorie(Long.parseLong(id.toString()));\n sendOk(response, mapper.writeValueAsString(kategorie));\n } catch (Exception ex) {\n java.util.logging.Logger.getLogger(BackendController.class.getName()).log(Level.SEVERE, null, ex);\n sendError(response, ex);\n }\n }", "private void listadoCategorias() {\r\n sessionProyecto.getCategorias().clear();\r\n sessionProyecto.setCategorias(itemService.buscarPorCatalogo(CatalogoEnum.CATALOGOPROYECTO.getTipo()));\r\n }", "@RequestMapping(value = \"/add\", method = GET)\n public String addCategory(Model model) {\n model.addAttribute(\"action\", ADD_ACTION);\n model.addAttribute(\"category\", new Category());\n return FORM_VIEW;\n }", "@GET(\"/empresa/listaCategoria\")\n public void listacategoria(Callback<List<Categoria>> callback);", "void loadCategoriesAsync(OnCategoryLoad onCategoryLoad);", "public void fetchCategories(final IViewCallback<JSONObject> callback) {\n Payload payload = new Payload();\n payload.add(\"key\", \"ajkT14Asdfe526fasdfJKCckecsdps\");\n payload.add(\"command\", \"fetch_categories\");\n\n Request request = RequestFactory.createRequest(\n HttpMethod.POST, \"http://stage.overboxd.com/index.php/generalqcapi\", null, payload, null, 60000, null, null);\n\n VolleyQueueUtils.getGeneralRequestQueue().add(new VolleyStringRequest(request, new Response.Listener<String>() {\n @Override\n public void onResponse(String response) {\n try {\n\n HttpResponse<JSONObject> httpResponse = new HttpResponse<>(\n new HttpResponseStatus(),\n new JSONObject(response)\n );\n\n notifyResponse(httpResponse, callback);\n\n } catch (JSONException e) {\n Log.d(\"Tag\",\"fetchcategory mein prob\");\n\n\n }\n }\n }, new Response.ErrorListener() {\n @Override\n public void onErrorResponse(VolleyError error) {\n\n }\n }));\n }", "public void setCategory(String category) {\r\n this.category = category;\r\n }", "@RequestMapping(\"get_deep_category.do\")\n @ResponseBody\n public ServerResponse getCategoryAndDeepChildrenCategory(HttpSession session, @RequestParam(value = \"categoryId\", defaultValue = \"0\") Integer categoryId, HttpServletRequest httpServletRequest) {\n String loginToken = CookieUtil.readLoginToken(httpServletRequest);\n if (org.apache.commons.lang3.StringUtils.isEmpty(loginToken)){\n return ServerResponse.createByErrorMessage(\"用户未登录\");\n }\n String userJsonStr = RedisShardedPoolUtil.get(loginToken);\n User user = JsonUtil.string2Obj(userJsonStr, User.class);\n if (user == null) {\n return ServerResponse.createByErrorCodeMessage(ResponseCode.NEED_LOGIN.getCode(), \"用户未登录,请登陆\");\n }\n\n if (userService.checkAdminRole(user).isSuccess()) {\n return categoryService.selectCategoryAndChildrenById(categoryId);\n } else {\n return ServerResponse.createByErrorMessage(\"非管理员,无权操作\");\n }\n }", "@RequestMapping(\"/category/{id}\")\n public String category(@PathVariable(\"id\") long id, Model model, Principal principal, Authentication authentication) {\n model.addAttribute(\"category\", categoryRepository.findById(id).get());\n model.addAttribute(\"products\", productRepository.findAll());\n model.addAttribute(\"categories\", categoryRepository.findAll());\n model.addAttribute(\"users\", userRepository.findAll());\n// model.addAttribute(\"product_user_id\", userRepository.findByUsername(principal.getName()).getId());\n\n //check for currently logged in \"user\", if no current user then set to \"0\" to prevent errors\n String username = null;\n try {\n username = principal.getName();\n model.addAttribute(\"product_user_id\", userRepository.findByUsername(principal.getName()).getId());\n model.addAttribute(\"user_id\", userRepository.findByUsername(principal.getName()).getId());\n return \"category\";\n } catch (Exception e){\n model.addAttribute(\"product_user_id\", 0);\n return \"category\";\n }\n }", "@GetMapping(value = \"/home\")\n public ModelAndView home(HttpServletRequest request) throws JAXBException {\n// List<Category> categories = categoryService.getAllSortedByCategoryKey();\n\n HttpSession session = request.getSession();\n// session.setAttribute(\"CATEGORIES\", categories);\n return new ModelAndView(\"index\");\n }", "public void setCategory(String category) {\n this.category = category;\n }", "public void setCategory(String category) {\n this.category = category;\n }", "public void setCategory(String category) {\n this.category = category;\n }", "public void setCategory(String category) {\n this.category = category;\n }", "public void setCategory(String category) {\n this.category = category;\n }", "@Override\n\tpublic Category updateCategory(HttpServletRequest request,\n\t\t\tHttpServletResponse response) {\n\t\treturn null;\n\t}", "@Override\n public Single<List<CategoryModel>> getCategories() {\n return api.getCategories().map(categories -> iVmMapper.mapToViewModel(categories));\n }", "public void setCategory(Category c) {\n this.category = c;\n }", "@RequestMapping(\"/category/{id}\")\n public String category(@PathVariable int id,ModelMap modelMap) {\n Category category = categoryRepository.findById(id);\n modelMap.put(\"category\", category);\n\n List<Gif> gifs = gifRepo.findByCategoryId(id);\n modelMap.put(\"gifs\", gifs);\n\n return \"category\";\n }", "@RequestMapping(value = RestConstant.BY_ID, method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_VALUE)\r\n\tpublic ResponseEntity<Category> getCategoryById(@PathVariable(\"id\") Long id) {\r\n\t\ttry {\r\n\t\t\tCategory category = categoryService.findById(id);\r\n\t\t\treturn new ResponseEntity<Category>(category, HttpStatus.OK);\r\n\t\t} catch (Exception e) {\r\n\t\t\tlogger.error(\"Failed to read category \" + id, e);\r\n\t\t\treturn new ResponseEntity<Category>(HttpStatus.INTERNAL_SERVER_ERROR);\r\n\t\t}\r\n\t}", "public void chooseCategory(){\n String title = intent.getStringExtra(\"title\");\n String content = intent.getStringExtra(\"content\");\n TextView titleView = findViewById(R.id.category_grid_title);\n titleView.setText(R.string.choose_category_title);\n categoriesAdapter.passInfo(title, content);\n }", "public void getCategories(String uri) {\n StringRequest request = new StringRequest(uri,\n response -> {\n JSONObject responseObject;\n JSONArray responseArray;\n\n try {\n // Get JSON object and array of data\n responseObject = new JSONObject(response);\n responseArray = responseObject.getJSONArray(\"categories\");\n ArrayList<String> categories = new ArrayList<>();\n\n // Add every found string to the ArrayList\n for (int i = 0; i < responseArray.length(); i++) {\n String category = responseArray.getString(i);\n categories.add(category);\n }\n // Use an adapter and the ArrayList to feed the list\n CategoryAdapter adapter = new CategoryAdapter(mContext, R.layout.list_item_category, categories);\n lv.setAdapter(adapter);\n\n } catch (JSONException e) {\n e.printStackTrace();\n }\n },\n error -> Toast.makeText(mContext, R.string.error_network, Toast.LENGTH_SHORT).show());\n RequestQueue queue = Volley.newRequestQueue(this);\n queue.add(request);\n }", "@Override\n protected void doPost(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n String button = request.getParameter(\"button\");\n HomeControler data = new HomeControler();\n request.setAttribute(\"test\", data.getListCategories());\n HttpSession session = request.getSession();\n switch (button) {\n case \"account\":\n if (session.getAttribute(\"user\") != null) {\n\n }\n request.setAttribute(\"data\", data.getListCategories());\n doGet(request, response);\n break;\n case \"selectedProduct\":\n session.setAttribute(\"productId\", request.getParameter(\"selectedProduct\"));\n response.sendRedirect(response.encodeRedirectURL(request.getContextPath() + \"/productInfo\"));\n doGet(request, response);\n break;\n case \"employe\":\n request.setAttribute(\"data\", data.getListCategories());\n request.getRequestDispatcher(\"/listEmployes.jsp\").forward(request, response);\n break;\n case \"client\":\n request.setAttribute(\"data\", data.getListCategories());\n request.getRequestDispatcher(\"/listClients.jsp\").forward(request, response);\n break;\n default:\n doGet(request, response);\n }\n }", "public void setCategory(String cat) {\t//TODO\n\t\tcategory = cat;\n\t}", "public String categoryList(CategoryDetails c);", "@PreAuthorize(\"hasRole('ROLE_ADMIN')\")\n @RequestMapping(value=\"/{id}\", method= RequestMethod.GET)\n public ResponseEntity<CategoryDTO> getCategory(@PathVariable Long id){\n\n Category cat = catService.findOne(id);\n\n if(cat == null){\n return new ResponseEntity<>(HttpStatus.NOT_FOUND);\n }\n\n return new ResponseEntity<>(catMapper.toDto(cat), HttpStatus.OK);\n }", "@RequestMapping(value=\"/{categoryId}/items\",\n\t\t\tmethod=RequestMethod.GET, \n\t\t\tproduces = MediaType.APPLICATION_JSON_VALUE)\n\tpublic ResponseEntity<Collection<Item>> getCategoryItem(@PathVariable(\"categoryId\") Long categoryId){\n\t\t\n\t\tCollection<Item> items = itemService.findCategoryItems(categoryId);\t\t\n\t\treturn new ResponseEntity<Collection<Item>>(items, HttpStatus.OK);\n\t}", "@RequestMapping(value=\"/categoryList.htm\",method=RequestMethod.GET)\r\n\t\tpublic String categoryList(@RequestParam(value=\"bcat\")String baseCategory,Model model)\r\n\t\t{\r\n\t\t\r\n\t\t\tList<Category> categoryList=(List<Category>) categoryDao.searchCategory(baseCategory);\r\n\t\t\tmodel.addAttribute(\"categoryList\", categoryList);\r\n\t\treturn \"categoryList\";\r\n\t\t}", "public String getCategoryListing(){\n\t\tCategoryDAO daoObject = new CategoryDAO();\n\t\tString result = \"\";\n\t\t/*if(requestCall.equalsIgnoreCase(\"table\")){\n\t\t\t//System.out.println(\"in getCategoryListing service call table\");\n\t\t\tresult = daoObject.getCategoriesAndSubCategories();\n\t\t}else{\n\t\t\tresult = daoObject.getCategories(); \n\t\t}*/\n\t\t//result = daoObject.getCategoriesAndSubCategories();\n\t\tresult = daoObject.getCategories();\n\t\treturn result;\n\t}", "@RequestMapping(value = \"/categories\", method = RequestMethod.GET)\n\tpublic @ResponseBody List<Category> categoryListRest() {\n\t\treturn (List<Category>) CatRepo.findAll();\n\t}", "@RequestMapping(\"/\")\n public String index(final Model model) {\n IReactiveDataDriverContextVariable reactiveDataDrivenMode =\n new ReactiveDataDriverContextVariable(categoryService.getCategories(), 1);\n\n model.addAttribute(\"categories\", reactiveDataDrivenMode);\n\n\n return \"index\";\n }", "public String getCategory() {\n return this.category;\n }", "public String getCategory() {\n return this.category;\n }", "public String getCategory(){\r\n\t\treturn this.category;\r\n\t}", "public Categories getCategories() {\n return this.categories;\n }", "@GetMapping(\"movie-cat/{category}\")\n\tpublic List<Movie> getMovieCat(@PathVariable(\"category\") String category){\n\t\tList<Movie> list = repo.findByCategory(category);\n\t\treturn list;\n\t\t\n\t}", "@RequestMapping(\"get_category.do\")\n @ResponseBody\n public ServerResponse getChildrenParallelCategory(HttpSession session, @RequestParam(value = \"categoryId\", defaultValue = \"0\") Integer categoryId, HttpServletRequest httpServletRequest) {\n String loginToken = CookieUtil.readLoginToken(httpServletRequest);\n if (org.apache.commons.lang3.StringUtils.isEmpty(loginToken)){\n return ServerResponse.createByErrorMessage(\"用户未登录\");\n }\n String userJsonStr = RedisShardedPoolUtil.get(loginToken);\n User user = JsonUtil.string2Obj(userJsonStr, User.class);\n if (user == null) {\n return ServerResponse.createByErrorCodeMessage(ResponseCode.NEED_LOGIN.getCode(), \"用户未登录,请登陆\");\n }\n\n if (userService.checkAdminRole(user).isSuccess()) {\n\n //查询子节点的category信息,不递归,保持平级\n return categoryService.getChildrenParallelCategory(categoryId);\n } else {\n return ServerResponse.createByErrorMessage(\"非管理员,无权操作\");\n }\n }", "public static void showCategories() throws IOException {\n Main.FxmlLoader(CATEGORY_PATH);\n }", "@RequestMapping(value=\"/{id}\",method = RequestMethod.GET)\n\tpublic ResponseEntity<Categoria> listar(@PathVariable Integer id) {\n\t\treturn ResponseEntity.ok(servico.buscar(id));\n\t\t\n\t}" ]
[ "0.70226896", "0.66187644", "0.65931606", "0.64509946", "0.64439124", "0.64237887", "0.6420564", "0.6413951", "0.6413606", "0.6348121", "0.629256", "0.62635654", "0.6251696", "0.6175978", "0.6131227", "0.61266977", "0.60988945", "0.6090651", "0.6072585", "0.6030492", "0.60058266", "0.6002315", "0.59742826", "0.597365", "0.5964359", "0.5960824", "0.59476954", "0.59462225", "0.5938715", "0.59250045", "0.5916867", "0.5912481", "0.59043056", "0.5893438", "0.58887374", "0.58681107", "0.58676976", "0.58614886", "0.58303136", "0.5829909", "0.58102304", "0.58056694", "0.57987666", "0.57980543", "0.5794483", "0.5786839", "0.5776755", "0.5768279", "0.5756676", "0.5748945", "0.57326186", "0.57291144", "0.5727569", "0.57258284", "0.57059175", "0.57009", "0.5698527", "0.5696925", "0.56968", "0.5696106", "0.5682047", "0.56652814", "0.5649583", "0.563285", "0.5631898", "0.5631265", "0.56225836", "0.5608656", "0.55927294", "0.55849844", "0.55797803", "0.55767775", "0.55767775", "0.55767775", "0.55767775", "0.55767775", "0.5572765", "0.5570551", "0.5567218", "0.5566802", "0.5548159", "0.55463755", "0.5545468", "0.5539125", "0.55391246", "0.55360633", "0.5533277", "0.5532486", "0.55268174", "0.55154556", "0.5513541", "0.55069727", "0.55042344", "0.55026674", "0.5500489", "0.5499617", "0.5493645", "0.5486366", "0.54863054", "0.5486271" ]
0.59836364
22
Handles requests to specific category
@RequestMapping("/category/{id}") public String category(@PathVariable int id,ModelMap modelMap) { Category category = categoryRepository.findById(id); modelMap.put("category", category); List<Gif> gifs = gifRepo.findByCategoryId(id); modelMap.put("gifs", gifs); return "category"; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void onCategoryClicked(String category){\n\t\tfor(int i = 0 ; i < mData.getStatistics().size(); i++){\r\n\t\t\tif(mData.getStatistics().get(i).getCategory().equals(category)){\r\n\t\t\t\tif(mData.getStatistics().get(i).getDueChallenges() == 0){\r\n\t\t\t\t\tmGui.showToastNoDueChallenges(mData.getActivity());\r\n\t\t\t\t} else {\r\n\t\t\t\t\t//Start activity challenge (learn session) with category and user \t\r\n\t\t\t\t\tNavigation.startActivityChallenge(mData.getActivity(), mData.getUser(), category);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\t\t\t\r\n\t}", "public void setCategory(String category){\n this.category = category;\n }", "public void setCategory(String category) {\r\n this.category = category;\r\n }", "public void setCategory(String category) {\n this.category = category;\n }", "public void setCategory(String category) {\n this.category = category;\n }", "public void setCategory(String category) {\n this.category = category;\n }", "public void setCategory(String category) {\n this.category = category;\n }", "public void setCategory(String category) {\n this.category = category;\n }", "void updateCategory(String category){}", "public void setCategory(Integer category) {\n this.category = category;\n }", "public void setCategory(Category cat) {\n this.category = cat;\n }", "public void setCategory(String category);", "public void setCategory(java.lang.String category) {\n this.category = category;\n }", "void updateCategory(Category category);", "void updateCategory(Category category);", "public void setCategory(Category category) {\r\n this.category = category;\r\n }", "@Override\n\tpublic Category updateCategory(HttpServletRequest request,\n\t\t\tHttpServletResponse response) {\n\t\treturn null;\n\t}", "private void getAnimalCategory() {\n mProgressBar.setVisibility(View.VISIBLE);\n VolleyInvokeWebService volleyClient = new VolleyInvokeWebService(this, VolleyInvokeWebService.JSON_TYPE_REQUEST, this, Request.Method.GET);\n volleyClient.hitWithOutTokenService(Constants.GET_ANIMAL_CATEGORY, null, GET_ANIMAL_CATEGORY_TAG);\n }", "public void setCategory(Category c) {\n this.category = c;\n }", "@Override\n public void setCategory(String category) {\n this.category = category;\n }", "public void setCategory(Category category) {\n this.category = category;\n }", "public void setCategory(Category category) {\n this.category = category;\n }", "public void setCategory(Category category) {\n this.category = category;\n }", "public void setCategory(Category category) {\n this.category = category;\n }", "public void setCategory(String cat) {\t//TODO\n\t\tcategory = cat;\n\t}", "public void setCategory(String newCategory) {\n category = newCategory;\n }", "@Override\n\tpublic void deleteCategory(HttpServletRequest request,\n\t\t\tHttpServletResponse response) {\n\n\t}", "public void selectCategory() {\n\t\t\r\n\t}", "public void setCategory(String category)\r\n {\r\n m_category = category;\r\n }", "@Override\n\tprotected void doGet(SlingHttpServletRequest request, SlingHttpServletResponse response)\n\t\t\tthrows ServletException, IOException {\n\t\t logger.error(\"BISHUNNN CALLED\");\n\t\tString category = request.getParameter(\"category\").trim();\n\t\tGetHttpCall getHttpCall = new GetHttpCall();\n\t\turl = APIConstants.baseURL+category.toLowerCase();\n\t\tresponseString = getHttpCall.execute(url);\n\t\tresponse.getWriter().write(responseString);\n\t}", "@Override\n public String getCategory() {\n return category;\n }", "public abstract String getCategory();", "public abstract String getCategory();", "@Override\n\n // If the request is succesfull\n public void onResponse(JSONObject response) {\n try {\n JSONArray categoriesArray = response.getJSONArray(\"categories\");\n for (int i = 0; i < categoriesArray.length(); i++){\n categories.add(categoriesArray.getString(i));\n }\n }\n catch (JSONException e) {\n Log.e(\"Request\", e.getMessage());\n }\n activity.gotCategories(categories);\n }", "public void cheakCategory(String category) {\n\n if (category.equals(\"1\")) {\n url_count += 1;\n } else if (category.equals(\"4\")) {\n sms_count += 1;\n } else if (category.equals(\"2\")) {\n text_count += 1;\n } else if (category.equals(\"3\")) {\n contact_count += 1;\n } else if (category.equals(\"5\")) {\n initiate_call_count += 1;\n }\n\n }", "public void setCategory(String category) {\n\t\tthis.category = category;\n\t}", "public void setCategory(String category) {\n\t\tthis.category = category;\n\t}", "public String getCategory() {\n return this.category;\n }", "public static void loopCategories() throws IOException {\n //If all of the categories haven't been checked yet check the response at the current index (count).\n if (count < CATEGORY_ARRAY_SIZE) {\n //If that response if equal to TRUE (1).\n if (currentUser.getSingleCategory(count) == TRUE) {\n //Adjust the start index.\n startIndex = count * LOCATIONS_PER_CATEGORY;\n //Call the locaitons view.\n Main.FxmlLoader(LOCATIONS_PATH);\n }\n //Otherwise increment count and check the next index recursively.\n else {\n count++;\n loopCategories();\n }\n }\n }", "@RequestMapping(\"\")\n\tpublic ModelAndView category(){\n\t\tJSONObject json = categoryService.getAllCategorys();\n\t\tModelAndView mv = new ModelAndView(\"category/category\");\n\t\tmv.addObject(\"categories\",json);\n\t\tmv.addObject(\"active\", \"2\");\n\t\treturn mv;\n\t}", "public String searchCategory()\n {\n logger.info(\"**** In searchCategory in Controller ****\");\n categoryList = categoryService.getCategories();\n return Constants.SEARCH_CATEGORY_VIEW;\n }", "String getCategory();", "String getCategory();", "@FXML\n private String handleComboCategory(ActionEvent event)\n {\n String category;\n\n int selectedIndex = comboCategoryBox.getSelectionModel().getSelectedIndex();\n\n switch (selectedIndex)\n {\n case 0:\n category = \"blues\";\n break;\n case 1:\n category = \"hipHop\";\n break;\n case 2:\n category = \"pop\";\n break;\n case 3:\n category = \"rap\";\n break;\n case 4:\n category = \"rock\";\n break;\n case 5:\n category = \"techno\";\n break;\n case 6:\n txtOtherCategory.setVisible(true);\n category = txtOtherCategory.getText();\n break;\n default:\n throw new UnsupportedOperationException(\"Category not chosen\");\n }\n return category;\n }", "public void setCategory(String cat)\n\t{\n\t\tif(cat!=null)\n\t\t\tthis.category = cat;\n\t}", "public String getCategory() {\n return this.category;\n }", "public String getCategory(){\r\n\t\treturn this.category;\r\n\t}", "private void renderCategories(){\n int[] arr = {1, 3, 6, 8, 10};\r\n for (int i : arr) requestQueue.add(getDataFromServer(webURL, String.valueOf(i)));\r\n }", "public String getCategory() {\n return category;\n }", "public String getCategory() {\r\n return category;\r\n }", "public String getCategory();", "private void handleActionGetCategory(String id) {\n\n Log.i(\"getcountry\",\"Thread service name : \"+Thread.currentThread().getName());\n URL url = null;\n\n try {\n\n url = new URL(\"http://binouze.fabrigli.fr/categories/\"+id+\".json\");\n HttpURLConnection conn = (HttpURLConnection) url.openConnection();\n conn.setRequestMethod(\"GET\");\n conn.connect();\n\n if(HttpURLConnection.HTTP_OK == conn.getResponseCode()){\n copyInputStreamToFile(conn.getInputStream(), new File(getCacheDir(),\"category.json\"));\n Log.d(\"getcategory\",\"Country json downloaded\");\n }\n else{\n Log.d(\"getcategory\",\"Country json NOT downloaded. HttpURLConnection.HTTP_OK = \"+HttpURLConnection.HTTP_OK+ \" et conn.getResponseCode() = \"+conn.getResponseCode());\n }\n\n //lance un intent pour signaler l'update\n LocalBroadcastManager.getInstance(this).sendBroadcast(new Intent(SecondeActivity.CATEGORY_UPDATE));\n\n }catch(MalformedURLException e){\n e.printStackTrace();\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n }", "private void defaultCategoryShouldBeFound(String filter) throws Exception {\n restCategoryMockMvc.perform(get(\"/api/categories?sort=id,desc&\" + filter))\n .andExpect(status().isOk())\n .andExpect(content().contentType(MediaType.APPLICATION_JSON_VALUE))\n .andExpect(jsonPath(\"$.[*].id\").value(hasItem(category.getId().intValue())))\n .andExpect(jsonPath(\"$.[*].label\").value(hasItem(DEFAULT_LABEL)))\n .andExpect(jsonPath(\"$.[*].primaryColor\").value(hasItem(DEFAULT_PRIMARY_COLOR)))\n .andExpect(jsonPath(\"$.[*].secondaryColor\").value(hasItem(DEFAULT_SECONDARY_COLOR)));\n\n // Check, that the count call also returns 1\n restCategoryMockMvc.perform(get(\"/api/categories/count?sort=id,desc&\" + filter))\n .andExpect(status().isOk())\n .andExpect(content().contentType(MediaType.APPLICATION_JSON_VALUE))\n .andExpect(content().string(\"1\"));\n }", "@RequestMapping(value=\"/{categoryId}\",\n\t\t\tmethod=RequestMethod.GET, \n\t\t\tproduces = MediaType.APPLICATION_JSON_VALUE)\n\tpublic ResponseEntity<Category> getCategoryById(@PathVariable(\"categoryId\") Long categoryId){\n\t\t\n\t\tCategory category = categoryService.findById(categoryId);\n\t\tif (category == null) {\n\t\t\treturn new ResponseEntity<Category>(HttpStatus.NOT_FOUND);\n\t\t}\n\t\t\n\t\treturn new ResponseEntity<Category>(category, HttpStatus.OK);\n\t}", "void success(String category);", "public void setCategory(String category) {\n this.category = category;\n changeState(CHANGE);\n }", "public com.google.common.util.concurrent.ListenableFuture<io.reactivesw.catalog.grpc.GrpcCategory> getCategoryById(\n io.reactivesw.catalog.grpc.LongValue request) {\n return futureUnaryCall(\n getChannel().newCall(METHOD_GET_CATEGORY_BY_ID, getCallOptions()), request);\n }", "public String getCategory() {\n return category;\n }", "public String getCategory() {\n return category;\n }", "public void category(String menuCategory) {\n for (WebElement element : categories) {\n\n if (menuCategory.equals(CategoryConstants.NEW_IN.toString())) {\n String newin = menuCategory.replace(\"_\", \" \");\n menuCategory = newin;\n }\n try {\n Thread.sleep(1000);\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n String elementText = element.getText();\n if (elementText.equals(menuCategory)) {\n element.click();\n\n break;\n }\n }\n }", "void addCategory(Category category);", "public void updatePortletCategory(PortletCategory category);", "public String getCategory()\n {\n return category;\n }", "public void setCategory (String mode) { category = mode; }", "public String getCategory() {\n return category;\n }", "public String getCategory() {\n return category;\n }", "public String getCategory() {\n return category;\n }", "public String getCategory() {\n return category;\n }", "public String getCategory() {\n return category;\n }", "public String getCategory() {\n return category;\n }", "public String getCategory() {\n return category;\n }", "Category selectCategory(String name);", "public void onSelectCategory(View view) {\n\n Intent intent = new Intent(this, SelectCategoryActivity.class);\n intent.putExtra(\"whichActivity\", 1);\n startActivity(intent);\n\n }", "CodeType getCategory();", "@Override\n public void onClick(View view) {\n final String e = imagedat.get(0).getCategory();\n Intent c = new Intent(MainActivity.this, categories_Activity.class) ;\n c.putExtra(\"Cat\", e);\n startActivity(c);\n }", "@GetMapping(\"/categoriesfu\")\n public synchronized List<Category> getAllCategories() {\n log.debug(\"REST request to get a page of Categories\");\n //fu\n final String user =SecurityUtils.getCurrentUserLogin().get();\n final UserToRestaurant userToRestaurant=userToRestaurantRepository.findOneByUserLogin(user);\n final Restaurant restaurant=userToRestaurant.getRestaurant();\n return categoryRepository.findAllByRestaurant(restaurant);\n }", "Category getCategoryById(int categoryId);", "@GetMapping(\"/category\")\n @TokenRequired\n @ApiOperation(value = \"Gets a Category\", httpMethod = \"GET\")\n public ServiceResponse<CategoryDto> getCategory(@RequestParam(value = \"categoryId\", required = false) String categoryId,\n @RequestParam(value = \"slug\", required = false) String slug,\n HttpServletResponse response) {\n ServiceResponse<CategoryDto> serviceResponse = new ServiceResponse<>();\n ServiceRequest<CategoryDto> serviceRequest = new ServiceRequest<>();\n try {\n checkRequiredParameters(categoryId, slug);\n serviceRequest.setParameter(createDto(categoryId, slug));\n Category categoryResult = categoryService.getCategoryByIdOrSlug(convertToEntity(serviceRequest.getParameter()));\n handleResponse(serviceResponse, convertToDto(categoryResult), response, true);\n } catch (Exception e) {\n exceptionHandler.handleControllerException(serviceResponse, serviceRequest, e, getMethodName(), response);\n }\n return serviceResponse;\n }", "public void chooseCategory(){\n String title = intent.getStringExtra(\"title\");\n String content = intent.getStringExtra(\"content\");\n TextView titleView = findViewById(R.id.category_grid_title);\n titleView.setText(R.string.choose_category_title);\n categoriesAdapter.passInfo(title, content);\n }", "void selectCategory() {\n // If user is the active player, ask for the user's category.\n if (activePlayer.getIsHuman()) {\n setGameState(GameState.CATEGORY_REQUIRED);\n }\n // Or get AI active player to select best category.\n else {\n Card activeCard = activePlayer.getTopMostCard();\n activeCategory = activeCard.getBestCategory();\n }\n\n logger.log(\"Selected category: \" + activeCategory + \"=\" +\n activePlayer.getTopMostCard().getCardProperties()\n .get(activeCategory));\n logger.log(divider);\n\n setGameState(GameState.CATEGORY_SELECTED);\n }", "public void setRequestType(String category){\n requestType = category;\n }", "public Object caseCategory(Category object) {\n\t\treturn null;\n\t}", "Category getCategoryByName(String categoryName);", "Category getCategoryById(Integer categoryId);", "@RequestMapping(value = \"category\", method = RequestMethod.GET)\n public String category(Model model, @RequestParam int id){\n Category cat = categoryDao.findOne(id);\n List<Recipe> recipes = cat.getRecipes();\n model.addAttribute(\"recipes\", recipes);\n model.addAttribute(\"title\", cat.getCategoryName() + \" recipes\");\n return \"recipe/list-under\";\n }", "public int getCategory() {\r\n\t\treturn category;\r\n\t}", "@GetMapping(\"movie-cat/{category}\")\n\tpublic List<Movie> getMovieCat(@PathVariable(\"category\") String category){\n\t\tList<Movie> list = repo.findByCategory(category);\n\t\treturn list;\n\t\t\n\t}", "private void filterHandler(Request req, ProductCategory filter) throws SQLException {\n generalHandler(req);\n params.put(\"currFilter\", filter);\n params.put(\"products\", filter.getProducts());\n }", "@GetMapping(\"/categoriesfu/{id}\")\n public synchronized ResponseEntity<Category> getCategory(@PathVariable Long id) {\n log.debug(\"REST request to get Category : {}\", id);\n //fu\n final String user =SecurityUtils.getCurrentUserLogin().get();\n final UserToRestaurant userToRestaurant=userToRestaurantRepository.findOneByUserLogin(user);\n final Restaurant restaurant=userToRestaurant.getRestaurant();\n Optional<Category> category = categoryRepository.findById(id);\n \tif(category != null && category.get().getRestaurant().getId()!=restaurant.getId()){\n \t\tlog.debug(\"zła restauracja \"+restaurant.getName() + ' ' + category.get().getRestaurant().getName());\n \t\tcategory=null;\n \t}\n return ResponseUtil.wrapOrNotFound(category);\n }", "@Override\n protected void onOk(Category category) {\n if (getPart().getCategory() != null) {\n getCurrentConversation().getEntityManager().detach(getPart().getCategory());\n }\n\n getPart().setCategory(category);\n messageUtil.infoEntity(\"status_created_ok\", category);\n }", "String category();", "private Category getCategory()\n\t{\n\t\tSystem.out.println(\"------------------------------------------------------------\");\n\t\tSystem.out.println(\"Choose category:\");\n\t\tint i = 1;\n\t\tfor(Category category : Category.values())\n\t\t{\n\t\t\tSystem.out.println(i + \": \"+category.getCategoryDescription());\n\t\t\ti++;\n\t\t}\n\t\tSystem.out.println(\"------------------------------------------------------------\");\n\t\tString userChoiceStr = scanner.nextLine();\n\t\tint userChoice;\n\t\ttry\n\t\t{\n\t\t\tuserChoice = Integer.parseInt(userChoiceStr);\n\t\t}\n\t\tcatch(NumberFormatException e)\n\t\t{\n\t\t\tSystem.out.println(\"Invalid input\");\n\t\t\treturn null;\n\t\t}\n\t\t\n\t\tif(userChoice<1 || userChoice>25)\n\t\t{\n//\t\t\tSystem.out.println(\"Invalid category code\");\n\t\t\treturn null;\n\t\t}\n\t\tCategory category;\n\t\tswitch (userChoice) \n\t\t{\n\t\t\tcase 1: category = Category.ARTS; break;\n\t\t\tcase 2: category = Category.AUTOMOTIVE; break;\n\t\t\tcase 3: category = Category.BABY; break;\n\t\t\tcase 4: category = Category.BEAUTY; break;\n\t\t\tcase 5: category = Category.BOOKS; break;\n\t\t\tcase 6: category = Category.COMPUTERS; break;\n\t\t\tcase 7: category = Category.CLOTHING;break;\n\t\t\tcase 8: category = Category.ELECTRONICS; break;\n\t\t\tcase 9: category = Category.FASHION; break;\n\t\t\tcase 10: category = Category.FINANCE; break;\n\t\t\tcase 11: category = Category.FOOD; break;\n\t\t\tcase 12: category = Category.HEALTH; break;\n\t\t\tcase 13: category = Category.HOME; break;\n\t\t\tcase 14: category = Category.LIFESTYLE; break;\n\t\t\tcase 15: category = Category.MOVIES; break;\n\t\t\tcase 16: category = Category.MUSIC; break;\n\t\t\tcase 17: category = Category.OUTDOORS; break;\n\t\t\tcase 18: category = Category.PETS; break;\n\t\t\tcase 19: category = Category.RESTAURANTS; break;\n\t\t\tcase 20: category = Category.SHOES; break;\n\t\t\tcase 21: category = Category.SOFTWARE; break;\n\t\t\tcase 22: category = Category.SPORTS; break;\n\t\t\tcase 23: category = Category.TOOLS; break;\n\t\t\tcase 24: category = Category.TRAVEL; break;\n\t\t\tcase 25: category = Category.VIDEOGAMES; break;\n\t\t\tdefault: category = null;System.out.println(\"No such category\"); break;\n\t\t}\n\t\treturn category;\n\t}", "@GetMapping(\"/category/{id}\")\n ResponseEntity<?> getCategory(@PathVariable Long id){\n Optional<Category> category = categoryRepository.findById(id);\n\n //map it to response if OK... create new response entity and send back NOT FOUND to browser if invalid id\n return category.map(response -> ResponseEntity.ok().body(response)).orElse(new ResponseEntity<>(HttpStatus.NOT_FOUND));\n }", "public String updateCategory()\n {\n logger.info(\"**** In updateCategory in Controller ****\");\n boolean flag = categoryService.updateCategory(category);\n if (flag)\n {\n FacesMessage facesMsg = new FacesMessage(FacesMessage.SEVERITY_INFO, Constants.CATEGORY_UPDATION_SUCCESS, Constants.CATEGORY_UPDATION_SUCCESS);\n FacesContext.getCurrentInstance().getExternalContext().getFlash().setKeepMessages(true);\n FacesContext.getCurrentInstance().addMessage(null, facesMsg);\n }\n return searchCategory();\n }", "public String category() {\n return this.category;\n }", "public String category() {\n return this.category;\n }", "Category selectCategory(long id);", "public String getCategory()\n\t{\n\t\treturn category;\n\t}", "public int getCategory(){\n\t\treturn this.cat;\n\t}", "public void setCategory(Category category) {\n\t\tthis.category = category;\n\t}" ]
[ "0.6659614", "0.65968555", "0.64729434", "0.6447404", "0.6447404", "0.6447404", "0.6447404", "0.6447404", "0.63836634", "0.63371545", "0.6314578", "0.62972856", "0.6242356", "0.6213628", "0.6213628", "0.61900985", "0.61656356", "0.6156787", "0.61514693", "0.6146537", "0.61427283", "0.61427283", "0.61427283", "0.61427283", "0.61161584", "0.6108769", "0.61066765", "0.6095344", "0.60466367", "0.60023946", "0.59993565", "0.5994911", "0.5994911", "0.5986909", "0.59709585", "0.59664387", "0.59664387", "0.5943352", "0.5924295", "0.5914138", "0.5896379", "0.5890519", "0.5890519", "0.58781785", "0.58704495", "0.58699334", "0.58677197", "0.583211", "0.58150697", "0.5813296", "0.5809064", "0.5804191", "0.57975775", "0.57939106", "0.5792512", "0.5789468", "0.57839894", "0.5768513", "0.5768513", "0.57560223", "0.5748155", "0.5746946", "0.5739636", "0.5726299", "0.5725234", "0.5725234", "0.5725234", "0.5725234", "0.5725234", "0.5725234", "0.5725234", "0.5719504", "0.5690623", "0.5686851", "0.56842834", "0.5681531", "0.56741554", "0.5672633", "0.56713665", "0.5667102", "0.565582", "0.56556374", "0.56465167", "0.5646116", "0.56454706", "0.5644922", "0.56422067", "0.56416756", "0.56358343", "0.56304896", "0.5613267", "0.560492", "0.56036294", "0.5601813", "0.55930436", "0.55930436", "0.5591344", "0.5588009", "0.5585938", "0.5584444" ]
0.56281006
90
Handles requests to individual gif page
@RequestMapping("/gif/{name}") public String gifDetails(@PathVariable String name, ModelMap modelMap) { Gif gif = gifRepo.getGifByName(name); modelMap.put("gif",gif); return "gif-details"; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void handleGifResponse(Response<GifResponse> response) {\n GifResponse gifResponse = (GifResponse) response.body();\n if (gifResponse != null) {\n this.listener.onSuccess(getImagesFromResponse(gifResponse.results()));\n return;\n }\n this.listener.onError();\n }", "@Override\n public void loadGif(String url) {\n CircularProgressDrawable progressPlaceHolder = ProgressBarUtil.getCircularProgressPlaceholder(getContext());\n if (!TextUtils.isEmpty(url)) {\n Glide.with(getContext())\n .asGif()\n .load(url)\n .apply(new RequestOptions()\n .placeholder(progressPlaceHolder))\n .into(ivGif);\n }\n }", "@RequestMapping(\"/gifs/{gifId}.gif\")\n @ResponseBody\n public byte[] gifImage(@PathVariable Long gifId) {\n return gifService.findById(gifId).getBytes();\n }", "@ResponseBody\n @GetMapping(path = \"/{id}.gif\", produces = MediaType.IMAGE_GIF_VALUE)\n public byte[] getGifImage(@PathVariable String id) {\n return gifService\n .findGifById(id)\n .getFile()\n .getData();\n }", "@Override\n public void run() {\n try {\n if (urlString != null && !urlString.equals(\"\")) {\n\n\n if (urlString.endsWith(\".gif\")) {\n\n\n handler.sendEmptyMessage(SHOW_VIEW_GIF);\n\n } else if (!urlString.endsWith(\".gif\")) {\n bitmapDrawable = null;\n bitmapDrawable = ((BitmapDrawable) loadImageFromUrl(urlString)).getBitmap();\n if (bitmapDrawable != null) {\n handler.sendEmptyMessage(SHOW_VIEW);\n }\n\n\n }\n\n\n }\n\n\n } catch (IOException e) {\n e.printStackTrace();\n }\n }", "public void act() {\n setImage(myGif.getCurrentImage());\n }", "@GetMapping(\"/check-currency-and-show-gif\")\n public ResponseEntity showGif(@RequestParam(\"code\") String code) throws URISyntaxException, IOException {\n URI uri = new URI(service.checkRatesAndGetGifLink(code));\n HttpHeaders httpHeaders = new HttpHeaders();\n httpHeaders.setLocation(uri);\n return new ResponseEntity(httpHeaders, HttpStatus.SEE_OTHER);\n }", "@Override\n public void populateGifDetails() {\n // Set the rating with animation\n ObjectAnimator anim = ObjectAnimator.ofFloat(averageRatingBar, \"rating\", gif.getAverageRating());\n anim.setDuration(2000);\n anim.start();\n\n tvRatingCount.setText(String.valueOf(gif.getRatingCount()));\n tvTitle.setText(gif.getTitle());\n tvUploader.setText(gif.getUserName());\n tvUploadDate.setText(getFormattedDate(gif.getImportDate()));\n tvDimension.setText(getString(R.string.formatted_dimensions, gif.getFullGif().getHeight()\n , gif.getFullGif().getWidth()));\n tvSize.setText(getString(R.string.formatted_size_with_unit_kb, gif.getFullGif().getSize()));\n }", "public GifMain() {\n initComponents ();\n \n }", "@RequestMapping(\"/\")\n public String listGifs(Model model) {\n List<Gif> gifs = gifService.findAll();\n model.addAttribute(\"gifs\", gifs);\n return \"gif/index\";\n }", "@PostMapping(path = {\"/{id}\", \"/{id}/\"})\n public String favoriteGif(@PathVariable String id, @RequestHeader(\"Referer\") String referer) {\n val gif = gifService.findGifById(id);\n\n gifService.favoriteGifById(id);\n\n // Omit the \"/\" after redirect, as the referer is a fully-qualified URL\n return String.format(\"redirect:%s\", referer);\n }", "@Override\n public void onResponse(final ImageLoader.ImageContainer response, boolean isImmediate) {\n if (circleImageView.getTag() != null && !circleImageView.getTag().equals(url))\n return;\n\n if (isImmediate && response.getBitmap() == null)\n {\n circleImageView.setImageResource(R.drawable.ic_profile);\n return;\n }\n\n if (response.getBitmap() != null)\n {\n if (!isScrolling)\n {\n circleImageView.setImageBitmap(response.getBitmap());\n }\n else\n {\n animateSides(circleImageView, !sender, new Animation.AnimationListener() {\n @Override\n public void onAnimationStart(Animation animation) {\n circleImageView.setImageBitmap(response.getBitmap());\n }\n\n @Override\n public void onAnimationEnd(Animation animation) {\n\n }\n\n @Override\n public void onAnimationRepeat(Animation animation) {\n\n }\n });\n\n circleImageView.getAnimation().start();\n }\n }\n }", "public ArrayList<BufferedImage> getImages(File gif) throws IOException {\r\n\t\tArrayList<BufferedImage> imgs = new ArrayList<BufferedImage>();\r\n\t\tImageReader rdr = new GIFImageReader(new GIFImageReaderSpi());\r\n\t\trdr.setInput(ImageIO.createImageInputStream(gif));\r\n\t\tfor (int i=0;i < rdr.getNumImages(true); i++) {\r\n\t\t\timgs.add(rdr.read(i));\r\n\t\t}\r\n\t\treturn imgs;\r\n\t}", "public void getImageResults(String tag){\n showProgressBar(true);\n HttpClient.get(\"rest/\", getRequestParams(tag), new AsyncHttpResponseHandler() {\n @Override\n public void onSuccess(int statusCode, Header[] headers, byte[] responseBody) {\n String response = new String(responseBody, StandardCharsets.UTF_8);\n response = StringUtils.replace(response, \"jsonFlickrApi(\", \"\");\n response = StringUtils.removeEnd(response, \")\");\n Log.d(\"SERVICE RESPONSE\", response);\n Gson gson = new Gson();\n FlickrSearchResponse jsonResponse = gson.fromJson(response, FlickrSearchResponse.class);\n if(jsonResponse.getStat().equals(\"fail\")){\n //api returned an error\n searchHelperListener.onErrorResponseReceived(jsonResponse.getMessage());\n } else {\n //api returned data\n searchHelperListener.onSuccessResponseReceived(jsonResponse);\n }\n showProgressBar(false);\n }\n\n @Override\n public void onFailure(int statusCode, Header[] headers, byte[] responseBody, Throwable error) {\n Log.d(\"SERVICE FAILURE\", error.getMessage());\n searchHelperListener.onErrorResponseReceived(error.getMessage());\n showProgressBar(false);\n }\n });\n\n }", "@Override\n public void onSuccess(FileDownloadTask.TaskSnapshot state) {\n useGlide(Uri.fromFile(animal_file1));\n\n }", "public static void displayGifImageFromUrl(Context context, String url, ImageView imageView, Drawable placeholderDrawable, RequestListener listener) {\n RequestOptions myOptions = new RequestOptions()\n .dontAnimate()\n .diskCacheStrategy(DiskCacheStrategy.AUTOMATIC)\n .placeholder(placeholderDrawable);\n\n if (listener != null) {\n Glide.with(context)\n .asGif()\n .load(url)\n .apply(myOptions)\n .listener(listener)\n .into(imageView);\n } else {\n Glide.with(context)\n .asGif()\n .load(url)\n .apply(myOptions)\n .into(imageView);\n }\n }", "private void doNetGetImg() {\n\t\tString url = UploadUtils.PATIENTAPP_FILE_URL + CommonUtils.getTokenParam(activity) +\"&patientId=\"+orderMoreDetails.getPatientId()+\"&reportType=mr\";\n\t\tQJNetUICallback2 callback = new QJNetUICallback2<QjResult<HashMap<String,List<ImgQiNiuEntity>>>>(activity) {\n\t\t\t@Override\n\t\t\tpublic void onSuccess(QjResult<HashMap<String,List<ImgQiNiuEntity>>> result) {\n\t\t\t\tif (result != null\n\t\t\t\t\t\t&& result.getResults() != null) {\n\t\t\t\t\tList<ImgQiNiuEntity> list = result.getResults().get(\"files\");\n\t\t\t\t\tif (list != null) {\n\n\t\t\t\t\t\tif (list.size()>=9) {\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tbtn_upcase.setVisibility(View.GONE);\n\t\t\t\t\t\t}else {\n\t\t\t\t\t\t\tbtn_upcase.setVisibility(View.VISIBLE);\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\tfor(int i = 0; i < list.size(); i ++){\n\t\t\t\t\t\t\tImageItem item = new ImageItem();\n\t\t\t\t\t\t\titem.imagePath = list.get(i).getThumbnailUrl();\n\t\t\t\t\t\t\titem.upImagePath = list.get(i).getAbsFileUrl();\n\t\t\t\t\t\t\tdataChoosed.add(item);\n\t\t\t\t\t\t\tnoScrollgridview.setAdapter(adapter);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tpublic void onError(Exception e, QjResult<HashMap<String,List<ImgQiNiuEntity>>> result) {\n\t\t\t\tsuper.onError(e, result);\n\t\t\t\tToastUtil.showToast(activity, \"获取失败!\",Toast.LENGTH_LONG);\n\t\t\t}\n\n\t\t\tpublic void onCompleted(Exception e, QjResult<HashMap<String,List<ImgQiNiuEntity>>> result) {\n\t\t\t\tsuper.onCompleted(e, result);\n\t\t\t}\n\t\t};\n\t\tNetOld.with(activity).fetch( url ,null, new TypeToken<QjResult<HashMap<String,List<ImgQiNiuEntity>>>>() {}, callback);\n\t}", "private void loadImages(FollowersResponse response) throws IOException {\n for(User user : response.getFollowers()) {\n byte [] bytes = ByteArrayUtils.bytesFromUrl(user.getImageUrl());\n user.setImageBytes(bytes);\n }\n }", "private void viewImage(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\t\tint id= Integer.parseInt(request.getParameter(\"fileId\"));\n\t\tFiles file= new FilesDAO().view(id);\n\t\trequest.setAttribute(\"files\", file);\n\t\trequest.setAttribute(\"path\", path);\n\t\trequest.getRequestDispatcher(\"viewImage.jsp\").forward(request, response);\n\t\tSystem.out.println(file);\n\t}", "public interface GlideLoadInterface {\n void glideLoad(Context context, Object url, ImageView view, int default_image, int radius);\n}", "public interface GIF {\n\n\t/**\n\t * The from method picks up the directory the\n\t * images are for gif creation\n\t * @param path path of the directory image resides in.\n\t * @return GIFMaker\n\t */\n\tpublic GIFMaker from(ImageComposite collection);\n\n\t/**\n\t * The destination directory where the final gif will reside.\n\t * @param path Directory path\n\t * @return GIFMAKER\n\t */\n\tpublic GIFMaker to(String path);\n\n\t/**\n\t * Adds the delay between two images.\n\t * @param delay int\n\t * @return GIFMaker\n\t */\n\tpublic GIFMaker withDelay(int delay);\n\t\n\t/**\n\t * Repeats GIF\n\t * @param repeat\n\t * @return GIFMaker\n\t */\n\tpublic GIFMaker repeat(boolean repeat);\n\t\n\t/**\n\t * Sets the width\n\t * @param width\n\t * @return GIFMaker\n\t */\n\tpublic GIFMaker width(int width);\n\t\n\t/**\n\t * Sets the height\n\t * @param height\n\t * @return GIFMaker\n\t */\n\tpublic GIFMaker height(int height);\n\n\t/**\n\t * Makes the final GIF Image for the the application.\n\t */\n\tpublic void make();\n\t\n}", "public void playerAnimation(){\r\n \r\n switch (gif) {\r\n case 5:\r\n j= new ImageIcon(getClass().getResource(\"/\" + Character.choosen_char + \"_1.png\"));\r\n img = j.getImage().getScaledInstance(200, 200, Image.SCALE_DEFAULT);\r\n ;\r\n break;\r\n case 15:\r\n j = new ImageIcon(getClass().getResource(\"/\"+ Character.choosen_char + \"_2.png\"));\r\n img = j.getImage().getScaledInstance(200, 200, Image.SCALE_DEFAULT);\r\n break;\r\n case 20:\r\n j = new ImageIcon(getClass().getResource(\"/\"+ Character.choosen_char + \"_3.png\"));\r\n img = j.getImage().getScaledInstance(200, 200, Image.SCALE_DEFAULT);\r\n\r\n break;\r\n case 35:\r\n j = new ImageIcon(getClass().getResource(\"/\" + Character.choosen_char + \"_4.png\"));\r\n img = j.getImage().getScaledInstance(200, 200, Image.SCALE_DEFAULT);\r\n\r\n break;\r\n case 45:\r\n j = new ImageIcon(getClass().getResource(\"/\" + Character.choosen_char + \"_5.png\"));\r\n img = j.getImage().getScaledInstance(200, 200, Image.SCALE_DEFAULT);\r\n\r\n break;\r\n case 55:\r\n j = new ImageIcon(getClass().getResource(\"/\" + Character.choosen_char + \"_6.png\"));\r\n img = j.getImage().getScaledInstance(200, 200, Image.SCALE_DEFAULT);\r\n\r\n break;\r\n case 65:\r\n // j= new ImageIcon(\"D:\\\\Netbeans\\\\Projects\\\\ProjectZ\\\\src\\\\shi_1.png\");\r\n // img = j.getImage().getScaledInstance(200, 200, Image.SCALE_DEFAULT);\r\n // \r\n gif = 0;\r\n break;\r\n default:\r\n break;\r\n }\r\n\r\n }", "@Override\n\tpublic List<String> gif_image_list(String user_id) throws Exception {\n\t\treturn sqlSession.selectList(NAMESPACE + \".gif_image_list\", user_id);\n\t}", "private void requestFirstHug() {\n new ImageDownloader(this) {\n @Override\n protected void onPostExecute(String filePath) {\n super.onPostExecute(filePath);\n Hug hug = new Hug(\n getString(R.string.first_hug_message),\n filePath,\n System.currentTimeMillis());\n HugDatabaseHelper.insertHug(MainActivity.this, hug);\n }\n }.executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR, KramConstant.GOOGLE_SEARCH_URL);\n }", "@Override\n public void onClick(View v) {\n// Intent intent=new Intent();\n// intent.setClass(Main47Activity.this,LibMainActivity.class);\n// startActivity(intent);\n\n ImageView icon=findViewById(R.id.image);\n GlideApp.with(Main47Activity.this).load(\"http://www.10000s.com/servlet/ValidateCodeServlet\").into(icon);\n }", "private void loadActivity() {\n\t\tsetContentView(R.layout.activity_rhyme);\n\t\tloadSpeechActivity();\n\t\tDisplayMetrics displaymetrics = new DisplayMetrics();\n\t\tgetWindowManager().getDefaultDisplay().getMetrics(displaymetrics);\n\t\theight = displaymetrics.heightPixels; //432\n\t\twidth = displaymetrics.widthPixels;\t //800\n\t\t\n\t\tdensity = getResources().getDisplayMetrics().density;\t\t\n\t\t\n\t\t/*Load the windmill gif*/\n\t\tLinearLayout linearLayout=(LinearLayout) findViewById(R.id.linearlayout);\n\t\tGifWebView gifView;\n\t\tDisplayMetrics dm = getApplicationContext().getResources().getDisplayMetrics();\n\t\tfloat screenWidth=dm.widthPixels / dm.xdpi;\n\t float screenHeight=dm.heightPixels / dm.ydpi;\n\t screenSize = Math.sqrt(Math.pow(screenWidth,2)+Math.pow(screenHeight, 2));\n\t arrayInitialise();\n\t /* Load the gif for the part \"here..there..\"*/\n\t gifView_here\t= new GifWebView(this, hereGif.get(counter));\n\t if(screenSize > 2 && screenSize < 5)\n\t\t{\n\t\t\tgifView\t= new GifWebView(this, \"file:///android_asset/fan_ldpi2.gif\");\n\t\t}\n\t\telse if(screenSize >= 7 && density > 1)\n\t\t{\n\t\t\tgifView\t= new GifWebView(this, \"file:///android_asset/fan_hdpi.gif\");\n\t\t}\n\t\telse \n\t\t{\n\t\t\tgifView\t= new GifWebView(this, \"file:///android_asset/fan_mdpi2.gif\");\n\t\t}\n\t\tgifView.setBackgroundColor(0x00000000);\n\t\tgifView.setLayerType(WebView.LAYER_TYPE_SOFTWARE, null);\n\t\tlinearLayout.setBackgroundColor(Color.TRANSPARENT);\n\t\tlinearLayout.addView(gifView);\n\t\t\n\t\t/*Load the main farmer-cart GIF*/\n\t\tRelativeLayout relativeLayout=(RelativeLayout) findViewById(R.id.rl1);\n\t\tgifView2\t= new GifWebView(this, farmerGif.get(counter));\n\t\tgifView2.setBackgroundColor(0x00000000);\n\t\tgifView2.setLayerType(WebView.LAYER_TYPE_SOFTWARE, null);\n\t\trelativeLayout.setBackgroundColor(Color.TRANSPARENT);\t\t\t\n\t\trelativeLayout.addView(gifView2);\n\t\trelativeLayout.setVisibility(View.VISIBLE);\n\t\tEditText et = (EditText) findViewById(R.id.editText1);\n\t\tet.setVisibility(View.INVISIBLE);\n\t\tImageButton speakButton = (ImageButton) findViewById(R.id.speakButton);\n\t\tspeakButton.setVisibility(View.INVISIBLE);\n\t\t\n\t\tRelativeLayout rl3=(RelativeLayout) findViewById(R.id.rl3);\n\t\trl3.setVisibility(View.INVISIBLE);\n\t\t\n\t\tscreenSet();\n\t\t\n\t\tmoveViewToScreenCenter(gifView2);\n\t\t\n\t\tmp = MediaPlayer.create(this,soundStart.get(counter));\n\t\tmp.start();\n\t\tmp.setOnCompletionListener(new MediaPlayer.OnCompletionListener() {\n\t\t public void onCompletion(MediaPlayer mp) {\n\t\t \tif(voiceSupport==0){\n\t\t\t \tEditText et = (EditText) findViewById(R.id.editText1);\n\t\t\t\t\tet.setVisibility(View.VISIBLE);\n\t\t \t}\n\t\t \telse\n\t\t \t{\n\t\t \t\tImageButton speakButton = (ImageButton) findViewById(R.id.speakButton);\n\t\t \t\tspeakButton.setVisibility(View.VISIBLE);\n\t\t \t}\n\t\t\t\n\t\t }\n\t\t});\n\t\t/*Check when the user is done typing*/\n\t\tet.setOnEditorActionListener(\n\t\t\t new EditText.OnEditorActionListener() \n\t\t\t {\n\t\t\t@Override\n\t\t\tpublic boolean onEditorAction(TextView v, int actionId, KeyEvent event) \n\t\t\t{\n\t\t\t if (actionId == EditorInfo.IME_ACTION_SEARCH ||\n\t\t\t actionId == EditorInfo.IME_ACTION_DONE ||\n\t\t\t event.getAction() == KeyEvent.ACTION_DOWN &&\n\t\t\t event.getKeyCode() == KeyEvent.KEYCODE_ENTER) \n\t\t\t {\n\t\t\t // the user is done typing.\n\t\t\t \ttry {\n\t\t\t\t\t\tThread.sleep(20);\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 \tInputMethodManager inputManager = (InputMethodManager)\n getSystemService(Context.INPUT_METHOD_SERVICE); \n\n\t\t\t \tinputManager.hideSoftInputFromWindow(getCurrentFocus().getWindowToken(),\n InputMethodManager.HIDE_NOT_ALWAYS);\n\t\t\t \tEditText sound1 = (EditText)findViewById(R.id.editText1);\n\t\t\t \t\n\t\t\t \tString input = sound1.getText().toString();\n\t\t\t \tcheckAnswer(input);\t\t\t \t\n\t\t\t return true; // consume.\n\t\t\t \n\t\t\t }\n\t\t\t return false; // pass on to other listeners. \n\t\t\t}\n\n\t\t\t\n\t });\t\n\t\t}", "public GIFMaker to(String path);", "public interface MainView {\n\n void setGifs(GifList list);\n void showError(String error);\n\n}", "com.yahoo.xpathproto.TransformTestProtos.ContentImage getImageByHandler();", "private boolean matchUrl(String url) {\n return url.contains(\"v1/gifs/\");\n }", "Map getImageCode(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException;", "public void updateGif(final Date date) {\r\n if (giffer != null) {\r\n giffer.updateGif(buffer, date);\r\n if (replay.isAtEnd()) {\r\n endGif();\r\n }\r\n }\r\n }", "@Override\n\t\t\tprotected Drawable doInBackground(ImageView... params) {\n\t\t\t\timageview = params[0];\n\t\t\t\tDrawable drawable = null;\n\t\t\t\tFile downloadPath = createDownloadsPath(activity, url.split(\"/\"));\n\t\t\t\tdo {\n\t\t\t\t\tdrawable = Utils.LoadImageFromWebOperations(url,\n\t\t\t\t\t\t\tdownloadPath);\n\t\t\t\t\tattempts--;\n\t\t\t\t} while (attempts > 0 && drawable == null);\n\t\t\t\treturn drawable;\n\t\t\t}", "public boolean isGif(String url){\n if(url==null){\n return false;\n }\n\n // First try to grab the mime from the options\n Options options = new Options();\n options.inJustDecodeBounds = true;\n BitmapFactory.decodeFile(getFullCacheFileName(mContext, url), options);\n if(options.outMimeType!=null && \n options.outMimeType.equals(ImageManager.GIF_MIME)){\n return true;\n }\n\n // Next, try to grab the mime type from the url\n final String extension = MimeTypeMap.getFileExtensionFromUrl(url);\n if(extension!=null){\n String mimeType = \n MimeTypeMap.getSingleton().getMimeTypeFromExtension(extension);\n if(mimeType!=null){\n return mimeType.equals(ImageManager.GIF_MIME);\n }\n }\n\n return false;\n }", "protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\t\t\n\t\tLong mediaId = null;\n\t\tresponse.addHeader(\"Access-Control-Allow-Origin\", \"*\");\n\t\t\n\t\tif(request.getParameterMap().containsKey(\"mediaId\")) {\n\t\t\tmediaId = Long.parseLong(request.getParameter(\"mediaId\"));\n\t\t}\n\t\t\n\t\ttry {\n\t\t\tlogger.info(\"Sending media information for id = \" + mediaId);\n\t\t\tresponse.setContentType(\"image/png\");\n\t\t\tFile f = new File(IMG_PATH + mediaId + \".png\");\n\t\t\tBufferedImage bi ;\n\t\t\tif(f.exists() && !f.isDirectory()) { \n\t\t\t\t bi = ImageIO.read(f);\n\t\t\t}\n\t\t\telse {\n\t\t\t\tf = new File(IMG_PATH + 0 + \".png\");\n\t\t\t\tbi = ImageIO.read(f);\n\t\t\t}\n\t\t\tOutputStream out = response.getOutputStream();\n\t\t\tImageIO.write(bi, \"png\", out);\n\t\t\tout.close();\n\t\t} catch (Exception e) {\n\t\t\t\n\t\t}\n\t\t\n\t}", "@Override\r\n public void onResponse(String response) {\n loadImageInGUI(response);\r\n Utility.writeOnPreferences(activity, \"image\", response);\r\n Utility.reloadActivity(activity);\r\n\r\n }", "public void createSes(File f){\r\n ArrayList list = new ArrayList();\r\n list.addAll(andrec);\r\n\r\n ArrayList<Image> im = new ArrayList<Image>();\r\n im.addAll(images);\r\n Image anime = null;\r\n if(!im.isEmpty()){\r\n File path = new File(workplace+\"/gifs\");\r\n if(!path.exists())\r\n path.mkdir();\r\n String str = \"/gifs/\"+getFileTime(f)+\".gif\";\r\n str = str.replace(\" \", \"_\");\r\n str = str.replace(\":\", \"-\");\r\n str = workplace + str;\r\n File gif = new File(str);\r\n try {\r\n AnimatedGifEncoder e = new AnimatedGifEncoder();\r\n e.start(str);\r\n e.setDelay(1000);\r\n for(int i=0 ; i<im.size() ; i++){\r\n BufferedImage bi = (BufferedImage)im.get(i);\r\n e.addFrame(bi);\r\n }\r\n e.finish();\r\n anime = Toolkit.getDefaultToolkit().createImage(gif.getAbsolutePath());\r\n } catch (Exception ex) {\r\n JOptionPane.showMessageDialog(null, \"failed to create gif.\", \"System Message\", JOptionPane.ERROR_MESSAGE);\r\n ex.printStackTrace();\r\n System.out.println(gif.getAbsolutePath());\r\n System.out.println(workplace);\r\n }\r\n }\r\n session se = null;\r\n if(anime == null) {\r\n se = new session(getFileTime(f).toString(), list, null);\r\n }else if(anime != null) {\r\n for(int i=0 ; i<100 ; i++){\r\n if(animeimg[i]==null){\r\n animeimg[i] = anime;\r\n break;\r\n }\r\n }\r\n se = new session(getFileTime(f).toString(), list, anime);\r\n //update anime list\r\n updateanime();\r\n }\r\n ses.add(se);\r\n andrec.clear();\r\n images.clear();\r\n }", "@GetMapping(\"/category/{id}\")\n public String gifsCategory(@PathVariable int id, ModelMap modelMap){\n Category category = categoryRepository.getCategoryById(id);\n //1.2. pobranie gifow z id danej kategorii\n List<Gif> gifs = gifRepository.getGifsByCategoryId(id);\n //2. przekazanie do widoku\n modelMap.put(\"category\",category);\n modelMap.put(\"gifs\",gifs);\n //3.Zwracanie widoku\n return \"category\";\n }", "@RequestMapping(\"/upload\")\n public String formNewGif(Model model) {\n if (!model.containsAttribute(\"gif\")) {\n model.addAttribute(\"gif\", new Gif());\n }\n model.addAttribute(\"categories\", categoryService.findAll());\n model.addAttribute(\"action\", \"/gifs\");\n model.addAttribute(\"heading\", \"Upload Gif\");\n model.addAttribute(\"submit\", \"Upload\");\n return \"gif/form\";\n }", "public void run() {\n if(request!=null && request.mLoadDelay>0){\n try {\n Thread.sleep(request.mLoadDelay);\n } catch (InterruptedException e){\n if(ImageManager.DEBUG){\n e.printStackTrace();\n }\n }\n }\n\n File file = null;\n\n // If the URL is not a local reseource, grab the file\n if(!getUrl().startsWith(\"content://\")){\n\n // Grab a link to the file\n file = new File(getFullCacheFileName(mContext, getUrl()));\n\n // If the file doesn't exist, grab it from the network\n if (!file.exists()){\n cacheImage( file, request);\n } \n\n // Otherwise let the callback know the image is cached\n else if(request!=null){\n request.sendCachedCallback(getUrl(), true);\n }\n\n // Check if the file is a gif\n boolean isGif = isGif(getUrl());\n\n // If the file downloaded was a gif, tell all the callbacks\n if( isGif && request!=null ){\n request.sendGifCallback(getUrl());\n }\n }\n\n // Check if we should cache the image and the dimens\n boolean shouldCache = false;\n int maxWidth = MAX_WIDTH;\n int maxHeight = MAX_HEIGHT;\n if(request!=null){\n maxWidth = request.mMaxWidth;\n maxHeight = request.mMaxHeight;\n shouldCache = request.mCacheImage;\n }\n\n // If any of the callbacks request the image should be cached, cache it\n if(shouldCache && \n (request!=null&&request.mContext!=null)||request==null){\n\n // First check the image isn't actually in the cache\n Bitmap bitmap = get(getUrl());\n\n // If the bitmap isn't in the cache, try to grab it\n // Or the bitmap was in the cache, but is of no use\n if(bitmap == null){\n\n if(!getUrl().startsWith(\"content://\")){\n bitmap = decodeBitmap(file, maxWidth, maxHeight);\n }else{\n Uri uri = Uri.parse(getUrl());\n try{\n InputStream input = mContext.getContentResolver().openInputStream(uri);\n bitmap = BitmapFactory.decodeStream(input);\n input.close();\n }catch(FileNotFoundException e){\n if(DEBUG){\n e.printStackTrace();\n }\n }catch(IOException e){\n if(DEBUG){\n e.printStackTrace();\n }\n }\n }\n\n // If we grabbed the image ok, add to the cache\n if(bitmap!=null){\n addEntry(getUrl(), bitmap);\n }\n }\n\n // Send the cached callback\n if(request!=null){\n request.sendCallback(getUrl(), bitmap);\n }\n }\n }", "@Override\n\tprotected void doGet(HttpServletRequest request, HttpServletResponse response)\n\t\t\tthrows ServletException, IOException {\n\t\tresponse.setHeader(\"Pragma\", \"No-cache\");\n\t\tresponse.setHeader(\"Cache-Control\", \"no-cache\");\n\t\tresponse.setDateHeader(\"Expires\", 0);\n\t\tresponse.setContentType(\"image/jpeg\");\n\t\tString reqCount = request.getParameter(\"count\");\n\t\tString reqWidth = request.getParameter(\"width\");\n\t\tString reqHeight = request.getParameter(\"height\");\n\t\tString reqType = request.getParameter(\"type\");\n\t\tif(reqCount!=null && reqCount!=\"\")this.count = Integer.parseInt(reqCount);\n\t\tif(reqWidth!=null && reqWidth!=\"\")this.width = Integer.parseInt(reqWidth);\n\t\tif(reqHeight!=null && reqHeight!=\"\")this.height = Integer.parseInt(reqHeight);\n\t\tif(reqType!=null && reqType!=\"\")this.type = Integer.parseInt(reqType);\n\t\tfont = new Font(\"微软雅黑\",Font.BOLD,width/count);\n\t\tBufferedImage image = new BufferedImage(width,height,BufferedImage.TYPE_INT_RGB);\n\t\tGraphics g = image.getGraphics();\n\t\tg.setColor(getRandColor(200,250));\n\t\tg.fillRect(0,0,width,height);\n\t\tg.setColor(getRandColor(160,200));\n\t\tfor(int i=0;i<line;i++){\n\t\t\t int x = random.nextInt(width);\n\t\t\t int y = random.nextInt(height);\n\t\t\t int x1 = random.nextInt(12);\n\t\t\t int y1 = random.nextInt(12);\n\t\t\t g.drawLine(x, y, x+x1, y+y1);\n\t\t}\n\t\tg.setFont(font);\n\t\tvalidate_code = getValidateCode(count,type);\n\t\trequest.getSession().setAttribute(\"validate_code\",validate_code );\n\t\tfor(int i=0;i<count;i++){\n\t\t\tg.setColor(new Color(20+random.nextInt(110),20 + random.nextInt(110),20 + random.nextInt(110)));\n\t\t\tint x = (int)(width/count)*i;\n\t\t\tint y = (int)((height+font.getSize())/2)-5;\n\t\t\tg.drawString(String.valueOf(validate_code.charAt(i)), x, y);\n\t\t}\n\t\tg.dispose();\n\t\tJPEGImageEncoder encoder = JPEGCodec.createJPEGEncoder(response.getOutputStream());\n\t\tencoder.encode(image);\n\t}", "protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws \n\tServletException, IOException {\n\t\t\n\t\tPrintWriter out=resp.getWriter();\n\t\tString htmlres=\"<html>\"+\n\t\t\t\t\"<body>\"+\n\t\t\t\t\n\t\t\t\t\"<br></br>\"+\n\t\t\t\t\n\t\t\t\t\"</body>\"+\n\t\t\t\t\"</html>\";\n\t\n\t\tout.print(htmlres);\n\n\n\t\tHttpSession session=req.getSession(false);\n\t\tif(session==null)\n\t\t{\n\t\t\t\n\t\t\n\t\t\n\t\tdispatcher = req.getRequestDispatcher(\"Header.html\");\n dispatcher.include(req,resp);\n\t\t}\n\t\telse\n\t\t{\n\t\t\tdispatcher = req.getRequestDispatcher(\"Header2.html\");\n\t dispatcher.include(req,resp);\n\t\t}\n\t\t \n\t\t \t\n\t\t\t\t\n\t\t\t\tString htmlres1=\"<html>\"+\n\t\t\t\t\t\t\"<body>\"+\n\t\t\t\t\t\t\n\t\t\t\t\t\t\"<br></br>\"+\n\t\t\t\t\t\t\"</body>\"+\n\t\t\t\t\t\t\"</html>\";\n\t\t\t\n\t\t\t\tout.print(htmlres1);\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\n\t\t\t\t dispatcher=req.getRequestDispatcher(\"Image.html\");\n\t\t\t\t dispatcher.include(req,resp);\n\n\t\t\t\t\t\tString htmlres2=\"<html>\"+\n\t\t\t\t\t\t\t\t\"<body>\"+\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\"<br></br>\"+\n\t\t\t\t\t\t\t\t\"<br></br>\"+\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\"</body>\"+\n\t\t\t\t\t\t\t\t\"</html>\";\n\t\t\t\t\t\n\t\t\t\t\t\tout.print(htmlres2);\n\t\t \n\t\t dispatcher=req.getRequestDispatcher(\"Footer.html\");\n\t\t dispatcher.include(req,resp);\n\t\n\t\t\n\t}", "@Override\n protected String doInBackground(Void... params) {\n return getImages();\n }", "@Override\n protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n sampleGauges();\n // serve data using Prometheus built in client.\n super.doGet(req, resp);\n }", "public interface GifListView extends IBaseView<GifListRet>{\n}", "@Override\n\tpublic void run() {\n\t\ttry {\n\n\n\t\t\tBitmap result = ImageService.getImage(ac,urlparams);\n\t\t\tLog.i(\"tan8\",\"url\"+urlparams);\n\t\t\tMessage ms = Message.obtain();\n\t\t\tms.what = what;\n\t\t\tms.obj = result;\n\t\t\tif (handler != null) {\n\t\t\t\thandler.sendMessage(ms);\n\t\t\t}\n\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\n\t}", "@Override\n\t\tpublic void run() {\n\t\t\tbm = getBitmap(url);\n\t\t\tdownLoaderListenner.onDownLoadSuccess(bm,url);\n\t\t}", "@Override\n\tpublic void run() {\n\t\ttry {\n\t\t\tuploadCurrentImage();\n\t\t} catch (IOException | InterruptedException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\t//Call function from client with the Image URL\n\t}", "private void retrieveFavoritePhotos() {\n showProgress(this.mProgressBar, this.mRlContent);\n this.mFavoritePhotosViewModel.retrievePhotos();\n }", "@RequestMapping(\"/\")\n public String home(ModelMap modelMap) {\n List<Gif> allGifs = gifRepo.getAllGifs();\n modelMap.put(\"gifs\", allGifs);\n return \"home\";\n }", "public void run() {\nif(i[0] ==le.size()){\n i[0]=0;}\n File file = new File(\"/var/www/html/PawsAndClaws/web/bundles/uploads/brochures/\" + le.get( i[0]).getBrochure());\n\n Image it = new Image(file.toURI().toString(), 500, 310, false, false);\n eventspicture.setImage(it);\n i[0]++;\n }", "public boolean service(WebloungeRequest request, WebloungeResponse response) {\n\n WebUrl url = request.getUrl();\n Site site = request.getSite();\n String path = url.getPath();\n String fileName = null;\n\n // This request handler can only be used with the prefix\n if (!path.startsWith(URI_PREFIX))\n return false;\n\n // Get hold of the content repository\n ContentRepository contentRepository = site.getContentRepository();\n if (contentRepository == null) {\n logger.warn(\"No content repository found for site '{}'\", site);\n return false;\n } else if (contentRepository.isIndexing()) {\n logger.debug(\"Content repository of site '{}' is currently being indexed\", site);\n DispatchUtils.sendServiceUnavailable(request, response);\n return true;\n }\n\n // Check if the request uri matches the special uri for previews. If so, try\n // to extract the id from the last part of the path. If not, check if there\n // is an image with the current path.\n ResourceURI resourceURI = null;\n Resource<?> resource = null;\n try {\n String id = null;\n String imagePath = null;\n\n String uriSuffix = StringUtils.chomp(path.substring(URI_PREFIX.length()), \"/\");\n uriSuffix = URLDecoder.decode(uriSuffix, \"utf-8\");\n\n // Check whether we are looking at a uuid or a url path\n if (uriSuffix.length() == UUID_LENGTH) {\n id = uriSuffix;\n } else if (uriSuffix.length() >= UUID_LENGTH) {\n int lastSeparator = uriSuffix.indexOf('/');\n if (lastSeparator == UUID_LENGTH && uriSuffix.indexOf('/', lastSeparator + 1) < 0) {\n id = uriSuffix.substring(0, lastSeparator);\n fileName = uriSuffix.substring(lastSeparator + 1);\n } else {\n imagePath = uriSuffix;\n fileName = FilenameUtils.getName(imagePath);\n }\n } else {\n imagePath = \"/\" + uriSuffix;\n fileName = FilenameUtils.getName(imagePath);\n }\n\n // Try to load the resource\n resourceURI = new ResourceURIImpl(null, site, imagePath, id);\n resource = contentRepository.get(resourceURI);\n if (resource == null) {\n logger.debug(\"No resource found at {}\", resourceURI);\n return false;\n }\n } catch (ContentRepositoryException e) {\n logger.error(\"Error loading resource from {}: {}\", contentRepository, e.getMessage());\n DispatchUtils.sendInternalError(request, response);\n return true;\n } catch (UnsupportedEncodingException e) {\n logger.error(\"Error decoding resource url {} using utf-8: {}\", path, e.getMessage());\n DispatchUtils.sendInternalError(request, response);\n return true;\n }\n\n // Agree to serve the preview\n logger.debug(\"Preview handler agrees to handle {}\", path);\n\n // Check the request method. Only GET is supported right now.\n String requestMethod = request.getMethod().toUpperCase();\n if (\"OPTIONS\".equals(requestMethod)) {\n String verbs = \"OPTIONS,GET\";\n logger.trace(\"Answering options request to {} with {}\", url, verbs);\n response.setHeader(\"Allow\", verbs);\n response.setContentLength(0);\n return true;\n } else if (!\"GET\".equals(requestMethod)) {\n logger.debug(\"Image request handler does not support {} requests\", requestMethod);\n DispatchUtils.sendError(HttpServletResponse.SC_METHOD_NOT_ALLOWED, request, response);\n return true;\n }\n\n // Is it published?\n // TODO: Fix this. imageResource.isPublished() currently returns false,\n // as both from and to dates are null (see PublishingCtx)\n // if (!imageResource.isPublished()) {\n // logger.debug(\"Access to unpublished image {}\", imageURI);\n // DispatchUtils.sendNotFound(request, response);\n // return true;\n // }\n\n // Can the resource be accessed by the current user?\n User user = request.getUser();\n try {\n // TODO: Check permission\n // PagePermission p = new PagePermission(page, user);\n // AccessController.checkPermission(p);\n } catch (SecurityException e) {\n logger.warn(\"Access to resource {} denied for user {}\", resourceURI, user);\n DispatchUtils.sendAccessDenied(request, response);\n return true;\n }\n\n // Determine the response language by filename\n Language language = null;\n if (StringUtils.isNotBlank(fileName)) {\n for (ResourceContent c : resource.contents()) {\n if (c.getFilename().equalsIgnoreCase(fileName)) {\n if (language != null) {\n logger.debug(\"Unable to determine language from ambiguous filename\");\n language = LanguageUtils.getPreferredContentLanguage(resource, request, site);\n break;\n }\n language = c.getLanguage();\n }\n }\n if (language == null)\n language = LanguageUtils.getPreferredContentLanguage(resource, request, site);\n } else {\n language = LanguageUtils.getPreferredContentLanguage(resource, request, site);\n }\n\n // If the filename did not lead to a language, apply language resolution\n if (language == null) {\n logger.warn(\"Resource {} does not exist in any supported language\", resourceURI);\n DispatchUtils.sendNotFound(request, response);\n return true;\n }\n\n // Find a resource preview generator\n PreviewGenerator previewGenerator = null;\n synchronized (previewGenerators) {\n for (PreviewGenerator generator : previewGenerators) {\n if (generator.supports(resource)) {\n previewGenerator = generator;\n break;\n }\n }\n }\n\n // If we did not find a preview generator, we need to let go\n if (previewGenerator == null) {\n logger.debug(\"Unable to generate preview for {} since no suitable preview generator is available\", resource);\n DispatchUtils.sendServiceUnavailable(request, response);\n return true;\n }\n\n // Extract the image style\n ImageStyle style = null;\n String styleId = StringUtils.trimToNull(request.getParameter(OPT_IMAGE_STYLE));\n if (styleId != null) {\n style = ImageStyleUtils.findStyle(styleId, site);\n if (style == null) {\n DispatchUtils.sendBadRequest(\"Image style '\" + styleId + \"' not found\", request, response);\n return true;\n }\n }\n\n // Get the path to the preview image\n File previewFile = ImageStyleUtils.getScaledFile(resource, language, style);\n\n // Check the modified headers\n long revalidationTime = MS_PER_DAY;\n long expirationDate = System.currentTimeMillis() + revalidationTime;\n if (!ResourceUtils.hasChanged(request, previewFile)) {\n logger.debug(\"Scaled preview {} was not modified\", resourceURI);\n response.setDateHeader(\"Expires\", expirationDate);\n DispatchUtils.sendNotModified(request, response);\n return true;\n }\n\n // Load the image contents from the repository\n ResourceContent resourceContents = resource.getContent(language);\n\n // Add mime type header\n String contentType = resourceContents.getMimetype();\n if (contentType == null)\n contentType = MediaType.APPLICATION_OCTET_STREAM;\n\n // Set the content type\n String characterEncoding = response.getCharacterEncoding();\n if (StringUtils.isNotBlank(characterEncoding))\n response.setContentType(contentType + \"; charset=\" + characterEncoding.toLowerCase());\n else\n response.setContentType(contentType);\n\n // Browser caches and proxies are allowed to keep a copy\n response.setHeader(\"Cache-Control\", \"public, max-age=\" + revalidationTime);\n\n // Set Expires header\n response.setDateHeader(\"Expires\", expirationDate);\n\n // Write the image back to the client\n InputStream previewInputStream = null;\n try {\n if (previewFile.isFile() && previewFile.lastModified() >= resourceContents.getCreationDate().getTime()) {\n previewInputStream = new FileInputStream(previewFile);\n } else {\n previewInputStream = createPreview(request, response, resource, language, style, previewGenerator, previewFile, contentRepository);\n }\n\n if (previewInputStream == null) {\n // Assuming that createPreview() is setting the response header in the\n // case of failure\n return true;\n }\n\n // Add last modified header\n response.setDateHeader(\"Last-Modified\", previewFile.lastModified());\n response.setHeader(\"ETag\", ResourceUtils.getETagValue(previewFile.lastModified()));\n response.setHeader(\"Content-Disposition\", \"inline; filename=\" + previewFile.getName());\n response.setHeader(\"Content-Length\", Long.toString(previewFile.length()));\n previewInputStream = new FileInputStream(previewFile);\n IOUtils.copy(previewInputStream, response.getOutputStream());\n response.getOutputStream().flush();\n return true;\n } catch (EOFException e) {\n logger.debug(\"Error writing image '{}' back to client: connection closed by client\", resource);\n return true;\n } catch (IOException e) {\n DispatchUtils.sendInternalError(request, response);\n if (RequestUtils.isCausedByClient(e))\n return true;\n logger.error(\"Error sending image '{}' to the client: {}\", resourceURI, e.getMessage());\n return true;\n } catch (Throwable t) {\n logger.error(\"Error creating scaled image '{}': {}\", resourceURI, t.getMessage());\n DispatchUtils.sendInternalError(request, response);\n return true;\n } finally {\n IOUtils.closeQuietly(previewInputStream);\n }\n }", "private void downloadInBackground(){\n\t\tdownloadResourceInBackground(imageUrl1, R.id.dl_image_1, R.id.dl_progressbar_1);\n\t\tdownloadResourceInBackground(imageUrl2, R.id.dl_image_2, R.id.dl_progressbar_2);\n\t\tdownloadResourceInBackground(imageUrl3, R.id.dl_image_3, R.id.dl_progressbar_3);\n\t\tdownloadResourceInBackground(imageUrl4, R.id.dl_image_4, R.id.dl_progressbar_4);\n\t\tdownloadResourceInBackground(imageUrl5, R.id.dl_image_5, R.id.dl_progressbar_5);\n\t}", "@RequestMapping(value = \"/gifs\", method = RequestMethod.POST)\n public String addGif(@Valid Gif gif, BindingResult result, RedirectAttributes redirectAttributes) {\n if (result.hasErrors()) {\n redirectAttributes.addFlashAttribute(\"org.springframework.validation.BindingResult.gif\", result);\n redirectAttributes.addFlashAttribute(\"gif\", gif);\n return \"redirect:/upload\";\n }\n\n gifService.save(gif);\n redirectAttributes.addFlashAttribute(\"flash\", new FlashMessage(\"GIF added!\", FlashMessage.Status.SUCCESS));\n return String.format(\"redirect:/gifs/%s\", gif.getId());\n }", "@Override\n public void onPageStarted(WebView view, String url, Bitmap favicon) {\n // loading start\n progressBar.setVisibility(View.VISIBLE);\n }", "public Image getImage(URL paramURL) {\n/* 276 */ return getAppletContext().getImage(paramURL);\n/* */ }", "@Override\n\t\t\tpublic void run() {\n\t\t\tint i = 0;\n\t\t\ttry {\n\t\t\t\t// URL url = new\n\t\t\t\t// URL(\"http://192.168.1.100:8080/myweb/image.jpg\");\n\n\t\t\t\t// URL url = new\n\t\t\t\t// URL(\"http://ecshopxax.sinaapp.com/favicon.ico\");\n\t\t\t\t\n\t\t\t\t\n\n\t\t\t\twhile (i < mQuestionList.size())\n\t\t\t\t{\n\t\t\t\t\tif (mQuestionList.get(i).getAvatarFile() !=\"\" && mQuestionList.get(i).getAvatarFile() !=\"null\")\n\t\t\t\t\t{\n\t\t\t\t\t\tURL url = new URL(mQuestionList.get(i).getAvatarFile());\n\t\t\t\t\t\tInputStream is = url.openStream();\n\t\t\t\t\t\tbitmap = BitmapFactory.decodeStream(is);\n\t\t\t\t\t\t\n\t\t\t\t\t\tbitMapList.add(bitmap);\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t\tbitMapList.add(null);\n\t\t\t\t\t\n\t\t\t\t\ti++;\n\t\t\t\t}\n\t\t\t\n\t\t\n\t\t\t\t\n\t\t\t\tMessage msg = new Message();\n\t\t\t\tmsg.what = 0x18;\n\n\t\t\t\tmyHandler.sendMessage(msg);\n\n\t\t\t} catch (Exception e) {\n\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\n\t\t}", "@Override\n protected void doGet(HttpServletRequest request,\n HttpServletResponse response) throws IOException, ServletException {\n\n // Check the path information to find the resource being requested.\n String pathInfo = request.getPathInfo();\n if (JAVASCRIPT_CORE.equals(pathInfo)) {\n JavascriptProvider.sendCoreJavaScript(request, response);\n } else if (JAVASCRIPT_FEATURES.equals(pathInfo)) {\n JavascriptProvider.sendFeatureJavaScript(request, response);\n } else if (\n pathInfo.toLowerCase().endsWith(\"jpg\") ||\n pathInfo.toLowerCase().endsWith(\"png\") ||\n pathInfo.toLowerCase().endsWith(\"gif\")) {\n ImageOptimizer.sendImage(request, response);\n }\n }", "@PostMapping(path = {\"\", \"/\"})\n public String postNewGif(@Valid @ModelAttribute GifForm form, BindingResult result, RedirectAttributes attributes) {\n val file = form.getFile();\n\n String message;\n FlashMessage flash;\n Gif gif;\n\n // First check if a user even uploaded a GIF\n if (file == null || file.isEmpty()) {\n message = \"You must upload a GIF.\";\n flash = new FlashMessage(message, Status.FAILURE);\n\n attributes.addFlashAttribute(\"flash\", flash);\n attributes.addFlashAttribute(\"gif\", form);\n\n return \"redirect:/gifs/form\";\n }\n\n // Check to ensure that the uploaded file is actually a GIF\n // A valid GIF with an incorrect file extension will be allowed\n // Note: For basic detection (file extension), you can use multipartFile.getContentType()\n // Note: You can also use the Lombok @Cleanup annotation instead of try-with-resources\n try (val stream = file.getInputStream()) {\n val tika = new Tika();\n val mimeType = tika.detect(stream);\n\n if (!mimeType.equals(\"image/gif\")) {\n message = String.format(\"%s is not a valid GIF.\", form.getFile().getOriginalFilename());\n flash = new FlashMessage(message, Status.FAILURE);\n\n attributes.addFlashAttribute(\"flash\", flash);\n attributes.addFlashAttribute(\"gif\", form);\n\n return \"redirect:/gifs/form\";\n }\n } catch (IOException exception) {\n message = exception.getMessage();\n flash = new FlashMessage(message, Status.FAILURE);\n\n attributes.addFlashAttribute(\"flash\", flash);\n attributes.addFlashAttribute(\"gif\", form);\n\n return \"redirect:/gifs/form\";\n }\n\n // Then check if the user added Description and Category fields\n if (result.hasErrors()) {\n attributes.addFlashAttribute(\"org.springframework.validation.BindingResult.gif\", result);\n attributes.addFlashAttribute(\"gif\", form);\n\n return \"redirect:/gifs/form\";\n }\n\n // Finally, attempt to save the GIF\n gif = gifService.saveGifFromForm(form);\n message = \"GIF uploaded successfully!\";\n flash = new FlashMessage(message, Status.SUCCESS);\n\n attributes.addFlashAttribute(\"flash\", flash);\n\n return String.format(\"redirect:/gifs/%s\", gif.getId());\n }", "@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n request.setAttribute(\"fatalError\", \"\");\n TachyonFS tachyonClient = TachyonFS.get(mTachyonConf);\n\n String filePath = request.getParameter(\"path\");\n if (!(filePath == null || filePath.isEmpty())) {\n // Display file block info\n try {\n UiFileInfo uiFileInfo = getUiFileInfo(tachyonClient, new TachyonURI(filePath));\n request.setAttribute(\"fileBlocksOnTier\", uiFileInfo.getBlocksOnTier());\n request.setAttribute(\"blockSizeByte\", uiFileInfo.getBlockSizeBytes());\n request.setAttribute(\"path\", filePath);\n\n getServletContext().getRequestDispatcher(\"/worker/viewFileBlocks.jsp\").forward(request,\n response);\n return;\n } catch (FileDoesNotExistException fdne) {\n request.setAttribute(\"fatalError\", \"Error: Invalid Path \" + fdne.getMessage());\n getServletContext().getRequestDispatcher(\"/worker/blockInfo.jsp\").forward(request,\n response);\n return;\n } catch (IOException ie) {\n request.setAttribute(\"invalidPathError\", \"Error: File \" + filePath + \" is not available \"\n + ie.getMessage());\n getServletContext().getRequestDispatcher(\"/worker/blockInfo.jsp\").forward(request,\n response);\n return;\n }\n }\n\n List<Integer> fileIds = getSortedFileIds();\n request.setAttribute(\"nTotalFile\", fileIds.size());\n\n // URL can not determine offset and limit, let javascript in jsp determine and redirect\n if (request.getParameter(\"offset\") == null && request.getParameter(\"limit\") == null) {\n getServletContext().getRequestDispatcher(\"/worker/blockInfo.jsp\").forward(request, response);\n return;\n }\n\n try {\n int offset = Integer.parseInt(request.getParameter(\"offset\"));\n int limit = Integer.parseInt(request.getParameter(\"limit\"));\n List<Integer> subFileIds = fileIds.subList(offset, offset + limit);\n List<UiFileInfo> uiFileInfos = new ArrayList<UiFileInfo>(subFileIds.size());\n for (int fileId : subFileIds) {\n uiFileInfos.add(getUiFileInfo(tachyonClient, fileId));\n }\n request.setAttribute(\"fileInfos\", uiFileInfos);\n } catch (FileDoesNotExistException fdne) {\n request.setAttribute(\"fatalError\", \"Error: Invalid FileId \" + fdne.getMessage());\n getServletContext().getRequestDispatcher(\"/worker/blockInfo.jsp\").forward(request,\n response);\n return;\n } catch (NumberFormatException nfe) {\n request.setAttribute(\"fatalError\",\n \"Error: offset or limit parse error, \" + nfe.getLocalizedMessage());\n getServletContext().getRequestDispatcher(\"/worker/blockInfo.jsp\").forward(request, response);\n return;\n } catch (IndexOutOfBoundsException iobe) {\n request.setAttribute(\"fatalError\", \"Error: offset or offset + limit is out of bound, \"\n + iobe.getLocalizedMessage());\n getServletContext().getRequestDispatcher(\"/worker/blockInfo.jsp\").forward(request, response);\n return;\n } catch (IllegalArgumentException iae) {\n request.setAttribute(\"fatalError\", iae.getLocalizedMessage());\n getServletContext().getRequestDispatcher(\"/worker/blockInfo.jsp\").forward(request, response);\n return;\n }\n\n getServletContext().getRequestDispatcher(\"/worker/blockInfo.jsp\").forward(request, response);\n }", "private void waitForPageToLoad(){\n new WebDriverWait(driver,10).until(\n ExpectedConditions.visibilityOfElementLocated(By.xpath(\"//body//table//img[contains(@src,'backtoflights.gif')]\")));\n }", "Integer updateExerciseGif(ExercisePo exercisePo);", "public void doGet(HttpServletRequest req, HttpServletResponse resp)\n throws IOException {\n ServletContext sc = getServletContext();\n String uri = req.getRequestURI();\n String servletBase = req.getServletPath();\n\n boolean Companyflag = (req.getParameter(\"company\") != null) ? true : false;\n String imagePath = defaultImgPath;\n String requestedFileName = \"\";\n if (Companyflag) {\n imagePath = defaultCompanyImgPath;\n String companyId = null;\n try {\n companyId = sessionHandlerImpl.getCompanyid(req);\n } catch (Exception ee) {\n }\n if (StringUtil.isNullOrEmpty(companyId)) {\n String domain = URLUtil.getDomainName(req);\n if (!StringUtil.isNullOrEmpty(domain)) {\n //@@@ - Uncomment\n//\t\t\t\t\tcompanyId = DBCon.getCompanyid(domain);\n requestedFileName = \"/original_\" + companyId + \".png\";\n } else {\n requestedFileName = \"logo.gif\";\n }\n } else {\n requestedFileName = \"/\" + companyId + \".png\";\n }\n } else {\n requestedFileName = uri.substring(uri.lastIndexOf(servletBase)\n + servletBase.length());\n }\n String fileName = null;\n\n fileName = storageHandlerImpl.GetProfileImgStorePath() + requestedFileName;\n // Get the MIME type of the image\n String mimeType = sc.getMimeType(fileName);\n if (mimeType == null) {\n sc.log(\"Could not get MIME type of \" + fileName);\n resp.setStatus(HttpServletResponse.SC_INTERNAL_SERVER_ERROR);\n return;\n }\n\n // Set content type\n resp.setContentType(mimeType);\n\n // Set content size\n File file = new File(fileName);\n if (!file.exists()) {\n if (fileName.contains(\"_100.\")) {\n file = new File(fileName.replaceAll(\"_100.\", \".\"));\n }\n if (!file.exists()) {\n file = new File(sc.getRealPath(imagePath));\n }\n }\n\n resp.setContentLength((int) file.length());\n\n // Open the file and output streams\n FileInputStream in = new FileInputStream(file);\n OutputStream out = resp.getOutputStream();\n\n // Copy the contents of the file to the output stream\n byte[] buf = new byte[4096];\n int count = 0;\n while ((count = in.read(buf)) >= 0) {\n out.write(buf, 0, count);\n }\n in.close();\n out.close();\n }", "@Override\n public void onSuccess(Uri uri){\n Glide.with(getActivity()).load(uri.toString()).placeholder(R.drawable.round_account_circle_24).dontAnimate().into(profilepic);\n }", "@Override\n public void onLoad(String url) {\n \n }", "public void doGet(HttpServletRequest request, HttpServletResponse response)\n\t\t\tthrows ServletException, IOException {\n\n\t\tresponse.setHeader(\"Cache-Control\", \"no-cache\"); // Forces\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// caches\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// to\n\t\tresponse.setHeader(\"Cache-Control\", \"no-store\"); // Directs\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// caches\n\t\tresponse.setDateHeader(\"Expires\", 0); // Causes\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// the proxy\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// cache to\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// see\n\t\tresponse.setHeader(\"Pragma\", \"no-cache\"); // HTTP\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// 1.0\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// backward\n\t\ttry {\n\t\t\tImageIO.write((RenderedImage) DrawRandomNumber.getInstance()\n\t\t\t\t\t.drawRandNumber(4, 10, request), \"JPEG\",\n\t\t\t\t\tresponse.getOutputStream());\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "@Override\n\tprotected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\n\t\tresp.setContentType(\"text/html\");\n\n\t\tPrintWriter out=resp.getWriter();\n\n\t\tfor(int i=1;i<=5;i++) { // 괄호 () 안에 내용을 5번 반복\n\n\t\t\tfor(int j=1;j<=i;j++) {\n\n\t\t\t\tout.print(\"*\"); // alt + up , down \n\n\t\t\t}\n\n\t\t\tout.println(\"<br>\");\n\t\t}\n\t\tout.println(\"<html>\");\n\t\tout.println(\"<head>\");\n\t\tout.println(\"</head>\");\n\t\tout.println(\"<body>\");\n\t\tout.println(\"tmalak\");\n\t\tout.println(\"<h1>\");\n\t\tfor(int i=0;i<2;i++) {\n\n\t\t\tint n= (int) (Math.random()*6);\n\n\t\t\tSystem.out.println(n+1);\n\t\t\tout.println(\"<img src=dice\"+(n+1)+\".jpg>\");\n\t\t}\n\t\tout.println(\"</h1>\");\n\t\tout.println(\"</body>\");\n\t\tout.println(\"</html>\");\n\t\tout.println(\"Hello,Sevlet\");\n\t}", "@Override\n public void onSuccess(Uri uri) {\n Glide.with(DoctorHome.this).load(uri).into(doctorpic); // uses Gilde , a framework to load and download files in android\n }", "@Override\n\t\t\tpublic void run() {\n\t\t\t\tBitmap bitmap = getImageFromLocal(imgPath);\n\t\t\t\tif (bitmap == null) {\n\t\t\t\t\tloadImgByNet(handler, imgUrl, imgPath);\n\t\t\t\t} else {\n\t\t\t\t\tMessage msg = handler.obtainMessage();\n\t\t\t\t\tmsg.obj = bitmap;\n\t\t\t\t\tmsg.what = IMG_FROM_LOCAL;\n\t\t\t\t\thandler.sendMessage(msg);\n\t\t\t\t}\n\t\t\t}", "@Override\n\t\t\t\t\tpublic void run() {\n\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tList<String> headers = readRequest(client);\n\t\t\t\t\t\t\tif (headers != null && headers.size() >= 1) {\n\t\t\t\t\t\t\t\tString requestURL = getRequestURL(headers.get(0));\n\t\t\t\t\t\t\t\tLog.d(TAG, requestURL);\n\n\t\t\t\t\t\t\t\tif (requestURL.startsWith(\"http://\")) {\n\n\t\t\t\t\t\t\t\t\t// HttpRequest request = new\n\t\t\t\t\t\t\t\t\t// BasicHttpRequest(\"GET\", requestURL);\n\n\t\t\t\t\t\t\t\t\tprocessHttpRequest(requestURL, client, headers);\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\tprocessFileRequest(requestURL, client, headers);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t} catch (IllegalStateException e) {\n\t\t\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t\t} catch (IOException e) {\n\t\t\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t\t}\n\t\t\t\t\t}", "@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n try {\n processRequest(request, response);\n } catch (SQLException ex) {\n Logger.getLogger(indicatoractivities1.class.getName()).log(Level.SEVERE, null, ex);\n }\n }", "@RequestMapping(value = \"/gifs/{gifId}/favorite\", method = RequestMethod.POST)\n public String toggleFavorite(@PathVariable Long gifId, HttpServletRequest request) {\n Gif gif = gifService.findById(gifId);\n gifService.toggleFavorite(gif);\n return String.format(\"redirect:%s\", request.getHeader(\"referer\"));\n }", "public interface IMainScm {\n\n void getImage(String url,ImageView view);\n\n void getImagePath(HttpListener<String[]> httpListener);\n}", "private void loadProfilePic(final CircleImageView circleImageView, final String url, final boolean sender){\n\n if (url == null)\n {\n circleImageView.setImageResource(R.drawable.ic_profile);\n return;\n }\n\n circleImageView.setTag(url);\n\n VolleyUtils.getImageLoader().get(url, new ImageLoader.ImageListener() {\n @Override\n public void onResponse(final ImageLoader.ImageContainer response, boolean isImmediate) {\n\n // Checking to see that there is no new rewuest on this image.\n if (circleImageView.getTag() != null && !circleImageView.getTag().equals(url))\n return;\n\n if (isImmediate && response.getBitmap() == null)\n {\n circleImageView.setImageResource(R.drawable.ic_profile);\n return;\n }\n\n if (response.getBitmap() != null)\n {\n if (!isScrolling)\n {\n circleImageView.setImageBitmap(response.getBitmap());\n }\n else\n {\n animateSides(circleImageView, !sender, new Animation.AnimationListener() {\n @Override\n public void onAnimationStart(Animation animation) {\n circleImageView.setImageBitmap(response.getBitmap());\n }\n\n @Override\n public void onAnimationEnd(Animation animation) {\n\n }\n\n @Override\n public void onAnimationRepeat(Animation animation) {\n\n }\n });\n\n circleImageView.getAnimation().start();\n }\n }\n }\n\n @Override\n public void onErrorResponse(VolleyError error) {\n circleImageView.setImageResource(R.drawable.ic_profile);\n }\n }, circleImageView.getWidth(), circleImageView.getWidth());\n }", "private void getUserImage(){\r\n \t//setProgressBarIndeterminateVisibility(true);\r\n \t\r\n \tusername=null;\r\n \tfor(int i=0; i<senderList.size(); i++) {\t// kovetkezo felhasznalo kepe\r\n \t\tString str=senderList.get(i);\r\n \t\tif (!userImage.containsKey(str)) {\r\n \t\t\tusername=str;\r\n \t\t\tbreak;\r\n \t\t}\r\n \t}\r\n \t\r\n \tif (username==null) return;\r\n \t\r\n\t String url = \"ImageDownload?size=medium&username=\" + username +\r\n\t \t\t\t\t\t\t \"&ssid=\" + UserInfo.getSSID();\r\n\t downloadUserImage = new HttpGetByteConnection(url, mHandler, TASK_GETUSERIMAGE);\r\n\t downloadUserImage.start();\r\n }", "@Override\n\t\tpublic void onDownloadGalleryIconFinish(String iconUrl) {\n\t\t\tMessage msg = mHandler.obtainMessage();\n\t\t\tmsg.what = MSG_REFRESH_GALLERY_ICON;\n\t\t\tmsg.obj = iconUrl;\n\t\t\tmsg.sendToTarget();\n\t\t}", "@Override\n public void onProgress(String requestId, long bytes, long totalBytes) {\n Double progress = (double) bytes / totalBytes;\n // post progress to app UI (e.g. progress bar, notification)\n // example code ends here\n mAvi1.setVisibility(View.VISIBLE);\n }", "@Override\n public void onProgress(String requestId, long bytes, long totalBytes) {\n Double progress = (double) bytes / totalBytes;\n // post progress to app UI (e.g. progress bar, notification)\n // example code ends here\n mAvi1.setVisibility(View.VISIBLE);\n }", "@Override\n\tprotected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t\tString name = req.getParameter(IMAGE_NAME);\n\t\tString imageSize = req.getParameter(IMAGE_SIZE);\n\n\t\tresp.setContentType(\"image/jpeg\");\n\n\t\tPath imgPath = null;\n\t\tif (imageSize.equals(THUMBNAIL)) {\n\t\t\timgPath = Paths.get(getServletContext().getRealPath(THUMBNAILS_FILE)).resolve(name);\n\t\t} else {\n\t\t\timgPath = Paths.get(getServletContext().getRealPath(BASE_RESOURCES)).resolve(name);\n\t\t}\n\n\t\tBufferedImage bi = ImageIO.read(imgPath.toFile());\n\t\tOutputStream out = resp.getOutputStream();\n\t\tImageIO.write(bi, \"jpg\", out);\n\t\tout.close();\n\t}", "@Override\r\n\tprotected String doInBackground(Integer... arg0) {\n\t\tmData.loadSpecificImage(mImageName, mImageView);\r\n\t\treturn null;\r\n\t}", "@Override\n public void onHttpResponseReceived(Bitmap response, Params<Bitmap> params) {\n if(null != mBitmapFetcher && !mBitmapFetcher.isCancelled()){\n final String baseUrl = params.getUrl();\n if (baseUrl.equals(mImageObject.getImageThumbnailUrl())) {\n Utils.updateImageWithDrawable(response, mImageView);\n }\n mBitmapFetcher = null;\n }\n }", "public void setGigURL(URL gigURL) {\n this.gigURL = gigURL;\n }", "public static void cacheImage(final File file, ImageRequest imageCallback) {\n\n HttpURLConnection urlConnection = null;\n FileOutputStream fileOutputStream = null;\n InputStream inputStream = null;\n boolean isGif = false;\n\n try{\n // Setup the connection\n urlConnection = (HttpURLConnection) new URL(imageCallback.mUrl).openConnection();\n urlConnection.setConnectTimeout(ImageManager.LONG_CONNECTION_TIMEOUT);\n urlConnection.setReadTimeout(ImageManager.LONG_REQUEST_TIMEOUT);\n urlConnection.setUseCaches(true);\n urlConnection.setInstanceFollowRedirects(true);\n\n // Set the progress to 0\n imageCallback.sendProgressUpdate(imageCallback.mUrl, 0);\n\n // Connect\n inputStream = urlConnection.getInputStream();\n\n // Do not proceed if the file wasn't downloaded\n if(urlConnection.getResponseCode()==404){\n urlConnection.disconnect();\n return;\n }\n\n // Check if the image is a GIF\n String contentType = urlConnection.getHeaderField(\"Content-Type\");\n if(contentType!=null){\n isGif = contentType.equals(GIF_MIME);\n }\n\n // Grab the length of the image\n int length = 0;\n try{\n String fileLength = urlConnection.getHeaderField(\"Content-Length\");\n if(fileLength!=null){\n length = Integer.parseInt(fileLength);\n }\n }catch(NumberFormatException e){\n if(ImageManager.DEBUG){\n e.printStackTrace();\n }\n }\n\n // Write the input stream to disk\n fileOutputStream = new FileOutputStream(file, true);\n int byteRead = 0;\n int totalRead = 0;\n final byte[] buffer = new byte[8192];\n int frameCount = 0;\n\n // Download the image\n while ((byteRead = inputStream.read(buffer)) != -1) {\n\n // If the image is a gif, count the start of frames\n if(isGif){\n for(int i=0;i<byteRead-3;i++){\n if( buffer[i] == 33 && buffer[i+1] == -7 && buffer[i+2] == 4 ){\n frameCount++;\n\n // Once we have at least one frame, stop the download\n if(frameCount>1){\n fileOutputStream.write(buffer, 0, i);\n fileOutputStream.close();\n\n imageCallback.sendProgressUpdate(imageCallback.mUrl, 100);\n imageCallback.sendCachedCallback(imageCallback.mUrl, true);\n\n urlConnection.disconnect();\n return;\n }\n }\n }\n }\n\n // Write the buffer to the file and update the total number of bytes\n // read so far (used for the callback)\n fileOutputStream.write(buffer, 0, byteRead);\n totalRead+=byteRead;\n\n // Update the callback with the current progress\n if(length>0){\n imageCallback.sendProgressUpdate(imageCallback.mUrl, \n (int) (((float)totalRead/(float)length)*100) );\n }\n }\n\n // Tidy up after the download\n if (fileOutputStream != null){\n fileOutputStream.close();\n }\n\n // Sent the callback that the image has been downloaded\n imageCallback.sendCachedCallback(imageCallback.mUrl, true);\n\n if (inputStream != null){\n inputStream.close();\n }\n\n // Disconnect the connection\n urlConnection.disconnect();\n } catch (final MalformedURLException e) {\n if (ImageManager.DEBUG){\n e.printStackTrace();\n }\n\n // If the file exists and an error occurred, delete the file\n if (file != null){\n file.delete();\n }\n\n } catch (final IOException e) {\n if (ImageManager.DEBUG){\n e.printStackTrace();\n }\n\n // If the file exists and an error occurred, delete the file\n if (file != null){\n file.delete();\n }\n\n }\n\n }", "@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n try {\n processRequest(request, response);\n } catch (Exception ex) {\n Logger.getLogger(lib_barcode.class.getName()).log(Level.SEVERE, null, ex);\n }\n }", "public Xoi_cmd_imageMagick_download(Gfo_usr_dlg usr_dlg, Gfui_kit kit, Io_url trg) {this.Ctor(usr_dlg, kit); this.trg = trg;}", "com.yahoo.xpathproto.TransformTestProtos.ContentImage getImagesByHandler(int index);", "@Override\n\tprotected void doGet(HttpServletRequest request, HttpServletResponse response)\n\t\t\tthrows ServletException, IOException {\n\t\tString page = (String)request.getParameter(\"page\");\n\t\tSystem.out.println(\"page = \" + page);\n\t\ttry{\n\t\t\tif(conn == null)\n\t\t\t\tconn = new DBConnection();\n\t\t\t\n\t\t\tint prodId = Integer.parseInt((String)request.getParameter(\"id\"));\n\n\t\t\tSystem.out.println(\"id = , \" + prodId);\n\t\t\tProduct prod = conn.getProductById(prodId);\n\n\t\t\tif(prod != null)\n\t\t\t{\n\t\t\t\tresponse.setContentType(\"image/gif\");\n\t\t\t\tOutputStream os = response.getOutputStream();\n\t\t\t\tos.write(prod.getImage());\n\t\t\t\tos.flush();\n\t\t\t\tos.close();\n\t\t\t}\n\t\t\telse if(page != null)\n\t\t\t\tresponse.sendRedirect(page + \"?status=\" + StatusHandler.ERR_NOT_FOUND);\n\t\t} catch(SQLException | NumberFormatException ex)\n\t\t{\n\t\t\tex.printStackTrace();\n\t\t\tif(page != null)\n\t\t\t\tresponse.sendRedirect(page + \"?status=\" + StatusHandler.ERR_DB_CONN);\n\t\t}\n\t}", "protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\t\tString string= request.getParameter(\"action\");\n\t\tif(string.equals(\"listingPage\")) {\n\t\t\tlistingPage(request, response);\n\t\t}\n\t\telse if(string.equals(\"viewImage\")) {\n\t\t\t\n\t\t\tviewImage(request, response);\n\t\t}\n\t\telse if(string.equals(\"deleteImage\")) {\n\t\t\tdeleteImage(request, response);\n\t\t}\n\t\telse {\n\t\t\trequest.getRequestDispatcher(\"index.jsp\").forward(request, response);\n\t\t}\n\t}", "@Override\n public void imageLoadSuccess(String path) {\n Intent mainIntent = new Intent(MainActivity.this, PresenterActivity.class);\n mainIntent.putExtra(\"path\", path);\n startActivity(mainIntent);\n }", "@Override\n public void run() {\n try {\n Drawable drawable = Drawable.createFromStream(new URL(image_path).openStream(), \"\");\n\n Message message = Message.obtain();\n message.obj = drawable;\n handler.sendMessage(message);\n } catch (MalformedURLException e) {\n // TODO Auto-generated catch block\n e.printStackTrace();\n } catch (IOException e) {\n // TODO Auto-generated catch block\n e.printStackTrace();\n }\n }", "@Override\n public void onClick(View v) {\n showImageView.setVisibility(View.VISIBLE);\n String imgUrl = \"http://210.42.121.241/servlet/GenImg\";\n new DownImgAsyncTask().execute(imgUrl);\n }", "public void requestImage(final ImageRequest request) {\n\n // If the request has no URL, abandon it\n if(request.mUrl==null){\n return;\n }\n\n // Create the image download runnable\n final ImageDownloadThread imageDownloadThread = new ImageDownloadThread(){\n\n public void run() {\n\n // Sleep the request for the specified time\n if(request!=null && request.mLoadDelay>0){\n try {\n Thread.sleep(request.mLoadDelay);\n } catch (InterruptedException e){\n if(ImageManager.DEBUG){\n e.printStackTrace();\n }\n }\n }\n\n File file = null;\n\n // If the URL is not a local reseource, grab the file\n if(!getUrl().startsWith(\"content://\")){\n\n // Grab a link to the file\n file = new File(getFullCacheFileName(mContext, getUrl()));\n\n // If the file doesn't exist, grab it from the network\n if (!file.exists()){\n cacheImage( file, request);\n } \n\n // Otherwise let the callback know the image is cached\n else if(request!=null){\n request.sendCachedCallback(getUrl(), true);\n }\n\n // Check if the file is a gif\n boolean isGif = isGif(getUrl());\n\n // If the file downloaded was a gif, tell all the callbacks\n if( isGif && request!=null ){\n request.sendGifCallback(getUrl());\n }\n }\n\n // Check if we should cache the image and the dimens\n boolean shouldCache = false;\n int maxWidth = MAX_WIDTH;\n int maxHeight = MAX_HEIGHT;\n if(request!=null){\n maxWidth = request.mMaxWidth;\n maxHeight = request.mMaxHeight;\n shouldCache = request.mCacheImage;\n }\n\n // If any of the callbacks request the image should be cached, cache it\n if(shouldCache && \n (request!=null&&request.mContext!=null)||request==null){\n\n // First check the image isn't actually in the cache\n Bitmap bitmap = get(getUrl());\n\n // If the bitmap isn't in the cache, try to grab it\n // Or the bitmap was in the cache, but is of no use\n if(bitmap == null){\n\n if(!getUrl().startsWith(\"content://\")){\n bitmap = decodeBitmap(file, maxWidth, maxHeight);\n }else{\n Uri uri = Uri.parse(getUrl());\n try{\n InputStream input = mContext.getContentResolver().openInputStream(uri);\n bitmap = BitmapFactory.decodeStream(input);\n input.close();\n }catch(FileNotFoundException e){\n if(DEBUG){\n e.printStackTrace();\n }\n }catch(IOException e){\n if(DEBUG){\n e.printStackTrace();\n }\n }\n }\n\n // If we grabbed the image ok, add to the cache\n if(bitmap!=null){\n addEntry(getUrl(), bitmap);\n }\n }\n\n // Send the cached callback\n if(request!=null){\n request.sendCallback(getUrl(), bitmap);\n }\n }\n }\n };\n\n // Set the url of the request\n imageDownloadThread.setUrl(request.mUrl);\n\n // Set the creation time of the request\n imageDownloadThread.setCreated(request.mCreated);\n\n // Assign a priority to the request\n if(request.mImageListener==null){\n // If there is no image listener, assign it background priority\n imageDownloadThread.setPriority(BACKGROUND_PRIORITY);\n }else{\n // If there is an image listener, assign it UI priority\n imageDownloadThread.setPriority(UI_PRIORITY);\n }\n\n // If the new request is not a duplicate of an entry of the active and \n // task queues, add the request to the task queue\n if(!mTaskQueue.contains(imageDownloadThread) && \n !mActiveTasks.contains(imageDownloadThread)){\n mThreadPool.execute(imageDownloadThread);\n }\n\n // If the request is a duplicate, add it to the blocked tasks queue\n else{\n mBlockedTasks.add(imageDownloadThread);\n }\n }", "private void listingPage(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException{\n\t\trequest.setAttribute(\"files\", new FilesDAO().getFiles());\n\t\trequest.setAttribute(\"path\", path);\n\t\trequest.getRequestDispatcher(\"listingPage.jsp\").forward(request, response);\n\t}", "@Override\r\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\r\n throws ServletException, IOException {\r\n try {\r\n processRequest(request, response);\r\n } catch (JSONException ex) {\r\n Logger.getLogger(PDCBukUpload.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n }", "@Override\n public void run() {\n headerText.startAnimation(AnimationUtils.loadAnimation(Home.this, R.anim.view_fallingfromsky));\n headerText.setVisibility(View.VISIBLE);\n\n spaconIcon.startAnimation(AnimationUtils.loadAnimation(Home.this, R.anim.view_fadein_long));\n spaconIcon.setVisibility(View.VISIBLE);\n\n if (fillableLoader.getVisibility() == View.GONE) {\n fillableLoader.setVisibility(View.VISIBLE);\n }\n fillableLoader.start();\n }", "protected void paintComponent(Graphics g) {\n\t ImageIcon icone = new ImageIcon(getClass().getResource(\"/resources/wait.gif\"));\n\t g.drawImage(icone.getImage(), 1, 1, 220, 19, this);\n\t }", "@Override\n public void response(String o, String requestTag) {\n switch (NoisyConstants.Requests.valueOf(requestTag.toUpperCase())) {\n case GET_COMICS: {\n\n mComicDataWrapper = (ComicDataWrapper) NoisyUtils.getFromJson(o, ComicDataWrapper.class);\n\n if(mComicDataWrapper.getData().getResults().size() == 0){\n notAvailable.setVisibility(View.VISIBLE);\n }else {\n gallery.setAdapter(new ComicsAdapter(this, mComicDataWrapper));\n gallery.invalidate();\n syncAll(comicsURI, mComicDataWrapper.getData().getResults().size());\n }\n break;\n }\n case GET_ALL_COMICS: {\n\n ComicDataWrapper tComicDataWrapper = (ComicDataWrapper) NoisyUtils.getFromJson(o, ComicDataWrapper.class);\n merge(tComicDataWrapper);\n gallery.invalidate();\n syncAll(comicsURI, mComicDataWrapper.getData().getResults().size() + 1);\n break;\n }\n default: {\n NoisyUtils.showDialog(this, NoisyConstants.INVALID_NETWORK_REQUEST, NoisyConstants.INVALID_NETWORK_REQUEST);\n }\n }\n }", "@Override\n\t\tprotected void onPostExecute(String file_url) {\n\n\t\t\t// Displaying downloaded image into image view\n\t\t\t// Reading image path from sdcard\n\n\t\t\tString imagePath = Environment.getExternalStorageDirectory()\n\t\t\t\t\t.toString() + \"sdcard/RBK/FeaturedImage\" + r + \".jpg\";\n\t\t\t// setting downloaded into image view\n\n\t\t\t// my_image.setImageDrawable(Drawable.createFromPath(imagePath));\n\t\t\tr++;\n\n\t\t\tLog.v(\"log_tag\", \"r ::: \" + r);\n\t\t\tfloat x = (r / map1.size()) * 100;\n\t\t\tpublishProgress(\"\" + (int) x);\n\t\t\tif (r == map1.size())\n\n\t\t\t{\n\n\t\t\t\tpDialog.setProgress(0);\n\t\t\t\tbtnShowProgress1.setEnabled(false);\n\t\t\t\tdismissDialog(progress_bar_type);\n\n\t\t\t}\n\n\t\t}", "private void galleryAddPic() {\n\t}", "private static BufferedImage jpegToGif(BufferedImage image) {\n\t\t\r\n\t\tBufferedImage gifImage = image;\r\n\t\t\r\n\t\ttry {\r\n\t\t\tImageIO.write(image, \"gif\", new File(\"temp.gif\"));\r\n\t\t\tgifImage = ImageIO.read(new File(\"temp.gif\"));\r\n\t\t} catch (Exception e) {e.printStackTrace();}\r\n\t\t\r\n\t\treturn gifImage;\r\n\t}" ]
[ "0.7186867", "0.660475", "0.6401707", "0.6307213", "0.62609065", "0.60098606", "0.5863254", "0.5786957", "0.5680105", "0.5677655", "0.5524975", "0.5493128", "0.54750454", "0.54748416", "0.53675604", "0.534591", "0.5338633", "0.5313506", "0.53006274", "0.52922964", "0.5291427", "0.5273609", "0.52734905", "0.5267483", "0.5256678", "0.52231216", "0.5213508", "0.5212732", "0.51969385", "0.5178788", "0.5163925", "0.51448196", "0.5136208", "0.5106996", "0.5102366", "0.50960547", "0.5088171", "0.508187", "0.507892", "0.5077554", "0.5074596", "0.5048043", "0.50413454", "0.5037808", "0.5031621", "0.50288427", "0.5023578", "0.50229615", "0.50117123", "0.50106573", "0.50075305", "0.500644", "0.49976778", "0.49877685", "0.49866974", "0.49825892", "0.4981726", "0.49792203", "0.49777007", "0.49769747", "0.49653625", "0.49576586", "0.49538293", "0.4949299", "0.4948201", "0.4940671", "0.49336916", "0.49326003", "0.49299708", "0.4925494", "0.4920848", "0.49167663", "0.49163714", "0.4914584", "0.49089125", "0.49067408", "0.48942533", "0.48942533", "0.4892308", "0.48863876", "0.4874476", "0.48683932", "0.48653072", "0.48603708", "0.48500237", "0.48467165", "0.48463082", "0.48452005", "0.48409748", "0.48343778", "0.48332474", "0.482647", "0.48184943", "0.48151308", "0.48101678", "0.48042944", "0.479892", "0.47963706", "0.47933665", "0.47911417" ]
0.6058022
5
FIXME implement constructors if needed
public School(){ _persons = new TreeMap<Integer, Person>(); _students = new HashMap<Integer, Student>(); _professors = new HashMap<Integer, Professor>(); _administratives = new HashMap<Integer, Administrative>(); _courses = new HashMap<String,Course>(); _disciplines = new HashMap<String,Discipline>(); _disciplineCourse = new TreeMap<String, HashMap<String, Discipline>>(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Constructor() {\r\n\t\t \r\n\t }", "public Constructor(){\n\t\t\n\t}", "protected abstract void construct();", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "@Override\r\n\tpublic void init() {}", "@Override\n\t\tpublic void init() {\n\t\t}", "@Override\n public void init() {}", "Reproducible newInstance();", "@Override\n protected void init() {\n }", "public Clade() {}", "protected GeometricObject() \n\t{\n\t\tdateCreated = new java.util.Date();\n\t}", "private TMCourse() {\n\t}", "public Data() {}", "@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}", "public Pitonyak_09_02() {\r\n }", "@Override\n void init() {\n }", "@Override\n public void init() {\n }", "public Orbiter() {\n }", "@Override\n public void construct() throws IOException {\n \n }", "public RngObject() {\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 init() {\n\t\t\n\t}", "private Instantiation(){}", "private IndexBitmapObject() {\n\t}", "@Override\n public void init() {\n }", "private Rekenhulp()\n\t{\n\t}", "@Override public void init()\n\t\t{\n\t\t}", "private Converter()\n\t{\n\t\tsuper();\n\t}", "@Override\r\n\tpublic void init()\r\n\t{\n\t}", "public void init() {\r\n\t\t// to override\r\n\t}", "public Coche() {\n super();\n }", "@Override\n public void init() {\n\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 protected void initialize() {\n }", "public PSRelation()\n {\n }", "private void __sep__Constructors__() {}", "public Anschrift() {\r\n }", "@Override\r\n\tpublic final void init() {\r\n\r\n\t}", "public Steganography() {}", "public BaseParameters(){\r\n\t}", "public Rol() {}", "private SimpleRepository() {\n \t\t// private ct to disallow external object creation\n \t}", "public mapper3c() { super(); }", "private SingleObject(){}", "public CSSTidier() {\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}", "public CyanSus() {\n\n }", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "private MApi() {}", "private SingleObject()\r\n {\r\n }", "public Libro() {\r\n }", "@Override\n\tpublic void init()\n\t{\n\n\t}", "public Basic() {}", "private TAPosition()\n {\n\n }", "@Override\n public void init() {\n\n }", "@Override\n public void init() {\n\n }", "public Aritmetica(){ }", "public Implementor(){}", "protected Asignatura()\r\n\t{}", "public TTau() {}", "public Husdjurshotell(){}", "public Data() {\n }", "public Data() {\n }", "@Override\n\t\tprotected void initialise() {\n\n\t\t}", "@Override\n\tprotected void initialize() {\n\n\t}", "@Override\n\tpublic void init() {\n\t}", "public SgaexpedbultoImpl()\n {\n }", "public Ov_Chipkaart() {\n\t\t\n\t}", "Composite() {\n\n\t}", "public Pojo1110110(){\r\n\t}", "public Odontologo() {\n }", "public Trening() {\n }", "@Override\n\tprotected void initData() {\n\t\t\n\t}", "private OMUtil() { }", "public Parameters() {\n\t}", "public Phl() {\n }", "private Item(){}", "public Cohete() {\n\n\t}", "public lo() {}", "private Parser () { }", "public Data() {\n \n }", "public Pasien() {\r\n }", "public SlanjePoruke() {\n }", "O() { super(null); }", "private TbusRoadGraph() {}", "public Curso() {\r\n }", "public AirAndPollen() {\n\n\t}", "public InitialData(){}", "public Item(){}" ]
[ "0.7294366", "0.68127555", "0.6660814", "0.66557944", "0.65174615", "0.6440068", "0.64208597", "0.6396245", "0.6354576", "0.6341697", "0.6303242", "0.6301993", "0.62988526", "0.6288192", "0.6288192", "0.6288192", "0.62775433", "0.627181", "0.6262655", "0.62533355", "0.62445116", "0.62215865", "0.62156296", "0.62156296", "0.62156296", "0.62156296", "0.62156296", "0.6203398", "0.61987096", "0.6194721", "0.61890924", "0.6186048", "0.61652756", "0.61626935", "0.6152333", "0.6144431", "0.6135233", "0.61324245", "0.61324245", "0.61324245", "0.61324245", "0.61324245", "0.61324245", "0.6129578", "0.6122834", "0.61178046", "0.611548", "0.61072505", "0.6104144", "0.61033416", "0.6101012", "0.60948294", "0.6090901", "0.60901016", "0.6088444", "0.6088444", "0.6088444", "0.6086979", "0.6085445", "0.6085445", "0.60814935", "0.60768133", "0.607445", "0.6074223", "0.60708827", "0.6067717", "0.6062662", "0.6062662", "0.6062151", "0.605663", "0.6048976", "0.6038004", "0.6034385", "0.6034337", "0.6034337", "0.603138", "0.60304236", "0.6029726", "0.6016061", "0.6013595", "0.6012696", "0.60114765", "0.6005028", "0.6000315", "0.59996146", "0.5996695", "0.5992505", "0.5986109", "0.5977991", "0.59764093", "0.5974716", "0.5972772", "0.597095", "0.59657997", "0.5963007", "0.5959811", "0.5953698", "0.5950932", "0.5943453", "0.59392273", "0.59389657" ]
0.0
-1
Imports the file with the predefined concepts in the start of the application
public void importFile(String filename) throws IOException, BadEntryException, ImportFileException{ try{ BufferedReader reader = new BufferedReader(new FileReader(filename)); String line; line = reader.readLine(); while(line != null){ String[] fields = line.split("\\|"); int id = Integer.parseInt(fields[1]); if(_persons.get(id) != null){ throw new BadEntryException(fields[0]); } if(fields[0].equals("FUNCIONÁRIO")){ registerAdministrative(fields); line = reader.readLine(); }else if(fields[0].equals("DOCENTE")){ Professor _professor = new Professor(id, fields[2], fields[3]); _professors.put(id, _professor); _persons.put(id, (Person) _professor); line = reader.readLine(); if(line != null){ fields = line.split("\\|"); while((line != null) && (fields[0].charAt(0) == '#')){ String course = fields[0].substring(2); String discipline = fields[1]; Course _course = _courses.get(course); if(_course == null){ _course = new Course(course); _disciplineCourse.put(course, new HashMap<String, Discipline>()); _courses.put(course, _course); } if(_professor.getDisciplineCourses().get(course) == null){ _professor.getDisciplineCourses().put(course, new HashMap<String, Discipline>()); } Discipline _discipline = _disciplines.get(discipline); if(_discipline == null){ _discipline = new Discipline(discipline,_course); _disciplines.put(discipline, _discipline); _course.getDisciplines().put(discipline, _discipline); } _discipline.registerObserver(_professor, id); _disciplineCourse.get(course).put(discipline, _discipline); if(_professor.getDisciplines() != null){ _professor.getDisciplines().put(discipline, _discipline); _professor.getDisciplineCourses().get(course).put(discipline, _discipline); } line = reader.readLine(); if(line != null){ fields = line.split("\\|"); } } } }else if(fields[0].equals("DELEGADO")){ Student _student = new Student(id, fields[2], fields[3]); _students.put(id, _student); _persons.put(id, (Person) _student); line = reader.readLine(); fields = line.split("\\|"); while((line != null) && (fields[0].charAt(0) == '#')){ String course = fields[0].substring(2); String discipline = fields[1]; Course _course = _courses.get(course); if(_course == null){ _course = new Course(course); _disciplineCourse.put(course, new HashMap<String, Discipline>()); _courses.put(course,_course); } if(_course.getRepresentatives().size() == 8){ System.out.println(id); throw new BadEntryException(course); }else{ _course.getRepresentatives().put(id,_student); } _student.setCourse(_course); Discipline _discipline = _disciplines.get(discipline); if(_discipline == null){ _discipline = new Discipline(discipline, _course); _disciplines.put(discipline,_discipline); _course.getDisciplines().put(discipline, _discipline); } if(_student.getDisciplines().size() == 6){ throw new BadEntryException(discipline); }else{ if(_discipline.getStudents().size() == 100){ throw new BadEntryException(discipline); }else{ _student.getDisciplines().put(discipline,_discipline); _discipline.getStudents().put(id,_student); } } line = reader.readLine(); if(line != null){ fields = line.split("\\|"); } } }else if(fields[0].equals("ALUNO")){ Student _student = new Student(id, fields[2], fields[3]); _students.put(id, _student); _persons.put(id, (Person) _student); line = reader.readLine(); fields = line.split("\\|"); while((line != null) && (fields[0].charAt(0) == '#')){ String course = fields[0].substring(2); String discipline = fields[1]; Course _course = _courses.get(course); if(_course == null){ _course = new Course(course); _disciplineCourse.put(course, new HashMap<String, Discipline>()); _courses.put(course, _course); } _student.setCourse(_course); Discipline _discipline = _disciplines.get(discipline); if(_discipline == null){ _discipline = new Discipline(discipline, _course); _disciplines.put(discipline, _discipline); _course.getDisciplines().put(discipline, _discipline); } _discipline.registerObserver(_student, id); if(_student.getDisciplines().size() == 6){ throw new BadEntryException(discipline); }else{ _student.getDisciplines().put(discipline,_discipline); if(_discipline.getStudents().size() == 100){ throw new BadEntryException(discipline); }else{ _discipline.getStudents().put(id,_student); } } line = reader.readLine(); if(line != null){ fields = line.split("\\|"); } } }else{ throw new BadEntryException(fields[0]); } } for(Course course: _courses.values()){ HashMap<Integer,Student> representatives = course.getRepresentatives(); HashMap<String, Discipline> disciplines = course.getDisciplines(); for(Discipline discipline: disciplines.values()){ for(Student representative: representatives.values()){ discipline.registerObserver(representative, representative.getId()); } } } reader.close(); }catch(BadEntryException e){ throw new ImportFileException(e); }catch(IOException e){ throw new ImportFileException(e); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Imports createImports();", "public void loadWorkflow(String filename);", "public static void loadFromFile() {\n\t\tloadFromFile(Main.getConfigFile(), Main.instance.getServer());\n\t}", "Import createImport();", "Import createImport();", "public static void load() {\n }", "private void importAll() {\n\t\tfinal JFileChooser chooser = new JFileChooser(System.getProperty(\"user.home\"));\n\t\tint returnVal = chooser.showOpenDialog(null);\n\t\tif(returnVal == JFileChooser.APPROVE_OPTION) {\n\t\t\tFile file = chooser.getSelectedFile();\n\t\t\tdeserializeFile(file);\n\t\t\t // imported the projects for this application from a file, so update what should be persisted on close\n\t\t\tupdatePersistence();\n\t\t}\n\t}", "private static void load(){\n }", "private void handleInclude() {\n definedGrammar.include(getGrammar(getAbsPath()));\n }", "private void ImportLibrary(){\n for(int i = 0; i < refact.size(); i++){\n if(refact.get(i).contains(\"import\")){\n for(String library : libraries){\n refact.add(i, library + \"\\r\");\n }\n break;\n }\n }\n\n\n }", "@Override\r\n\tpublic void initialLoad() throws IOException {\n\t\t\r\n\t}", "private void loadText() {\n\t\ttext1 = app.loadStrings(\"./data/imports/TXT 1.txt\");\n\t\ttext2 = app.loadStrings(\"./data/imports/TXT 2.txt\");\n\t}", "public static void main(String[] args) throws Exception {\r\n\t\tSpeechInput input = new SpeechInput();\r\n\t\tinput.afterPropertiesSet();\r\n\t\tRuleGrammar ruleGrammar = input.getGrammar().getRuleGrammar();\r\n\t\tSystem.out.println(\"Adding import\");\r\n\t\t\r\n\t\tRecognizer recognizer = ruleGrammar.getRecognizer();\r\n\t\tSystem.out.println(\"Loading: \" + new ClassPathResource(\"/grammar/hello.gram\"));\r\n\t\tloadGrammar(recognizer, new ClassPathResource(\"/grammar/cooking.gram\"));\r\n\t\tloadGrammar(recognizer, new ClassPathResource(\"/grammar/ingredient.gram\"));\r\n\t\tloadGrammar(recognizer, new ClassPathResource(\"/grammar/recipe.gram\"));\r\n\t\tloadGrammar(recognizer, new ClassPathResource(\"/grammar/step.gram\"));\r\n\t\tloadGrammar(recognizer, new ClassPathResource(\"/grammar/timer.gram\"));\r\n\t\tloadGrammar(recognizer, new ClassPathResource(\"/grammar/remy.gram\"));\r\n\t\t\r\n//\t\tRuleGrammar helloRules = loadGrammar(recognizer, new ClassPathResource(\"/grammar/hello.gram\"));\r\n//\t\tString name = helloRules.getName();\r\n//\t\tSystem.out.println(\"Adding grammar: \" + name);\r\n//\t\truleGrammar.addImport(new RuleName(\"hello.hello\"));\r\n\t\tSystem.out.println(\"Added\");\r\n\t\tSystem.out.println(\"Committing changes\");\r\n\t\t\r\n\t\tinput.getGrammar().commitChanges();\r\n\t\tSystem.out.println(\"Committed\");\r\n\t\tRule rule = ruleGrammar.getRule(\"command\");\r\n\t\tshowRule(rule, \"\");\r\n\t\taddGrammar(rule, \"hello\");\r\n\t\tList<String> ingredients = Arrays.asList(\r\n\t\t\t\t\"carrot\",\r\n\t\t\t\t\"broccoli\",\r\n\t\t\t\t\"kale\"\r\n\t\t\t\t);\r\n//\t\tString ingredientRuleStr = StringUtils.collectionToDelimitedString(ingredients, \"|\")\r\n//\t\t\t+ \";\";\r\n//\t\tRule ingredientsRule = ruleGrammar.ruleForJSGF(ingredientRuleStr);\r\n//\t\tRuleGrammar recipeGrammar = recognizer.getRuleGrammar(\"recipe\");\r\n//\t\trecipeGrammar.setRule(\"ingredient\", ingredientsRule, true);\r\n\t\tRuleGrammar ingredientGrammar = recognizer.getRuleGrammar(\"ingredient\");\r\n\t\tGrammarLoader.loadWords(\"ingredient\", ingredients, ingredientGrammar);\r\n\r\n//\t\trecipeGrammar.getRule(\"ingredient\");\r\n\t\t\r\n\t\t//ruleGrammar.getRecognizer().getRuleGrammar(s)\r\n\t\tinput.getGrammar().commitChanges();\r\n\t\tif (rule instanceof RuleAlternatives) {\r\n\t\t\tRuleAlternatives alts = (RuleAlternatives) rule;\r\n\t\t\tfor(Rule r: alts.getRules()) {\r\n\t\t\t\tshowRule(r, \"\");\r\n\t\t\t\tif (r instanceof RuleSequence) {\r\n\t\t\t\t\tfor (Rule rs : ((RuleSequence)r).getRules()) {\r\n\t\t\t\t\t\tshowRule(rs, \" \");\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\t//System.out.println(\"Alternatives: \" + r.getRules()\r\n\t\t\r\n//\t\tSystem.out.println(\"Random sentence:\");\r\n//\t\tString randomSentence = input.getGrammar().getRandomSentence();\r\n//\t\tSystem.out.println(\"\\t\" + randomSentence);\r\n\t\tSystem.out.println(\"Parsing...\");\r\n\t\tRuleParse result = ingredientGrammar.parse(\"kale\", \"ingredient\");\r\n\t\tSystem.out.println(\"Parse: \" + result);\r\n\t\t\r\n\t\tWhatWasSaid utterance = null;\r\n\t\tdo {\r\n\t\t\tSystem.out.println(\"Say something:\");\r\n\t\t\tutterance = input.recordUtterance();\r\n\t\t\tSystem.out.println(\"Got utterance: \" + utterance);\r\n\t\t} while (!utterance.getText().equals(\"quit\"));\r\n\t\t\r\n\t\tSystem.out.println(\"Quitting\");\r\n\t\tinput.destroy();\r\n\t}", "@BeforeTest\n\tpublic void loadLocatorsFile() {\n\t\tlog = Logger.getLogger(HeroImageProducttestscripts.class);\n\t\tLogReport.getlogger();\n\t\tlogger = extent.startTest(\"HomepageRedirection\");\n\t\tlocator = ReadPropertiesFile.loadProperty(FilePath.LOCATOR_FILE);\n\t\tvalidate = ReadPropertiesFile.loadProperty(FilePath.VALIDATION_FILE);\n\t\tlog.info(\"Files has been loaded\");\n\t}", "private void loadEnvironment(String filename){\n try (BufferedReader reader = new BufferedReader(new FileReader(filename))) {\n String line;\n while ((line = reader.readLine()) != null) {\n String[] info = line.split(\",\");\n String type = info[TYPE_INDEX];\n type = type.replaceAll(\"[^a-zA-Z0-9]\", \"\"); // remove special characters\n Point coordinate = new\n Point(Double.parseDouble(info[POS_X_INDEX]), Double.parseDouble(info[POS_Y_INDEX]));\n\n switch (type) {\n case \"Player\" -> this.player = new Player(coordinate, Integer.parseInt(info[ENERGY_INDEX]));\n case \"Zombie\" -> {\n entityList.add(new Zombie(coordinate, type));\n zombieCounter++;\n }\n case \"Sandwich\" -> {\n entityList.add(new Sandwich(coordinate, type));\n sandwichCounter++;\n }\n case \"Treasure\" -> this.treasure = new Treasure(coordinate, type);\n default -> throw new BagelError(\"Unknown type: \" + type);\n }\n }\n } catch (IOException e) {\n e.printStackTrace();\n System.exit(-1);\n }\n }", "public static void main(String args[])\n {\n LoadFileSupport sample = new LoadFileSupport();\n sample.createNewInstance(\"C:/pavan/j2eeWork/ws-studio-ie-workspace/xml-test/HTMLtoXSLProject/IncomingTimber/LoadSampleSample.xml\");\n sample.loadExistingInstance(\"C:/pavan/j2eeWork/ws-studio-ie-workspace/xml-test/HTMLtoXSLProject/IncomingTimber/LoadSampleSample.xml\");\n }", "public static void loadPracticeListFromFile() {\n JSONParser jsonParser = new JSONParser();\n\n try (FileReader reader = new FileReader(\"src/practiceList.json\")) {\n // Read JSON file\n Object object = jsonParser.parse(reader);\n\n //Iterate over word list array\n JSONArray wordList = (JSONArray) object;\n for (Object o : wordList) {\n\n JSONObject next = (JSONObject) o;\n String extra = \"\";\n\n if (((String) next.get(\"wordType\")).equalsIgnoreCase(\"verb\")) {\n extra = \"to \";\n }\n\n Word loadedWord = new Word(extra + next.get(\"english\"), (String) next.get(\"welsh\"), (String) next.get(\"wordType\"));\n\n addIntoPracticedWords(loadedWord);\n }\n\n } catch (ParseException | IOException e) {\n System.out.println(\"PracticeList file not found, will be created on exit.\");\n }\n }", "private void importCatalogue() {\n\n mAuthors = importModelsFromDataSource(Author.class, getHeaderClass(Author.class));\n mBooks = importModelsFromDataSource(Book.class, getHeaderClass(Book.class));\n mMagazines = importModelsFromDataSource(Magazine.class, getHeaderClass(Magazine.class));\n }", "ImportConfig createImportConfig();", "public static void run(String path) {\n\n\t\t// Create a resource set with a base directory:\n\t\tHenshinResourceSet resourceSet = new HenshinResourceSet(path);\n\n\t\t// Load the module:\n\t\tModule module = resourceSet.getModule(\"javaimports.henshin\", false);\n\n\t\t// Create an empty EGraph:\n\t\tEGraph graph = new EGraphImpl();\n\n\t\t// Use a delegating class loader so that the script engine can find the helper class:\n\t\tThread thread = Thread.currentThread();\n\t\tthread.setContextClassLoader(new InterpreterUtil.DelegatingClassLoader(thread.getContextClassLoader(),\n\t\t\t\tJavaImportsExample.class.getClassLoader()));\n\n\t\t// Create an engine and a rule application:\n\t\tEngine engine = new EngineImpl();\n\t\tRuleApplication app = new RuleApplicationImpl(engine, graph, (Rule) module.getUnit(\"simple\"), null);\n\t\tString value = \"hello world\";\n\t\tapp.setParameterValue(\"x\", value);\n\t\tInterpreterUtil.executeOrDie(app);\n\n\t\t\n\t\t\n\t\t// retrieve the node that was created by the rule\n\t\tIterator<EObject> graphIt =graph.iterator(); \n\t\tEObject newObj = null;\n\t\tif(graphIt.hasNext()) \n\t\t\tnewObj = graphIt.next();\n\t\tif(newObj==null) \n\t\t\tthrow new RuntimeException(\"Unexpected result of rule application: no graph node was created (expected one node)\");\n\t\t\n\t\t// retrieve the attribute value of the node and check the expected result\n\t\tString newValue = (String) newObj.eGet(newObj.eClass().getEStructuralFeature(\"stringValue\"));\n\t\tif (!newValue.equals(value.toUpperCase())) {\n\t\t\tthrow new RuntimeException(\"Unexpected string value: \\\"\" + newValue + \"\\\" (expected \\\"\"\n\t\t\t\t\t+ value.toUpperCase() + \"\\\")\");\n\t\t} else {\n\t\t\tSystem.out.println(\"Java Imports Example: Found correct value: \\\"\" + newValue + \"\\\"\");\n\t\t}\n\n\t}", "public void importFrom(JTFFile file) throws FileException {\n if (file.getHeader().getFileVersion() != Constants.Files.Versions.JTF.FIRST ||\n file.getHeader().getFileVersion() != Constants.Files.Versions.JTF.SECOND) {\n throw new FileException(resources.getMessage(\"errors.file.unsupportedversion\"));\n } else if (file.isValid()) {\n\n importLanguage(file);\n importCountries(file);\n importKinds(file);\n importType(file);\n importRealizer(file);\n importActors(file);\n\n file.getFilm().setNote(daoNotes.getNote(NoteType.getEnum(file.getFilm().getTemporaryContext().getIntNote())));\n\n filmsService.create(file.getFilm());\n } else {\n throw new FileException(resources.getMessage(\"errors.file.structureerror\"));\n }\n }", "File getLoadLocation();", "private void loadApplication() throws Exception{\n\t\t\n\t\tBufferedReader br = new BufferedReader(new FileReader(this.appfile));\n\t\tString line;\n\t\t\n\t\twhile ((line = br.readLine()) != null) {\n\t\t\tif (line.equals(\"Date\")){\n\t\t\t\tline = br.readLine();\n\t\t\t\tsetDate(line);\n\t\t\t}\n\t\t\telse if (line.equals(\"GPA\")){\n\t\t\t\tline = br.readLine();\n\t\t\t\tdouble newGPA = Double.parseDouble(line);\n\t\t\t\tsetGPA(newGPA);\n\t\t\t}\n\t\t\telse if (line.equals(\"Education Level\")){\n\t\t\t\tline = br.readLine();\n\t\t\t\tsetEducationLevel(line);\n\t\t\t}\n\t\t\telse if (line.equals(\"Status\")){\n\t\t\t\tline = br.readLine();\n\t\t\t\tsetStatus(line);\n\t\t\t}\n\t\t\telse if (line.equals(\"Priority\")){\n\t\t\t\tline = br.readLine();\n\t\t\t\tint newPriority = Integer.parseInt(line);\n\t\t\t\tsetPriority(newPriority);\n\t\t\t}\n\t\t}\n\t\tbr.close();\t\n\t}", "private void importLanguage(JTFFile file) {\n if (file.getLanguage() != null) {\n if (languagesService.exist(file.getLanguage())) {\n file.setLanguage(languagesService.getSimpleData(file.getLanguage().getName()));\n } else {\n languagesService.create(file.getLanguage());\n }\n\n file.getFilm().setTheLanguage(file.getLanguage());\n }\n }", "public void loadTheProject() {\n\t\tProjectHandler.openProject(mFilePath);\n }", "public abstract String getImportFromFileTemplate( );", "@PostConstruct\n public void init() {\n \n ClassLoader classLoader = Thread.currentThread().getContextClassLoader();\n InputStream res = classLoader.getResourceAsStream(\"input.txt\");\n BufferedReader br = new BufferedReader(new InputStreamReader(res));\n \n String line;\n\n try {\n while ((line = br.readLine()) != null) {\n LOG.log(Level.INFO, \"Buffer text = {0}\", line);\n }\n } catch (IOException ex) {\n LOG.log(Level.SEVERE, null, ex);\n } finally {\n try {\n br.close();\n } catch (IOException ex) {\n LOG.log(Level.SEVERE, null, ex);\n }\n }\n\n // Add business logic below. (Right-click in editor and choose\n // \"Insert Code > Add Business Method\")\n }", "public void load() {\n }", "void openImportOrCreate(Context context);", "@PostConstruct\n public void init() {\n try {\n String contentFile = PlatformUtils.fileToString(TALKS_FILE_PATH, getClass().getClassLoader());\n loadTalks(PlatformUtils.parseToJson(contentFile));\n } catch (IOException e) {\n logger.log(Level.WARNING, \"An error occurred while loading data\", e);\n }\n }", "private void initiate(){try{\n\t//String dataIni = run.class.getResource(\"../util/DataBase.ini\").getFile();\n //FileInputStream fin=new FileInputStream(dataIni); // 打开文件,从根目录开始寻找\n//\tFileInputStream fin=new FileInputStream(\"src/util/DataBase.ini\"); // 打开文件,从根目录开始寻找\n//\tProperties props=new Properties(); // 建立属性类,读取ini文件\n//\tprops.load(fin); \n//\tdriver=props.getProperty(\"driver\"); //根据键读取值\n//\turl=props.getProperty(\"url\");\n//\tusername=props.getProperty(\"username\");\n//\tuserpassword=props.getProperty(\"userpassword\");\n\t}\n\tcatch(Exception e){e.printStackTrace();}\n\t}", "@Override\n public void load() throws IOException, ClassNotFoundException {\n \n }", "public void importFileClick() {\n\n //Lets the user choose a file location\n FileChooser fileChooser = new FileChooser();\n fileChooser.setTitle(\"Open Resource File\");\n fileChooser.setInitialDirectory(new File(System.getProperty(\"user.dir\")));\n fileChooser.getExtensionFilters().add(new FileChooser.ExtensionFilter(\"Run-length encoding\",\n \"*.rle\"));\n File file = fileChooser.showOpenDialog(new Stage());\n\n //If a file was chosen, will stop the game and set the generation to 0 and try to load the file.\n if (file != null) {\n timeline.stop();\n gOL.resetGenCounter();\n generationLabel.setText(Integer.toString(gOL.getGenCounter()));\n try {\n fileHandler.readGameBoardFromDisk(file);\n } catch (IOException ie) {\n //Produces a warning if unsuccessful\n PopUpAlerts.ioAlertFromDisk();\n }\n }\n\n aliveLabel.setText(Integer.toString(board.getCellsAlive()));\n ruleLabel.setText(gOL.getRuleString().toUpperCase());\n isMovable = true;\n canvasArea.requestFocus();\n setFocusTraversable(false);\n\n //Resets offset to accommodate for the new pattern and calls draw().\n canvasDrawer.resetOffset(board, canvasArea);\n draw();\n }", "@Override\n protected void load(ScanningContext context) {\n ResourceItem item = getRepository().getResourceItem(mType, mResourceName);\n\n // add this file to the list of files generating this resource item.\n item.add(this);\n\n // Ask for an ID refresh since we're adding an item that will generate an ID\n context.requestFullAapt();\n }", "public void initFromClasspath() throws IOException {\n \t\tcontactNames = loadFromClassPath(\"contactNames\");\n \t\tgroupNames = loadFromClassPath(\"groupNames\");\n \t\tmessageWords = loadFromClassPath(\"messageWords\");\n \t}", "private void initOntology() {\n\n\tontology = ModelFactory.createDefaultModel();\n\t\t\t\n\ttry \n\t{\n\t\t//ontology.read(new FileInputStream(\"ontology.ttl\"),null,\"TTL\");\n\t\tontology.read(new FileInputStream(\"Aminer-data.ttl\"),null,\"TTL\");\n\t\t//ontology.read(new FileInputStream(\"SO data.ttl\"),null,\"TTL\");\n\t} \n\tcatch (FileNotFoundException e) \n\t{\n\t\tSystem.out.println(\"Error creating ontology model\" +e.getMessage());\n\t\te.printStackTrace();\n\t}\n\t\t\t\n\t\t\n\t}", "public void init(String file) {\n\t\tif (file == null) {\n\t\t\tfile = Controller.getSourceFile();\n\t\t}\n\t\tthis.satelliteList = JSONLoader.getSatelliteList(file);\n\t\tthis.initModules();\n\t}", "public static void main(String[] args) {\n String s = \"We are testing import statements\";\n System.out.println(s);\n\n // We use simple name because we specified location in the import\n // statement\n VineVegetable.main(args);\n }", "private void loadEnvironment () {\r\n Factory forceFactory = new ForceFactory(mySimulation);\r\n int response = INPUT_CHOOSER.showDialog(null, \"Environment file\");\r\n if (response == JFileChooser.APPROVE_OPTION) {\r\n forceFactory.loadFile(INPUT_CHOOSER.getSelectedFile());\r\n }\r\n }", "@Override\n\tprotected void onStart() {\n\t\t// TODO Auto-generated method stub\n\t\tsuper.onStart();\n\t\tthis.loadFromFile();\n\t}", "public static void load(FileIO fileIO) \r\n\t{\n\t\t\r\n\t}", "public void initLoadingFileEnviroment() {\n // file init\n try {\n DiskFileItemFactory fileFactory = new DiskFileItemFactory();\n File filepath = new File(DATA_PATH);\n fileFactory.setRepository(filepath);\n this._uploader = new ServletFileUpload(fileFactory);\n\n } catch (Exception ex) {\n System.err.println(\"Error init new file environment. \" + ex.getMessage());\n }\n }", "public TpImport(){\r\n\t\t\r\n\t}", "public void load(){\n\t\t\tArrayList<String> entries = readEntriesFromFile(FILENAME);\n\t\t\t\n\t\t\tfor(int i = 1; i < entries.size(); i++){\n\t\t\t\tString entry = entries.get(i);\n\t\t\t\tString[] entryParts = entry.split(\",\");\n\t\t\t\tString name = entryParts[0];\n\t\t\t\tString power = entryParts[1];\n\t\t\t\tString gold = entryParts[2];\n\t\t\t\tString xp = entryParts[3];\n\t\t\t\tString location = entryParts[4];\n\t\t\t\tint powerInt = Integer.parseInt(power);\n\t\t\t\tint goldInt = Integer.parseInt(gold);\n\t\t\t\tint XPInt = Integer.parseInt(xp);\n\t\t\t\tRegion regionR = RM.getRegion(location);\n\t\t\t\tTrap trap = new Trap(name, powerInt, goldInt, XPInt, regionR);\n\t\t\t\ttrapList[i-1] = trap;\n\t\t\t}\n\t}", "public abstract void loadKnowledge(String path) throws LoadKnowledgeException;", "public void load() {\n\t}", "@PostConstruct\n public void loadSchema() throws IOException {\n\n loadDataIntoHSQL();\n\n //get the schema\n File schemaFile = resource.getFile();\n\n //parse the schema\n //Register the schema file\n TypeDefinitionRegistry typeDefinitionRegistry = new SchemaParser().parse(schemaFile);\n\n //build the wiring to connect\n RuntimeWiring wiring = buildRuntimeWiring();\n\n //Generate the schema using registered file and wiring which is nothing but reference.\n GraphQLSchema schema = new SchemaGenerator().makeExecutableSchema(typeDefinitionRegistry, wiring);\n\n //build the graphQL\n graphQL = GraphQL.newGraphQL(schema).build();\n\n List<Vehicle> list = vehicleService.findAll();\n\n for (Vehicle vehicle : list) {\n System.out.println(vehicle.getMake().toString());\n }\n\n }", "public void init() {\n this.properties = loadProperties(\"/project3.properties\");\n }", "public void readFromFile() {\n\n\t}", "public static void initializeToolsAndResources(String wordnetPath) throws MalformedURLException, IOException {\n\n Logger.getLogger(ExternalKnowledgeDemoMain.class.getName()).log(Level.INFO, \"...Generating stop-words lists...\");\n StringUtils.generateStopListsFromExternalSource(filePath_en, filePath_gr);\n\n Properties split_props = new Properties();\n //Properties without lemmatization\n split_props.put(\"annotators\", \"tokenize, ssplit, pos\");\n split_props.put(\"tokenize.language\", \"en\");\n split_pipeline = new StanfordCoreNLP(split_props);\n\n Properties lemma_props = new Properties();\n lemma_props.put(\"annotators\", \"tokenize, ssplit, pos, lemma\");\n lemma_props.put(\"tokenize.language\", \"en\");\n lemma_pipeline = new StanfordCoreNLP(lemma_props);\n\n Properties entityMentions_props = new Properties();\n entityMentions_props.put(\"annotators\", \"tokenize, ssplit, truecase, pos, lemma, ner, entitymentions\");\n entityMentions_props.put(\"tokenize.language\", \"en\");\n entityMentions_props.put(\"truecase.overwriteText\", \"true\");\n entityMentions_pipeline = new StanfordCoreNLP(entityMentions_props);\n\n Properties compound_props = new Properties();\n compound_props.put(\"annotators\", \"tokenize, ssplit, truecase, pos, parse\");\n compound_props.put(\"tokenize.language\", \"en\");\n compound_props.put(\"truecase.overwriteText\", \"true\");\n compounds_pipeline = new StanfordCoreNLP(compound_props);\n\n spotlight = new Spotlight();\n\n chanel = new LODSyndesisChanel();\n\n }", "public void load() throws FileNotFoundException {\n loadConfig();\n initRepos();\n }", "private void loadFromFile(ArrayList<Question> questionsList) {\n String tempString = \"\"; // Holds the \"identifier\" of the line\n String question = \"\"; // text containing actual question\n ArrayList<Integer> scoreList = new ArrayList<>(); // contains scores of questions\n ArrayList<String> answers = new ArrayList<>(); // contains answers of questions\n ArrayList<String> nextQuestions = new ArrayList<>(); // contains next question of current question\n int specialCase = 0; // special case of question\n boolean backExists = false; // boolean indicating if back button does(n't) exist\n Question tempQuestion; // temporary question which is later added to the list\n\n // Attempt to open a the question_data file and read its contents\n try {\n InputStream in = getClass().getResourceAsStream(\"question_data\");\n Scanner sc = new Scanner(in);\n\n while (sc.hasNextLine()) {\n tempString = sc.nextLine();\n if (tempString.equals(\"\")) {\n continue;\n }\n\n switch (tempString.charAt(0)) {\n case '#':\n // Anything beginning with '#' is ignored.\n break;\n case 'Q':\n // 'Q' indicated the text of the question\n question = tempString.substring(3);\n break;\n case 'A':\n // 'A' indicates an answer\n answers.add(tempString.substring(3));\n break;\n case 'B':\n // 'B' indicates if a back button exists or not\n backExists = Boolean.parseBoolean(tempString.substring(3));\n break;\n case 'N':\n // 'N' indicates the next question of every answer\n nextQuestions.add(tempString.substring(3));\n break;\n case 'S':\n // 'S' indicates the score of every answer, can be set to -1 if no score is needed\n scoreList.add(Integer.parseInt(tempString.substring(3)));\n break;\n case 'C':\n // Special case. Every special case (number other than 0) has to be accounted for...\n specialCase = Integer.parseInt(tempString.substring(3));\n break;\n case 'T':\n // 'T' stands for terminate and create. A 'T' should be placed at the end of a\n // question and all of its answers. This indicated the creation of the question.\n\n // Create new question, set its answer, reset all lists, etc.\n tempQuestion = new Question(question, backExists);\n tempQuestion.setSpecialCase(specialCase);\n for (int i = 0; i < answers.size(); i++) {\n tempQuestion\n .addAnswer(answers.get(i), nextQuestions.get(i), scoreList.get(i));\n tempQuestion.setBackAvailable(backExists);\n }\n questionsList.add(tempQuestion);\n answers.clear();\n scoreList.clear();\n nextQuestions.clear();\n specialCase = 0;\n break;\n default:\n break;\n }\n\n }\n } catch (Exception e){\n System.out.println(System.getProperty(\"user.dir\"));\n System.out.println(\"An error occurred while parsing the file, make sure the file exists.\"\n + \"and/or has the correct filename (question_data)\");\n\n }\n }", "Import getImport();", "public void inici() {\n\t\n if (filename == null) {\n \t//System.err.println(Resources.getResource(\"./modelo/cube.obj\"));\n \t filename = Resources.getResource(\"./modelo/cube.obj\");\n if (filename == null) {\n System.err.println(\"modelo/cube.obj nots found\");\n System.exit(1);\n }\n\t}\n\t}", "void singleModeLoading( File dataPath, File resultsPath, int scenarioNumber );", "protected abstract void onLoad() throws IOException, ConfigInvalidException;", "public void importFurniture() {\n new ImportedFurnitureWizardController(this.home, this.preferences, this, this.viewFactory, \n this.contentManager, this.undoSupport).displayView(getView());\n }", "public void loadResources();", "public Import() {\n this(null, new Name(), null, null, false, false);\n }", "private void loadFromFile() {\n try {\n FileInputStream fis = openFileInput(FILENAME);\n InputStreamReader isr = new InputStreamReader(fis);\n BufferedReader reader = new BufferedReader(isr);\n Gson gson = new Gson();\n Type listFeelingType = new TypeToken<ArrayList<Feeling>>(){}.getType();\n recordedFeelings.clear();\n ArrayList<Feeling> tmp = gson.fromJson(reader, listFeelingType);\n recordedFeelings.addAll(tmp);\n fis.close();\n\n } catch (FileNotFoundException e) {\n // TODO Auto-generated catch block\n recordedFeelings = new ArrayList<Feeling>();\n e.printStackTrace();\n } catch (IOException e) {\n // TODO Auto-generated catch block\n e.printStackTrace();\n }\n }", "public void importPackage(String pack) throws Exception;", "@Override\r\n\tprotected void load() {\n\t\t\r\n\t}", "@Override\n\tprotected void load() {\n\n\t}", "@Override\n\tprotected void load() {\n\n\t}", "public void load() throws IOException {\r\n\t\tFile file = new File(projectDir, TERN_PROJECT);\r\n\t\tif (file.exists()) {\r\n\t\t\tJSONParser parser = new JSONParser();\r\n\t\t\ttry {\r\n\t\t\t\tJSONObject result = (JSONObject) parser.parse(new FileReader(\r\n\t\t\t\t\t\tfile));\r\n\t\t\t\tsuper.putAll(result);\r\n\t\t\t} catch (ParseException e) {\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t}\r\n\t\t}\r\n\t}", "private void loadEnvironment(String filename){\n // Code here to read from the file and set up the environment\n try (BufferedReader br = new BufferedReader(new FileReader(filename))) {\n String line;\n while((line = br.readLine()) != null) {\n String[] values = line.split(\",\");\n String type = values[0].replaceAll(\"[^a-zA-Z0-9]\", \"\"); // remove special characters\n double x = Double.parseDouble(values[1]);\n double y = Double.parseDouble(values[2]);\n switch (type) {\n case \"Zombie\":\n Zombie zombie = new Zombie(x, y);\n this.zombies.put(zombie.getPosition(), zombie);\n break;\n case \"Sandwich\":\n Sandwich sandwich = new Sandwich(x, y);\n this.sandwiches.put(sandwich.getPosition(), sandwich);\n break;\n case \"Player\":\n this.player = new Player(x, y, Integer.parseInt(values[3]));\n break;\n case \"Treasure\":\n this.treasure = new Treasure(x, y);\n break;\n default:\n throw new BagelError(\"Unknown type: \" + type);\n }\n }\n } catch (Exception e) {\n e.printStackTrace();\n }\n\n }", "public static void main(String[] args) {\n DisplayUI ui = new DisplayUI();\n Storage storage = new Storage(FILE_PATH);\n TaskList taskList = new TaskList();\n Parser parser = new Parser();\n\n tasks = storage.importTaskFromFile();\n programStart(ui, storage, taskList);\n loopTillEnd(ui, storage, taskList, parser);\n }", "@TaskAction\n public void configureFromResources() {\n // set icon file as input for supplyIcon task\n File icon = helperTask.getIcon().getResolve().get();\n helperTask.getIcon().setIcon(nullifyIfNotExists(icon));\n\n // todo implement \"should we even try to produce a splash?\"\n\n // look at the headerType first.\n // ACTUALLY, we don't care. We would assume that the user put a splash\n // in the directory, so that's what they want. If they don't want to use a splash\n // they can disable the splash task.\n\n // set splash file as input for supplySplash task\n // if splash file is present change header type to gui if it is not already set.\n File splash = helperTask.getSplash().getResolve().get();\n helperTask.getSplash().setSplash(nullifyIfNotExists(splash));\n\n // todo update the launch4jTask with a \"gui\" headerType.\n // if we actually produced a splash, that is...\n\n File manifest = helperTask.getManifest().getResolve().get();\n helperTask.getManifest().setManifest(nullifyIfNotExists(manifest));\n }", "private void importKinds(JTFFile file) {\n for (SimpleData kind : file.getKinds()) {\n if (kindsService.exist(kind)) {\n kind.setId(kindsService.getSimpleData(kind.getName()).getId());\n } else {\n kindsService.create(kind);\n }\n\n file.getFilm().addKind(kind);\n }\n }", "void loadExistingInstance(String filename)\n {\n iIncomingLobsFactory = new incomingLobsFactory();\n iIncomingLobsFactory.setPackageName(\"com.loadSample\");\n \n // Load the document\n iIncomingLobs = (incomingLobs) iIncomingLobsFactory.loadDocument(filename);\n printincomingLobs();\n }", "private void importImages() {\n\n\t\t// Create array of the images. Each image pixel map contains\n\t\t// multiple images of the animate at different time steps\n\n\t\t// Eclipse will look for <path/to/project>/bin/<relative path specified>\n\t\tString img_file_base = \"Game_Sprites/\";\n\t\tString ext = \".png\";\n\n\t\t// Load background\n\t\tbackground = createImage(img_file_base + \"Underwater\" + ext);\n\t}", "@Override\n\t@SystemSetup(extension = FrameitcoreConstants.EXTENSIONNAME, process = Process.ALL, type = Type.ESSENTIAL)\n\tpublic void createEssentialData() {\n\t\t// Import essential data\n\t\tLOG.info(\"Importing essential data...\");\n\n\t\tsuper.importData(\"/essentialData/countries.impex\");\n\n\t\tLOG.info(\"Essential data import complete.\");\n\t}", "public void load(File source);", "private static void init() throws IOException, BusinessException {\n\t\tMap<String, String> books = new HashMap<String, String>();\n\t\tbooks.put(\"tranc1-in\", Entry.class.getClassLoader().getResource(\"TRANC1-IN.book\").getPath());\n\t\tbooks.put(\"tranc1-out\", Entry.class.getClassLoader().getResource(\"TRANC1-OUT.book\").getPath());\n\t\tBookStore.loadBooks(books);\n\t}", "private void loadScheme(File file)\n\t{\n\t\tString name = file.getName();\n\n\t\ttry\n\t\t{\n\t\t\tBedrockScheme particle = BedrockScheme.parse(FileUtils.readFileToString(file, Charset.defaultCharset()));\n\n\t\t\tthis.presets.put(name.substring(0, name.indexOf(\".json\")), particle);\n\t\t}\n\t\tcatch (Exception e)\n\t\t{\n\t\t\te.printStackTrace();\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}", "@Override\n\tprotected void load() {\n\t\t\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 void load();", "public void load();", "@Override\n\tprotected void GenerateImportLibrary(String LibName) {\n\n\t}", "@Test\n public void importTest1() {\n isl.exportSP();\n SharedPreferences sp = appContext.getSharedPreferences(spName, Context.MODE_PRIVATE);\n assertEquals(5, sp.getInt(\"nr\", 0));\n IngredientList isl2 = new IngredientList(sp, new TextFileReader(appContext)); //constructor automatically imports\n\n //check a random part of an ingredient present\n assertEquals(\"kruiden\", ((Ingredient) isl2.get(1)).category);\n\n //check if ingredient 5 is present correctly\n assertEquals(\"aardappelen\", isl2.get(4).name);\n assertEquals(\"geen\", ((Ingredient) isl2.get(4)).category);\n assertEquals(5, ((Ingredient) isl2.get(4)).amountNeed, 0);\n assertEquals(1, ((Ingredient) isl2.get(4)).amountHave, 0);\n assertEquals(Unit.NONE, ((Ingredient) isl2.get(4)).unit);\n\n //test text file import\n assertEquals(\"leek\", isl2.get(10).name);\n }", "public void load() ;", "public static void load(String filename, Supervisor k) throws FileNotFoundException{\n String source = \"\";\n try {\n Scanner in = new Scanner(new FileReader(filename));\n while(in.hasNext()){\n source = source + in.next();\n }\n } catch (FileNotFoundException ex) {\n //throw ex;\n System.out.println(\"Could not read config file: \" + ex);\n System.out.println(\"trying to create a new one...\");\n String stsa = \"Done!\\n\";\n try (\n Writer writer = new BufferedWriter(new OutputStreamWriter(\n new FileOutputStream(filename), \"utf-8\"))) {\n writer.write(\"\");\n writer.close();\n }\n \n catch (IOException ex1) {\n stsa = \"\";\n System.out.println(\"FAILED, SKIPPING CONFIG READ BECOUSE:\");\n Logger.getGlobal().warning(ex1.toString());\n System.out.println(\"Console version: \" + ex1.toString());\n }\n System.out.print(stsa);\n }\n LinkedList<String[]> raw = fetch(source);\n \n if(k.Logic == null){\n Logger.getGlobal().warning(\"ENGINE NOT INITIALIZED PROPERLY, ABORTING APPLYING CONFIG\");\n return;\n }\n if(k.Logic.Vrenderer == null){\n Logger.getGlobal().warning(\"ENGINE RENDERER NOT INITIALIZED PROPERLY, ABORTING APPLYING CONFIG\");\n return;\n }\n \n for(String[] x: raw){\n String value = x[1];\n if(!k.features_overrideAllStandard)\n switch(x[0]){\n case \"nausea\":\n int numValue = 0;\n try{\n numValue = Integer.parseInt(value);\n }\n catch(Exception e){\n quickTools.alert(\"configReader\", \"invalid nausea value\");\n break;\n }\n if(numValue > 0){\n k.Logic.Vrenderer.dispEffectsEnabled = true;\n }\n //k.Logic.Vrenderer.di\n break;\n default:\n\n break;\n }\n customFeatures(x[0], x[1], k);\n }\n }", "@PostConstruct\n private void loadFiles() {\n \n\n File dir = new File(Constants.DIR_PATH);\n File[] files = dir.listFiles(); //stores list of files in given paths\n String line=\"\";\n\n for(File file : files){\n try {\n br = new BufferedReader(new FileReader(file));\n br.readLine();\n while((line=br.readLine())!=null){\n\n String []token=line.split(Constants.DELIMETER);\n String fileName=file.getName().toUpperCase();\n\n FlightData newflight = new FlightData(fileName.substring(0,fileName.lastIndexOf(\".\")),token[0],token[1],token[2],token[3],token[4],token[5],Double.parseDouble(token[6]),token[7],token[8]);\n flightDataDao.insertFlightData(newflight);\n }\n\n } catch (FileNotFoundException e) {\n e.printStackTrace();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n\n }", "public static void init(){\n Path path = FileDirectoryUtil.getPath(\"src\", \"fileIO\", \"test.txt\");\n FileDirectoryUtil.tryCreateDirectory(path);\n\n // Try to create the file\n path = Paths.get(path.toAbsolutePath().toString(), \"test.txt\");\n FileDirectoryUtil.tryCreateFile(path);\n\n // Print out the final location of the file\n System.out.println(path.toAbsolutePath());\n\n // Try to write to the file\n IOUtil.tryWriteToFile(getContent(), path);\n\n // Try to print the content of the file\n IOUtil.tryPrintContents(path);\n\n }", "HttpRequest(){\n HttpHeader.getInstance().loadHeaderList(\"src/main/resources/headerList.txt\");\n }", "public void load (IFile file) throws Exception;", "private ClinicFileLoader() {\n\t}", "@FXML public void handleImportButton() {\n\t\tSystem.out.println(\"Import Button Clicked!\");\n\t\tFileChooser fileChooser = new FileChooser();\n\t\tfileChooser.getExtensionFilters().addAll(new ExtensionFilter(\"SENTA features selection\", \"*.sfs\"), new ExtensionFilter(\"All files\", \"*.*\"));\n\t\tfileChooser.setTitle(\"Please specify which file you want to import\");\n\t\ttry {\n\t\t\t\tString fileToOpen = fileChooser.showOpenDialog(Main.primaryStage).getPath();\n\t\t\t\tif (ConfirmBox.display(\"Import features configuration?\", \"Are you sure you want to import the selected set of features?\")) {\n\t\t\t\t\tReader.importFeatures(fileToOpen);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tMain.root = FXMLLoader.load(getClass().getResource(\"/windows/main/SelectBasicFeaturesWindow.fxml\"));\n\t\t\t\tMain.primaryStage.setScene(new Scene(Main.root, 800, 600));\n\t\t\t\tMain.primaryStage.show();\n\t\t\t\t\n\t\t} catch (NullPointerException exepction) {\n\t\t\tSystem.out.println(exepction.getMessage());\n\t\t} catch (IOException e) {\n\t\t\tSystem.out.println(e.getMessage());\n\t\t}\n\t}", "@Override\n public void load() {\n }", "public static synchronized boolean load(ServletContext servletContext) {\n\t\tString temp;\n\t\ttry {\n\t\t\t//Get the trial.xml config file\n\t\t\txml = XmlUtil.getDocument(servletContext.getRealPath(configFilename));\n\n\t\t\t//Get the basepath to the root directory\n\t\t\tbasepath = servletContext.getRealPath(File.separator).trim();\n\t\t\tif (!basepath.endsWith(File.separator)) basepath += File.separator;\n\n\t\t\t//Get the root directory name\n\t\t\ttemp = basepath.substring(0,basepath.length()-1);\n\t\t\tserviceName = temp.substring(temp.lastIndexOf(File.separator)+1);\n\n\t\t\t//Get the top-level attributes\n\t\t\tautostart = XmlUtil.getValueViaPath(xml,\"clinical-trial@autostart\");\n\t\t\tlog = XmlUtil.getValueViaPath(xml,\"clinical-trial@log\");\n\t\t\toverwrite = XmlUtil.getValueViaPath(xml,\"clinical-trial@overwrite\");\n\n\t\t\t//Get the preprocessor parameters.\n\t\t\tpreprocessorEnabled = XmlUtil.getValueViaPath(xml,\"clinical-trial/http-import/preprocessor@enabled\");\n\t\t\tpreprocessorClassName = XmlUtil.getValueViaPath(xml,\"clinical-trial/http-import/preprocessor/preprocessor-class-name\");\n\t\t\t//Get the http import anonymizer enabled parameter\n\t\t\thttpImportAnonymize = XmlUtil.getValueViaPath(xml,\"clinical-trial/http-import/anonymize\");\n\t\t\t//Get the http import IP addresses\n\t\t\tNodeList list = xml.getElementsByTagName(\"http-import\");\n\t\t\tif (list.getLength() == 0) {\n\t\t\t\thttpImportIPAddresses = new String[0];\n\t\t\t}\n\t\t\telse {\n\t\t\t\tElement httpImportNode = (Element)list.item(0);\n\t\t\t\tlist = httpImportNode.getElementsByTagName(\"site\");\n\t\t\t\thttpImportIPAddresses = new String[list.getLength()];\n\t\t\t\tfor (int i=0; i<list.getLength(); i++) {\n\t\t\t\t\thttpImportIPAddresses[i] = XmlUtil.getElementValue(list.item(i));\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t//Get the http export directories and URLs\n\t\t\tElement httpExportNode = XmlUtil.getElementViaPath(xml,\"clinical-trial/http-export\");\n\t\t\tif (httpExportNode != null) {\n\t\t\t\tNodeList siteNodes = httpExportNode.getElementsByTagName(\"site\");\n\t\t\t\thttpExportDirectories = new String[siteNodes.getLength()];\n\t\t\t\thttpExportDirectoryFiles = new File[siteNodes.getLength()];\n\t\t\t\thttpExportURLs = new String[siteNodes.getLength()];\n\t\t\t\tfor (int i=0; i<httpExportDirectories.length; i++) {\n\t\t\t\t\thttpExportDirectories[i] = httpExportDir + File.separator +\n\t\t\t\t\t\t\t\t\t((Element)siteNodes.item(i)).getAttribute(\"directory\");\n\t\t\t\t\thttpExportDirectoryFiles[i] = new File(basepath + httpExportDirectories[i]);\n\t\t\t\t\thttpExportURLs[i] = XmlUtil.getElementValue(siteNodes.item(i));\n\t\t\t\t}\n\t\t\t}\n\t\t\telse {\n\t\t\t\thttpExportDirectories = new String[0];\n\t\t\t\thttpExportURLs = new String[0];\n\t\t\t}\n\n\t\t\t//Get the dicom export mode, directories, IP addresses and AE Titles\n\t\t\tElement dicomExportNode = XmlUtil.getElementViaPath(xml,\"clinical-trial/dicom-export\");\n\t\t\tif (dicomExportNode != null) {\n\t\t\t\tElement storeNode;\n\t\t\t\tdicomExportMode = dicomExportNode.getAttribute(\"mode\");\n\t\t\t\tNodeList storeNodes = dicomExportNode.getElementsByTagName(\"destination-dicom-store\");\n\t\t\t\tdicomExportDirectories = new String[storeNodes.getLength()];\n\t\t\t\tdicomExportDirectoryFiles = new File[storeNodes.getLength()];\n\t\t\t\tdicomExportAETitles = new String[storeNodes.getLength()];\n\t\t\t\tdicomExportIPAddresses = new String[storeNodes.getLength()];\n\t\t\t\tfor (int i=0; i<storeNodes.getLength(); i++) {\n\t\t\t\t\tstoreNode = (Element)storeNodes.item(i);\n\t\t\t\t\tdicomExportDirectories[i] = dicomExportDir + File.separator + storeNode.getAttribute(\"directory\");\n\t\t\t\t\tdicomExportDirectoryFiles[i] = new File(basepath + dicomExportDirectories[i]);\n\t\t\t\t\tdicomExportAETitles[i] = XmlUtil.getValueViaPath(storeNode,\"destination-dicom-store/ae-title\");\n\t\t\t\t\tdicomExportIPAddresses[i] = XmlUtil.getValueViaPath(storeNode,\"destination-dicom-store/ip-address\");\n\t\t\t\t}\n\t\t\t}\n\t\t\telse {\n\t\t\t\tdicomExportDirectoryFiles = new File[0];\n\t\t\t\tdicomExportAETitles = new String[0];\n\t\t\t\tdicomExportIPAddresses = new String[0];\n\t\t\t}\n\n\t\t\t//Get the dicom store parameters.\n\t\t\tdicomImportAnonymize = XmlUtil.getValueViaPath(xml,\"clinical-trial/dicom-store/anonymize\");\n\t\t\t//Detect a change in the ae-title or port and notify the author service.\n\t\t\tboolean change = false;\n\t\t\ttemp = XmlUtil.getValueViaPath(xml,\"clinical-trial/dicom-store/ae-title\").trim();\n\t\t\tif ((dicomStoreAETitle != null) && !temp.equals(dicomStoreAETitle)) change = true;\n\t\t\tdicomStoreAETitle = temp;\n\t\t\ttemp = XmlUtil.getValueViaPath(xml,\"clinical-trial/dicom-store/port\").trim();\n\t\t\tif ((dicomStorePort != null) && !temp.equals(dicomStorePort)) change = true;\n\t\t\tdicomStorePort = temp;\n\t\t\tif (change) AdminService.scpParamsChanged();\n\n\t\t\t//Get the database export parameters.\n\t\t\tdatabaseExportMode = XmlUtil.getValueViaPath(xml,\"clinical-trial/database-export@mode\");\n\t\t\tdatabaseExportAnonymize = XmlUtil.getValueViaPath(xml,\"clinical-trial/database-export/anonymize\");\n\t\t\tdatabaseExportInterval = XmlUtil.getValueViaPath(xml,\"clinical-trial/database-export/interval\");\n\t\t\tdatabaseClassName = XmlUtil.getValueViaPath(xml,\"clinical-trial/database-export/database-class-name\");\n\n\t\t\t//Get the remapper parameters\n\t\t\tkeyfile = XmlUtil.getValueViaPath(xml,\"clinical-trial/remapper@key-file\");\n\t\t\tbasedate = XmlUtil.getValueViaPath(xml,\"clinical-trial/remapper/base-date\");\n\t\t\tuidroot = XmlUtil.getValueViaPath(xml,\"clinical-trial/remapper/uid-root\");\n\t\t\tptIdPrefix = XmlUtil.getValueViaPath(xml,\"clinical-trial/remapper/patient-id/prefix\");\n\t\t\tptIdSuffix = XmlUtil.getValueViaPath(xml,\"clinical-trial/remapper/patient-id/suffix\");\n\n\t\t\tString s = XmlUtil.getValueViaPath(xml,\"clinical-trial/remapper/patient-id@first\");\n\t\t\ttry { firstPtId = Integer.parseInt(s); }\n\t\t\tcatch (Exception ex) { firstPtId = 1; }\n\n\t\t\ts = XmlUtil.getValueViaPath(xml,\"clinical-trial/remapper/patient-id@width\");\n\t\t\ttry { ptIdWidth = Integer.parseInt(s); }\n\t\t\tcatch (Exception ex) { ptIdWidth = 4; }\n\n\t\t\t//We made it.\n\t\t\treturn true;\n\t\t}\n\t\tcatch (Exception e) {\n\t\t\txml = null;\n\t\t\tlogger.warn(\"Unable to load the configuration: [\"+e.getMessage()+\"]\");\n\t\t}\n\t\treturn false;\n\t}", "public void load (File file) throws Exception;", "public void testLoadIsImport() {\n \n \t\t// setup\n \t\tIProject project = getProject(getUniqueString());\n \t\tensureExistsInWorkspace(project, true);\n \t\tIScopeContext context = new ProjectScope(project);\n \t\tString qualifier = \"test.load.is.import\";\n \t\tIEclipsePreferences node = context.getNode(qualifier);\n \t\tString key = \"key\";\n \t\tString oldValue = \"old value\";\n \t\tString newValue = \"new value\";\n \t\tIPreferencesService service = Platform.getPreferencesService();\n \n \t\t// set the values in the nodes and flush the values to the file system\n \t\tnode.put(key, oldValue);\n \t\ttry {\n \t\t\tnode.flush();\n \t\t} catch (BackingStoreException e) {\n \t\t\tfail(\"1.99\", e);\n \t\t}\n \t\tassertEquals(\"1.00\", oldValue, node.get(key, null));\n \n \t\t// copy the data into a buffer for later use\n \t\tFile fileInFS = getFileInFilesystem(project, qualifier);\n \t\tInputStream input = null;\n \t\tOutputStream output = null;\n \t\tbyte[] buffer = null;\n \t\ttry {\n \t\t\tinput = new BufferedInputStream(new FileInputStream(fileInFS));\n \t\t\toutput = new ByteArrayOutputStream(1024);\n \t\t\ttransferData(input, output);\n \t\t\tbuffer = ((ByteArrayOutputStream) output).toByteArray();\n \t\t} catch (IOException e) {\n \t\t\tfail(\"2.99\", e);\n \t\t}\n \n \t\t// remove the file from the project\n \t\tIFile fileInWS = getFileInWorkspace(project, qualifier);\n \t\ttry {\n \t\t\tfileInWS.delete(IResource.NONE, getMonitor());\n \t\t} catch (CoreException e) {\n \t\t\tfail(\"3.90\", e);\n \t\t}\n \t\tassertTrue(\"3.0\", !fileInWS.exists());\n \t\tassertTrue(\"3.1\", !fileInFS.exists());\n \t\tIEclipsePreferences projectNode = (IEclipsePreferences) service.getRootNode().node(ProjectScope.SCOPE).node(project.getName());\n \t\ttry {\n \t\t\tassertTrue(\"3.2\", !projectNode.nodeExists(qualifier));\n \t\t} catch (BackingStoreException e) {\n \t\t\tfail(\"3.91\", e);\n \t\t}\n \t\t//\t\tassertNull(\"3.3\", projectNode.node(qualifier).get(oldKey, null));\n \n \t\t// create the file in the project and discover it via a refresh local\n \t\ttry {\n \t\t\toutput = new BufferedOutputStream(new FileOutputStream(fileInFS));\n \t\t} catch (FileNotFoundException e) {\n \t\t\tfail(\"4.90\", e);\n \t\t}\n \t\tinput = new BufferedInputStream(new ByteArrayInputStream(buffer));\n \t\ttransferData(input, output);\n \t\ttry {\n \t\t\tproject.refreshLocal(IResource.DEPTH_INFINITE, getMonitor());\n \t\t} catch (CoreException e) {\n \t\t\tfail(\"4.91\", e);\n \t\t}\n \t\t// ensure that the resource changes happen\n \t\twaitForBuild();\n \n \t\t// verification - note that the preference modify listener gets called\n \t\t// here so that's why we are checking for \"new value\" and not the original one\n \t\tnode = context.getNode(qualifier);\n \t\tassertEquals(\"5.0\", newValue, node.get(key, null));\n \t}", "@Before\n public void setUp() throws Exception {\n wordFrequency = new WordFrequency();\n bufferedReader = new BufferedReader(new FileReader(\"/home/anurag/Desktop/P2/src/test/com/stackroute/practice/FileDemo.txt\"));\n }", "public LoginController() {\n\t\treadFromFile();\n\t\t// TODO Auto-generated constructor stub\n\t}", "private void loadData() {\n\n \tInputStream inputStream = this.getClass().getResourceAsStream(propertyFilePath);\n \n //Read configuration.properties file\n try {\n //prop.load(new FileInputStream(propertyFilePath));\n \tprop.load(inputStream);\n //prop.load(this.getClass().getClassLoader().getResourceAsStream(\"configuration.properties\"));\n } catch (IOException e) {\n System.out.println(\"Configuration properties file cannot be found\");\n }\n \n //Get properties from configuration.properties\n browser = prop.getProperty(\"browser\");\n testsiteurl = prop.getProperty(\"testsiteurl\");\n defaultUserName = prop.getProperty(\"defaultUserName\");\n defaultPassword = prop.getProperty(\"defaultPassword\");\n }", "@Override\r\n\tpublic void load() {\n\t}", "interface ImportService {\n /**\n * Main import method.\n */\n void doImport();\n}" ]
[ "0.61100763", "0.57258344", "0.5714626", "0.5662041", "0.5662041", "0.5657207", "0.55299205", "0.5513641", "0.5495746", "0.5460986", "0.5446563", "0.5434829", "0.542749", "0.54219234", "0.54209346", "0.5409183", "0.538708", "0.5384553", "0.5356482", "0.5331675", "0.5328412", "0.53172404", "0.5312938", "0.5250438", "0.5250279", "0.5248451", "0.524391", "0.52425504", "0.5236376", "0.5235971", "0.52265275", "0.52253073", "0.5225214", "0.5222039", "0.5216609", "0.52142954", "0.52060676", "0.51895976", "0.5181462", "0.5170154", "0.5163672", "0.5157234", "0.514912", "0.514095", "0.5140509", "0.5125058", "0.51231694", "0.51197696", "0.5115918", "0.5108913", "0.5108541", "0.50935936", "0.50877506", "0.50868315", "0.50749147", "0.5067715", "0.50670123", "0.5066582", "0.5064302", "0.5057734", "0.5056307", "0.5053027", "0.5043347", "0.5043347", "0.50415", "0.50409824", "0.50287855", "0.5027068", "0.50264186", "0.50215566", "0.5010769", "0.50107044", "0.5010039", "0.50093925", "0.50077343", "0.5002812", "0.5002812", "0.5002812", "0.5000368", "0.49966437", "0.49966437", "0.49900055", "0.49862623", "0.49852243", "0.4984802", "0.49794716", "0.4968972", "0.4967347", "0.4962603", "0.49533346", "0.4951782", "0.49497357", "0.49458858", "0.4945479", "0.4941753", "0.49413374", "0.49396807", "0.49388272", "0.49361765", "0.49351126" ]
0.49585602
89
Registers the administratives that come from the file that is imported.
public void registerAdministrative(String[] fields) throws BadEntryException{ int id = Integer.parseInt(fields[1]); if(_persons.get(id) != null){ throw new BadEntryException(fields[0]); } Administrative _administrative = new Administrative(id, fields[2], fields[3]); _administratives.put(id, _administrative); _persons.put(id, (Person) _administrative); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void adminLoad() {\n try {\n File file = new File(adminPath);\n Scanner scanner = new Scanner(file);\n while (scanner.hasNextLine()){\n String data = scanner.nextLine();\n String[]userData = data.split(separator);\n AdminAccounts adminAccounts = new AdminAccounts();\n adminAccounts.setUsername(userData[0]);\n adminAccounts.setPassword(userData[1]);\n users.add(adminAccounts);\n }\n\n } catch (FileNotFoundException e) {\n e.printStackTrace();\n }\n }", "public static void registerISTERs() {\n\n\t}", "public static boolean iniAdmins() {\n if (applID == APPL_DRV) {\n return false;\n }\n Daten.admins = new Admins();\n try {\n // try to open admin file\n Daten.admins.open(false);\n } catch (Exception e) {\n if (!isGuiAppl()) {\n // if this is not a GUI appl, then stop here!\n Logger.log(Logger.ERROR, Logger.MSG_CORE_ADMINSFAILEDOPEN,\n LogString.fileOpenFailed(((DataFile) Daten.admins.data()).getFilename(),\n International.getString(\"Administratoren\")));\n haltProgram(HALT_ADMIN);\n }\n // check whether admin file exists, and only could not be opened\n boolean exists = true;\n try {\n exists = Daten.admins.data().existsStorageObject();\n } catch (Exception ee) {\n Logger.logdebug(ee);\n }\n if (exists) {\n // admin file exists, but could not be opened. we exit here.\n String msg = LogString.fileOpenFailed(((DataFile) Daten.admins.data()).getFilename(),\n International.getString(\"Administratoren\"));\n Logger.log(Logger.ERROR, Logger.MSG_CORE_ADMINSFAILEDOPEN, msg);\n if (isGuiAppl()) {\n Dialog.error(msg);\n }\n haltProgram(HALT_ADMIN);\n }\n // no admin file there, we need to create a new one\n if (Daten.efaSec.secFileExists() && Daten.efaSec.secValueValid()) {\n // ok, sec file is there: we're allowed to create a new one\n return true;\n } else {\n // no sec file there: exit and don't create new admin\n String msg = International.getString(\"Kein Admin gefunden.\") + \"\\n\"\n + International.getString(\"Aus Gründen der Sicherheit verweigert efa den Dienst. \"\n + \"Hilfe zum Reaktivieren von efa erhälst Du im Support-Forum.\");\n Logger.log(Logger.ERROR, Logger.MSG_CORE_ADMINSFAILEDNOSEC, msg);\n if (isGuiAppl()) {\n Dialog.error(msg);\n }\n haltProgram(HALT_EFASEC);\n }\n return false; // we never reach here, but just to be sure... ;-)\n }\n // we do have a admin file already that we can open. now check whether there's a super admin configured as well\n if (admins.getAdmin(Admins.SUPERADMIN) == null) {\n // we don't have a super admin yet\n if (Daten.efaSec.secFileExists() && Daten.efaSec.secValueValid()) {\n // ok, sec file is there: we're allowed to create a new one\n return true;\n }\n // no sec file there: exit and don't create new admin\n String msg = International.getString(\"Kein Admin gefunden.\") + \"\\n\"\n + International.getString(\"Aus Gründen der Sicherheit verweigert efa den Dienst. \"\n + \"Hilfe zum Reaktivieren von efa erhälst Du im Support-Forum.\");\n Logger.log(Logger.ERROR, Logger.MSG_CORE_ADMINSFAILEDNOSEC, msg);\n if (isGuiAppl()) {\n Dialog.error(msg);\n }\n haltProgram(HALT_EFASEC);\n return false; // we never reach here, but just to be sure... ;-)\n } else {\n // ok, we do have a super admin already\n return false;\n }\n }", "public void register() {\n\t\tPrettyEmailNotificator.templatePath = server.getServerRootPath()+ myPluginDescriptor.getPluginResourcesPath() + \"templates/\";\r\n\t\tPrettyEmailNotificator.attachmentPath = server.getServerRootPath()+ myPluginDescriptor.getPluginResourcesPath() + \"img/\";\r\n\t\t\r\n\t\ttry {\r\n\t\t\tinitVelocity();\r\n\t\t\tnotificatorRegistry.register(this);\r\n\t\t\tLoggers.SERVER.info(this.getClass().getSimpleName() + \" :: Registering\");\r\n\t\t} catch (Exception e) {\r\n\t\t\tLoggers.SERVER.error(this.getClass().getSimpleName() + \" :: \" + PrettyEmailNotificator.TYPE + \" was NOT successfully registered. See DEBUG for Stacktrace\");\r\n\t\t\tLoggers.SERVER.debug(e);\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\r\n\t}", "private void init() {\r\n\t\t// administration\r\n\t\taddPrivilege(CharsetAction.class, User.ROLE_ADMINISTRATOR);\r\n\t\taddPrivilege(LanguageAction.class, User.ROLE_ADMINISTRATOR);\r\n\t\t\r\n\t\t// dictionary management\r\n\t\taddPrivilege(AddApplicationAction.class, User.ROLE_APPLICATION_OWNER | User.ROLE_TRANSLATION_MANAGER);\r\n\t\taddPrivilege(AddDictLanguageAction.class, User.ROLE_APPLICATION_OWNER | User.ROLE_TRANSLATION_MANAGER);\r\n\t\taddPrivilege(AddLabelAction.class, User.ROLE_APPLICATION_OWNER);\r\n\t\taddPrivilege(ChangeApplicationVersionAction.class, User.ROLE_APPLICATION_OWNER | User.ROLE_TRANSLATION_MANAGER);\r\n\t\taddPrivilege(ChangeDictVersionAction.class, User.ROLE_APPLICATION_OWNER | User.ROLE_TRANSLATION_MANAGER);\r\n\t\taddPrivilege(CreateApplicationAction.class, User.ROLE_APPLICATION_OWNER | User.ROLE_TRANSLATION_MANAGER);\r\n\t\taddPrivilege(CreateApplicationBaseAction.class, User.ROLE_APPLICATION_OWNER | User.ROLE_TRANSLATION_MANAGER);\r\n\t\taddPrivilege(CreateOrAddApplicationAction.class, User.ROLE_APPLICATION_OWNER | User.ROLE_TRANSLATION_MANAGER);\r\n\t\taddPrivilege(CreateProductAction.class, User.ROLE_APPLICATION_OWNER | User.ROLE_TRANSLATION_MANAGER);\r\n\t\taddPrivilege(CreateProductReleaseAction.class, User.ROLE_APPLICATION_OWNER | User.ROLE_TRANSLATION_MANAGER);\r\n\t\taddPrivilege(DeleteLabelAction.class, User.ROLE_APPLICATION_OWNER);\r\n\t\taddPrivilege(DeliverAppDictAction.class, User.ROLE_APPLICATION_OWNER);\r\n\t\taddPrivilege(DeliverDictAction.class, User.ROLE_APPLICATION_OWNER);\r\n\t\taddPrivilege(DeliverUpdateDictAction.class, User.ROLE_APPLICATION_OWNER);\r\n\t\taddPrivilege(DeliverUpdateDictLanguageAction.class, User.ROLE_APPLICATION_OWNER);\r\n\t\taddPrivilege(DeliverUpdateLabelAction.class, User.ROLE_APPLICATION_OWNER);\r\n\t\taddPrivilege(RemoveApplicationAction.class, User.ROLE_APPLICATION_OWNER | User.ROLE_TRANSLATION_MANAGER);\r\n\t\taddPrivilege(RemoveApplicationBaseAction.class, User.ROLE_APPLICATION_OWNER | User.ROLE_TRANSLATION_MANAGER);\r\n\t\taddPrivilege(RemoveDictAction.class, User.ROLE_APPLICATION_OWNER);\r\n\t\taddPrivilege(RemoveDictLanguageAction.class, User.ROLE_APPLICATION_OWNER);\r\n\t\taddPrivilege(RemoveProductAction.class, User.ROLE_APPLICATION_OWNER | User.ROLE_TRANSLATION_MANAGER);\r\n\t\taddPrivilege(RemoveProductBaseAction.class, User.ROLE_APPLICATION_OWNER | User.ROLE_TRANSLATION_MANAGER);\r\n\t\taddPrivilege(UpdateDictAction.class, User.ROLE_APPLICATION_OWNER | User.ROLE_TRANSLATION_MANAGER);\r\n\t\taddPrivilege(UpdateDictLanguageAction.class, User.ROLE_APPLICATION_OWNER | User.ROLE_TRANSLATION_MANAGER);\r\n\t\taddPrivilege(UpdateLabelAction.class, User.ROLE_APPLICATION_OWNER | User.ROLE_TRANSLATION_MANAGER);\r\n\t\taddPrivilege(UpdateLabelStatusAction.class, User.ROLE_APPLICATION_OWNER | User.ROLE_TRANSLATION_MANAGER);\r\n\t\taddPrivilege(ImportTranslationDetailsAction.class, User.ROLE_APPLICATION_OWNER | User.ROLE_TRANSLATION_MANAGER);\r\n\r\n\t\taddPrivilege(UpdateLabelRefAndTranslationsAction.class, User.ROLE_APPLICATION_OWNER | User.ROLE_TRANSLATION_MANAGER);\r\n\t\taddPrivilege(GlossaryAction.class, User.ROLE_ADMINISTRATOR);\r\n\r\n\r\n\t\t// translation management\r\n\t\taddPrivilege(UpdateStatusAction.class, User.ROLE_APPLICATION_OWNER | User.ROLE_TRANSLATION_MANAGER);\r\n\t\taddPrivilege(UpdateTranslationAction.class, User.ROLE_APPLICATION_OWNER | User.ROLE_TRANSLATION_MANAGER);\r\n\t\t\r\n\t\t// task management\r\n\t\taddPrivilege(ApplyTaskAction.class, User.ROLE_TRANSLATION_MANAGER);\r\n\t\taddPrivilege(CloseTaskAction.class, User.ROLE_TRANSLATION_MANAGER);\r\n\t\taddPrivilege(CreateTaskAction.class, User.ROLE_TRANSLATION_MANAGER);\r\n\t\taddPrivilege(ReceiveTaskFilesAction.class, User.ROLE_TRANSLATION_MANAGER);\r\n\t}", "public static void viewLoadLandRegistryFromBackUp() {\n\t\tArrayList<Property> prop_list = rc.loadFromFile(PROPERTIES_FILE);\r\n\t\tArrayList<Registrant> reg_list = rc.loadFromFile(REGISTRANTS_FILE);\r\n\t}", "@Override\n\tpublic void onEnable()\n\t{\n\t\tloggerPrefix = String.format(\"[InvReg %s]\", this.getDescription().getVersion());\n\t\tlogger().info(\"Enabled!\");\n\t\tsupportHandler = new SupportHandler(this);\n\t\tgetServer().getPluginManager().registerEvents(this.supportHandler, this);\n\n\t\t// Plugin support loading\n\t\tloadWorldGuardSupport();\n\t\tloadFactionSupport();\n\t\tloadGriefPrevention();\n\t\tloadForgeSupport();\n\t\tsupportHandler.load();\n\n\t\t// Config handling\n\t\tFile configFile = new File(References.CONFIG);\n\t\tYamlConfiguration config = null;\n\t\tif (configFile.exists())\n\t\t{\n\t\t\tconfig = YamlConfiguration.loadConfiguration(configFile);\n\t\t\tsupportHandler.loadConfig(config);\n\t\t}\n\t\telse\n\t\t{\n\t\t\tconfig = new YamlConfiguration();\n\t\t\tsupportHandler.createConfig(config);\n\t\t\ttry\n\t\t\t{\n\t\t\t\tconfig.save(configFile);\n\t\t\t}\n\t\t\tcatch (IOException e)\n\t\t\t{\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\t}", "public static void init()\n\t{\n\t\tusername2accesses.clear();\n\t\t//--- adds info.json in ./Home/Administrator for the system admin ---//\n\t\tfinal String adminAccessPath = Hierarchies.getSectionDir() + \"/\" + Hierarchies.getInfoFileName() + \".\" + Directories.getFileExt();\n\t\tfinal File adminAccessFile = new File(adminAccessPath);\n\t\tif (!adminAccessFile.exists())\n\t\t{\n\t\t\tfinal Access[] accesses = new Access[1];\n\t\t\taccesses[0] = new Access(\"admin\", Role.ADMINISTRATOR, null);\n\t\t\tfinal HierarchyItem hierarchyItem = new HierarchyItem(null, null, null, accesses);\n\t\t\tfinal String hierarchyItemAsJson = new Gson().toJson(hierarchyItem);\n\t\t\tFileIO.writeToFile(adminAccessPath, hierarchyItemAsJson);\n\t\t}\n\t\t//--- reads all JSON files recursively in ./Home/Administrator ---//\n\t\t//--- contents of JSON files will be processed to be cached in hash map username2accesses ---//\n\t\tfinal File file = new File(Hierarchies.getSectionDir());\n\t\tfinal Collection<File> jsonFiles = FileUtils.listFiles(file, new String[]{Directories.getFileExt()}, true);\n\t\tfor (File infoFile : jsonFiles) manage(infoFile, Op.STORE);\n\t}", "public void premutoRegistrati()\n\t{\n\t\tnew _FINITO_funzione_registrazioneGUI();\n\t}", "@Override\n\tpublic void registrarLlegada() {\n\t\t\n\t}", "private void loadRegistratedResources() {\n \t\tFile kbPluginLocation = KbPlugin.getDefault().getLocation();\r\n \t\tif(kbPluginLocation!=null) {\r\n \t IExtensionRegistry registry = Platform.getExtensionRegistry();\r\n \t\t\tIExtensionPoint extensionPoint = registry.getExtensionPoint(\"org.jboss.tools.common.kb.tldResource\");\r\n \t\t\tIExtension[] extensions = extensionPoint.getExtensions();\r\n \t\t\tfor (int i=0; i<extensions.length; i++) {\r\n \t\t\t\tIExtension extension = extensions[i];\r\n \t\t\t\tIConfigurationElement[] elements = extension.getConfigurationElements();\r\n \t\t\t\tfor(int j=0; j<elements.length; j++) {\r\n \t\t\t\t\tString uri = elements[j].getAttribute(\"uri\");\r\n \t\t\t\t\tString location = elements[j].getAttribute(\"schema-location\");\r\n \t\t\t\t\tString version = elements[j].getAttribute(\"version\");\r\n \t\t\t\t\tString jsf = elements[j].getAttribute(\"jsf\");\r\n \t\t\t\t\tif(uri==null || uri.length()==0 || location==null || location.length()==0) {\r\n \t\t\t\t\t\tcontinue;\r\n \t\t\t\t\t}\r\n \t\t\t\t\tFile shemaLocation = new File(kbPluginLocation, location);\r\n \t\t\t\t\tif(shemaLocation.isFile()) {\r\n \t\t\t\t\t\tKbTldResource resource = new KbTldResource(uri, null, null, null);\r\n \t\t\t\t\t\tresource.setSchemaLocation(shemaLocation);\r\n \t\t\t\t\t\tif(version!=null && version.length()>0) {\r\n \t\t\t\t\t\t\tresource.setVersion(version);\r\n \t\t\t\t\t\t}\r\n \t\t\t\t\t\tresource.setCustomTld(false);\r\n \t\t\t\t\t\tresource.setJsfResource(\"true\".equals(jsf));\r\n \t\t\t\t\t\tregistratedResources.put(resource, resource);\r\n \t\t\t\t\t} else {\r\n \t\t\t\t\t\tString message = \"Can't load KB schema: \" + shemaLocation;\r\n \t\t\t\t\t\tKbPlugin.getDefault().getLog().log(new Status(IStatus.WARNING, KbPlugin.PLUGIN_ID, IStatus.WARNING, message, null));\r\n \t\t\t\t\t}\r\n \t\t\t\t}\r\n \t\t\t}\r\n \t\t}\r\n \r\n \t\t// Get custom schemas.\r\n \t\tFile schemaFolder = new File(schemaLocation); \r\n \t\tif(!schemaFolder.exists()) {\r\n \t\t\treturn;\r\n \t\t}\r\n \t\tFile[] schemas = schemaFolder.listFiles(new FileFilter(){\r\n \t\t\tpublic boolean accept(File file) {\r\n \t\t\t\tif(file.isFile()) {\r\n \t\t\t\t\treturn true;\r\n \t\t\t\t}\r\n \t\t\t\treturn false;\r\n \t\t\t}\r\n \t\t});\r\n \r\n \t\tfor(int i=0; i<schemas.length; i++) {\r\n \t\t\tDocument document = null;\r\n \t\t\ttry {\r\n \t\t\t\tdocument = KbDocumentBuilderFactory.createDocumentBuilder(false).parse(schemas[i]);\r\n \t\t\t} catch (Exception e) {\r\n \t\t\t\tKbPlugin.getDefault().getLog().log(new Status(IStatus.ERROR, KbPlugin.PLUGIN_ID, IStatus.OK, \"Can't parse Schema (location: \" + schemas[i] + \")\", e));\r\n \t\t\t\tcontinue;\r\n \t\t\t}\r\n //\t\t\tString tldLocation = schemas[i].getAbsolutePath();\r\n \t\t\tString tldLocation = document.getDocumentElement().getAttribute(SchemaNodeFactory.LOCATION_ATTRIBUTE);\r\n \t\t\tString tldUri = document.getDocumentElement().getAttribute(SchemaNodeFactory.URI_ATTRIBUTE);\r\n \t\t\tString tldVersion = document.getDocumentElement().getAttribute(SchemaNodeFactory.VERSION_ATTRIBUTE);\r\n \t\t\tString jsf = document.getDocumentElement().getAttribute(SchemaNodeFactory.JSF_ATTRIBUTE);\r\n \t\t\tString tldContent = null; \r\n \t\t\tNodeList children = document.getDocumentElement().getChildNodes();\r\n \t\t\tfor(int j=0; j<children.getLength(); j++) {\r\n \t\t\t\tNode node = children.item(j);\r\n \t\t\t\tif(node.getNodeName().equals(SchemaNodeFactory.TLD_CONTENT_NODE)) {\r\n \t\t\t\t\tNode child = node.getFirstChild();\r\n \t\t\t\t\tif(child instanceof CDATASection) {\r\n \t\t\t\t\t\ttldContent = ((CDATASection)child).getData();\r\n \t\t\t\t\t}\r\n \t\t\t\t\tbreak;\r\n \t\t\t\t}\r\n \t\t\t}\r\n \t\t\tKbTldResource resource = new KbTldResource(tldUri, tldLocation, null, tldVersion);\r\n \t\t\tresource.setTldContent(tldContent);\r\n \t\t\tresource.setSchemaLocation(schemas[i]);\r\n \t\t\tresource.setCustomTld(true);\r\n \t\t\tresource.setJsfResource(\"true\".equals(jsf));\r\n \t\t\tregistratedResources.put(resource, resource);\r\n \t\t}\r\n \t}", "@Override\n\tpublic void registrarLlegada() {\n\t}", "public void importer() {\n\t\tString[] champs = {\n\t\t\t\"numero_edition\", \n\t\t\t\"libelle_edition\"\n\t\t};\n\t\t\n\t\tExploitation bdd = new Exploitation();\n\t\tbdd.chargerPilote();\n\t\tbdd.connexion();\n\t\tString[][] req = bdd.lister(champs, \"edition\");\n\n\t\tfor(int i=0; i<req.length; i++) {\n\t\t\tEdition e = new Edition(Integer.parseInt(req[i][0]), req[i][1]);\n\t\t\tthis.lesEditions.add(e);\n\t\t}\n\t\tbdd.deconnexion();\n\t}", "public static void registerDungeons()\r\n {\r\n if (!isLoaded || isLegacy)\r\n {\r\n return;// I supported this mod in older versions\r\n }\r\n\r\n try\r\n {\r\n Method addDungeonMob = Class.forName(\"com.evilnotch.dungeontweeks.main.world.worldgen.mobs.DungeonMobs\").getMethod(\"addDungeonMob\", ResourceLocation.class, ResourceLocation.class,\r\n int.class);\r\n for (AS_WorldGenTower.TowerTypes tower : AS_WorldGenTower.TowerTypes.values())\r\n {\r\n boolean nether = tower == TowerTypes.Netherrack;\r\n addDungeonMob.invoke(null, tower.getId(), new ResourceLocation(\"cave_spider\"), 100);\r\n addDungeonMob.invoke(null, tower.getId(), new ResourceLocation(\"spider\"), 90);\r\n addDungeonMob.invoke(null, tower.getId(), nether ? new ResourceLocation(\"wither_skeleton\") : new ResourceLocation(\"skeleton\"), 120);\r\n addDungeonMob.invoke(null, tower.getId(), new ResourceLocation(\"zombie\"), 120);\r\n\r\n if (nether)\r\n {\r\n addDungeonMob.invoke(null, tower.getId(), new ResourceLocation(\"blaze\"), 20);\r\n }\r\n }\r\n }\r\n catch (Exception e)\r\n {\r\n e.printStackTrace();\r\n }\r\n }", "public static void loadAnalyzerContributions() {\n\t\tIExtensionRegistry registry = Platform.getExtensionRegistry();\n\t\tIConfigurationElement[] config = registry.getConfigurationElementsFor(Activator.PLUGIN_ANALYZER_EXTENSION_ID);\n\t\ttry {\n\t\t\tfor (IConfigurationElement element : config) {\n\t\t\t\tfinal Object o = element.createExecutableExtension(\"class\");\n\t\t\t\tif (o instanceof Analyzer) {\n\t\t\t\t\tAnalyzer analyzer = (Analyzer) o;\n\t\t\t\t\tregisterAnalyzer(analyzer);\n\t\t\t\t}\n\t\t\t}\n\t\t} catch (CoreException e) {\n\t\t\tLog.error(\"Error loading analyzers.\", e);\n\t\t}\n\t}", "public void loadPluginsStartup();", "public List<Admin> importAdmin(String filename) throws FileNotFoundException {\n List<Admin> admins = new ArrayList<>();\n FileReader fileReader = new FileReader(DATA_PATH + filename);\n Scanner scanner = new Scanner(fileReader);\n //skip first line\n String firstLine = scanner.nextLine();\n Log.i(\"first line: \" + firstLine);\n\n while (scanner.hasNextLine()) {\n String[] s = scanner.nextLine().split(\",\");\n String adminName = s[0];\n Admin admin = new Admin(-1, adminName);\n admins.add(admin);\n }\n\n scanner.close();\n return admins;\n }", "protected void __register()\n {\n }", "protected void __register()\n {\n }", "public void addAdmin(Administrator administrator){\n administratorMyArray.add(administrator);\n }", "static void register() {\n }", "private void AddMetaRegistrationInformation(Registration reg) {\n }", "Registries createExtension();", "public static void registerModules()\n {\n // Mystcraft is pushed in through the backdoor so it can't be disabled.\n moduleLoader.registerUncheckedModule(Mystcraft.class);\n\n // Register the remaining plugin classes normally\n moduleLoader.registerModule(AppEng.class);\n moduleLoader.registerModule(BuildcraftTransport.class);\n moduleLoader.registerModule(IC2.class);\n moduleLoader.registerModule(Thaumcraft.class);\n moduleLoader.registerModule(NotEnoughItems.class);\n moduleLoader.registerModule(Waila.class);\n moduleLoader.registerModule(ThermalExpansion.class);\n }", "private void init(){\n //Get instance of Members to access Members Lists\n Members members = Members.getInstance();\n \n //add to patient members list\n members.getPatients().addMember(this);\n }", "public static void register() {\n Registry.register(Registry.BLOCK, new Identifier(\"cultivation\", \"sieve_block\"), SIEVE_BLOCK);\n Registry.register(Registry.ITEM, new Identifier(\"cultivation\", \"sieve_block\"), new BlockItem(SIEVE_BLOCK, new Item.Settings().group(Cultivation.GROUP)));\n Registry.register(Registry.BLOCK, new Identifier(\"cultivation\", \"pod_shell\"), POD_SHELL);\n }", "public static void enableRegNotifications() {\n\t\t\n\t}", "public void register()\n {\n menu.registerDisplay();\n chooseRole();\n }", "private void registerActions() {\n // File menu :\n new NewAction();\n new LoadOIFitsAction();\n new LoadFitsImageAction();\n\n new ExportOIFitsAction();\n new ExportFitsImageAction();\n\n // Edit menu :\n new DeleteSelectionAction();\n\n // Processing menu :\n new RunAction();\n new ResampleImageAction();\n\n // Interop menu :\n // Send OIFits (SAMP) :\n new SendOIFitsAction();\n // Send Fits (SAMP) :\n new SendFitsAction();\n }", "public synchronized void loadCollaborators() {\n Path collaboratorsPath = this.uri.getPath().resolve(\"collaborators.txt\");\n try {\n this.collaborators = Files.readAllLines(collaboratorsPath, StandardCharsets.UTF_8).stream()\n .map(c -> State.getInstance().getUserOrNull(c))\n .collect(Collectors.toSet());\n System.out.println(this.uri + \" can be accessed by \" + this.collaborators);\n for (User collaborator : collaborators) {\n collaborator.queueInvite(new Invite(this, collaborator));\n }\n } catch (NoSuchFileException e) {\n try {\n Files.createFile(collaboratorsPath);\n } catch (IOException ex) {\n ex.printStackTrace();\n }\n } catch (IOException e) {\n e.printStackTrace();\n }\n }", "private void getAgentTypesFromFile(){\n \t\tagentTypes= agentTypesProvider.GetAgentTypes();\n \t}", "private void initExternalSystemsAvailable() {\n externalSystemsAvailable.add(\"Accounting system\");\n externalSystemsAvailable.add(\"Tax system\");\n }", "public void importaRegole(String file, ArrayList<Sensore> listaSensori, ArrayList<Attuatore> listaAttuatori) {\n ArrayList<String> nomiDispPres = new ArrayList<>();\n\n for (Sensore s : listaSensori) {\n nomiDispPres.add(s.getNome());\n }\n\n for (Attuatore att : listaAttuatori) {\n nomiDispPres.add(att.getNome());\n }\n\n String regoleImport = readFromFile(file);\n\n if (regoleImport.equals(\"\")) {\n System.out.println(\"XX Errore di lettura file. Non sono state inserite regole per l'unita immobiliare XX\\n\");\n return;\n }\n\n String[] regole = regoleImport.split(\"\\n\");\n\n for (String r : regole) {\n try {\n ArrayList<String> dispTrovati = verificaCompRegola(r);\n\n for (String nomeDis : dispTrovati) {\n if (nomeDis.contains(\".\")){\n String nomeS = nomeDis.split(\"\\\\.\")[0];\n\n if (!nomiDispPres.contains(nomeS)) {\n throw new Exception(\"XX Dispositivi Incompatibili all'interno della regola XX\\n\");\n }\n\n Sensore s = listaSensori.stream().filter(sensore -> sensore.getNome().equals(nomeS)).iterator().next();\n String nomeInfo = nomeDis.split(\"\\\\.\")[1];\n\n if (s.getInformazione(nomeInfo) == null)\n throw new Exception(\"XX Regola non compatibile XX\\n\");\n\n\n } else if (!nomiDispPres.contains(nomeDis)) {\n throw new Exception(\"XX Dispositivi Incompatibili all'interno della regola XX\\n\");\n\n }\n }\n System.out.println(\"*** Importazione della regola avvenuta con successo ***\\n\");\n writeRuleToFile(r, true);\n\n } catch (Exception e) {\n System.out.println(e.getMessage());\n }\n\n }\n eliminaDoppie(listaSensori,listaAttuatori);\n }", "public static void registerExternal(External hooks) { external = hooks; }", "public void addCustExt() {\n String toAdd = customExt.getText();\n String[] extensions = toAdd.split(\",\");\n ExtensionsAdder.addExtensions(extensions);\n }", "private void registerReference(final Resource referencer,\n \t\t\tfinal Resource referenced) {\n \n \t\tif ((referencer != null) && (referenced != null)\n \t\t\t&& (referencer != referenced)) {\n \n \t\t\tMap importsMap = getImportsMap(referencer);\n \n \t\t\tif (importsMap == null) {\n \t\t\t\timportsMap = new HashMap();\n \t\t\t\timports.put(referencer, importsMap);\n \t\t\t}\n \n \t\t\tInteger importsCount = (Integer) importsMap.get(referenced);\n \n \t\t\tif (importsCount == null) {\n \n \t\t\t\tdomain.sendNotification(new NotificationImpl(\n \t\t\t\t\tEventTypes.IMPORT, (Object) null, referenced, -1) {\n \n \t\t\t\t\tpublic Object getNotifier() {\n \t\t\t\t\t\treturn referencer;\n \t\t\t\t\t}\n \t\t\t\t});\n \n \t\t\t\timportsCount = new Integer(1);\n \n \t\t\t} else {\n \t\t\t\timportsCount = new Integer(importsCount.intValue() + 1);\n \t\t\t}\n \n \t\t\timportsMap.put(referenced, importsCount);\n \n \t\t\tMap exportsMap = getExportsMap(referenced);\n \n \t\t\tif (exportsMap == null) {\n \t\t\t\texportsMap = new HashMap();\n \t\t\t\texports.put(referenced, exportsMap);\n \t\t\t}\n \n \t\t\tInteger exportsCount = (Integer) exportsMap.get(referencer);\n \n \t\t\tif (exportsCount == null) {\n \n \t\t\t\tdomain.sendNotification(new NotificationImpl(\n \t\t\t\t\tEventTypes.EXPORT, (Object) null, referencer, -1) {\n \n \t\t\t\t\tpublic Object getNotifier() {\n \t\t\t\t\t\treturn referenced;\n \t\t\t\t\t}\n \t\t\t\t});\n \n \t\t\t\texportsCount = new Integer(1);\n \n \t\t\t} else {\n \t\t\t\texportsCount = new Integer(exportsCount.intValue() + 1);\n \t\t\t}\n \n \t\t\texportsMap.put(referencer, exportsCount);\n \t\t}\n \t}", "public void addAdmin(Admin admin);", "public void onEnable() {\n PluginDescriptionFile pdfFile = this.getDescription();\n\n // Setup permissions\n Plugin permissionsPlugin = this.getServer().getPluginManager().getPlugin(\"Permissions\");\n\n if (permissionsPlugin == null) {\n log.info(\"[\" + pdfFile.getName() + \"] Permission system not detected, defaulting to all users\");\n usePermissions = false;\n } else {\n log.info(\"[\" + pdfFile.getName() + \"] Permission system detected\");\n usePermissions = true;\n this.permissionHandler = ((Permissions) permissionsPlugin).getHandler();\n }\n\n // Register commands\n getCommand(\"tradewolf\").setExecutor(new TradeWolfCommand(this));\n\n // Output to console that plugin is enabled\n log.info(pdfFile.getName() + \" version \" + pdfFile.getVersion() + \" enabled!\");\n }", "protected void addEntries() {\r\n\t\t// default is to do nothing;\r\n\t}", "private void charge_up() throws GB_Exception {\n try{\n if(PersonalDataController.getInstance().existRegistry(username)){\n putPersonalInformation();\n }else{\n putDefaultInformation();\n }\n } catch (SQLException | IOException ex) {\n LOG.error(ex);\n throw new GB_Exception(\"Error al carga informacion de usuario. Comuniquese con su administrador.\");\n }\n }", "@BeforeTest\n\tpublic void loadLocatorsFile() {\n\t\tlog = Logger.getLogger(HeroImageProducttestscripts.class);\n\t\tLogReport.getlogger();\n\t\tlogger = extent.startTest(\"HomepageRedirection\");\n\t\tlocator = ReadPropertiesFile.loadProperty(FilePath.LOCATOR_FILE);\n\t\tvalidate = ReadPropertiesFile.loadProperty(FilePath.VALIDATION_FILE);\n\t\tlog.info(\"Files has been loaded\");\n\t}", "private static void findAdministrators(Robot robot, JsonNode robotNode) {\n List<String> administrators = new ArrayList<String>();\n robot.getAdministrators().clear();\n for (JsonNode node : robotNode.get(\"administrators\")) {\n administrators.add(node.asText());\n }\n for (RosterEntry entry : robot.getRosters()) {\n if (administrators.contains(entry.getUser())) {\n robot.getAdministrators().add(entry);\n }\n }\n robot.setAdministratorIds(administrators);\n }", "public void register(){\n }", "protected abstract void registerSuperTypes();", "public adminUsuarios() {\n initComponents();\n showUsuarios();\n }", "private void registToWX() {\n }", "public void registerComponents() \r\n {\r\n grantsByPIForm.jbnRunButton.addActionListener(this);\r\n grantsByPIForm.jbnCloseButton.addActionListener(this);\r\n \r\n }", "public void addCustomFileImporter(FileImporter importer) {\n\t\tif (importer == null)\n\t\t\tthrow new NullPointerException(\"importer\");\n\t\tif (!_customFileImporters.contains(importer))\n\t\t\t_customFileImporters.add(importer);\n\n\t}", "private void registerAll(final Path start) throws IOException {\n\t\t// register directory and sub-directories\n\t\tFiles.walkFileTree(start, new SimpleFileVisitor<Path>() {\n\t\t\t@Override\n\t\t\tpublic FileVisitResult preVisitDirectory(Path dir, BasicFileAttributes attrs) throws IOException {\n\t\t\t\tregister(dir);\n\t\t\t\treturn FileVisitResult.CONTINUE;\n\t\t\t}\n\t\t});\n\t}", "public Admin()\n {\n File f1 = new File(\"adm1.txt\");//checking whether file exists or not\n\t\tif(f1.exists())\n\t\t{\n try{\n \tadd_admin(\"1\", \"1\", \"1\", \"CO1\", 123, \"878451\",true,\"1\", \"1\");\n \tFileInputStream file = new FileInputStream(f1);\n BufferedInputStream b=new BufferedInputStream(file);\n b.mark(0);\n b.reset();\n ObjectInputStream obj = new ObjectInputStream(b);\n \n Admin e=null;\n e=(Admin) obj.readObject();//reading object from the file \n adm_list.insert(e);//inserting in the current linked list and appending the data in the file\n \n if(file.markSupported())//marking the pointer in the file to start the traversal\n file.reset();\n obj.close();//closing the streams\n file.close(); \n }\n catch(Exception e)//catching exceptions\n {\n \n }\n \n\t\t} \n }", "public static void setupModules(){\n\t\tStart.setupModules();\n\t\t//add\n\t\t//e.g.: special custom scripts, workers, etc.\n\t}", "private void addAllowedCheats() {\r\n\t\tresourcesForCheat = new Vector<String>();\r\n\t\tresourcesForCheat.add(\"wool\"); //$NON-NLS-1$\r\n\t\tresourcesForCheat.add(\"brick\"); //$NON-NLS-1$\r\n\t\tresourcesForCheat.add(\"grain\"); //$NON-NLS-1$\r\n\t\tresourcesForCheat.add(\"ore\"); //$NON-NLS-1$\r\n\t\tresourcesForCheat.add(\"lumber\"); //$NON-NLS-1$\r\n\t\tresourcesForCheat.add(\"all\");\t //$NON-NLS-1$\r\n\t}", "public void registerExcluded(List<String> excludedFiles) {\n excluded.addAll(excludedFiles);\n }", "public static void viewListOfRegistrants() {\n\t\tArrayList<Registrant> list_reg = getRegControl().listOfRegistrants();\r\n\t\tif (list_reg.size() == 0) {\r\n\t\t\tSystem.out.println(\"No Registrants loaded yet\\n\");\r\n\t\t} else {\r\n\t\t\tSystem.out.println(\"List of registrants:\\n\");\r\n\t\t\tfor (Registrant registrant : list_reg) {\r\n\t\t\t\tSystem.out.println(registrant.toString());\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public void loadGifts() {\n this.giftRegistry.clear();\n this.playerRegistry.clear();\n this.pairedPlayers.clear();\n this.givenEmpty.clear();\n\n // Fetching loaders from Gifts directory\n IOLoader<SecretSanta> defaultGifts = new IOLoader<SecretSanta>(SecretSanta._this(), \"ExampleGift.yml\", \"Gifts\");\n defaultGifts = new IOLoader<SecretSanta>(SecretSanta._this(), \"ExampleGift.yml\", \"Gifts\");\n List<File> giftFiles = IOHandler.getAllFiles(defaultGifts.getFile().getParent());\n List<IOLoader<SecretSanta>> giftLoaders = IOHandler.getSaveLoad(SecretSanta._this(), giftFiles, \"Gifts\");\n\n for(IOLoader<SecretSanta> s1 : giftLoaders) {\n for(String name : s1.getCustomConfig().getConfigurationSection(\"\").getKeys(false)) {\n try {\n SantaConfig sc = new SantaConfig(name, s1.getFile(), s1.getCustomConfig());\n\n // Fetching owner of box by UUID\n String owner = s1.getCustomConfig().getString(name + \".Owner\");\n owner = s1.getCustomConfig().getString(name + \".BoxOwner\", owner);\n\n GiftBox box = new GiftBox(sc);\n this.giftRegistry.put(UUID.fromString(owner), box);\n\n } catch(Exception ex) {\n ex.printStackTrace();\n }\n }\n }\n\n //SecretSanta._this().logDebug(\"[GiftManager] Gift data load complete.\");\n\n IOLoader<SecretSanta> playerLoader = new IOLoader<SecretSanta>(SecretSanta._this(), \"PlayerRegistry.yml\", \"Data\");\n SantaConfig pConfig = new SantaConfig(\"PlayerRegistry\", playerLoader.getFile(), playerLoader.getCustomConfig());\n registerPlayers(pConfig);\n //SecretSanta._this().logDebug(\"[GiftManager] Player Registry load complete.\");\n\n IOLoader<SecretSanta> pairLoader = new IOLoader<SecretSanta>(SecretSanta._this(), \"PairedRegistry.yml\", \"Data\");\n SantaConfig pairConfig = new SantaConfig(\"PairedRegistry\", pairLoader.getFile(), pairLoader.getCustomConfig());\n registerPairs(pairConfig);\n //SecretSanta._this().logDebug(\"[GiftManager] Paired Registry load complete.\");\n\n IOLoader<SecretSanta> givenLoader = new IOLoader<SecretSanta>(SecretSanta._this(), \"GivenEmptyRegistry.yml\", \"Data\");\n SantaConfig givenConfig = new SantaConfig(\"GivenEmptyRegistry\", givenLoader.getFile(), givenLoader.getCustomConfig());\n registerGiven(givenConfig);\n\n SecretSanta._this().logDebug(\"[GiftManager] SecretSanta Data loading complete.\");\n }", "public void register (java.lang.String userClass, java.lang.String udtClass) { throw new RuntimeException(); }", "public LoadTestAdministrationsImpl getLoadTestAdministrations() {\n return this.loadTestAdministrations;\n }", "private void loadAlarms() {\n\n try {\n if (!Files.exists(Paths.get(alarmsFile))) {\n\n System.out.println(\"Alarms file not found attemping to create default\");\n Files.createFile(Paths.get(alarmsFile));\n\n } else {\n List<String> fileLines = Files.readAllLines(Paths.get(alarmsFile));\n\n for (int i = 0; i < fileLines.size() - 1; i += 4) {\n int hour = Integer.parseInt(fileLines.get(i));\n int minute = Integer.parseInt(fileLines.get(i + 1));\n int period = Integer.parseInt(fileLines.get(i + 2));\n String name = fileLines.get(i + 3);\n\n System.out.println(\"Adding new alarm from file. \" + name);\n addEntry(hour, minute, period, name);\n }\n }\n } catch (UnsupportedEncodingException ex) {\n Logger.getLogger(AlarmsEditPanel.class.getName()).log(Level.SEVERE, null, ex);\n } catch (FileNotFoundException ex) {\n Logger.getLogger(AlarmsEditPanel.class.getName()).log(Level.SEVERE, null, ex);\n } catch (IOException ex) {\n Logger.getLogger(AlarmsEditPanel.class.getName()).log(Level.SEVERE, null, ex);\n }\n }", "InstallerRegistry() {\n this.lookup = Lookups.forPath(INSTALLER_REGISTRY_FOLDER);\n this.platformInstalls = null;\n }", "public void includeAction(){\n actions.showActions();\n }", "public AggregatorsResource() {\n ConfigSingleton.setRepoxContextUtil(new DefaultRepoxContextUtil());\n dataManager = ((DefaultDataManager)ConfigSingleton.getRepoxContextUtil().getRepoxManager().getDataManager());\n }", "private void addApplicationsPermissionsToRegistry() throws APIManagementException {\n Registry tenantGovReg = getRegistry();\n String permissionResourcePath = CarbonConstants.UI_PERMISSION_NAME + RegistryConstants.PATH_SEPARATOR + APPLICATION_ROOT_PERMISSION;\n try {\n if (!tenantGovReg.resourceExists(permissionResourcePath)) {\n String loggedInUser = CarbonContext.getThreadLocalCarbonContext().getUsername();\n UserRealm realm = (UserRealm) CarbonContext.getThreadLocalCarbonContext().getUserRealm();\n // Logged in user is not authorized to create the permission.\n // Temporarily change the user to the admin for creating the permission\n PrivilegedCarbonContext.getThreadLocalCarbonContext().setUsername(realm.getRealmConfiguration().getAdminUserName());\n tenantGovReg = CarbonContext.getThreadLocalCarbonContext().getRegistry(RegistryType.USER_GOVERNANCE);\n Collection appRootNode = tenantGovReg.newCollection();\n appRootNode.setProperty(\"name\", \"Applications\");\n tenantGovReg.put(permissionResourcePath, appRootNode);\n PrivilegedCarbonContext.getThreadLocalCarbonContext().setUsername(loggedInUser);\n }\n } catch (org.wso2.carbon.user.core.UserStoreException e) {\n throw new APIManagementException(\"Error while reading user store information.\", e);\n } catch (org.wso2.carbon.registry.api.RegistryException e) {\n throw new APIManagementException(\"Error while creating new permission in registry\", e);\n }\n }", "public void setupImport() {\r\n\t\tmnuImport.addActionListener(new ActionListener() {\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\r\n\t\t\t\tnew ImportGUI();\r\n\t\t\t}\r\n\t\t});\r\n\t}", "private void registerEvents(){\n Bukkit.getPluginManager().registerEvents(new RegionListener(), this);\n Bukkit.getPluginManager().registerEvents(new SignListener(), this);\n Bukkit.getPluginManager().registerEvents(new PrisonerListener(), this);\n Bukkit.getPluginManager().registerEvents(new PrisonBlockListener(), this);\n Bukkit.getPluginManager().registerEvents(new MonitorListener(), this);\n Bukkit.getPluginManager().registerEvents(new PortalListener(), this);\n }", "public static void register() {\n // Registers the GUI Handler\n NetworkRegistry.instance().registerGuiHandler(Dendritis.instance, GUIHandler.instance());\n \n OreDictionaryRegistry.oreDictionary();\n BlockRegistry.registerBlocks();\n WorldRegistry.registerWorld();\n RecipeHandler.init();\n }", "public void registerSalvageables(List<Salvageable> salvageables);", "void loadOwners() {\n synchronized (getLockObject()) {\n mOwners.load();\n setDeviceOwnershipSystemPropertyLocked();\n if (mOwners.hasDeviceOwner()) {\n setGlobalSettingDeviceOwnerType(\n mOwners.getDeviceOwnerType(mOwners.getDeviceOwnerPackageName()));\n }\n }\n }", "private void loadRegistredCommands() {\n ServiceLoader<Command> loader = ServiceLoader.load(Command.class);\n for (Command command : loader) {\n addCommand(command);\n }\n }", "public String[] addAdmin(Session session) throws RemoteException {\n\t\tSystem.out.println(\"Server model invokes addAdmin() method\");\n\t\treturn null;\n\t}", "public void ventilationServices() {\n\t\tSystem.out.println(\"FH----overridden method from hospital management--parent class of fortis hospital\");\n\t}", "public void reload(){\n\t\tplugin_configuration.load();\n\t\tflarf_configuration.load();\n\t\tmessages_configuration.load();\n\t\tstadiumlisting.load();\n\t}", "public AdministrarUsuarios() {\n initComponents();\n modelo = (DefaultTableModel) tablaUsuarios.getModel();\n tablaUsuarios.getTableHeader().setReorderingAllowed(false);\n tablaUsuarios.getTableHeader().setDefaultRenderer(new Facturar.HeaderColor());\n \n manejador.CargarUsuarios();\n listaTotalUsuarios = manejador.ObtenerListaUsuarios();\n cargarUsuariosEnTabla(listaTotalUsuarios);\n ocultarColumnaID();\n }", "private void initAccess() {\n\t\tif (!Users.doesCurrentUserHaveAccess(Users.ACCESS_CLASS_BEGINNING_DATA_ENTRY) &&\n\t\t\t\t!this.getParentEditor().getNewRecord() &&\n\t\t\t\t!referenceNewPatron) {\n\t\t\treadOnly = true;\n\t\t\tsetFormToReadOnly();\n\t\t\t//research purpose\n\t\t\taddResearchPurpose.setEnabled(false);\n\t\t\tremoveResearchPurpose.setEnabled(false);\n\t\t\t//subject buttons\n\t\t\taddSubject.setEnabled(false);\n\t\t\tremoveSubject.setEnabled(false);\n\t\t\t//name buttons\n\t\t\taddName.setEnabled(false);\n\t\t\tremoveName.setEnabled(false);\n\t\t\teditNameRelationshipButton.setEnabled(false);\n // resource button\n addResourceButton.setEnabled(false);\n removeResourceButton.setEnabled(false);\n\t\t}\n\t}", "private void importActors(JTFFile file) {\n for (Person actor : file.getActors()) {\n actor.setNote(daoNotes.getNote(NoteType.getEnum(actor.getTemporaryContext().getIntNote())));\n actor.setTheCountry(DataUtils.getDataByTemporaryId(\n actor.getTemporaryContext().getCountry(), file.getCountries()));\n\n if (actorService.exist(actor)) {\n actor.setId(actorService.getPerson(actor.getFirstName(), actor.getName()).getId());\n } else {\n actorService.create(actor);\n }\n\n file.getFilm().addActor(actor);\n }\n }", "public static void registerOres(){\n overworldOres.add(register(\"limestone\", Feature.ORE.withConfiguration(new OreFeatureConfig(\n OreFeatureConfig.FillerBlockType.BASE_STONE_OVERWORLD, AnnotatedBlockHolder.LIMESTONE.getDefaultState(), 24)) //Vein Size\n .range(72).square()\n .func_242731_b(24))); \n\n overworldOres.add(register(\"halite_ore\", Feature.ORE.withConfiguration(new OreFeatureConfig(\n new BlockMatchRuleTest(AnnotatedBlockHolder.LIMESTONE.getDefaultState().getBlock()), AnnotatedBlockHolder.HALITE_ORE.getDefaultState(), 16)) //Vein Size\n .range(72).square() //Spawn height start\n .func_242731_b(48))); //Chunk spawn frequency\n }", "public void loadFactionSupport()\n\t{\n\t\tif (factionsListener == null)\n\t\t{\n\t\t\tPlugin factions = getServer().getPluginManager().getPlugin(\"Factions\");\n\t\t\tif (factions != null)\n\t\t\t{\n\t\t\t\tlogger().info(\"Factions support loaded\");\n\t\t\t\tfactionsListener = new FactionSupport(this);\n\t\t\t\tsupportHandler.register(factionsListener);\n\t\t\t\tgetServer().getPluginManager().registerEvents(this.factionsListener, this);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tlogger().info(\"Factions plugin not installed! Skipping Factions support!\");\n\t\t\t}\n\t\t}\n\t}", "protected void registerPreLoad(ConfigurationSection configuration) {\n PreLoadEvent loadEvent = new PreLoadEvent(this);\n Bukkit.getPluginManager().callEvent(loadEvent);\n\n blockBreakManagers.addAll(loadEvent.getBlockBreakManagers());\n blockBuildManagers.addAll(loadEvent.getBlockBuildManagers());\n pvpManagers.addAll(loadEvent.getPVPManagers());\n teamProviders.addAll(loadEvent.getTeamProviders());\n castManagers.addAll(loadEvent.getCastManagers());\n targetingProviders.addAll(loadEvent.getTargetingManagers());\n teamProviders.addAll(loadEvent.getTeamProviders());\n playerWarpManagers.putAll(loadEvent.getWarpManagers());\n\n // Vault currency must be registered after VaultController initialization\n ConfigurationSection currencyConfiguration = configuration.getConfigurationSection(\"builtin_currency\");\n addCurrency(new VaultCurrency(this, currencyConfiguration.getConfigurationSection(\"currency\")));\n\n // Custom currencies can override the defaults\n for (Currency currency : loadEvent.getCurrencies()) {\n addCurrency(currency);\n }\n\n if (aureliumSkillsManager != null) {\n aureliumSkillsManager.register(currencyConfiguration);\n }\n if (tokenManager != null) {\n tokenManager.register(currencyConfiguration);\n }\n\n // Configured currencies override everything else\n currencyConfiguration = configuration.getConfigurationSection(\"custom_currency\");\n Set<String> keys = currencyConfiguration.getKeys(false);\n for (String key : keys) {\n addCurrency(new CustomCurrency(this, key, currencyConfiguration.getConfigurationSection(key)));\n }\n\n log(\"Registered currencies: \" + StringUtils.join(currencies.keySet(), \",\"));\n\n // Register any attribute providers that were in the PreLoadEvent.\n for (AttributeProvider provider : loadEvent.getAttributeProviders()) {\n externalProviders.add(provider);\n }\n\n // Re-register any providers previously registered by external plugins via register()\n for (MagicProvider provider : externalProviders) {\n registerAndUpdate(provider);\n }\n\n // Don't allow overriding Magic requirements\n checkMagicRequirements();\n }", "@Override\r\n\tpublic boolean getAddAdmin(Admins ad) {\n\t\treturn adi.addAdmin(ad);\r\n\t}", "public interface Registries {\n\n /***/\n ElementHandlerRegistry getElementHandlerRegistry();\n\n /***/\n AnnotationRegistry getAnnotationHandlerRegistry();\n\n /***/\n PainterRegistry getPaintRegistry();\n\n /**\n * Bundles up extension of each registry.\n */\n Registries createExtension();\n}", "public vtnAdminMenuUsuariosA() {\n initComponents();\n Image icono = Toolkit.getDefaultToolkit().getImage(\"src/design/softipet.png\");\n this.setIconImage(icono);\n }", "public static void loadCreatures() {\r\n\t \tregisterEntity(EntityZertum.class, \"Zertum\", 0);\r\n\t \tEntityRegistry.addSpawn(EntityZertum.class, 10, 2, 5, EnumCreatureType.creature);\r\n\t \tregisterEntity(EntityRedZertum.class, \"RedZertum\", 1);\r\n\t \tEntityRegistry.addSpawn(EntityRedZertum.class, 10, 3, 6, EnumCreatureType.creature);\r\n\t \tregisterEntity(EntityDestroZertum.class, \"DestroZertum\", 2);\r\n\t \tEntityRegistry.addSpawn(EntityDestroZertum.class, 10, 3, 6, EnumCreatureType.creature);\r\n\t \tregisterEntity(EntityJakan.class, \"Jakan\", 3);\r\n\t \tEntityRegistry.addSpawn(EntityJakan.class, 10, 3, 6, EnumCreatureType.creature);\r\n\t \tregisterEntity(EntityJakanPrime.class, \"JakanPrime\", 4);\r\n\t \tEntityRegistry.addSpawn(EntityJakanPrime.class, 10, 3, 6, EnumCreatureType.creature);\r\n\t}", "public void registerComponents() {\r\n maintainSponsorHierarchyBaseWindow.addVetoableChangeListener(this);\r\n maintainSponsorHierarchyBaseWindow.btnChangeGroupName.addActionListener(this);\r\n maintainSponsorHierarchyBaseWindow.btnClose.addActionListener(this);\r\n maintainSponsorHierarchyBaseWindow.btnCreateNewGroup.addActionListener(this);\r\n maintainSponsorHierarchyBaseWindow.btnDelete.addActionListener(this);\r\n maintainSponsorHierarchyBaseWindow.btnDetails.addActionListener(this);\r\n maintainSponsorHierarchyBaseWindow.btnMoveDown.addActionListener(this);\r\n maintainSponsorHierarchyBaseWindow.btnMoveUp.addActionListener(this);\r\n maintainSponsorHierarchyBaseWindow.btnSave.addActionListener(this);\r\n maintainSponsorHierarchyBaseWindow.btnSearchSponser.addActionListener(this);\r\n maintainSponsorHierarchyBaseWindow.btnPanel.addActionListener(this);\r\n maintainSponsorHierarchyBaseWindow.mnuItmChangeGroupName.addActionListener(this);\r\n maintainSponsorHierarchyBaseWindow.mnuItmChangePassword.addActionListener(this);\r\n maintainSponsorHierarchyBaseWindow.mnuItmClose.addActionListener(this);\r\n maintainSponsorHierarchyBaseWindow.mnuItmCreateNewGroup.addActionListener(this);\r\n maintainSponsorHierarchyBaseWindow.mnuItmDetails.addActionListener(this);\r\n maintainSponsorHierarchyBaseWindow.mnuItmDelete.addActionListener(this);\r\n maintainSponsorHierarchyBaseWindow.mnuItmExit.addActionListener(this);\r\n maintainSponsorHierarchyBaseWindow.mnuItmInbox.addActionListener(this);\r\n maintainSponsorHierarchyBaseWindow.mnuItmMoveDown.addActionListener(this);\r\n maintainSponsorHierarchyBaseWindow.mnuItmMoveUp.addActionListener(this);\r\n //Added for Case#3682 - Enhancements related to Delegations - Start\r\n maintainSponsorHierarchyBaseWindow.mnuItmDelegations.addActionListener(this);\r\n //Added for Case#3682 - Enhancements related to Delegations - End\r\n maintainSponsorHierarchyBaseWindow.mnuItmPreferences.addActionListener(this);\r\n maintainSponsorHierarchyBaseWindow.mnuItmSave.addActionListener(this);\r\n maintainSponsorHierarchyBaseWindow.mnuItmPanel.addActionListener(this);\r\n maintainSponsorHierarchyBaseWindow.mnuItmSearchSponser.addActionListener(this);\r\n //Case 2110 Start\r\n maintainSponsorHierarchyBaseWindow.mnuItmCurrentLocks.addActionListener(this);\r\n //Case 2110 End\r\n //Addded for Case#2445 - proposal development print forms linked to indiv sponsor, should link to sponsor hierarchy - Start\r\n maintainSponsorHierarchyBaseWindow.mnuItmSponsorForm.addActionListener(this);\r\n //Case#2445 - End \r\n sponsorHierarchyTree.addTreeSelectionListener(this);\r\n sponsorHierarchyTree.addMouseListener(this);\r\n model.addTreeModelListener(this);\r\n }", "public Register() {\n\n this.literatureRegister = new ArrayList<>();\n }", "public void importFile() {\n \ttry {\n\t File account_file = new File(\"accounts/CarerAccounts.txt\");\n\n\t FileReader file_reader = new FileReader(account_file);\n\t BufferedReader buff_reader = new BufferedReader(file_reader);\n\n\t String row;\n\t while ((row = buff_reader.readLine()) != null) {\n\t String[] account = row.split(\",\"); //implementing comma seperated value (CSV)\n\t String[] users = account[6].split(\"-\");\n\t int[] usersNew = new int[users.length];\n\t for (int i = 0; i < users.length; i++) {\n\t \tusersNew[i] = Integer.parseInt(users[i].trim());\n\t }\n\t this.add(Integer.parseInt(account[0]), account[1], account[2], account[3], account[4], account[5], usersNew);\n\t }\n\t buff_reader.close();\n } catch (IOException e) {\n System.out.println(\"Unable to read text file this time.\");\n \t}\n\t}", "protected void init_actions()\n {\n action_obj = new CUP$include$actions(this);\n }", "private void contributeToActionBars() {\n\t\tIActionBars bars = getViewSite().getActionBars();\n\t\tfillLocalPullDown(bars.getMenuManager());\n\t\tfillLocalToolBar(bars.getToolBarManager());\n\t}", "org.apache.geronimo.corba.xbeans.csiv2.tss.TSSGssExportedNameType addNewGssExportedName();", "static void allowAccess(ClassMaker cm) {\n var thisModule = CoreUtils.class.getModule();\n var thatModule = cm.classLoader().getUnnamedModule();\n thisModule.addExports(\"org.cojen.dirmi.core\", thatModule);\n }", "public void crearConfiguracion (){\n\t\tInputStream streamMenues = FileUtil.getResourceAsStream(\"organizacionMenues.xml\");\r\n\t\tgruposModulos = new ArrayList<GrupoModulos>();\r\n\t\ttry {\r\n\t\t\tif (streamMenues != null){\r\n\t\t\t\tgruposModulos = leerGruposModulos(streamMenues);\t\r\n\t\t\t}\r\n\t\t} catch(XPathExpressionException e) {\r\n\t\t\tManejadorMenues.logger.error(\"Error procesando xml de menues\",e);\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\tif (gruposModulos.isEmpty()){\r\n\t\t\tGrupoModulos gm = new GrupoModulos();\r\n\t\t\tgm.setNombre(\"Módulos\");\r\n\t\t\tgm.setEsDefault(true);\r\n\t\t\tgruposModulos.add(gm);\r\n\t\t}\r\n\t\t\r\n\t}", "public WelcomeITIAdmin() {\n initComponents();\n new UIEnhancements().setIcon(\"tablaIconFull.png\", this);\n \n }", "public void ingresarCalificacionAdministracion(String administracion, String identificacion, String periodo, String calificacion) {\n\t\tArrayList<String> parameters = new ArrayList<String>();\n\t\tparameters.add(administracion);\n\t\tparameters.add(identificacion);\n\t\tparameters.add(periodo);\n\t\tparameters.add(calificacion);\n\t\ttry {\n\t\t\tthis.objADAO.ingresarCalificacionAdministracion(parameters);\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "@CallSuper\n public void registerOrganizer() {\n try {\n getController().registerOrganizer(mInterface);\n } catch (RemoteException e) {\n throw e.rethrowFromSystemServer();\n }\n }", "public void setRegistered(Index index) {\n\t\tfor (Registration reg : registrations) {\n\t\t\tif (reg.getIndex() == index) {\n\t\t\t\treg.setRegistered();\n\t\t\t\tau += index.getCourse().getAu();\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t}", "@Override\n public void initializeUsersForImportation() {\n if (LOG.isDebugEnabled()) {\n LOG.debug(\"initializeUsersForImportation\");\n }\n clearAddPanels();\n setRenderImportUserPanel(true);\n\n List<User> users;\n\n usersForImportation = new ArrayList<Pair<Boolean, User>>();\n\n if (Role.isLoggedUserAdmin() || Role.isLoggedUserProjectManager()) {\n choosenInstitutionForAdmin = (Institution) Component.getInstance(CHOOSEN_INSTITUTION_FOR_ADMIN);\n\n if (choosenInstitutionForAdmin != null) {\n users = User.listUsersForCompany(choosenInstitutionForAdmin);\n } else {\n users = User.listAllUsers();\n }\n } else {\n users = User.listUsersForCompany(Institution.getLoggedInInstitution());\n }\n boolean emailAlreadyExists;\n for (User user : users) {\n emailAlreadyExists = false;\n\n for (ConnectathonParticipant cp : connectathonParticipantsDataModel().getAllItems(FacesContext.getCurrentInstance())) {\n\n if (user.getEmail().equals(cp.getEmail())) {\n emailAlreadyExists = true;\n }\n }\n\n if (!emailAlreadyExists) {\n usersForImportation.add(new Pair<Boolean, User>(false, user));\n }\n }\n }", "public void registerCommands() {\n commands = new LinkedHashMap<String,Command>();\n \n /*\n * admin commands\n */\n //file util cmds\n register(ReloadCommand.class);\n register(SaveCommand.class);\n \n //shrine cmds\n register(KarmaGetCommand.class);\n register(KarmaSetCommand.class); \n }", "public void verDatosAdministrador()\r\n\t{\r\n\t\tcrearadmin = new CrearAdministrador(this);\r\n\t\tcrearadmin.setVisible(true);\r\n\t}", "public admin() {\n\t\tsuper();\n\t}", "void importSubsystem() {\n\t\t//Update attributes of target subsystem//\r\n\t\t/////////////////////////////////////////\r\n\t\tblockElementInto.setAttribute(\"Name\", blockElementFrom.getAttribute(\"Name\"));\r\n\t\tblockElementInto.setAttribute(\"Descriptions\", blockElementFrom.getAttribute(\"Descriptions\"));\r\n\t}", "@External\n\tpublic void set_admin(Address _admin) {\n\t\t\n\t\tif (Context.getCaller().equals(this.super_admin.get())) {\n\t\t\tthis.admin_list.add(_admin);\n\t\t}\t\t\n\t}", "public GUIGestionUsuarios(Administrador administrador, VentanaDisponible myUnicaVentana ) {\n this.administrador=administrador;\n initComponents();\n //setIconImage(new ImageIcon(getClass().getResource(\"/recursos/clothing.png\")).getImage());\n btnGroupCargoAU.add(rbtnAdministradorAU);\n btnGroupCargoAU.add(rbtnFuncionarioAU);\n \n btnGroupCargoUU.add(rbtnAdministradorUU);\n btnGroupCargoUU.add(rbtnFuncionarioUU);\n this.myUnicaVentana = myUnicaVentana;\n }" ]
[ "0.57709175", "0.5582676", "0.54741985", "0.5343136", "0.532459", "0.53007793", "0.5265715", "0.5198186", "0.51953894", "0.5166416", "0.5148085", "0.51136905", "0.5103977", "0.50577277", "0.5031643", "0.5009474", "0.49901482", "0.49651653", "0.49651653", "0.4941768", "0.4910965", "0.4909527", "0.48968372", "0.48919085", "0.48805612", "0.48799622", "0.48770744", "0.48606536", "0.48514113", "0.48467913", "0.48333672", "0.4827068", "0.4821511", "0.48212785", "0.48123884", "0.4804091", "0.4802187", "0.47976393", "0.47917336", "0.4789286", "0.47788063", "0.47742546", "0.47632512", "0.47615486", "0.47596884", "0.47559053", "0.47438133", "0.4740181", "0.4734923", "0.47342426", "0.47313946", "0.47272688", "0.4726564", "0.47261", "0.4719942", "0.47128466", "0.47124895", "0.47052065", "0.4704092", "0.47018722", "0.47010785", "0.4685902", "0.46854866", "0.46803105", "0.46781304", "0.4668895", "0.46684656", "0.46505663", "0.46463206", "0.46387464", "0.46354094", "0.46316803", "0.46309155", "0.4627572", "0.46218994", "0.46181384", "0.46156198", "0.46083912", "0.4605191", "0.45994967", "0.45994374", "0.45901138", "0.45897275", "0.45814833", "0.4579919", "0.4579383", "0.4575455", "0.45747247", "0.45686495", "0.45666015", "0.45663452", "0.4560538", "0.45546684", "0.45500478", "0.45499498", "0.45426556", "0.4541532", "0.45402557", "0.45363912", "0.45276147" ]
0.5014661
15
Returns the persons in the school database
public TreeMap<Integer, Person> getPersons() { return _persons; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\tpublic Map<String, Object> getSchool() {\n\t\treturn getSession().selectOne(getNamespace() + \"getSchool\");\n\t}", "private void getScholsFromDatabase() {\n schols = new Select().all().from(Scholarship.class).execute();\n }", "public ArrayList<Person> getPeople(String descendant) {\n String sql = \"SELECT firstName, lastName, personId, AssociatedUsername,gender,father,mother,spouse FROM Person WHERE AssociatedUsername = ?\";\n Person output = null;\n ArrayList<Person> people = null;\n\n try {\n PreparedStatement pstmt = conn.prepareStatement(sql);\n pstmt.setString(1, descendant);\n ResultSet rs = pstmt.executeQuery();\n\n //input the data into model\n while (rs.next()) {\n output = new Person(rs.getString(\"personId\"), rs.getString(\"AssociatedUsername\"),\n rs.getString(\"firstName\"), rs.getString(\"lastName\"), rs.getString(\"gender\"),\n rs.getString(\"father\"), rs.getString(\"mother\"), rs.getString(\"spouse\"));\n\n\n if (people == null)\n people = new ArrayList<>();\n people.add(output);\n }\n\n rs.close();\n } catch (Exception e) {\n e.printStackTrace();\n }\n return people;\n }", "private void loadSchoolInfo() {\r\n \r\n try {\r\n // Get fine ammount to be incurred by retrieving data from the database. \r\n String sql3 = \"SELECT * FROM schoolInfo \";\r\n pstmt = con.prepareStatement(sql3);\r\n\r\n ResultSet rs3=pstmt.executeQuery();\r\n if (rs3.next()) {\r\n schoolName = rs3.getString(\"name\");\r\n schoolContact = rs3.getString(\"contact\");\r\n schoolAddress = rs3.getString(\"address\");\r\n schoolRegion = rs3.getString(\"region\");\r\n schoolEmail = rs3.getString(\"email\");\r\n schoolWebsite = rs3.getString(\"website\");\r\n } \r\n \r\n pstmt.close();\r\n \r\n } catch (SQLException e) {\r\n }\r\n \r\n //////////////////////////////////// \r\n }", "public ArrayList<Person> getPersons(String username) throws DataAccessException {\n Person person;\n ArrayList<Person> people = new ArrayList<>();\n ResultSet rs = null;\n String sql = \"SELECT * FROM persons WHERE assoc_username = ?;\";\n try(PreparedStatement stmt = conn.prepareStatement(sql)) {\n stmt.setString(1, username);\n rs = stmt.executeQuery();\n while (rs.next()) {\n person = new Person(rs.getString(\"person_id\"), rs.getString(\"assoc_username\"),\n rs.getString(\"first_name\"), rs.getString(\"last_name\"),\n rs.getString(\"gender\"), rs.getString(\"father_id\"),\n rs.getString(\"mother_id\"), rs.getString(\"spouse_id\"));\n people.add(person);\n }\n return people;\n } catch (SQLException e) {\n e.printStackTrace();\n throw new DataAccessException(\"Error encountered while finding person\");\n } finally {\n if (rs != null) {\n try {\n rs.close();\n } catch (SQLException e) {\n e.printStackTrace();\n }\n }\n }\n }", "public static ArrayList getSchoolList(Connection con) throws ServletException{\n try{\n PreparedStatement ps = con.prepareStatement(\"SELECT * FROM schools;\");\n ResultSet rs = ps.executeQuery();\n ArrayList<School> schoolList = new ArrayList();\n while (rs.next()){\n schoolList.add(new School(rs.getString(\"schoolname\")));\n }\n return schoolList;\n } catch (SQLException ex) {\n throw new ServletException(\"school list load problem\");\n } \n }", "public List<Person> read() {\n Session session = getSessionFactory().openSession();\n List<Person> persons = session.createQuery(\"FROM Person\").list();\n session.close();\n LOGGER.log(Level.INFO,\"Found \" + persons.size() + \" persons\");\n return persons;\n }", "private List<School> querySchools(final Connection connection) {\n List<Integer> schools = new ArrayList<>();\n try {\n Statement st = connection.createStatement();\n ResultSet rs = st.executeQuery(allSchoolsQuery);\n while (rs.next()) {\n schools.add(rs.getInt(1));\n }\n rs.close();\n st.close();\n } catch (Exception e) {\n e.printStackTrace();\n }\n\n List<School> result = new ArrayList<>();\n\n for (Integer schoolId : schools) {\n List<Integer> students = new ArrayList<>();\n String query = schoolsStudentsQuery.replace(SCHOOL_ID_SQL_TAG, schoolId.toString());\n\n try {\n Statement st = connection.createStatement();\n ResultSet rs = st.executeQuery(query);\n while (rs.next()) {\n students.add(rs.getInt(1));\n }\n rs.close();\n st.close();\n } catch (Exception e) {\n e.printStackTrace();\n continue;\n }\n\n result.add(new School(schoolId, students));\n }\n\n return result;\n }", "@Override\n\tpublic Iterator<Student> selectAll() {\n\t\tString sql=\"SELECT a.id,a.num,a.name,a.email,a.phone,a.degree,a.project,a.school,b.name,a.is_cap from tc_student as a,tc_school as b where a.school=b.id\";\n\t\tArrayList<Student> arr=new ArrayList<Student>();\n\t\tResultSet rs=mysql.query(sql);\n\t\ttry {\n\t\t\twhile(rs.next())\n\t\t\t{\n\t\t\t\tStudent stu=new Student();\n\t\t\t\tstu.setId(rs.getInt(1));\n\t\t\t\tstu.setNum(rs.getString(2));\n\t\t\t\tstu.setName(rs.getString(3));\n\t\t\t\tstu.setEmail(rs.getString(4));\n\t\t\t\tstu.setPhone(rs.getString(5));\n\t\t\t\tstu.setDegree(rs.getShort(6));\n\t\t\t\tstu.setProject(rs.getInt(7));\n\t\t\t\tstu.setSchool(rs.getInt(8));\n\t\t\t\tstu.setSchoolstring(rs.getString(9));\n\t\t\t\tstu.setIs_cap(rs.getInt(10));\n\t\t\t\tstu.setDegreestring(degreemap[stu.getDegree()]);\n\t\t\t\tarr.add(stu);\n\t\t\t}\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\treturn arr.iterator();\n\t}", "@GetMapping(\"/schools\")\n public List<School> list() {\n List<School> schoolList = schoolRepository.findAll();\n return schoolList;\n }", "List<SchoolSubject> findSchoolSubjects() throws DaoException;", "@Override\n\tpublic List<Professor> getProfessors() {\n\t\tList<Professor> pros=null;\n\t\tProfessor pro=null;\n\t\t\n\t\ttry{\n\t\t\t\n\t\t\tstmt=conn.prepareStatement(\"SELECT ssn,name,department,password FROM Professor\");\n\t\t\t/*stmt.setString(1, admin.getCname());\n\t\t\tstmt.setString(2, admin.getCplace());*/\n\t\t\tResultSet rs=stmt.executeQuery();\n\t\t\tpros=new ArrayList<Professor>();\n\t\t\twhile(rs.next()){\n\t\t\t\tpro=new Professor(rs.getString(\"name\"),rs.getString(\"ssn\"),\"\", rs.getString(\"department\"));\n\t\t\t\t\n\t\t\t\tpros.add(pro);\n\t\t\t}\n\t\t\t}catch(SQLException e){\n\t\t\t\tex=e;\n\t\t\t}finally{\n\t\t\t\tif(conn!=null){\n\t\t\t\t\ttry{\n\t\t\t\t\t\tconn.close();\n\t\t\t\t\t}catch(SQLException e){\n\t\t\t\t\t\tif(ex==null){\n\t\t\t\t\t\t\tex=e;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\tif(ex!=null){\n\t\t\t\tthrow new RuntimeException(ex);\n\t\t\t}\n\t\t\t}\n\t\treturn pros;\n\t}", "List<WordSchool> selectByExample(WordSchoolExample example);", "public ArrayList<Student> getStudents() {\n\n ArrayList<Student> students = new ArrayList<Student>();\n String query = \"SELECT * FROM student\";\n try{\n result = statement.executeQuery(query);\n while(result.next()) {\n\n String id = Integer.toString(result.getInt(\"student_id\"));\n String firstName = result.getString(\"student_first_name\");\n String lastName = result.getString(\"student_last_name\");\n String degree = result.getString(\"degree\");\n String yearOfStudy = result.getString(\"year_of_study\");\n String outcome = result.getString(\"outcome\");\n students.add(new Student(id, firstName, lastName, degree, yearOfStudy, outcome));\n\n }\n }\n catch (SQLException e){\n\n }\n\n return students;\n }", "School findSchoolByName(String schoolName) throws TechnicalException;", "School findSchoolById(int id) throws TechnicalException;", "public List<Person> getAllPerson() {\n \t\n //Collection<Person> c = personMap.values();\n List<Person> list = new ArrayList<Person>();\n //list.addAll(c);*/\n list = queryExecutor.selectAll();\n return list;\n }", "void getPeople();", "public List<SickPerson> getSickPersonList(String lastNameSubString) throws SQLException;", "public Iterable<StudentQualificationPersonDetail> getStudentRegisteredData(){\n\t\t\n\t\treturn sqcRepository.findAll();\n\t}", "List<ProSchoolWare> selectByExample(ProSchoolWareExample example);", "public ResultSet getPublicationsByPerson(int person_id) throws SQLException {\n\t\tquery = \"SELECT p.*, pn.name as devisor FROM publication p \"\n\t\t\t\t+ \"LEFT OUTER JOIN person pn ON p.devisor_id=pn.id \"\n\t\t\t\t+ \"WHERE pn.id=\" + person_id + \" ORDER BY p.name\";\n\t\treturn stmt.executeQuery(query);\n\t}", "public List<Professor> findAll();", "@Override\n public List<Person> getPeople() {\n return this.personRepository.findAll();\n }", "@SuppressWarnings(\"unchecked\")\n public Collection<Person> findPersonsByLastName(String lastName) throws DataAccessException {\n return template.find(\"from Person p where p.lastName = ?\", lastName);\n }", "@Override\n\tpublic List<Person> getAllPersons() {\n\t\treturn (List<Person>) personDao.findAll();\n\t}", "public TreeMap<String, Professor> getAllProfessors(String params) {\n\n StringBuffer json = new StringBuffer();\n ArrayList<Professor> allProfessors = new ArrayList<>();\n\n try {\n\n int i = 1;\n while (true) {\n if (params == null) {\n json.append(new JsonReader(\"http://api.umd\" +\n \".io/v0/professors?per_page=100&page=\" + i).readUrl());\n } else {\n json.append(new JsonReader(\"http://api.umd\" +\n \".io/v0/professors?per_page=100&page=\" + i + \"&\" +\n params).readUrl());\n }\n\n allProfessors.addAll(new Gson().fromJson(json.toString().replace\n (\"][\", \",\"),\n new TypeToken<ArrayList<Professor>>(){}.getType()));\n\n if (allProfessors.size() % 100 == 0) {\n i++;\n continue;\n } else {\n break;\n }\n }\n } catch (Exception e) {\n e.printStackTrace();\n }\n\n\n TreeMap<String, Professor> genProfessors = new TreeMap<>();\n\n for (Professor p : allProfessors) {\n genProfessors.put(p.getName(), p);\n }\n\n return genProfessors;\n }", "InternalResultsResponse<Person> fetchAllPersons();", "public void consultarListasPersonas(){\n SQLiteDatabase db = conn.getReadableDatabase();\n Personal personal = null;\n listaPersonales = new ArrayList<>();\n Cursor cursor = db.rawQuery(\"SELECT * FROM personal\", null);\n while(cursor.moveToNext()){\n personal = new Personal();\n personal.setId(cursor.getInt(0));\n personal.setNombre(cursor.getString(1));\n personal.setApellido(cursor.getString(2));\n personal.setHoraEntrada(cursor.getInt(3));\n personal.setHoraSalida(cursor.getInt(4));\n personal.setId_laboratorio(cursor.getInt(5));\n listaPersonales.add(personal);\n }\n db.close();\n obtenerLista();\n }", "public static List<SchoolModel> getSchoolData(Activity context) {\n Cursor cursor;\n cursor = context.getContentResolver().query(SchoolTable.URI, null, null, null, null);\n List<SchoolModel> schoolDataList = new ArrayList<>();\n if (cursor != null && !cursor.isClosed()) {\n while (cursor.moveToNext()) {\n schoolDataList.add(fetchSchoolDataFromCursor(cursor));\n }\n cursor.close();\n }\n\n return schoolDataList;\n }", "protected Collection<RS_User> selectUsersFromPersons(String query) {\n\t\tCollection<RS_User> users = new SortedArrayList<RS_User>();\n\t\t//TODO Robbert: is deze keuze hier ok???\n\t\t\n\t\tResultSet rs;\n\t\ttry {\n\t\t\tStatement stat = conn.createStatement();\n\t\t\trs = stat.executeQuery(query);\n\t\t\t\n\t\t\twhile (rs.next()) {\t\n\t\t\t\tString username = rs.getString(\"lfm_username\");\n\t\t\t\tint age = rs.getInt(\"age\");\n\t\t\t\tString country = rs.getString(\"country\");\n\t\t\t\tString language = rs.getString(\"language\");\n\t\t\t\tString gender = rs.getString(\"gender\");\n\t\t\t\tRS_User rsu = new RS_User(username, age, country, language, gender);\n\t\t\t\tusers.add(rsu);\n\t\t\t}\t\n\t\t} catch (SQLException e) {\n\t\t\tSystem.out.println(\"Something went wrong selecting results from Persons\");\n\t\t}\n\t\treturn users;\n\t}", "private static void showStudentDB () {\n for (Student s : studentDB) {\n System.out.println(\"ID: \" + s.getID() + \"\\n\" + \"Student: \" + s.getName());\n }\n }", "List<Patient> findPatients(Employee nurse_id);", "WordSchool selectByPrimaryKey(Long id);", "@Override\r\n public List<Professor> findAll() {\r\n return getEntityManager().createNamedQuery(\"Professor.findAll\",Professor.class).getResultList();\r\n }", "public List<People> getPeople();", "public People getPeopleById(Long id);", "List<LawPerson> selectByExample(LawPersonExample example);", "@Test\n\tpublic void testGetSchoolByID(){\n\t\t\n\t List<School> list=schoolService.getSchoolbyId(2);\n\t\t\tfor(int i=0;i<list.size();i++){\n\t\t\t\tSchool s=(School) list.get(i);\n\t\t\t\tSystem.out.println(\"id: \"+s.getSchId());\n\t\t\t\tSystem.out.println(\"name: \"+s.getSchName());\n\t\t\t\tSystem.out.println(\"zip: \"+s.getSchZip());\n\t\t\t\tSystem.out.println(\"state: \"+s.getSchState());\n\t\t\t}\n\t}", "@Override\n\tpublic List<Student> getStudents() {\n\t\tSession currentSession = sessionFactory.getCurrentSession();\n\n\t\t// create a query\n\t\tQuery<Student> query = currentSession.createQuery(\"from Student order by lastName\", Student.class);\n\n\t\t// execute the query and get the results list\n\t\tList<Student> students = query.getResultList();\n\n\t\t// return the results\n\t\treturn students;\n\t}", "@Override\r\n\tpublic List<Person> findAll(){\n\t\tQuery query=em.createQuery(\"Select p from Person p\");\r\n\t\tList<Person> list = query.getResultList();\r\n\t\treturn list;\r\n\t}", "List<Student> getAll() {\n\t\tSessionFactory sessionFactory = null;\n\t\tStandardServiceRegistry registry = new StandardServiceRegistryBuilder()\n\t\t\t\t.configure()\t// hibernate.cfg.xml\n\t\t\t\t.build();\n\t\ttry {\n\t\t\tsessionFactory = new MetadataSources(registry).buildMetadata().buildSessionFactory();\n\t\t} catch (Exception ex) {\n\t\t\tStandardServiceRegistryBuilder.destroy(registry);\n\t\t\tSystem.out.println(\"Setup Failed:\" + ex.getMessage());\n\t\t}\n\t\t// session = configObj.buildSessionFactory(serviceRegistryObj).openSession();\n\t\tSession session = sessionFactory.openSession();\n\t\tTransaction tx = null;\n\t\ttry {\n\t\t\ttx = session.beginTransaction();\n\t\t\tList data = session.createQuery(\"FROM Student\").list();\n\t\t\tfor (Iterator iterator = data.iterator(); iterator.hasNext();) {\n\t\t\t\tStudent st = (Student) iterator.next();\n\t\t\t\tSystem.out.print(\"Student ID: \" + st.getStudentId());\n\t\t\t\tSystem.out.print(\" Last Name: \" + st.getName());\n\t\t\t\tSystem.out.println(\" Address: \" + st.getAddress());\n\t\t\t}\n\t\t\ttx.commit();\n\t\t\treturn data;\n\t\t} catch (HibernateException e) {\n\t\t\tif (tx != null)\n\t\t\t\ttx.rollback();\n\t\t\te.printStackTrace();\n\t\t} finally {\n\t\t\tsession.close();\n\t\t}\n\t\treturn null;\n\t}", "public List<Person> UserSelect() {\n\t\t System.out.println(\"UserSelect\");\n\t\t return personDAO.getPersons();\n\t}", "Iterable<Person> getList() throws DataAccessException;", "@SuppressWarnings(\"unchecked\")\r\n public Collection<Person> findPersonsByName(String name) throws DataAccessException {\r\n return template.find(\"from Person p where p.lastName = ?\", name);\r\n }", "public ArrayList<String> getSchool() {\r\n\t\treturn school;\r\n\t}", "public List getAll(){\n\t\tList<Person> personList = personRepository.getAll();\n\t\treturn personList;\n\t}", "public List<SamplePerson> getAllPeople() {\n //TODO\n throw new NotImplementedException();\n }", "@Override\n\tpublic List<Student> getAllStudents() {\n\t\tList<Student> students = new ArrayList<Student>();\n\t\ttry {\n\t\t\tStatement stmt = conn.createStatement();\n\t\t\t//select CAST(gpa as DECIMAL(3,2)) AS gpa from student;\n\t\t\t//ResultSet rs = stmt.executeQuery(\"select * from student\");\n\t\t\tResultSet rs = stmt.executeQuery(\"select ID, Firstname, Lastname, Program, CAST(gpa as DECIMAL(3,2)) AS gpa from student\");\n\t\t\t\n\t\t\twhile(rs.next()) {\n\t\t\t\tStudent stu = new Student();\n\t\t\t\tstu.setStudentid(rs.getInt(\"ID\"));\n\t\t\t\tstu.setFirstname(rs.getString(\"Firstname\"));\n\t\t\t\tstu.setLastname(rs.getString(\"Lastname\"));\n\t\t\t\tstu.setProgram(rs.getString(\"Program\"));\n\t\t\t\tstu.setGpa(rs.getDouble(\"GPA\"));\n\n\t\t\t\tstudents.add(stu);\n\t\t\t}\n\t\t\t\n\t\t\trs.close();\n\t\t\tstmt.close();\n\t\t} catch (SQLException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\t\treturn students;\n\t}", "public ResultSet getPerson(int id) throws SQLException {\n\t\tquery = \"SELECT * FROM person WHERE id=\"+ id;\n\t\treturn stmt.executeQuery(query);\n\t}", "@Override\n\tpublic List<Student> getStudentsByTeacher(String teacherName) {\n\t\tCollection<Student> allStudents = getAllEntities(); \n\t\t\n\t\t/** Here add students only bounded to this teacher */\n\t\tList<Student> studentsByTeacher = new ArrayList<>();\n\t\t\n\t\t/** Loop through all students in collection */\n\t\tfor(Student student : allStudents) { \n\t\t\tHibernate.initialize(student.getSubjects());\n\t\t\tfor(int i = 0; i < student.getTeachers().size(); i++) {\n\t\t\t\t/** Compare passed argument's teacher's name with teacher names bounded with students */\n\t\t\t\tif(teacherName.equals(student.getTeachers().get(i).getUsername())) {\n\t\t\t\t\tstudentsByTeacher.add(student);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn studentsByTeacher;\n\t}", "public static Map<String, Person> GetPersons()\n {\n List<Person> persons = dataWraper.getAll(FrekenBok.class);\n Map<String, Person> personMap = new HashMap<>();\n\n persons.forEach( (i)->\n personMap.put(i.GetName(), i)\n );\n\n persons = dataWraper.getAll(LitleBoy.class);\n persons.forEach( (i)->\n personMap.put(i.GetName(), i)\n );\n\n return personMap;\n }", "public Iterable<Person> getPersonsByFirstName(String firstName) {\n\t\tMap<String, Object> params = new HashMap<>();\n\t\tparams.put(\"firstName\", firstName);\n\t\t\n\t\tFilter filter = new Filter(\"firstName\", ComparisonOperator.EQUALS, firstName);\n\t\tCollection<Person> persons = session.loadAll(Person.class, filter, 2);\n\t\treturn persons;\n\t}", "public Person[] getAllUsers() \r\n\t{\r\n\t\tString[][] stringArray = db.user_getUsers();\r\n\t\tPerson[] personArray = new Person[stringArray.length];\r\n\t\tfor(int i = 0; i < stringArray.length; i++) \r\n\t\t{\r\n\t\t\tString firstname = stringArray[i][0];\r\n\t\t\tString lastname = stringArray[i][1];\r\n\t\t\tString username = stringArray[i][2];\r\n\t\t\tString password = stringArray[i][3];\r\n\t\t\tchar type = stringArray[i][4].charAt(0);\r\n\t\t\tchar status = stringArray[i][5].charAt(0);\r\n\t\t\tString[][] savedArray = db.user_getUsernamesWithSavedSchools();\r\n\t\t\tArrayList<String> schoolsList = new ArrayList<String>(); \r\n\t\t\tfor (String[] pair : savedArray) {\r\n\t\t\t\tif (pair[0].equals(username))\r\n\t\t\t\t\tschoolsList.add(pair[1]);\r\n\t\t\t}\r\n\t\t\tString[] savedSchools = new String[0];\r\n\t\t\tsavedSchools = schoolsList.toArray(savedSchools);\r\n\t\t\tpersonArray[i] = new Person(firstname, lastname, username, password, type, status, savedSchools);\r\n\t\t}\r\n\t\treturn personArray;\r\n\t}", "@Override\r\n\tpublic ArrayList<Person> getAllPersons() {\n\t\treturn null;\r\n\t}", "@GET\n @Path(\"/at-school/{school : \\\\S+}\")\n @Produces({MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML})\n public Response getEducationsBySchool( @PathParam(\"school\") String school,\n @BeanParam PaginationBeanParam params ) throws ForbiddenException {\n\n RESTToolkit.authorizeAccessToWebService(params);\n logger.log(Level.INFO, \"returning educations for given school using EducationResource.getEducationsBySchool(school) method of REST API\");\n\n // find educations by given criteria\n ResourceList<Education> educations = new ResourceList<>( educationFacade.findBySchool(school, params.getOffset(), params.getLimit()) );\n\n // result resources need to be populated with hypermedia links to enable resource discovery\n EducationResource.populateWithHATEOASLinks(educations, params.getUriInfo(), params.getOffset(), params.getLimit());\n\n return Response.status(Status.OK).entity(educations).build();\n }", "java.lang.String getSchoolName();", "List<Student> getAllStudents();", "public ArrayList getSchools();", "public void getFkp() throws SQLException{\n \n ResultSet rset = dh.getPerson();\n \n fkp = new ArrayList<>();\n \n int i = 0;\n while(rset.next()){\n fkp.add(new Person(rset.getString(\"Nome\")));\n }\n }", "@GetMapping(path=\"/showData\")\n public List<Person> showData() {\n Iterable<Person> myPerson = personRepository.findAll();\n List<Person> listOfPersons = new ArrayList<>();\n myPerson.forEach((Person person) -> {\n listOfPersons.add(person);\n });\n return listOfPersons;\n }", "public ArrayList<Person> getAllPersons() throws IllegalArgumentException {\r\n\t\treturn this.personMapper.findAll();\r\n\t}", "List selectByExample(CTipoPersonaExample example) throws SQLException;", "@Override\n\tpublic List<Persona> getPersona() throws SQLException {\n\t\tList<Persona> listaPersona1 = new ArrayList<Persona>();\n\t\t\n Single<List<DbRow>> rows = dbClient.execute(exec -> exec\n \t\t.createQuery(\"select * from persona;\").execute()).collectList();\n \n try {\n List<DbRow> listasPersonas = rows.get();\n \n if(!listasPersonas.isEmpty()) {\n \t\n \tfor(int i=0; i< listasPersonas.size(); i++) {\n \t\tPersona p = new Persona();\n \t\tp.setId((int)listasPersonas.get(i).column(\"id\").value());\n \t\tp.setNombre((String)listasPersonas.get(i).column(\"nombre\").value());\n \t\tp.setDireccion((String)listasPersonas.get(i).column(\"direccion\").value());\n \t\tp.setCorreo((String)listasPersonas.get(i).column(\"correo\").value()); \t\t\n \t\tlistaPersona1.add(p);\n \t}\n \t\n }\n // listasPersonas.forEach(System.out::println);\n \n } catch (InterruptedException e) {\n e.printStackTrace();\n return null;\n } catch (ExecutionException e) {\n e.printStackTrace();\n return null;\n }\n return listaPersona1;\n\t\t\n\t}", "@Override\n\tpublic List<Person> getAllPersons() {\n\t\treturn null;\n\t}", "public SickPerson getSickPerson(int id) throws SQLException;", "public void findPersonById(int i) {\n\t\t\n\t}", "public static List<StudentInfo> searchStudentInfo(String firtname, String lastname) {\r\n \r\n List<StudentInfo> students = new ArrayList<>();\r\n \r\n // declare resultSet\r\n ResultSet rs = null;\r\n \r\n // declare prepared statement\r\n PreparedStatement preparedStatement = null;\r\n \r\n // declare connection\r\n Connection conn = null;\r\n try {\r\n // get connection\r\n conn = DBUtils.getConnection();\r\n\r\n // set prepared statement\r\n preparedStatement = conn\r\n .prepareStatement(\"SELECT instructor.FName, instructor.LName,\" +\r\n \" IF(EXISTS ( SELECT * FROM gra WHERE gra.StudentId = phdstudent.StudentId) , 'GRA', \" +\r\n \" IF(EXISTS ( SELECT * FROM gta WHERE gta.StudentId = phdstudent.StudentId) , 'GTA', \" +\r\n \" IF(EXISTS ( SELECT * FROM scholarshipsupport WHERE scholarshipsupport.StudentId = phdstudent.StudentId) , 'scholarship', \" +\r\n \" IF(EXISTS ( SELECT * FROM selfsupport WHERE selfsupport.StudentId = phdstudent.StudentId) , 'self', ''))\" +\r\n \" )) AS StudentType, \" +\r\n \" milestone.MName, milestonespassed.PassDate\" +\r\n \" FROM phdstudent left join instructor on instructor.InstructorId = phdstudent.Supervisor\"\r\n + \" left join milestonespassed on phdstudent.StudentId = milestonespassed.StudentId\"\r\n + \" left join milestone on milestonespassed.MID = milestone.MID\" +\r\n \" WHERE phdstudent.FName = ? AND phdstudent.LName = ?\");\r\n \r\n // execute query\r\n preparedStatement.setString(1, firtname);\r\n preparedStatement.setString(2, lastname); \r\n\r\n rs = preparedStatement.executeQuery();\r\n \r\n //iterate and create the StudentInfo objects\r\n while (rs.next()) {\r\n \r\n students.add(new StudentInfo(rs.getString(1)+ \" \" + rs.getString(2), rs.getString(3), rs.getString(4), \r\n utils.Utils.toDate(rs.getDate(5))));\r\n\r\n }\r\n }catch(Exception ex){\r\n ex.printStackTrace();\r\n }\r\n finally {\r\n DBUtils.closeResource(conn);\r\n DBUtils.closeResource(preparedStatement);\r\n DBUtils.closeResource(rs);\r\n } \r\n \r\n return students; \r\n }", "List<Teacher> selectAll();", "@Override\r\n\tpublic Students findStudents() {\n\t\treturn null;\r\n\t}", "@Override\n\t//查询所有数据\n\tpublic List<Student> selectStudents() {\n\t\tConnection connection =null;\n\t\tPreparedStatement ps = null;\n\t\tResultSet rs = null;\n\t\tList<Student> sList = new ArrayList<Student>();\n\t\t\n\t\ttry {\n\t\t\tconnection = MySQLConnectUtil.getMySQLConnection();\n\t\t\tps = connection.prepareStatement(QUARYSQL);\n\t\t\trs = ps.executeQuery();\n\t\t\twhile (rs.next()) {\n\t\t\t\tStudent student = new Student();\n\t\t\t\tstudent.setId(rs.getString(\"ID\"));\n\t\t\t\tstudent.setName(rs.getString(\"NAME\"));\n\t\t\t\tstudent.setAge(rs.getInt(\"AGE\"));\n\t\t\t\tsList.add(student);\n\t\t\t}\n\t\t} catch (SQLException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}finally {\n\t\t\tMySQLConnectUtil.closeResultset(rs);\n\t\t\tMySQLConnectUtil.closePreparestatement(ps);\n\t\t\tMySQLConnectUtil.closeConnection(connection);\n\t\t}\n\t\treturn sList;\n\t}", "private static void LessonDAO() {\n PersonDAO personDAO = new PersonDAOImpl(); //amend in next lesson\n List<Person> personList = personDAO.getPersonList();\n\n System.out.println(\"===============================\");\n for(Person person: personList) {\n System.out.println(person.getPersonId() + \": \" + person.getFirstName() + \" \" + person.getLastName());\n }\n System.out.println(\"===============================\");\n //endregion\n\n //region Prompt User\n Scanner reader = new Scanner(System.in);\n System.out.println(\"Please Select a Person from the list: \");\n String personId = reader.nextLine();\n //endregion\n\n //region Get Person Details\n Person personDetail = personDAO.getPersonById(Integer.parseInt(personId));\n\n System.out.println(\"---Person Details---\");\n System.out.println(\"Full Name: \" + personDetail.GetFullName());\n //endregion\n }", "public ArrayList<Person> getAllPeople()\r\n\t{\r\n\t\treturn dataService.getAllPeople();\r\n\t}", "@Override\r\n public List<String> getStudenti() {\r\n List<Studente> listaStudenti = studenteFacade.findAll();\r\n List<String> result = new ArrayList<>();\r\n\r\n for (Studente s : listaStudenti) {\r\n result.add(s.toString());\r\n }\r\n return result;\r\n }", "public static ArrayList<String> retrieveStudentInfo(ArrayList<Student> al,String schoolName) {\n \tArrayList<String> str=new ArrayList<String>();\n \tfor(int i=0;i<al.size();i++){\n \tStudent s=al.get(i);\n \tif(s.getSchoolName().equalsIgnoreCase(schoolName)){\n \t str.add(s.getStudName());\n \t}\n }\n \treturn str;\n }", "public static void main(String[] args) throws SQLException {\n StandAloneDataSource ds = new StandAloneDataSource(\"jdbc:postgresql://localhost:9999/NACID/\", \"postgres\", \"postgres\");\n ApplicationsDB db = new ApplicationsDB(ds, new NomenclaturesDB(ds));\n List<PersonRecord> persons = db.selectRecords(SQL, PersonRecord.class);\n List<CountryRecord> countries = db.selectRecords(CountryRecord.class,null);\n Map<Integer, CountryRecord> countriesMap = new HashMap<Integer, CountryRecord>();\n for (CountryRecord c:countries) {\n countriesMap.put(c.getId(), c);\n }\n Set<Integer> ids = new HashSet<Integer>();\n for (PersonRecord p:persons) {\n List<PersonRecord> personsByCivilIdType = db.selectRecords(PersonRecord.class, \"civil_id = ? and civil_id_type = ? order by id\", p.getCivilId(), p.getCivilIdType());\n for (int i = 0; i < personsByCivilIdType.size(); i++) {\n PersonRecord pr = personsByCivilIdType.get(i);\n ids.add(pr.getId());\n }\n }\n persons = db.selectRecords(PersonRecord.class, \"id in ( \" + StringUtils.join(ids, \",\") + \") order by civil_id, civil_id_type\");\n for (PersonRecord p:persons) {\n CountryRecord birthCountry = countriesMap.get(p.getBirthCountryId());\n CountryRecord citizenship = countriesMap.get(p.getCitizenshipId());\n System.out.println(p.getFName() + \"\\t\" + p.getSName() + \"\\t\" + p.getLName() + \"\\t\" + p.getCivilIdType() + \"\\t`\" + p.getCivilId() + \"\\t\" + (birthCountry == null ? \"\" : birthCountry.getName()) + \"\\t\" + (citizenship == null ? \"\" : citizenship.getName()) + \"\\t\" + p.getBirthDate() + \"\\t\" + p.getBirthCity());\n }\n System.out.println(StringUtils.join(persons, \"\\n\"));\n }", "public List<Persona> todasLasPersonas(){\n\n Iterable<Persona> ite=repo.findAll();\n Iterator<Persona> it=ite.iterator();\n List<Persona> actualList = new ArrayList<Persona>();\n while (it.hasNext()) {\n actualList.add(it.next());\n }\n\n return actualList;\n }", "public void personLookup() {\n\t\tSystem.out.print(\"Person: \");\n\t\tString entryName = getInputForName();\n\t\tphoneList\n\t\t\t.stream()\n\t\t\t.filter(n -> n.getName().equals(entryName))\n\t\t\t.forEach(n -> System.out.println(n));\n\t}", "public List <Student> getAllStudents();", "public List<Person> createPerson() throws ParseException {\n\t\tList<Person> lespersons = new ArrayList<Person>();\n\t\tint numOfPersons = manager.createQuery(\"Select p From Person p\", Person.class).getResultList().size();\n\n if (numOfPersons == 0) {\n \tSimpleDateFormat simpleDateFormat = new SimpleDateFormat(\"dd/MM/yyyy\");\n \tPerson p1 = new Person(\"dupont\", \"paul\", \"[email protected]\", \"M\", \"http://\", simpleDateFormat.parse(\"06/12/1965\"));\n \tPerson p2 = new Person(\"durand\", \"gerard\", \"[email protected]\", \"F\", \"http://\", simpleDateFormat.parse(\"06/04/1965\"));\n \tPerson p3 = new Person(\"Pierre\", \"martin\", \"[email protected]\", \"M\", \"http://\", simpleDateFormat.parse(\"06/08/1965\"));\n \tp1.getListAmis().add(p2);\n \tp2.getListAmis().add(p1);\n \tp2.getListAmis().add(p3);\n manager.persist(p1);\n manager.persist(p2);\n manager.persist(p3);\n lespersons.add(p1);\n lespersons.add(p2);\n lespersons.add(p3);\n }\n return lespersons;\n\t}", "@GetMapping(\"/personas\")\n\tpublic List<Persona> allPersonas(){\n\t\treturn personaRepository.findAll();\n\t\t\n\t}", "public void findallstudentservice() {\n\t\t dao.findallstudent();\r\n\t\t\r\n\t}", "@Override\n\tpublic List<Personne> findAllPErsonne() {\n\t\treturn dao.findAllPErsonne();\n\t}", "public static School load(String schoolname, Connection con) throws ServletException{\n try {\n System.out.println(schoolname);\n PreparedStatement ps = con.prepareStatement(\"SELECT * FROM schools WHERE schoolname=?;\");\n ps.setString(1, schoolname);\n ResultSet rs = ps.executeQuery();\n rs.next();\n return new School(rs.getString(\"schoolname\"),rs.getString(\"location\"),rs.getString(\"websiteaddress\"));\n } catch (Exception ex) {\n throw new ServletException(\"Could not load School\"); \n }\n }", "List<StudentClass> findClassesBySchoolId(int id) throws TechnicalException;", "Collection<Lesson> getLessons() throws DataAccessException;", "public List<Person> findAllUsers(){\n\t\t\n\t\tQuery q = em.createQuery(\"SELECT p FROM Person p \");\n\t\tList<Person> users = q.getResultList();\n\t\treturn users;\n\t}", "public List<Student> search() {\n \tQuery query = em.createQuery(\"Select e FROM Student e WHERE e.grade > 50.00\");\r\n \tList<Student> result = query.getResultList();\r\n \t\r\n \t \r\n \t// Query for a List of data elements.\r\n// \tQuery query = em.createQuery(\"Select e.firstname FROM Student e\");\r\n// \tList<String> result = query.getResultList();\r\n \t \r\n \t// Query for a List of element arrays.\r\n// \tQuery query = em.createQuery(\"Select e.firstname, e.grade FROM Student e\");\r\n// \tList<Object[]> result = query.getResultList();\r\n \t\r\n\t\t// \tsetFirstResult()\r\n\t\t// \tsetMaxResults()\r\n \t\r\n \treturn result;\r\n }", "List<PersonRegisterDo> selectByExample(PersonRegisterDoExample example);", "public Iterable<Person> getPersonsByLastName(String lastName) {\n\t\tMap<String, Object> params = new HashMap<>();\n\t\tparams.put(\"lastName\", lastName);\n\t\t\n\t\tFilter filter = new Filter(\"lastName\", ComparisonOperator.EQUALS, lastName);\n\t\tCollection<Person> persons = session.loadAll(Person.class, filter, 2);\n\t\treturn persons;\n\t}", "public School(){\n _persons = new TreeMap<Integer, Person>();\n _students = new HashMap<Integer, Student>();\n _professors = new HashMap<Integer, Professor>();\n _administratives = new HashMap<Integer, Administrative>();\n _courses = new HashMap<String,Course>();\n _disciplines = new HashMap<String,Discipline>();\n _disciplineCourse = new TreeMap<String, HashMap<String, Discipline>>();\n }", "public List<Student> fetch() {\n List<Student> studentList = new ArrayList<>();\n String[] columns = new String[]{DatabaseHelper.ID, DatabaseHelper.STUDENT_NAME, DatabaseHelper.STUDENT_ADDRESS};\n Cursor cursor = sqLiteDatabase.query(DatabaseHelper.TABLE_NAME, columns, null,\n null, null, null, null);\n while (cursor.moveToNext()) {\n Student student = new Student(cursor.getString(cursor.getColumnIndex(DatabaseHelper.STUDENT_NAME)),\n cursor.getString(cursor.getColumnIndex(DatabaseHelper.STUDENT_ADDRESS)),\n cursor.getInt(cursor.getColumnIndex(DatabaseHelper.ID)));\n studentList.add(student);\n }\n return studentList;\n }", "public List<Person> queryAll(DalHints hints) throws SQLException {\n\t\thints = DalHints.createIfAbsent(hints);\n\t\t\n\t\tSelectSqlBuilder builder = new SelectSqlBuilder().selectAll().orderBy(\"PeopleID\", ASC);\n\t\t\n\t\treturn client.query(builder, hints);\n\t}", "@Override\n\tpublic List<Student> queryAll() {\n\t\treturn sDao.queryAll();\n\t}", "@Override\n\tpublic List<Student> queryByGid(int gid) {\n\t\treturn sDao.queryByGid(gid);\n\t}", "public PersonsResponse persons(String auth) throws DataAccessException {\n PersonsResponse personsResponse = new PersonsResponse();\n Database db = new Database();\n try {\n Connection conn = db.openConnection();\n AuthTokenDao authTokenDao = new AuthTokenDao(conn);\n AuthToken authToken = authTokenDao.getAuthToken(auth);\n if (authToken != null) {\n PersonDao personDao = new PersonDao(conn);\n personsResponse.data = personDao.getPersonsOfUser(authToken.getUserName());\n personsResponse.setSuccess(true);\n db.closeConnection(true);\n }\n else {\n throw new AuthorizationException(\"Error: unauthorized request\");\n }\n\n } catch (DataAccessException | AuthorizationException e) {\n personsResponse.setMessage(e.getMessage());\n personsResponse.setSuccess(false);\n db.closeConnection(false);\n }\n return personsResponse;\n }", "@GetMapping(\"/schooldistricts\")\n public List<SchoolDistrict> listDistricts() {\n List<SchoolDistrict> schoolDistrictList = schoolDistrictRepository.findAll();\n return schoolDistrictList;\n }", "public static List<Person> loadTrainingSet(){\n List<Person> list_of_persons = new LinkedList<Person>();\n String[] names = getAllNames();\n\n try (Connection con = DriverManager.getConnection(url, user, password)){\n for(int i=0; i<names.length; i++){\n List<Histogram> histograms = new ArrayList<>();\n String query = \"SELECT h_json FROM \"+DATABASE_NAME+\".\"+names[i]+\";\";\n \n Statement st = con.createStatement();\n ResultSet rs = st.executeQuery(query);\n\n while (rs.next()) {\n Map<Integer, Integer> map = new HashMap<>();\n JSONObject obje = new JSONObject(rs.getString(1));\n for(int y=0; y<255; y++){\n map.put(y, (int)obje.get(\"\"+y));\n }\n histograms.add(new Histogram(map));\n }\n\n list_of_persons.add(new Person(names[i], histograms));\n }\n con.close();\n } catch (SQLException ex) {\n ex.printStackTrace();\n } \n\n return list_of_persons;\n }", "java.util.List<People>\n getUserList();", "List<Student> getStudent();", "Collection<User> getStaffs() throws DataAccessException;" ]
[ "0.6506123", "0.64141273", "0.6381909", "0.63584256", "0.62949157", "0.62947", "0.6259685", "0.62467813", "0.62413895", "0.6219244", "0.62152374", "0.62050927", "0.6167156", "0.6101667", "0.60696113", "0.6064819", "0.6045175", "0.6040154", "0.5999078", "0.59905", "0.5979659", "0.5969712", "0.594699", "0.5859955", "0.58329445", "0.58300495", "0.57987684", "0.5790241", "0.5768806", "0.5762904", "0.5754488", "0.5754279", "0.5747954", "0.5738114", "0.5725917", "0.57252467", "0.57246", "0.57239157", "0.5701405", "0.5692105", "0.5684296", "0.5678986", "0.5673995", "0.5670775", "0.5664595", "0.5658036", "0.5652662", "0.5651132", "0.5647988", "0.5645448", "0.5645357", "0.564201", "0.5640742", "0.56356126", "0.5631657", "0.5624957", "0.56229424", "0.56209093", "0.56083006", "0.5601507", "0.55775756", "0.55763024", "0.55760956", "0.55714244", "0.5568018", "0.5567507", "0.55653524", "0.55619335", "0.5554648", "0.5553082", "0.55520827", "0.5548873", "0.5544154", "0.55419236", "0.55398667", "0.5537161", "0.55324787", "0.5524958", "0.55178463", "0.5501015", "0.54900855", "0.54862255", "0.54743963", "0.5472724", "0.546913", "0.54679036", "0.5466562", "0.5465263", "0.5457896", "0.5455685", "0.5454395", "0.54497653", "0.5446783", "0.54451543", "0.54360807", "0.5435266", "0.54318935", "0.5425973", "0.5424621", "0.5422486", "0.542198" ]
0.0
-1
Returns the students in the school database
public HashMap<Integer, Student> getStudents() { return _students; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public ArrayList<Student> getStudents() {\n\n ArrayList<Student> students = new ArrayList<Student>();\n String query = \"SELECT * FROM student\";\n try{\n result = statement.executeQuery(query);\n while(result.next()) {\n\n String id = Integer.toString(result.getInt(\"student_id\"));\n String firstName = result.getString(\"student_first_name\");\n String lastName = result.getString(\"student_last_name\");\n String degree = result.getString(\"degree\");\n String yearOfStudy = result.getString(\"year_of_study\");\n String outcome = result.getString(\"outcome\");\n students.add(new Student(id, firstName, lastName, degree, yearOfStudy, outcome));\n\n }\n }\n catch (SQLException e){\n\n }\n\n return students;\n }", "@Override\n\tpublic List<Student> getStudents() {\n\t\tSession currentSession = sessionFactory.getCurrentSession();\n\n\t\t// create a query\n\t\tQuery<Student> query = currentSession.createQuery(\"from Student order by lastName\", Student.class);\n\n\t\t// execute the query and get the results list\n\t\tList<Student> students = query.getResultList();\n\n\t\t// return the results\n\t\treturn students;\n\t}", "public ArrayList<Student> getAllStudents()\n {\n Cursor cursor = sqlServices.getData(USER_TABLE, null, USER_IS_TEACHER + \" = ?\",\n new String[]{\"0\"});\n return getStudentFromCursor(cursor);\n }", "List<Student> getAllStudents();", "@Override\n\t//查询所有数据\n\tpublic List<Student> selectStudents() {\n\t\tConnection connection =null;\n\t\tPreparedStatement ps = null;\n\t\tResultSet rs = null;\n\t\tList<Student> sList = new ArrayList<Student>();\n\t\t\n\t\ttry {\n\t\t\tconnection = MySQLConnectUtil.getMySQLConnection();\n\t\t\tps = connection.prepareStatement(QUARYSQL);\n\t\t\trs = ps.executeQuery();\n\t\t\twhile (rs.next()) {\n\t\t\t\tStudent student = new Student();\n\t\t\t\tstudent.setId(rs.getString(\"ID\"));\n\t\t\t\tstudent.setName(rs.getString(\"NAME\"));\n\t\t\t\tstudent.setAge(rs.getInt(\"AGE\"));\n\t\t\t\tsList.add(student);\n\t\t\t}\n\t\t} catch (SQLException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}finally {\n\t\t\tMySQLConnectUtil.closeResultset(rs);\n\t\t\tMySQLConnectUtil.closePreparestatement(ps);\n\t\t\tMySQLConnectUtil.closeConnection(connection);\n\t\t}\n\t\treturn sList;\n\t}", "@Override\n\tpublic Iterator<Student> selectAll() {\n\t\tString sql=\"SELECT a.id,a.num,a.name,a.email,a.phone,a.degree,a.project,a.school,b.name,a.is_cap from tc_student as a,tc_school as b where a.school=b.id\";\n\t\tArrayList<Student> arr=new ArrayList<Student>();\n\t\tResultSet rs=mysql.query(sql);\n\t\ttry {\n\t\t\twhile(rs.next())\n\t\t\t{\n\t\t\t\tStudent stu=new Student();\n\t\t\t\tstu.setId(rs.getInt(1));\n\t\t\t\tstu.setNum(rs.getString(2));\n\t\t\t\tstu.setName(rs.getString(3));\n\t\t\t\tstu.setEmail(rs.getString(4));\n\t\t\t\tstu.setPhone(rs.getString(5));\n\t\t\t\tstu.setDegree(rs.getShort(6));\n\t\t\t\tstu.setProject(rs.getInt(7));\n\t\t\t\tstu.setSchool(rs.getInt(8));\n\t\t\t\tstu.setSchoolstring(rs.getString(9));\n\t\t\t\tstu.setIs_cap(rs.getInt(10));\n\t\t\t\tstu.setDegreestring(degreemap[stu.getDegree()]);\n\t\t\t\tarr.add(stu);\n\t\t\t}\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\treturn arr.iterator();\n\t}", "public List <Student> getAllStudents();", "private List<School> querySchools(final Connection connection) {\n List<Integer> schools = new ArrayList<>();\n try {\n Statement st = connection.createStatement();\n ResultSet rs = st.executeQuery(allSchoolsQuery);\n while (rs.next()) {\n schools.add(rs.getInt(1));\n }\n rs.close();\n st.close();\n } catch (Exception e) {\n e.printStackTrace();\n }\n\n List<School> result = new ArrayList<>();\n\n for (Integer schoolId : schools) {\n List<Integer> students = new ArrayList<>();\n String query = schoolsStudentsQuery.replace(SCHOOL_ID_SQL_TAG, schoolId.toString());\n\n try {\n Statement st = connection.createStatement();\n ResultSet rs = st.executeQuery(query);\n while (rs.next()) {\n students.add(rs.getInt(1));\n }\n rs.close();\n st.close();\n } catch (Exception e) {\n e.printStackTrace();\n continue;\n }\n\n result.add(new School(schoolId, students));\n }\n\n return result;\n }", "@Override\r\n\tpublic List<Student> getStudents(String courseName) {\n\t\tList<Student> students=new ArrayList<>();\r\n\t\tString sql=\"select studentid, studentname, studentshv.courseid from studentshv inner join courseshv on studentshv.courseid=courseshv.courseid where coursename=?\";\r\n\t\tPreparedStatement pstmt = null;\r\n\t\ttry {\r\n\t\t\tpstmt=conn.prepareStatement(sql);\r\n\t\t\tpstmt.setString(1, courseName);\r\n\t\t\tResultSet rs=pstmt.executeQuery();\r\n\t\t\twhile(rs.next()){\r\n\t\t\t\tlong studentId=rs.getLong(\"studentid\");\r\n\t\t\t\tString studentName=rs.getString(\"studentname\");\r\n\t\t\t\tlong courseId=rs.getLong(\"courseid\");\r\n\t\t\t\tstudents.add(new Student(studentId,studentName,courseId));\r\n\t\t\t}\r\n\t\t} catch (Exception e) {\r\n\t\t\t// TODO: handle exception\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\treturn students;\r\n\t}", "@Override\r\n\tpublic Students findStudents() {\n\t\treturn null;\r\n\t}", "public StudentDataBase getStudents() {\n return students;\n }", "@Override\r\n\tpublic List<Student> getAllStudents() {\n\t\treturn studentRepository.findAll();\r\n\t}", "public List getStudentList() throws GenericBusinessException {\n sust.paperlessexm.hibernatehelper.HibernateQueryHelper hibernateTemplate = new sust.paperlessexm.hibernatehelper.HibernateQueryHelper();\n try {\n\n String queryString = \"from \" + Student.class.getName() + \" e\";\n // Add a an order by on all primary keys to assure reproducable results.\n String orderByPart = \"\";\n orderByPart += \" order by e.studentId\";\n queryString += orderByPart;\n Query query = hibernateTemplate.createQuery(queryString);\n List list = hibernateTemplate.list(query);\n\n return list;\n } finally {\n log.debug(\"finished getStudentList\");\n }\n }", "@Override\r\n\tpublic List<Student> getAllStudent() {\n\t\treturn sdao.getAllStudent();\r\n\t}", "public ArrayList<Student> selectAllStudents() {\n Connection connection = null;\n Statement statement = null;\n ResultSet resultSet = null;\n ArrayList<Student> studentList = new ArrayList<>();\n try {\n Class.forName(Tools.MYSQL_JDBC_DRIVER);\n\n connection = DriverManager.getConnection(Tools.DB_URL, Tools.USERNAME, Tools.PASSWORD);\n\n statement = connection.createStatement();\n\n String query = \"SELECT * FROM STUDENTS;\";\n\n resultSet = statement.executeQuery(query);\n\n while (resultSet.next()) {\n String id = resultSet.getString(\"STUDENT_ID\");\n String lastName = resultSet.getString(\"LAST_NAME\");\n String firstName = resultSet.getString(\"FIRST_NAME\");\n String dob = resultSet.getString(\"DATE_OF_BIRTH\");\n float fees = resultSet.getFloat(\"TUITION_FEES\");\n Student student = new Student(id, firstName, lastName, dob, fees);\n\n studentList.add(student);\n\n }\n\n } catch (ClassNotFoundException | SQLException e) {\n e.printStackTrace();\n } finally {\n if (resultSet != null) {\n try {\n resultSet.close();\n } catch (SQLException e) {\n e.printStackTrace();\n }\n }\n\n if (statement != null) {\n try {\n statement.close();\n } catch (SQLException e) {\n e.printStackTrace();\n }\n }\n if (connection != null) {\n try {\n connection.close();\n } catch (SQLException e) {\n e.printStackTrace();\n }\n }\n }\n return studentList;\n }", "public List<String> getStudents();", "@Override\n\tpublic List<Student> getAllStudents() {\n\t\tList<Student> students = new ArrayList<Student>();\n\t\ttry {\n\t\t\tStatement stmt = conn.createStatement();\n\t\t\t//select CAST(gpa as DECIMAL(3,2)) AS gpa from student;\n\t\t\t//ResultSet rs = stmt.executeQuery(\"select * from student\");\n\t\t\tResultSet rs = stmt.executeQuery(\"select ID, Firstname, Lastname, Program, CAST(gpa as DECIMAL(3,2)) AS gpa from student\");\n\t\t\t\n\t\t\twhile(rs.next()) {\n\t\t\t\tStudent stu = new Student();\n\t\t\t\tstu.setStudentid(rs.getInt(\"ID\"));\n\t\t\t\tstu.setFirstname(rs.getString(\"Firstname\"));\n\t\t\t\tstu.setLastname(rs.getString(\"Lastname\"));\n\t\t\t\tstu.setProgram(rs.getString(\"Program\"));\n\t\t\t\tstu.setGpa(rs.getDouble(\"GPA\"));\n\n\t\t\t\tstudents.add(stu);\n\t\t\t}\n\t\t\t\n\t\t\trs.close();\n\t\t\tstmt.close();\n\t\t} catch (SQLException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\t\treturn students;\n\t}", "public ArrayList<Student> getStudentsForCourse(Course course){\n ArrayList<Student> result = new ArrayList();\n \n String statement = GET_SUDENTS_FOR_COURSE;\n \n ResultSet rs = data.makePreparedStatement(statement,new Object[]{(Object)course.getId()});\n try {\n while(rs.next()){\n Student student = new Student(rs.getInt(\"id\"),rs.getString(\"first_name\"),rs.getString(\"last_name\"),\n rs.getDate(\"birthday\").toLocalDate(),rs.getDouble(\"tuition_fees\"));\n result.add(student);\n \n }\n } catch (SQLException ex) {\n System.out.println(\"Problem with CourseDao.getStudentsForCourse()\");\n }finally{\n data.closeConnections(rs,data.ps, data.conn);\n }\n \n return result;\n }", "public List<Student> selectStudentAll() {\n\t\treturn this.studentMaper.selectStudentAll();\r\n\t}", "public static ArrayList<Student> getAllStudents() throws SQLException {\n\t\t\r\n\t\tArrayList<Student> students = new ArrayList<Student>();\r\n\t\t\t\t\r\n\t\t\t\tConnection connection = SQLUtil.getConnection();\r\n\t\t\t\tStatement statement = connection.createStatement(ResultSet.TYPE_SCROLL_SENSITIVE, ResultSet.CONCUR_UPDATABLE);\r\n\t\t\t\t\r\n\t\t\t\tString sql = \"SELECT * FROM students\";\r\n\t\t\t\t\r\n\t\t\t\tResultSet resultSet = statement.executeQuery(sql);\r\n\t\t\t\t\r\n\t\t\t\tresultSet.first();\r\n\t\t\t\t\r\n\t\t\t\twhile (!resultSet.isAfterLast()) {\r\n\t\t\t\t\tStudent student = new Student(resultSet.getString(\"firstname\"), resultSet.getString(\"lastname\"), resultSet.getString(\"registration_number\"));\r\n\r\n\t\t\t\t\tstudents.add(student);\r\n\t\t\t\t\tresultSet.next();\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\treturn students;\r\n\t\t\r\n\t}", "public List<Student> getAllStudentData() {\r\n\t\tList<Student> list = new ArrayList<Student>();\r\n\t\ttry {\r\n\t\t\tConnection con = DatabaseUtility.getCon(inputStream);\r\n\t\t\tPreparedStatement ps = con.prepareStatement(\"select * from student\");\r\n\t\t\tResultSet rs = ps.executeQuery();\r\n\t\t\twhile (rs.next()) {\r\n\t\t\t\tStudent stud = new Student();\r\n\r\n\t\t\t\tstud.setRollno(rs.getInt(1));\r\n\t\t\t\tstud.setFname(rs.getString(2));\r\n\t\t\t\tstud.setLname(rs.getString(3));\r\n\t\t\t\tstud.setEmail(rs.getString(4));\r\n\t\t\t\tstud.setGender(rs.getString(5));\r\n\t\t\t\tstud.setDOB(rs.getString(6));\r\n\t\t\t\tstud.setAddress(rs.getString(7));\r\n\t\t\t\tstud.setContact(rs.getString(8));\r\n\r\n\t\t\t\tlist.add(stud);\r\n\t\t\t}\r\n\t\t\tcon.close();\r\n\t\t} catch (Exception ex) {\r\n\t\t\tSystem.out.println(ex);\r\n\t\t}\r\n\r\n\t\treturn list;\r\n\t}", "public String getStudents(){\n\t\treturn this.students;\n\t}", "public static List<StudentInfo> searchStudentInfo(String firtname, String lastname) {\r\n \r\n List<StudentInfo> students = new ArrayList<>();\r\n \r\n // declare resultSet\r\n ResultSet rs = null;\r\n \r\n // declare prepared statement\r\n PreparedStatement preparedStatement = null;\r\n \r\n // declare connection\r\n Connection conn = null;\r\n try {\r\n // get connection\r\n conn = DBUtils.getConnection();\r\n\r\n // set prepared statement\r\n preparedStatement = conn\r\n .prepareStatement(\"SELECT instructor.FName, instructor.LName,\" +\r\n \" IF(EXISTS ( SELECT * FROM gra WHERE gra.StudentId = phdstudent.StudentId) , 'GRA', \" +\r\n \" IF(EXISTS ( SELECT * FROM gta WHERE gta.StudentId = phdstudent.StudentId) , 'GTA', \" +\r\n \" IF(EXISTS ( SELECT * FROM scholarshipsupport WHERE scholarshipsupport.StudentId = phdstudent.StudentId) , 'scholarship', \" +\r\n \" IF(EXISTS ( SELECT * FROM selfsupport WHERE selfsupport.StudentId = phdstudent.StudentId) , 'self', ''))\" +\r\n \" )) AS StudentType, \" +\r\n \" milestone.MName, milestonespassed.PassDate\" +\r\n \" FROM phdstudent left join instructor on instructor.InstructorId = phdstudent.Supervisor\"\r\n + \" left join milestonespassed on phdstudent.StudentId = milestonespassed.StudentId\"\r\n + \" left join milestone on milestonespassed.MID = milestone.MID\" +\r\n \" WHERE phdstudent.FName = ? AND phdstudent.LName = ?\");\r\n \r\n // execute query\r\n preparedStatement.setString(1, firtname);\r\n preparedStatement.setString(2, lastname); \r\n\r\n rs = preparedStatement.executeQuery();\r\n \r\n //iterate and create the StudentInfo objects\r\n while (rs.next()) {\r\n \r\n students.add(new StudentInfo(rs.getString(1)+ \" \" + rs.getString(2), rs.getString(3), rs.getString(4), \r\n utils.Utils.toDate(rs.getDate(5))));\r\n\r\n }\r\n }catch(Exception ex){\r\n ex.printStackTrace();\r\n }\r\n finally {\r\n DBUtils.closeResource(conn);\r\n DBUtils.closeResource(preparedStatement);\r\n DBUtils.closeResource(rs);\r\n } \r\n \r\n return students; \r\n }", "public static ArrayList<Student> getAllStudenti() {\n\t\ttry {\n\t\t\tRequestContent rp = new RequestContent();\n\t\t\trp.parameters = new Object[] {};\n\t\t\trp.type = RequestType.GET_ALL_STUDENTS;\n\t\t\tReceiveContent rps = sendReceive(rp);\n\t\t\treturn (ArrayList<Student>) rps.parameters[0];\n\t\t} catch (Exception e) {\n\t\t\tSystem.out.println(\"SendNewsLetter error\");\n\t\t}\n\t\treturn new ArrayList<Student>();\n\t}", "List<Student> getStudent();", "@Override\n\tpublic List<Student> retrieveAllStudents() {\n\t\tTypedQuery<Student> query = em.createQuery(\"select s from Student s\",\n\t\t\t\tStudent.class);\n\t\treturn query.getResultList();\n\t}", "public List<Student> stulist() throws Exception {\n\t\tClass.forName(\"com.mysql.jdbc.Driver\");\n\t\tConnection conn = DriverManager.getConnection(\"jdbc:mysql:///stuu\", \"root\", \"root\");\n\t\tPreparedStatement ps = conn.prepareStatement(\"select * from student\");\n\t\tResultSet rs = ps.executeQuery();\n\t\tList<Student> list = new ArrayList<Student>();\n\t\twhile(rs.next())\n\t\t{\n\t\t\tStudent s = new Student(rs.getInt(1),rs.getString(2),rs.getString(3),rs.getString(4),rs.getString(5),rs.getString(6));\n\t\t\tlist.add(s);\n\t\t}\n\t\trs.close();\n\t\tps.close();\n\t\tconn.close();\n\t\treturn list;\n\t}", "List<StudentClass> findClassesBySchoolId(int id) throws TechnicalException;", "List<SchoolSubject> findSchoolSubjects() throws DaoException;", "public List<Student> getCampusStudent(Campus c) {\n\t\tList<Student> allStudentList = new ArrayList<Student>();\n\t\tConnection conn = DBUtil.getConn();\n\t\tStatement stmt = DBUtil.createStmt(conn);\n\t\tString sql = \"select * from student where ville='%s' and region='%s' order by stu_ID \";\n\t\tsql = String.format(sql, c.getVille(), c.getRegion());\n\t\tSystem.out.println(sql);\n\t\tResultSet rst = DBUtil.getRs(stmt, sql);\n\t\ttry {\n\t\t\twhile (rst.next()) {\n\t\t\t\tStudent student = new Student();\n\t\t\t\tfillRsStudent(rst, student);\n\t\t\t\tallStudentList.add(student);\n\n\t\t\t}\n\t\t} catch (SQLException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn allStudentList;\n\t}", "public ArrayList getStudents();", "@Override\r\n public List<String> getStudenti() {\r\n List<Studente> listaStudenti = studenteFacade.findAll();\r\n List<String> result = new ArrayList<>();\r\n\r\n for (Studente s : listaStudenti) {\r\n result.add(s.toString());\r\n }\r\n return result;\r\n }", "@GetMapping(\"/schools\")\n public List<School> list() {\n List<School> schoolList = schoolRepository.findAll();\n return schoolList;\n }", "@Override\n\tpublic List<Student> queryAll() {\n\t\treturn sDao.queryAll();\n\t}", "public String[] getStudents() {\n\t\treturn students;\n\t}", "private static String searchStudent ( int studentId){\n for (Student s : studentDB) {\n if (s.getID() == studentId) {\n return s.getName();\n }\n }\n return \"\";\n }", "public ArrayList<Student> studentList()\n {\n ArrayList<Student> studentList = new ArrayList<>();\n try\n {\n DatabaseConnection databaseConnection = new DatabaseConnection();\n String query = \"select * from student\";\n ResultSet rs = databaseConnection.s.executeQuery(query);\n Student student;\n while(rs.next())\n {\n student = new Student(rs.getInt(\"student_id\"), rs.getString(\"student_name\"), rs.getString(\"batch\"), rs.getString(\"student_username\"), rs.getString(\"student_password\"));\n studentList.add(student);\n }\n }\n catch(Exception e)\n {\n JOptionPane.showMessageDialog(null, e);\n }\n return studentList;\n }", "private static void showStudentDB () {\n for (Student s : studentDB) {\n System.out.println(\"ID: \" + s.getID() + \"\\n\" + \"Student: \" + s.getName());\n }\n }", "public void showstudents(){\n for (int i=0; i<slist.size(); i++){\n System.out.println(slist.get(i).getStudent());\n }\n }", "public ArrayList<Student> getAllStudents() throws SQLException {\r\n\t\tArrayList<Student> studentList = new ArrayList<Student>();\r\n\t\tConnection dbConnection = null;\r\n\r\n\t\ttry {\r\n\t\t\tdbConnection = openConnection();\r\n\r\n\t\t\tString sqlText = \"SELECT id, firstname, lastname, streetaddress, postcode, postoffice \"\r\n\t\t\t\t\t+ \"FROM Student ORDER BY id DESC\";\r\n\r\n\t\t\tPreparedStatement preparedStatement = dbConnection.prepareStatement(sqlText);\r\n\r\n\t\t\tResultSet resultSet = preparedStatement.executeQuery();\r\n\r\n\t\t\twhile (resultSet.next()) {\r\n\t\t\t\tint id = resultSet.getInt(\"id\");\r\n\t\t\t\tString firstname = resultSet.getString(\"firstname\");\r\n\t\t\t\tString lastname = resultSet.getString(\"lastname\");\r\n\t\t\t\tString streetaddress = resultSet.getString(\"streetaddress\");\r\n\t\t\t\tString postcode = resultSet.getString(\"postcode\");\r\n\t\t\t\tString postoffice = resultSet.getString(\"postoffice\");\r\n\r\n\t\t\t\tstudentList.add(new Student(id, firstname, lastname, streetaddress, postcode, postoffice));\r\n\t\t\t}\r\n\r\n\t\t} catch (SQLException sqle) {\r\n\t\t\tthrow sqle; // Let the caller decide what to do with the exception\r\n\r\n\t\t} finally {\r\n\t\t\tcloseConnection(dbConnection);\r\n\t\t}\r\n\t\treturn studentList;\r\n\t}", "public Iterable<StudentQualificationPersonDetail> getStudentRegisteredData(){\n\t\t\n\t\treturn sqcRepository.findAll();\n\t}", "public ArrayList<Student> retrieveAllCurrent() {\r\n\t\tArrayList<Student> students = new ArrayList<Student>();\r\n\t\tHashMap<String, ArrayList<String>> map = MySQLConnector.executeMySQL(\"select\", \"SELECT * FROM `is480-matching`.users inner join `is480-matching`.students on users.id=students.id WHERE users.type LIKE 'Student';\");\r\n\t\tSet<String> keySet = map.keySet();\r\n\t\tIterator<String> iterator = keySet.iterator();\r\n\t\t\r\n\t\tDate date = new Date();\r\n\t\tCalendar cal = Calendar.getInstance();\r\n\t\tcal.setTime(date);\r\n\t\t\r\n\t\tint currYear = cal.get(cal.YEAR);\r\n\t\tint currMth = cal.get(cal.MONTH);\r\n\t\t\r\n\t\tint year = 0;\r\n\t\t\r\n\t\twhile (iterator.hasNext()){\r\n\t\t\tString key = iterator.next();\r\n\t\t\tArrayList<String> array = map.get(key);\t\r\n\t\t\tint id \t\t\t\t= Integer.parseInt(array.get(0));\r\n\t\t\tString username \t= array.get(1);\r\n\t\t\tString fullName \t= array.get(2);\r\n\t\t\tString contactNum \t= array.get(3);\r\n\t\t\tString email \t\t= array.get(4);\r\n\t\t\tString type\t\t\t= array.get(5);\r\n\t\t\tString secondMajor \t= array.get(7);\r\n\t\t\tint role \t\t\t= Integer.parseInt(array.get(8));\r\n\t\t\tint teamId \t\t\t= Integer.parseInt(array.get(9));\r\n\t\t\tint prefRole \t\t= Integer.parseInt(array.get(10));\r\n\t\t\t\r\n\t\t\ttry{\r\n\t\t\t\tint matricYear = Integer.parseInt(username.substring(username.length() - 4, username.length()));\r\n\t\t\t\t\r\n\t\t\t\tyear = currYear - matricYear;\r\n\t\t\t\t\r\n\t\t\t\tStudent student = new Student(id, username, fullName, contactNum, email, type, secondMajor, role, teamId, prefRole);\r\n\t\t\t\t\r\n\t\t\t\tif(currMth > 8){\r\n\t\t\t\t\tyear++;\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(year == 3 || year == 4){\r\n\t\t\t\t\tstudents.add(student);\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t}catch(Exception e){}\r\n\t\t}\r\n\t\t\r\n\t\treturn students;\r\n\t}", "List<Student> getAll() {\n\t\tSessionFactory sessionFactory = null;\n\t\tStandardServiceRegistry registry = new StandardServiceRegistryBuilder()\n\t\t\t\t.configure()\t// hibernate.cfg.xml\n\t\t\t\t.build();\n\t\ttry {\n\t\t\tsessionFactory = new MetadataSources(registry).buildMetadata().buildSessionFactory();\n\t\t} catch (Exception ex) {\n\t\t\tStandardServiceRegistryBuilder.destroy(registry);\n\t\t\tSystem.out.println(\"Setup Failed:\" + ex.getMessage());\n\t\t}\n\t\t// session = configObj.buildSessionFactory(serviceRegistryObj).openSession();\n\t\tSession session = sessionFactory.openSession();\n\t\tTransaction tx = null;\n\t\ttry {\n\t\t\ttx = session.beginTransaction();\n\t\t\tList data = session.createQuery(\"FROM Student\").list();\n\t\t\tfor (Iterator iterator = data.iterator(); iterator.hasNext();) {\n\t\t\t\tStudent st = (Student) iterator.next();\n\t\t\t\tSystem.out.print(\"Student ID: \" + st.getStudentId());\n\t\t\t\tSystem.out.print(\" Last Name: \" + st.getName());\n\t\t\t\tSystem.out.println(\" Address: \" + st.getAddress());\n\t\t\t}\n\t\t\ttx.commit();\n\t\t\treturn data;\n\t\t} catch (HibernateException e) {\n\t\t\tif (tx != null)\n\t\t\t\ttx.rollback();\n\t\t\te.printStackTrace();\n\t\t} finally {\n\t\t\tsession.close();\n\t\t}\n\t\treturn null;\n\t}", "@GetMapping(path = \"/std/all\")\n\tpublic @ResponseBody Iterable<student> getAllStsudents() {\n\t\treturn studentRepo.findAll();\n\n\t}", "@Override\r\n\tpublic List<Student> getAll() {\n\t\treturn dao.getAll();\r\n\t}", "static List<Student> getStudents() {\n return students;\n }", "@Override\n\t public List<Student> getAllStudent(BigInteger stdId){\n\t \t\n\t\t \n\t \treturn (List<Student>) studentrepo.findAll(); \t\n\t }", "@Override\n\tpublic List<Student> queryByGid(int gid) {\n\t\treturn sDao.queryByGid(gid);\n\t}", "@SuppressWarnings(\"unchecked\")\n\t\t@Override\n\t\tpublic List<Student> listStudent() {\n\t\t\treturn sessionFactory.getCurrentSession().createQuery(\"from Student\").list();\n\t\t}", "public static List<Student> getStudents() {\n\t\tList<Student> students = new ArrayList<>();\n\t\t\n\t\t// add sample data\n\t\tstudents.add(new Student(\"James\", \"Richt\", \"[email protected]\"));\n\t\tstudents.add(new Student(\"Kelly\", \"Lou\", \"[email protected]\"));\n\t\tstudents.add(new Student(\"Lin\", \"Howe\", \"[email protected]\"));\n\t\t\n\t\t// return the list\n\t\treturn students;\n\t}", "public ArrayList getSchools();", "public static List<Student> getAllStudents(){\r\n Student student1 = new Student(\"Dowlath\",2,3.6,\"male\", Arrays.asList(\"Swim\",\"BasketBall\",\"VolleyBall\"),11);\r\n Student student2 = new Student(\"Bhavya\",2,3.8,\"female\",Arrays.asList(\"Swim\",\"Gymnastics\",\"soccer\"),12);\r\n\r\n\r\n /* 3rd Grade Students */\r\n Student student3 = new Student(\"Priya\",3,4.0,\"female\", Arrays.asList(\"Swim\",\"BasketBall\",\"Aerobics\"),10);\r\n Student student4 = new Student(\"Arsh\",3,3.9,\"male\",Arrays.asList(\"Swim\",\"Gymnastics\",\"soccer\"),9);\r\n\r\n\r\n /* 4th Grade Students */\r\n Student student5 = new Student(\"Sowmiya\",4,3.5,\"female\", Arrays.asList(\"Swim\",\"Dancing\",\"FootBall\"),15);\r\n Student student6 = new Student(\"Ariz\",4,3.9,\"male\",Arrays.asList(\"Swim\",\"BasketBall\",\"BaseBall\",\"FootBall\"),14);\r\n\r\n List<Student> students = Arrays.asList(student1,student2,student3,student4,student5,student6);\r\n return students;\r\n }", "public List<User> getStudents(Group currentGroup);", "private void getScholsFromDatabase() {\n schols = new Select().all().from(Scholarship.class).execute();\n }", "@Override\r\n\tpublic Collection<Student> findAll() {\n\t\treturn null;\r\n\t}", "public static List<SchoolModel> getSchoolData(Activity context) {\n Cursor cursor;\n cursor = context.getContentResolver().query(SchoolTable.URI, null, null, null, null);\n List<SchoolModel> schoolDataList = new ArrayList<>();\n if (cursor != null && !cursor.isClosed()) {\n while (cursor.moveToNext()) {\n schoolDataList.add(fetchSchoolDataFromCursor(cursor));\n }\n cursor.close();\n }\n\n return schoolDataList;\n }", "public static ArrayList<String> retrieveStudentInfo(ArrayList<Student> al,String schoolName) {\n \tArrayList<String> str=new ArrayList<String>();\n \tfor(int i=0;i<al.size();i++){\n \tStudent s=al.get(i);\n \tif(s.getSchoolName().equalsIgnoreCase(schoolName)){\n \t str.add(s.getStudName());\n \t}\n }\n \treturn str;\n }", "public Student getStudents() {\n\t\treturn this.student;\n\t}", "@Override\n\t@Transactional\n\tpublic List<Student> getStudents() {\n\t\tAuthentication authentication = SecurityContextHolder.getContext().getAuthentication();\n\t\tString username = authentication.getName();\n\t\tSystem.out.println(\"The username is: \"+username);\n\t\tSession currentSession = sessionFactory.getCurrentSession();\n\t\t\n\t\tQuery<Student> query = currentSession.createQuery(\"from Student s where s.username='\"+username+\"'\", Student.class);\n\t\t\n List<Student> students = query.getResultList();\n\t\t\n\t\treturn students;\n\t}", "Student findWithSectionsBy(int studentNumber);", "private ArrayList<Student> getStudentsFromRS(ResultSet rs) {\t\n\t\t\n\t\tArrayList<Student> someStudents = new ArrayList<Student>();\n\n\t\ttry {\n\t\t\twhile (rs.next()) {\n\t\t\t\tStudent aStudent = new Student();\n\t\t\t\taStudent.setId(rs.getInt(\"id\"));\n\t\t\t\taStudent.setfName(rs.getString(\"first_name\"));\n\t\t\t\taStudent.setlName(rs.getString(\"last_name\"));\n\t\t\t\taStudent.setGpa(rs.getDouble(\"gpa\"));\n\t\t\t\taStudent.setSat(rs.getInt(\"sat\"));\n\t\t\t\taStudent.setMajor(rs.getInt(\"major_id\"));\n\t\t\t\tsomeStudents.add(aStudent);\n\t\t\t}\n\t\t} catch (SQLException ex) {ex.printStackTrace();};\n\t\t\n\t\treturn someStudents.isEmpty() ? null : someStudents;\n\t}", "@GetMapping(\"/students\")\n\tpublic List<Student> getStudents(){\n\t\n\t\treturn theStudents;\n\t}", "public List<Student> getAllStudents() throws IOException {\n\t\tstudentList = studentListGenerator.generateList(\"StudentList.txt\");\n\t\treturn studentList;\n\t}", "public static ArrayList getSchoolList(Connection con) throws ServletException{\n try{\n PreparedStatement ps = con.prepareStatement(\"SELECT * FROM schools;\");\n ResultSet rs = ps.executeQuery();\n ArrayList<School> schoolList = new ArrayList();\n while (rs.next()){\n schoolList.add(new School(rs.getString(\"schoolname\")));\n }\n return schoolList;\n } catch (SQLException ex) {\n throw new ServletException(\"school list load problem\");\n } \n }", "@Query(\"from Student\")\n\tList<Student> findAllStudents();", "@GetMapping(\"student-list/{id}\")\n\tpublic Student getStudentById(@PathVariable int id) throws SQLException {\n\t\treturn studentSerivce.getStudents(id);\n\t}", "public List<User> getAllStudent() {\n\t\t return userDao.getAllUsers();\r\n\t }", "List<StudentRecord> getStudents(String clientId) throws Exception;", "@Transactional(propagation = Propagation.SUPPORTS,isolation = Isolation.DEFAULT,readOnly = true)\r\n\tpublic List<Student> findStudentsByStuName(String stuName) {\n\t\treturn studentMapper.findStudentsByStuName(\"%\"+stuName+\"%\");\r\n\t}", "public List<Student> fetch() {\n List<Student> studentList = new ArrayList<>();\n String[] columns = new String[]{DatabaseHelper.ID, DatabaseHelper.STUDENT_NAME, DatabaseHelper.STUDENT_ADDRESS};\n Cursor cursor = sqLiteDatabase.query(DatabaseHelper.TABLE_NAME, columns, null,\n null, null, null, null);\n while (cursor.moveToNext()) {\n Student student = new Student(cursor.getString(cursor.getColumnIndex(DatabaseHelper.STUDENT_NAME)),\n cursor.getString(cursor.getColumnIndex(DatabaseHelper.STUDENT_ADDRESS)),\n cursor.getInt(cursor.getColumnIndex(DatabaseHelper.ID)));\n studentList.add(student);\n }\n return studentList;\n }", "public void findallstudentservice() {\n\t\t dao.findallstudent();\r\n\t\t\r\n\t}", "@Override\n\tpublic List<Student> geStudents() {\n\t\treturn null;\n\t}", "@Override\r\n\tpublic List<StudentBean> getStudentsByClassId(String classId) {\n\t\treturn studentDAO.getStudentsByClassId(classId);\r\n\t}", "public ArrayList<String> getSchool() {\r\n\t\treturn school;\r\n\t}", "private void printStudListByCourse() throws Exception {\n String courseID = null;\n ArrayList<Student> studentList = new ArrayList<Student>();\n\n Scanner sc = new Scanner(System.in);\n\n System.out.println(\"\\nPlease enter course ID\");\n courseID = sc.nextLine();\n while(!courseID.matches(\"^[a-zA-Z]{2}[0-9]{4}$\")){\n System.out.println(\"Invalid input! Please enter a valid index number!\");\n courseID = sc.nextLine();\n }\n\n studentList= this.adminManager.getStudentByCourse(courseID);\n if(studentList == null){\n System.out.println(\"\\nThere is no such a course index\\n\\n\");\n System.exit(1);\n }\n if (studentList.isEmpty()){\n System.out.println(\"\\nThere is no student registered for this course ID\\n\\n\");\n return;\n }\n else{\n System.out.println(\"Hang on a moment while we load database.\\n\\n\");\n System.out.println(\"------------------------------------------------------\");\n System.out.println(\" STUDENT NAME GENDER NATIONALITY\");\n System.out.println(\"------------------------------------------------------\");\n //\n for(Student student:studentList){\n System.out.println(String.format(\"%20s %6s %s\",student.getName(),student.getGender(),student.getNationality()));\n }\n\n System.out.println(\"------------------------------------------------------\\n\");\n }\n }", "public ArrayList<Student> getStudents() {\r\n\t\treturn this.students;\r\n\t}", "public List<Student>ViewStudentDAO(int id) {\n\t\tList<Student> students = new ArrayList<Student>();\n\t\ttry {\n stmt = connection.prepareStatement(SqlQueries.GetStudents);\n stmt.setInt(1, id);\n stmt.execute();\t \n ResultSet result =stmt.executeQuery();\n while(result.next())\n {\n \tstudents.add(SDAO.GetStudent(result.getInt(1)));\n }\n } catch(Exception ex){\n \tlogger.error(ex.getMessage()); \n } finally{\n \t//close resources\n \tDBUtil.closeStmt(stmt);\n }\n\treturn students ;\t\n\t}", "public List<Student> search() {\n \tQuery query = em.createQuery(\"Select e FROM Student e WHERE e.grade > 50.00\");\r\n \tList<Student> result = query.getResultList();\r\n \t\r\n \t \r\n \t// Query for a List of data elements.\r\n// \tQuery query = em.createQuery(\"Select e.firstname FROM Student e\");\r\n// \tList<String> result = query.getResultList();\r\n \t \r\n \t// Query for a List of element arrays.\r\n// \tQuery query = em.createQuery(\"Select e.firstname, e.grade FROM Student e\");\r\n// \tList<Object[]> result = query.getResultList();\r\n \t\r\n\t\t// \tsetFirstResult()\r\n\t\t// \tsetMaxResults()\r\n \t\r\n \treturn result;\r\n }", "public static ArrayList<String> getStudents(String course)\n\t{\n\t\tHashMap<String, String> map = createMap();\n\t\tArrayList<String> students = new ArrayList<String>();\n\t\t\n\t\treturn students;\n\t}", "public static ArrayList<String> getStudents(String course)\n\t{\n\t\tHashMap<String, String> map = createMap();\n\t\tArrayList<String> students = new ArrayList<String>();\n\t\t\n\t\treturn students;\n\t}", "public ArrayList<Student> getStudents() {\r\n\t\treturn students;\r\n\t}", "List<Map<String, Object>> getStudentsList();", "@Override\n\tpublic Map<String, Object> getSchool() {\n\t\treturn getSession().selectOne(getNamespace() + \"getSchool\");\n\t}", "private List<Student> getStudentList(StudentSearchResponse srchResponse) {\r\n\t\tList<Student> studentList = new ArrayList<Student>();\r\n\t\tif (srchResponse != null && srchResponse.size() > 0) {\r\n\t\t\tfor (StudentSearchResult srchRes : srchResponse) {\r\n\t\t\t\tStudent std = new Student(srchRes.getInquiryId(),\r\n\t\t\t\t\t\tsrchRes.getStudentNumber(), srchRes.getFirstName(),\r\n\t\t\t\t\t\tsrchRes.getLastName(), srchRes.getMaidenName(),\r\n\t\t\t\t\t\tsrchRes.getDateOfBirth(), srchRes.getCity(),\r\n\t\t\t\t\t\tsrchRes.getStateProvince(), srchRes.getSSN());\r\n\t\t\t\tstudentList.add(std);\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn studentList;\r\n\t}", "@Override\r\n\tpublic Student[] getStudents() {\n\t\treturn this.students;\r\n\t}", "private void viewAllStudents() {\n Iterable<Student> students = ctrl.getStudentRepo().findAll();\n students.forEach(System.out::println);\n }", "private void loadSchoolInfo() {\r\n \r\n try {\r\n // Get fine ammount to be incurred by retrieving data from the database. \r\n String sql3 = \"SELECT * FROM schoolInfo \";\r\n pstmt = con.prepareStatement(sql3);\r\n\r\n ResultSet rs3=pstmt.executeQuery();\r\n if (rs3.next()) {\r\n schoolName = rs3.getString(\"name\");\r\n schoolContact = rs3.getString(\"contact\");\r\n schoolAddress = rs3.getString(\"address\");\r\n schoolRegion = rs3.getString(\"region\");\r\n schoolEmail = rs3.getString(\"email\");\r\n schoolWebsite = rs3.getString(\"website\");\r\n } \r\n \r\n pstmt.close();\r\n \r\n } catch (SQLException e) {\r\n }\r\n \r\n //////////////////////////////////// \r\n }", "@Test\n public void testFindAllStudents() throws Exception {\n List<Students> list = cs.findAllStudents();\n for (Students stu :\n list) {\n System.out.println(stu);\n }\n }", "Student[] getStudents(){\n\t\treturn enrolled.toArray(new Student[enrolled.size()]);\n\t}", "@RequestMapping(value=\"/students\", method=RequestMethod.GET) //MediaType.APPLICATION_XML_VALUE\r\n\tpublic List<Student> getStudentsList() {\r\n\t\tArrayList<Student> list = new ArrayList<Student>();\r\n\t\tlist.add(new Student(\"Kaja\", \"Piloun\", \"123465\", 25, null));\r\n\t\tlist.add(new Student(\"Paja\", \"Pilouna\", \"123465\", 25, null));\r\n\t\tlist.add(new Student(\"Vaja\", \"Pilounen\", \"123465\", 25, null));\r\n\t\t\r\n\t\treturn list;\r\n\t}", "public List<StudentDto> getAllStudents() {\n\t\tList<Student> studentList = studentRepository.findAll();\n\t\tif (ObjectUtils.isEmpty(studentList))\n\t\t\tthrow new ResourceNotFoundException(Constants.noDataFound);\n\n\t\tList<StudentDto> studentDtoList = studentList.stream()\n\t\t\t\t\t\t\t\t\t\t\t\t\t .map(converter::convert)\n\t\t\t\t\t\t\t\t\t\t\t\t\t .collect(Collectors.toList());\t\t\n\t\treturn studentDtoList;\n\t}", "@Override\n\tpublic Map<String, Student> getStudents() {\n\t\t//FIX ME!\n\t\treturn null;\n\t}", "public Student[] listStudents(long id) {\n\t\treturn new Tutor().listMyStudents(id);\n\t}", "List<ScoreEntity> findList(int studentId);", "abstract public void showAllStudents();", "@Override\n\tpublic List<Student> selectStudent(int classId) {\n\t\t\n\t\tString sql=\"select t2.stu_id,t2.stu_name,t2.stu_no ,t1.score_jilv,t1.score_jishu,t1.score_zhiye from \"\n\t\t\t\t+ \"(select stu_id,\"\n\t\t\t\t+ \"SUM(CASE WHEN score_type=1 THEN score_value END )score_jilv,\"\n\t\t\t\t+ \"SUM(CASE WHEN score_type=2 THEN score_value END )score_jishu,\"\n\t\t\t\t+ \"SUM(CASE WHEN score_type=3 THEN score_value END )score_zhiye \"\n\t\t\t\t+ \"from tb_score where class_id=? GROUP BY stu_id)t1,\"\n\t\t\t\t+ \"tb_student t2 WHERE t1.stu_id=t2.stu_id\";\n\t\tObject[] classid={classId};\n\t\t\n\t\tList<Student> stu=ORMUtil.ormutil().selectList(sql, classid, Student.class);\n\t\t\n\t\treturn stu;\n\t}", "@Override\n public List<Student> getStudentsByCourse(Course course) {\n return null;\n }", "@Override\n\tpublic Map<String, Object> getStudent() {\n\t\treturn getSession().selectOne(getNamespace() + \"getStudent\");\n\t}", "public ArrayList<Student> getStudents()\n {\n return students;\n }", "public Set<Student> getStudents() {\n return students;\n }" ]
[ "0.74881935", "0.72812086", "0.7215592", "0.71681446", "0.71432596", "0.7108698", "0.7081259", "0.70775026", "0.69926584", "0.6988015", "0.69590443", "0.69279134", "0.6912567", "0.69085383", "0.6903234", "0.69016397", "0.6893166", "0.68872935", "0.68829495", "0.68751943", "0.68551016", "0.6846626", "0.68159634", "0.68066776", "0.68062335", "0.6782105", "0.6775814", "0.6771286", "0.676858", "0.6767411", "0.67648", "0.67645913", "0.6762745", "0.67605674", "0.6755351", "0.6744036", "0.6742284", "0.6732277", "0.6714603", "0.67142576", "0.6708825", "0.67024916", "0.6695519", "0.6692632", "0.6687228", "0.664144", "0.66395396", "0.6624455", "0.6620243", "0.6609965", "0.660859", "0.6600984", "0.65872407", "0.6583376", "0.65694916", "0.6559721", "0.65464383", "0.6545568", "0.6545209", "0.6531378", "0.65194386", "0.6513977", "0.64874977", "0.64845294", "0.6480028", "0.6478278", "0.6475773", "0.64751846", "0.646589", "0.64556193", "0.6451153", "0.64463747", "0.64416444", "0.64375293", "0.6425988", "0.64232373", "0.6412772", "0.63962954", "0.63948226", "0.63948226", "0.63766634", "0.6375698", "0.63673985", "0.63636845", "0.63524646", "0.6339948", "0.63195497", "0.6318171", "0.6313791", "0.6313561", "0.6299424", "0.6295799", "0.6290184", "0.6280022", "0.62783307", "0.6271126", "0.62709254", "0.6267127", "0.6264969", "0.62646776" ]
0.669418
43
Returns the professors in the school database
public HashMap<Integer, Professor> getProfessors() { return _professors; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\tpublic List<Professor> getProfessors() {\n\t\tList<Professor> pros=null;\n\t\tProfessor pro=null;\n\t\t\n\t\ttry{\n\t\t\t\n\t\t\tstmt=conn.prepareStatement(\"SELECT ssn,name,department,password FROM Professor\");\n\t\t\t/*stmt.setString(1, admin.getCname());\n\t\t\tstmt.setString(2, admin.getCplace());*/\n\t\t\tResultSet rs=stmt.executeQuery();\n\t\t\tpros=new ArrayList<Professor>();\n\t\t\twhile(rs.next()){\n\t\t\t\tpro=new Professor(rs.getString(\"name\"),rs.getString(\"ssn\"),\"\", rs.getString(\"department\"));\n\t\t\t\t\n\t\t\t\tpros.add(pro);\n\t\t\t}\n\t\t\t}catch(SQLException e){\n\t\t\t\tex=e;\n\t\t\t}finally{\n\t\t\t\tif(conn!=null){\n\t\t\t\t\ttry{\n\t\t\t\t\t\tconn.close();\n\t\t\t\t\t}catch(SQLException e){\n\t\t\t\t\t\tif(ex==null){\n\t\t\t\t\t\t\tex=e;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\tif(ex!=null){\n\t\t\t\tthrow new RuntimeException(ex);\n\t\t\t}\n\t\t\t}\n\t\treturn pros;\n\t}", "@Override\n\tpublic List<Professor> getAllProfessors() {\n\t\treturn professorDao.findAll(Professor.class);\n\t}", "public ArrayList<Professor> getProfessors(String courseId) {\n return getCourse(courseId).getProfessors();\n }", "public TreeMap<String, Professor> getAllProfessors(String params) {\n\n StringBuffer json = new StringBuffer();\n ArrayList<Professor> allProfessors = new ArrayList<>();\n\n try {\n\n int i = 1;\n while (true) {\n if (params == null) {\n json.append(new JsonReader(\"http://api.umd\" +\n \".io/v0/professors?per_page=100&page=\" + i).readUrl());\n } else {\n json.append(new JsonReader(\"http://api.umd\" +\n \".io/v0/professors?per_page=100&page=\" + i + \"&\" +\n params).readUrl());\n }\n\n allProfessors.addAll(new Gson().fromJson(json.toString().replace\n (\"][\", \",\"),\n new TypeToken<ArrayList<Professor>>(){}.getType()));\n\n if (allProfessors.size() % 100 == 0) {\n i++;\n continue;\n } else {\n break;\n }\n }\n } catch (Exception e) {\n e.printStackTrace();\n }\n\n\n TreeMap<String, Professor> genProfessors = new TreeMap<>();\n\n for (Professor p : allProfessors) {\n genProfessors.put(p.getName(), p);\n }\n\n return genProfessors;\n }", "public List<Professor> listarTodos() throws BDException {\n\t\treturn professores;\r\n\t}", "public TreeMap<String, Course> getCourseByProfessor(String professor) {\n TreeMap<String, Professor> prof = getAllProfessors(null);\n TreeMap<String, Course> fin = new TreeMap<>();\n\n for (String s : prof.keySet()) {\n if (s.equals(professor)) {\n fin = prof.get(s).getCourses();\n }\n }\n\n return fin;\n }", "public Professor getProfessor() {\r\n\t\treturn prof;\r\n\t}", "public TreeMap<String, Course> getCourseByProfessorLastName(String professor) {\n TreeMap<String, Professor> prof = getAllProfessors(null);\n TreeMap<String, Course> fin = new TreeMap<>();\n\n for (String s : prof.keySet()) {\n int temp = s.indexOf(\" \");\n\n if (s.substring(temp + 1, s.length()).equals(professor)) {\n fin = prof.get(s).getCourses();\n }\n }\n\n return fin;\n }", "public Professor professor() {\n ////\n return professor;\n }", "public List<Professor> findAll();", "@Override\r\n public List<Professor> findAll() {\r\n return getEntityManager().createNamedQuery(\"Professor.findAll\",Professor.class).getResultList();\r\n }", "void viewStudents(Professor professor);", "ArrayList<Professor> professoresFormPend();", "@Override\n\tpublic Iterable<Profesores> listaProfesores() {\n\t\treturn profesoresRepositorio.findAll();\n\t}", "public Vector getListProfessionals(){\n Vector listProfessionals = new Vector();\n try{\n String sqlGet = \"SELECT * FROM professional ORDER BY professional_name\";\n\n ResultSet rsGet = this.queryData(sqlGet);\n int order = 0;\n while(rsGet.next()){\n order++;\n Vector dataSet = new Vector();\n dataSet.add(rsGet.getInt(\"professional_id\"));\n dataSet.add(rsGet.getString(\"professional_name\"));\n\n listProfessionals.add(dataSet);\n }\n } catch(Exception e){\n System.out.println(e.getMessage());\n }\n return listProfessionals;\n }", "public static List<StudentAndProfessorDetails> getProfessordetails(StudentAndProfessorDetails profdetails) {\n\t\tEntityManagerFactory entityManagerFactory = Persistence.createEntityManagerFactory(\"StudentDataManagementAndProcessing\");\n\t\tEntityManager entityManager = entityManagerFactory.createEntityManager();\n\t\tList<StudentAndProfessorDetails> profdetailsList = entityManager.createQuery(\"SELECT s from StudentAndProfessorDetails s where s.username=(SELECT user from LoginCredentials user where user.username=?1)\").setParameter(1,profdetails.getUsername().getUsername()).getResultList();\n\t\tentityManager.close();\n\t\tentityManagerFactory.close();\n\t\treturn profdetailsList;\n\t}", "public static DAO getProfessorDAO() {\n return new ProfessorDAO(entityManager, Professor.class);\n }", "private void getScholsFromDatabase() {\n schols = new Select().all().from(Scholarship.class).execute();\n }", "public List<UserProfile> getProfili() {\r\n\t\t// return upDao.findAll();\r\n\t\treturn upDao.getAllUserProfile();\r\n\t}", "public List<Proveedores> listProveedores() {\r\n\t\tString sql = \"select p from Proveedores p\";\r\n\t\tTypedQuery<Proveedores> query = em.createQuery(sql, Proveedores.class);\r\n\t\tSystem.out.println(\"2\");\r\n\t\tList<Proveedores> lpersonas = query.getResultList();\r\n\t\treturn lpersonas;\r\n\t}", "private int removeBestProfessor() {\n if (professors.size() == 1){\n return 2; // MEAN LOSS\n } else {\n if (professors.get(0).getName().equals(DefaultValues.NAME_FIRST_PROF)){\n professors.remove(1);\n } else {\n professors.remove(0);\n }\n return 1;\n }\n }", "public String getNomeProfessor()\n\t{\n\t\treturn nomeProfessor;\n\t}", "public Iterable<StudentQualificationPersonDetail> getStudentRegisteredData(){\n\t\t\n\t\treturn sqcRepository.findAll();\n\t}", "public void getFkp() throws SQLException{\n \n ResultSet rset = dh.getPerson();\n \n fkp = new ArrayList<>();\n \n int i = 0;\n while(rset.next()){\n fkp.add(new Person(rset.getString(\"Nome\")));\n }\n }", "public String[] imprimeProfessores() {\n\t\tString[] st = new String[PROFESSORES.size()];\n\n\t\tfor (int i = 0; i < st.length; i++) {\n\n\t\t\tst[i] = PROFESSORES.get(i).getCodProfessor() + \" \" + PROFESSORES.get(i).getNome();\n\t\t}\n\n\t\treturn st;\n\t}", "public List<Provider> getProName() {\n\t\treturn userDao.getProName();\r\n\t}", "public List<Proveedor> findProveedor() {\n\t\treturn find(Proveedor.class,\"from Proveedor\");\n\t}", "@Override\n\tpublic Map<String, Object> getSchool() {\n\t\treturn getSession().selectOne(getNamespace() + \"getSchool\");\n\t}", "@Override\n\tpublic ArrayList<Professor> consultarTudo() {\n\t\treturn listaprof;\n\t}", "public List<Person> UserSelect() {\n\t\t System.out.println(\"UserSelect\");\n\t\t return personDAO.getPersons();\n\t}", "Lecturer getLecturerWhoOfers(Project proj)\n {\n for(Lecturer lecturer :lectors)\n {\n for(Project project :lecturer.getProjectOfered())\n {\n if(proj.equals(project))\n {\n return lecturer;\n }\n }\n }\n return null;\n }", "public Professor getProfIndex(int index) {\n\n\t\tif (PROFESSORES.size() >= index) {\n\n\t\t\treturn PROFESSORES.get(index);\n\t\t} else {\n\n\t\t\treturn null;\n\t\t}\n\n\t}", "public void listarProvincia() {\n provincias = JPAFactoryDAO.getFactory().getProvinciaDAO().find();\n// for(int i=0;i<provincias.size();i++ ){\n// System.out.println(\"lista:\"+provincias.get(i).getNombreprovincia());\n// }\n }", "@Override\r\n\tpublic List<ProfitUserDomain> findSubProfitUserByWhere(ProfitUserDomain profitUserDomain) {\n\t\treturn profitUserDAO.findSubProfitUserByWhere(profitUserDomain);\r\n\t}", "public static List<CoProveedor> getProveedor() {\n return proveedor;\n }", "@Override\n\tpublic Person signInProfessor(Person admin) {\n\t\tProfessor pro=null;\n\t\t\n\t\ttry{\n\t\t\t\n\t\t\tstmt=conn.prepareStatement(\"SELECT ssn,name,department,password FROM Professor WHERE ssn=? and password=?\");\n\t\t\tstmt.setString(1, admin.getSsn());\n\t\t\tstmt.setString(2, admin.getPassword());\n\t\t\tResultSet rs=stmt.executeQuery();\n\t\t\t\n\t\t\twhile(rs.next()){\n\t\t\t\tpro=new Professor(rs.getString(\"name\"),rs.getString(\"ssn\"),\"\", rs.getString(\"department\"));\n\t\t\t\t\n\t\t\t\t\n\t\t\t}\n\t\t\t}catch(SQLException e){\n\t\t\t\tex=e;\n\t\t\t}finally{\n\t\t\t\tif(conn!=null){\n\t\t\t\t\ttry{\n\t\t\t\t\t\tconn.close();\n\t\t\t\t\t}catch(SQLException e){\n\t\t\t\t\t\tif(ex==null){\n\t\t\t\t\t\t\tex=e;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\tif(ex!=null){\n\t\t\t\tthrow new RuntimeException(ex);\n\t\t\t}\n\t\t\t}\n\t\treturn pro;\n\t}", "@Override\n\tpublic Iterator<Student> selectAll() {\n\t\tString sql=\"SELECT a.id,a.num,a.name,a.email,a.phone,a.degree,a.project,a.school,b.name,a.is_cap from tc_student as a,tc_school as b where a.school=b.id\";\n\t\tArrayList<Student> arr=new ArrayList<Student>();\n\t\tResultSet rs=mysql.query(sql);\n\t\ttry {\n\t\t\twhile(rs.next())\n\t\t\t{\n\t\t\t\tStudent stu=new Student();\n\t\t\t\tstu.setId(rs.getInt(1));\n\t\t\t\tstu.setNum(rs.getString(2));\n\t\t\t\tstu.setName(rs.getString(3));\n\t\t\t\tstu.setEmail(rs.getString(4));\n\t\t\t\tstu.setPhone(rs.getString(5));\n\t\t\t\tstu.setDegree(rs.getShort(6));\n\t\t\t\tstu.setProject(rs.getInt(7));\n\t\t\t\tstu.setSchool(rs.getInt(8));\n\t\t\t\tstu.setSchoolstring(rs.getString(9));\n\t\t\t\tstu.setIs_cap(rs.getInt(10));\n\t\t\t\tstu.setDegreestring(degreemap[stu.getDegree()]);\n\t\t\t\tarr.add(stu);\n\t\t\t}\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\treturn arr.iterator();\n\t}", "public List<ProgressionCourrier> getAllUsers() {\n Query q = getEntityManager().createQuery(\"select U from ProgressionCourrier U order by U.nomPrenoms\");\n // set parameters\n List<ProgressionCourrier> suggestions = q.getResultList();\n\n // avoid returing null to managed beans\n if (suggestions == null) {\n suggestions = new ArrayList<>();\n }\n\n // return the suggestions\n return suggestions;\n\n }", "@RequestMapping(\"/programmers-list\")\n public List<Programmer> getProgrammerListMembers() {\n return programmerService.getProgrammersListMembers();\n\n }", "@Override\r\n public String toString()\r\n {\r\n return \"Professor: name=\" + name + \" and id=\" + id;\r\n }", "public Person[] getAllUsers() \r\n\t{\r\n\t\tString[][] stringArray = db.user_getUsers();\r\n\t\tPerson[] personArray = new Person[stringArray.length];\r\n\t\tfor(int i = 0; i < stringArray.length; i++) \r\n\t\t{\r\n\t\t\tString firstname = stringArray[i][0];\r\n\t\t\tString lastname = stringArray[i][1];\r\n\t\t\tString username = stringArray[i][2];\r\n\t\t\tString password = stringArray[i][3];\r\n\t\t\tchar type = stringArray[i][4].charAt(0);\r\n\t\t\tchar status = stringArray[i][5].charAt(0);\r\n\t\t\tString[][] savedArray = db.user_getUsernamesWithSavedSchools();\r\n\t\t\tArrayList<String> schoolsList = new ArrayList<String>(); \r\n\t\t\tfor (String[] pair : savedArray) {\r\n\t\t\t\tif (pair[0].equals(username))\r\n\t\t\t\t\tschoolsList.add(pair[1]);\r\n\t\t\t}\r\n\t\t\tString[] savedSchools = new String[0];\r\n\t\t\tsavedSchools = schoolsList.toArray(savedSchools);\r\n\t\t\tpersonArray[i] = new Person(firstname, lastname, username, password, type, status, savedSchools);\r\n\t\t}\r\n\t\treturn personArray;\r\n\t}", "@Override\n\tpublic List<Proyecto> listarProyectos() {\n\t\treturn proyectoRepo.findAll();\n\t}", "public ArrayList<Person> getPersons(String username) throws DataAccessException {\n Person person;\n ArrayList<Person> people = new ArrayList<>();\n ResultSet rs = null;\n String sql = \"SELECT * FROM persons WHERE assoc_username = ?;\";\n try(PreparedStatement stmt = conn.prepareStatement(sql)) {\n stmt.setString(1, username);\n rs = stmt.executeQuery();\n while (rs.next()) {\n person = new Person(rs.getString(\"person_id\"), rs.getString(\"assoc_username\"),\n rs.getString(\"first_name\"), rs.getString(\"last_name\"),\n rs.getString(\"gender\"), rs.getString(\"father_id\"),\n rs.getString(\"mother_id\"), rs.getString(\"spouse_id\"));\n people.add(person);\n }\n return people;\n } catch (SQLException e) {\n e.printStackTrace();\n throw new DataAccessException(\"Error encountered while finding person\");\n } finally {\n if (rs != null) {\n try {\n rs.close();\n } catch (SQLException e) {\n e.printStackTrace();\n }\n }\n }\n }", "@Generated\n public List<Proveedor> getProveedores() {\n if (proveedores == null) {\n __throwIfDetached();\n ProveedorDao targetDao = daoSession.getProveedorDao();\n List<Proveedor> proveedoresNew = targetDao._queryUsuarios_Proveedores(id);\n synchronized (this) {\n if(proveedores == null) {\n proveedores = proveedoresNew;\n }\n }\n }\n return proveedores;\n }", "public static Profesor buscaProfesor(String codigo){\n\t\tProfesor profesor = null;\n\t\tResultSet resultadoConsulta;\n\t\tPreparedStatement comando;\n\t\tString query = \"SELECT \"\n\t\t\t\t+ \"id,\"\n\t\t\t\t+ \"nombre,\"\n\t\t\t\t+ \"apellido_paterno,\"\n\t\t\t\t+ \"apellido_materno,\"\n\t\t\t\t+ \"codigo \"\n\t\t\t\t+ \"FROM \"\n\t\t\t\t+ \"profesor \"\n\t\t\t\t+ \"WHERE \"\n\t\t\t\t+ \"codigo = ?\";\n\t\ttry {\n\t\t\tcomando = conexion.prepareStatement(query);\n\t\t\tcomando.setString(1,codigo);\n\t\t\tresultadoConsulta = comando.executeQuery();\n\t\t\t\n\t\t\twhile(resultadoConsulta.next()){\n\t\t\t\tprofesor= new Profesor(resultadoConsulta.getString(\"nombre\"),\n\t\t\t\t\t\tresultadoConsulta.getString(\"apellido_paterno\"),\n\t\t\t\t\t\tresultadoConsulta.getString(\"apellido_materno\"),\n\t\t\t\t\t\tresultadoConsulta.getString(\"codigo\"),\n\t\t\t\t\t\tresultadoConsulta.getInt(\"id\"));\n\t\t\t}\n\t\t\treturn profesor;\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\treturn profesor;\n\t}", "public void iniciarProduccion(){\n try {\n Connection conn = Conectar.conectar();\n Statement st = conn.createStatement();\n ResultSet rs = st.executeQuery(\"select nick from usuarios where nick in(select usuario from construcciones) or nick \"\n +\"in(select usuario from investigaciones) or nick in(select usuario from movimientos)\");\n\n while(rs.next()){\n produccion.add(new Construcciones(rs.getString(1)));\n System.out.println(rs.getString(1));\n }\n\n st.close();\n rs.close();\n conn.close();\n\n }catch(SQLException e){\n System.out.println(\"Fallo actualizacion de produccion.\");\n }\n}", "public ArrayList<University> findRecommended(String schoolToCompare) {\n\t\tArrayList<University> closeMatch = sfCon.rankUniversity(schoolToCompare);\n\t\tfor (int i = 0; i < 5; i++) {\n\t\t\tSystem.out.println(closeMatch.get(i).getName());\n\t\t}\n\n\t\treturn closeMatch;\n\t}", "@Override\r\n public List<Score> scofindAll() {\n return userMapper.scofindAll();\r\n }", "public List<Prova> todasProvas(int codigoProfessor) {\n\t\tTransactionManager txManager = new TransactionManager();\n\t return txManager.doInTransactionWithReturn((connection) -> {\n\t \t\n\t\t\tps = connection.prepareStatement(\n\t\t\t\t\t\"SELECT codigo, codProfessor, codDisciplina, titulo, questoes, valorTotal, valorQuestoes, tempo, data, allowAfterDate, allowMultipleAttempts FROM prova WHERE codProfessor=? GROUP BY codigo\");\n\t\t\tps.setInt(1, codigoProfessor);\n\t\t\trs = ps.executeQuery();\n\t\n\t\t\tList<Prova> list = new ArrayList<Prova>();\n\t\t\t\n\t\t\twhile(rs.next()) {\n\t\t\t\tint codigo = rs.getInt(1);\n\t\t\t\tint codProfessor = rs.getInt(2);\n\t\t\t\tint codDisciplina = rs.getInt(3);\n\t\t\t\tString titulo = rs.getString(4);\n\t\t\t\tString questoes = rs.getString(5);\n\t\t\t\tfloat valorTotal = rs.getFloat(6);\n\t\t\t\tfloat valorQuestoes = rs.getFloat(7);\n\t\t\t\tint tempo = rs.getInt(8);\n\t\t\t\tString data = rs.getString(9);\n\t\t\t\tboolean allowAfterDate = rs.getBoolean(10);\n\t\t\t\tboolean allowMultipleAttempts = rs.getBoolean(11);\n\t\t\t\t\n\t\t\t\tlist.add(new Prova(codigo, codProfessor, codDisciplina, titulo, questoes, valorTotal, valorQuestoes, tempo, data, allowAfterDate, allowMultipleAttempts));\n\t\t\t}\n\t\t\treturn list;\n\t\t});\n\t}", "public static String obtenerListaProfesores () {\n StringBuilder sb;\n Statement stmt;\n String query;\n ResultSet result;\n try {\n iniciarConexion();\n sb = new StringBuilder();\n stmt = connection.createStatement();\n query = \"SELECT * FROM usuarios WHERE Matricula LIKE 'l%';\";\n result = stmt.executeQuery(query);\n while (result.next()) {\n sb.append(result.getString(2));\n sb.append(\" \");\n sb.append(result.getString(3));\n sb.append(\",\");\n }\n return sb.toString();\n } catch (SQLException ex) {\n Logger.getLogger(ManejoBasesDatos.class.getName()).log(Level.SEVERE, null, ex);\n return \"\";\n }\n }", "public HashSet<Usuario> getRegistrosPendientesDeAprobacion(){\r\n\t\t\r\n\t\tif(!this.modoAdmin) return null;\r\n\t\t\r\n\t\tUsuario u;\r\n\t\tHashSet<Usuario> pendientes = new HashSet<Usuario>();\r\n\t\tfor(Proponente p: this.proponentes) {\r\n\t\t\tif( p.getClass().getSimpleName().equals(\"Usuario\")) {\r\n\t\t\t\tu = (Usuario)p;\r\n\t\t\t\tif(u.getEstado()== EstadoUsuario.PENDIENTE) {\r\n\t\t\t\t\tpendientes.add(u);\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn pendientes;\r\n\t}", "public static List<Student> studentGpa() {\n\t\t\nList<Student> stuGpa = StudentDataBase.getAllStudents().stream().filter(j->j.getGpa()>=3.9).collect(Collectors.toList());\n\t\treturn stuGpa;\n\t}", "public List<ProveedorEntity> getProveedores(){\n List<ProveedorEntity>proveedores = proveedorPersistence.findAll();\n return proveedores;\n }", "protected ResultSet selectStaff() {\r\n\t\tResultSet rs = sqlSelect( \"*\", \"Staff\", \"\");\r\n\t\treturn rs;\r\n\t}", "public List<UserProfile> getProfiliGestiti() {\r\n\t\tList<UserProfile> profili = getProfili();\r\n\t\t// siccome tiro su i profili ordinati per id,\r\n\t\t// so per certo che il primo � l'amministratore\r\n\t\t//profili.remove(0);\r\n\t\treturn profili;\r\n\t}", "@Override\r\n\tpublic List<ProductFamily> findProductFamily() {\n\t\treturn iImportSalesRecordDao.findProductFamily();\r\n\t}", "public List<Propriedade> getPropriedadesDoJogador() {\r\n return propriedadesDoJogador;\r\n }", "public Set<P2PUser> getUsers();", "@Override\n\tpublic List<Profession> getAll() {\n\t\treturn dao.findAll();\n\t}", "@Override\r\n public void mostrarProfesores(){\n for(Persona i: listaPersona){\r\n if(i instanceof Profesor){\r\n i.mostrar();\r\n }\r\n }\r\n }", "public ArrayList<Integer> getProfs(){\r\n\t\treturn this.listeProfs;\r\n\t}", "public ArrayList<Person> getQualifiedPeople(int jobCode) {\n ArrayList<Person> results = new ArrayList<Person>();\n\n String name = \"\";\n String email = \"\";\n\n try {\n PreparedStatement pStmt = conn.prepareStatement(\"SELECT DISTINCT NAME, EMAIL \\n\" +\n \"FROM PERSON NATURAL JOIN (\\n\" +\n \" SELECT PER_ID\\n\" +\n \" FROM PERSON_SKILL A\\n\" +\n \" WHERE NOT EXISTS (\\n\" +\n \" \\n\" +\n \" -- get skills of specific job\\n\" +\n \" SELECT JOB_SKILL.KS_CODE\\n\" +\n \" FROM JOB_SKILL INNER JOIN JOB_LISTING\\n\" +\n \" ON JOB_SKILL.JOB_CODE = JOB_LISTING.JOB_CODE\\n\" +\n \" WHERE JOB_SKILL.JOB_CODE=? AND JOB_LISTING.COMP_ID=?\\n\" +\n \" \\n\" +\n \" MINUS\\n\" +\n \" \\n\" +\n \" -- get skills of person\\n\" +\n \" (SELECT KS_CODE\\n\" +\n \" FROM PERSON_SKILL B\\n\" +\n \" WHERE A.PER_ID = B.PER_ID)\\n\" +\n \" )\\n\" +\n \")\");\n\n pStmt.setString(1, jobCode + \"\");\n pStmt.setString(2, this.compId + \"\");\n ResultSet rset = pStmt.executeQuery();\n\n while(rset.next()){\n name = rset.getString(1);\n email = rset.getString(2);\n\n Person person = new Person(name, email);\n results.add(person);\n }\n\n } catch(Exception e) {\n System.out.println(\"\\nError in method qualifiedPeople of Company: \" + e);\n }\n\n return results;\n }", "private void displaySchalorship() {\n\n for (Scholarship scholarship : scholarshipDatabase) {\n\n stdOut.println(scholarship.toString() + \"\\n\");\n\n }\n }", "public Professor findByUsername(String username) {\r\n return getEntityManager().createNamedQuery(\"Professor.findByUsername\",Professor.class).setParameter(\"username\", username).getSingleResult();\r\n }", "private void populaProfessor()\n {\n Calendar nasc = Calendar.getInstance();\n\n ProfessorFunc p = new ProfessorFunc();\n nasc.set(Calendar.DAY_OF_MONTH, NumberLogic.randomInteger(1, 28));\n nasc.set(Calendar.MONTH, NumberLogic.randomInteger(1, 12));\n nasc.set(Calendar.YEAR, NumberLogic.randomInteger(1940, 1995));\n p.setDataNascimento(nasc);\n p.setNome(\"Joana\");\n p.setEmail(p.getNome() + \"@gmail.com\");\n p.setCpf(String.valueOf(NumberLogic.randomInteger(100000000, 999999999)));\n p.setIsProfessor(true);\n p.setSenha(CriptografiaLogic.encriptar(\"123\"));\n p.setRg(String.valueOf(NumberLogic.randomInteger(100000000, 999999999)));\n professorFuncDAO.insert(p);\n\n p = new ProfessorFunc();\n nasc.set(Calendar.DAY_OF_MONTH, NumberLogic.randomInteger(1, 28));\n nasc.set(Calendar.MONTH, NumberLogic.randomInteger(1, 12));\n nasc.set(Calendar.YEAR, NumberLogic.randomInteger(1940, 1995));\n p.setDataNascimento(nasc);\n p.setNome(\"Mario\");\n p.setEmail(p.getNome() + \"@gmail.com\");\n p.setCpf(String.valueOf(NumberLogic.randomInteger(100000000, 999999999)));\n p.setIsProfessor(true);\n p.setSenha(CriptografiaLogic.encriptar(\"123\"));\n p.setRg(String.valueOf(NumberLogic.randomInteger(100000000, 999999999)));\n professorFuncDAO.insert(p);\n\n p = new ProfessorFunc();\n nasc.set(Calendar.DAY_OF_MONTH, NumberLogic.randomInteger(1, 28));\n nasc.set(Calendar.MONTH, NumberLogic.randomInteger(1, 12));\n nasc.set(Calendar.YEAR, NumberLogic.randomInteger(1940, 1995));\n p.setDataNascimento(nasc);\n p.setNome(\"Marcio\");\n p.setEmail(p.getNome() + \"@gmail.com\");\n p.setCpf(String.valueOf(NumberLogic.randomInteger(100000000, 999999999)));\n p.setIsProfessor(true);\n p.setSenha(CriptografiaLogic.encriptar(\"123\"));\n p.setRg(String.valueOf(NumberLogic.randomInteger(100000000, 999999999)));\n professorFuncDAO.insert(p);\n\n p = new ProfessorFunc();\n nasc.set(Calendar.DAY_OF_MONTH, NumberLogic.randomInteger(1, 28));\n nasc.set(Calendar.MONTH, NumberLogic.randomInteger(1, 12));\n nasc.set(Calendar.YEAR, NumberLogic.randomInteger(1940, 1995));\n p.setDataNascimento(nasc);\n p.setNome(\"Fabiana\");\n p.setEmail(p.getNome() + \"@gmail.com\");\n p.setCpf(String.valueOf(NumberLogic.randomInteger(100000000, 999999999)));\n p.setIsProfessor(true);\n p.setSenha(CriptografiaLogic.encriptar(\"123\"));\n p.setRg(String.valueOf(NumberLogic.randomInteger(100000000, 999999999)));\n professorFuncDAO.insert(p);\n\n p = new ProfessorFunc();\n nasc.set(Calendar.DAY_OF_MONTH, NumberLogic.randomInteger(1, 28));\n nasc.set(Calendar.MONTH, NumberLogic.randomInteger(1, 12));\n nasc.set(Calendar.YEAR, NumberLogic.randomInteger(1940, 1995));\n p.setDataNascimento(nasc);\n p.setNome(\"Kleber\");\n p.setEmail(p.getNome() + \"@gmail.com\");\n p.setCpf(String.valueOf(NumberLogic.randomInteger(100000000, 999999999)));\n p.setIsProfessor(true);\n p.setSenha(CriptografiaLogic.encriptar(\"123\"));\n p.setRg(String.valueOf(NumberLogic.randomInteger(100000000, 999999999)));\n professorFuncDAO.insert(p);\n\n p = new ProfessorFunc();\n nasc.set(Calendar.DAY_OF_MONTH, NumberLogic.randomInteger(1, 28));\n nasc.set(Calendar.MONTH, NumberLogic.randomInteger(1, 12));\n nasc.set(Calendar.YEAR, NumberLogic.randomInteger(1940, 1995));\n p.setDataNascimento(nasc);\n p.setNome(\"Antonio\");\n p.setEmail(p.getNome() + \"@gmail.com\");\n p.setCpf(String.valueOf(NumberLogic.randomInteger(100000000, 999999999)));\n p.setIsProfessor(true);\n p.setSenha(CriptografiaLogic.encriptar(\"123\"));\n p.setRg(String.valueOf(NumberLogic.randomInteger(100000000, 999999999)));\n professorFuncDAO.insert(p);\n\n p = new ProfessorFunc();\n nasc.set(Calendar.DAY_OF_MONTH, NumberLogic.randomInteger(1, 28));\n nasc.set(Calendar.MONTH, NumberLogic.randomInteger(1, 12));\n nasc.set(Calendar.YEAR, NumberLogic.randomInteger(1940, 1995));\n p.setDataNascimento(nasc);\n p.setNome(\"Paula\");\n p.setEmail(p.getNome() + \"@gmail.com\");\n p.setCpf(String.valueOf(NumberLogic.randomInteger(100000000, 999999999)));\n p.setIsProfessor(true);\n p.setSenha(CriptografiaLogic.encriptar(\"123\"));\n p.setRg(String.valueOf(NumberLogic.randomInteger(100000000, 999999999)));\n professorFuncDAO.insert(p);\n }", "@Override\n\tpublic List<Student> getAllStudents() {\n\t\tList<Student> students = new ArrayList<Student>();\n\t\ttry {\n\t\t\tStatement stmt = conn.createStatement();\n\t\t\t//select CAST(gpa as DECIMAL(3,2)) AS gpa from student;\n\t\t\t//ResultSet rs = stmt.executeQuery(\"select * from student\");\n\t\t\tResultSet rs = stmt.executeQuery(\"select ID, Firstname, Lastname, Program, CAST(gpa as DECIMAL(3,2)) AS gpa from student\");\n\t\t\t\n\t\t\twhile(rs.next()) {\n\t\t\t\tStudent stu = new Student();\n\t\t\t\tstu.setStudentid(rs.getInt(\"ID\"));\n\t\t\t\tstu.setFirstname(rs.getString(\"Firstname\"));\n\t\t\t\tstu.setLastname(rs.getString(\"Lastname\"));\n\t\t\t\tstu.setProgram(rs.getString(\"Program\"));\n\t\t\t\tstu.setGpa(rs.getDouble(\"GPA\"));\n\n\t\t\t\tstudents.add(stu);\n\t\t\t}\n\t\t\t\n\t\t\trs.close();\n\t\t\tstmt.close();\n\t\t} catch (SQLException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\t\treturn students;\n\t}", "@Override\n\tpublic List<Student> getStudents() {\n\t\tSession currentSession = sessionFactory.getCurrentSession();\n\n\t\t// create a query\n\t\tQuery<Student> query = currentSession.createQuery(\"from Student order by lastName\", Student.class);\n\n\t\t// execute the query and get the results list\n\t\tList<Student> students = query.getResultList();\n\n\t\t// return the results\n\t\treturn students;\n\t}", "public abstract ArrayList<ProfesorAsignatura> getProfesores();", "public static void main(String[] args) {\n\n rellenarDatos();\n mostrarProfesor();\n mostrarAlumno();\n Profesor prof = null;\n int i = 0;\n int encontrado =0;\n while (i < personas.size()&& (encontrado==0)){\n if(personas.get(i) instanceof Profesor){\n encontrado =1;\n prof =(Profesor) personas.get(i);\n }\n i++;\n }\n CambiarEspecialidad(prof, \"Ciencias sociales\");\n }", "@Override\n public List<ConnectathonParticipant> getPeopleAttendingOnFriday() {\n if (LOG.isDebugEnabled()) {\n LOG.debug(\"getPeopleAttendingOnFriday\");\n }\n\n renderAddPanel = false;\n\n if (Role.isLoggedUserAdmin() || Role.isLoggedUserProjectManager() || Role.isLoggedUserMonitor()) {\n\n EntityManager em = EntityManagerService.provideEntityManager();\n choosenInstitutionForAdmin = (Institution) Component.getInstance(CHOOSEN_INSTITUTION_FOR_ADMIN);\n\n if (choosenInstitutionForAdmin != null) {\n Query query = em\n .createQuery(\"SELECT cp FROM ConnectathonParticipant cp WHERE cp.testingSession = :inTestingSession AND cp.institution = \" +\n \":inInstitution AND fridayMeal IS true\");\n query.setParameter(IN_TESTING_SESSION, TestingSession.getSelectedTestingSession());\n query.setParameter(IN_INSTITUTION, choosenInstitutionForAdmin);\n return query.getResultList();\n } else {\n Query query = em\n .createQuery(\"SELECT cp FROM ConnectathonParticipant cp WHERE cp.testingSession = :inTestingSession AND fridayMeal IS true\");\n query.setParameter(IN_TESTING_SESSION, TestingSession.getSelectedTestingSession());\n return query.getResultList();\n }\n } else {\n selectedInstitution = Institution.getLoggedInInstitution();\n EntityManager em = EntityManagerService.provideEntityManager();\n Query query = em\n .createQuery(\"SELECT cp FROM ConnectathonParticipant cp WHERE cp.testingSession = :inTestingSession AND cp.institution = \" +\n \":inInstitution AND fridayMeal IS true\");\n query.setParameter(IN_TESTING_SESSION, TestingSession.getSelectedTestingSession());\n query.setParameter(IN_INSTITUTION, selectedInstitution);\n return query.getResultList();\n }\n }", "@Override\r\n\tpublic List<Teacher> findallTeachers() throws Exception {\n\t\ttry {\r\n\t\t\treturn this.dao.findallTeachers();\r\n\t\t}catch(Exception e) {\r\n\t\t\tthrow e;\r\n\t\t}finally {\r\n\t\t\tthis.dbc.close();\r\n\t\t}\r\n\t}", "public static void pesquisarTest() {\n\t\t\n\t\tlistaProfissional = profissionalDAO.lista();\n\n\t\t//user.setReceitas(new ArrayList<Receita>());\n\t\t\n\t\t\n\t\tSystem.out.println(\"Entrou PEsquisar ====\");\n\t\tSystem.out.println(listaProfissional);\n\n\t}", "@Override\r\n\tpublic List<ProfitUserDomain> findDateProfitUserByWhere(ProfitUserDomain profitUserDomain) {\n\t\treturn profitUserDAO.findDateProfitUserByWhere(profitUserDomain);\r\n\t}", "public List<Dept> list() {\n try {\n List<Dept> dept = new ArrayList<Dept>();\n PreparedStatement stmt = this.connection\n .prepareStatement(\"select * from dept_sr\"); //here\n\n ResultSet rs = stmt.executeQuery();\n\n while (rs.next()) {\n // adiciona a tarefa na lista\n dept.add(populateDept(rs));\n }\n\n rs.close();\n stmt.close();\n\n return dept;\n } catch (SQLException e) {\n throw new RuntimeException(e);\n }\n }", "public ArrayList<Student> getStudents() {\n\n ArrayList<Student> students = new ArrayList<Student>();\n String query = \"SELECT * FROM student\";\n try{\n result = statement.executeQuery(query);\n while(result.next()) {\n\n String id = Integer.toString(result.getInt(\"student_id\"));\n String firstName = result.getString(\"student_first_name\");\n String lastName = result.getString(\"student_last_name\");\n String degree = result.getString(\"degree\");\n String yearOfStudy = result.getString(\"year_of_study\");\n String outcome = result.getString(\"outcome\");\n students.add(new Student(id, firstName, lastName, degree, yearOfStudy, outcome));\n\n }\n }\n catch (SQLException e){\n\n }\n\n return students;\n }", "public static DAO getProfessorLessonDAO() {\n return new ProfessorLessonDAO(entityManager, ProfessorLesson.class);\n }", "Collection<User> getStaffs() throws DataAccessException;", "public static void main(String[] args) {\n\t\tStudent s = new Student(\"Bora\", \"Boric\", 1989, 39998, 3, 7.59);\r\n\t\tStudent s1 = new Student(\"Mika\", \"Mikic\", 1998, 39322, 1, 8.59);\r\n\t\tStudent s2 = new Student(\"Kasa\", \"Kasic\", 1991, 39299, 2, 8.94);\r\n\t\tProfesor p = new Profesor(\"Stanko\", \"Stanic\", 1980, \"Predavac\");\r\n\t\tProfesor p1 = new Profesor(\"Sasa\", \"Sasic\", 1984, \"Asistent\");\r\n\t\tp.dodajPredmet(\"Statistika\");\r\n\t\tp.dodajPredmet(\"Matematika\");\r\n\t\tp1.dodajPredmet(\"Teorija cena\");\r\n\t\tp1.dodajPredmet(\"Makroekonomija\");\r\n\t\tSystem.out.println(s.ispis());\r\n\t\tSystem.out.println(s1.ispis());\r\n\t\tSystem.out.println(s2.ispis());\r\n\t\tSystem.out.println(p.ispisi());\r\n\t\tSystem.out.println(p1.ispisi());\r\n\r\n\t}", "public List<Staff> findAllStaffMembers(){\n\t\treturn staffRepository.findAll();\n\t}", "@Override\n\tpublic List<Personne> findAllPErsonne() {\n\t\treturn dao.findAllPErsonne();\n\t}", "@Override\n\tpublic ProfessorDao GetProfessorInstance() throws Exception {\n\t\treturn new SqliteProfessorDaoImpl();\n\t}", "public ArrayList<Persona> getLProfesorado() {\n return LProfesorado;\n }", "public Professor(Professor prof)\r\n {\r\n this.name = prof.name;\r\n this.id = prof.id;\r\n }", "List<SchoolSubject> findSchoolSubjects() throws DaoException;", "public static List<StudentInfo> searchStudentInfo(String firtname, String lastname) {\r\n \r\n List<StudentInfo> students = new ArrayList<>();\r\n \r\n // declare resultSet\r\n ResultSet rs = null;\r\n \r\n // declare prepared statement\r\n PreparedStatement preparedStatement = null;\r\n \r\n // declare connection\r\n Connection conn = null;\r\n try {\r\n // get connection\r\n conn = DBUtils.getConnection();\r\n\r\n // set prepared statement\r\n preparedStatement = conn\r\n .prepareStatement(\"SELECT instructor.FName, instructor.LName,\" +\r\n \" IF(EXISTS ( SELECT * FROM gra WHERE gra.StudentId = phdstudent.StudentId) , 'GRA', \" +\r\n \" IF(EXISTS ( SELECT * FROM gta WHERE gta.StudentId = phdstudent.StudentId) , 'GTA', \" +\r\n \" IF(EXISTS ( SELECT * FROM scholarshipsupport WHERE scholarshipsupport.StudentId = phdstudent.StudentId) , 'scholarship', \" +\r\n \" IF(EXISTS ( SELECT * FROM selfsupport WHERE selfsupport.StudentId = phdstudent.StudentId) , 'self', ''))\" +\r\n \" )) AS StudentType, \" +\r\n \" milestone.MName, milestonespassed.PassDate\" +\r\n \" FROM phdstudent left join instructor on instructor.InstructorId = phdstudent.Supervisor\"\r\n + \" left join milestonespassed on phdstudent.StudentId = milestonespassed.StudentId\"\r\n + \" left join milestone on milestonespassed.MID = milestone.MID\" +\r\n \" WHERE phdstudent.FName = ? AND phdstudent.LName = ?\");\r\n \r\n // execute query\r\n preparedStatement.setString(1, firtname);\r\n preparedStatement.setString(2, lastname); \r\n\r\n rs = preparedStatement.executeQuery();\r\n \r\n //iterate and create the StudentInfo objects\r\n while (rs.next()) {\r\n \r\n students.add(new StudentInfo(rs.getString(1)+ \" \" + rs.getString(2), rs.getString(3), rs.getString(4), \r\n utils.Utils.toDate(rs.getDate(5))));\r\n\r\n }\r\n }catch(Exception ex){\r\n ex.printStackTrace();\r\n }\r\n finally {\r\n DBUtils.closeResource(conn);\r\n DBUtils.closeResource(preparedStatement);\r\n DBUtils.closeResource(rs);\r\n } \r\n \r\n return students; \r\n }", "public List peersFromCourse(Course course) throws SQLException {\n List listOfStudents = new ArrayList<>();\n String query = \"SELECT * FROM registration WHERE courseID = \\\"\"\n + retrieveCourseValue(course, \"courseID\") + \"\\\";\";\n Statement myStatement = null;\n ResultSet myResultSet = null;\n\n myStatement = studentConn.createStatement();\n myResultSet = myStatement.executeQuery(query);\n\n while (myResultSet.next()) {\n Student student = convertRegistrationRowToStudent(myResultSet);\n listOfStudents.add(student);\n }\n return listOfStudents;\n }", "List<KingdomUser> getUsers();", "@SuppressWarnings(\"unchecked\")\n public List<Profesor> selectByExample(ProfesorCriteria example) {\n List<Profesor> list = getSqlMapClientTemplate().queryForList(\"tbl_profesor.ibatorgenerated_selectByExample\", example);\n return list;\n }", "@Override\r\n\tpublic List<ProfitUserDomain> findByWhere(ProfitUserDomain t) {\n\t\treturn profitUserDAO.findByWhere(t);\r\n\t}", "public Vector listaProfesores()\n {\n try\n {\n\n //Se obtiene una conexion\n Connection conexion = this.bbdd.getConexion();\n\n //Se prepara la query\n String query = \"SELECT * FROM profesores\";\n\n //Se crea un vector de asignaturas\n Vector vectorProfesores = new Vector();\n\n //Se ejecuta la query\n Statement st = conexion.createStatement();\n ResultSet resultado = st.executeQuery(query);\n\n //Para cada fila se creará un objeto y se rellenará\n //con los valores de las columnas.\n while(resultado.next())\n {\n profesor profesor = new profesor();\n\n profesor.setIdProfesor(Integer.valueOf(resultado.getString(\"idprofesor\")));\n profesor.setNombre(resultado.getString(\"nombre\"));\n profesor.setEmail(resultado.getString(\"email\"));\n profesor.setTelefono(Integer.valueOf(resultado.getString(\"telefono\")));\n\n //Se añade la asignatura al vector de asignaturas\n vectorProfesores.add(profesor);\n }\n\n //Se cierra la conexión\n this.bbdd.cerrarConexion(conexion);\n\n return vectorProfesores;\n }\n catch(SQLException e)\n {\n System.out.println(\"Error al acceder a los profesores de la Base de Datos: \"+e.getMessage());\n return null;\n }\n }", "public List<Person> findAllUsers(){\n\t\t\n\t\tQuery q = em.createQuery(\"SELECT p FROM Person p \");\n\t\tList<Person> users = q.getResultList();\n\t\treturn users;\n\t}", "public ResultSet getPublicationsByPerson(int person_id) throws SQLException {\n\t\tquery = \"SELECT p.*, pn.name as devisor FROM publication p \"\n\t\t\t\t+ \"LEFT OUTER JOIN person pn ON p.devisor_id=pn.id \"\n\t\t\t\t+ \"WHERE pn.id=\" + person_id + \" ORDER BY p.name\";\n\t\treturn stmt.executeQuery(query);\n\t}", "public static void main(String[] args) {\n\t\tProfesor profesor = new Alumno();\r\n\t\tSystem.out.println(\"Profesor: \"+profesor.devolverNombre());\r\n\t\tSystem.out.println(\"Edad: \"+profesor.devolverEdad());\r\n\t\tSystem.out.println();\r\n\t\tPersona persona = new Alumno();\r\n\t\tSystem.out.println(\"Edad: \"+persona.devolverEdad());\r\n\t\tSystem.out.println(\"Nombre: \"+persona.devolverNombre());\r\n\t\t\r\n\t\tPersona persona2 = new Profesor();\r\n\t\tSystem.out.println(\"Edad: \"+persona2.devolverEdad());\r\n\t\tSystem.out.println(\"Nombre: \"+persona2.devolverNombre());\r\n\t\t\r\n\t\tArrayList<Persona> personas = new ArrayList<Persona>();\r\n\t\tpersonas.add(persona);\r\n\t\tpersonas.add(persona2);\r\n\t\t\r\n\t\tfor (Persona persona3 : personas) {\r\n\t\t\tSystem.out.println(\"ENTRO AL FOR\");\r\n\t\t\tSystem.out.println(\"Edad: \"+persona3.devolverEdad());\r\n\t\t\tSystem.out.println(\"Nombre: \"+persona3.devolverNombre());\r\n\t\t}\r\n\t}", "@Override\r\n public List<String> getStudenti() {\r\n List<Studente> listaStudenti = studenteFacade.findAll();\r\n List<String> result = new ArrayList<>();\r\n\r\n for (Studente s : listaStudenti) {\r\n result.add(s.toString());\r\n }\r\n return result;\r\n }", "List<ProSchoolWare> selectByExample(ProSchoolWareExample example);", "public List<PrimaryTechnician> getPrimaryTechnicianData() {\n\t\tlogger.debug(\"Inside getPrimaryTechnicianDummyData of PrimaryTechnicianDummyData\");\n\t\tList<PrimaryTechnician> primaryTechnicians = new ArrayList<PrimaryTechnician>();\n\t\tPrimaryTechnician primaryTechnician = new PrimaryTechnician(\"601\", \"Software\", \"David\");\n\t\tprimaryTechnicians.add(primaryTechnician);\n\t\tprimaryTechnician = new PrimaryTechnician(\"602\", \"Infra\", \"John\");\n\t\tprimaryTechnicians.add(primaryTechnician);\n\t\tprimaryTechnician = new PrimaryTechnician(\"603\", \"Software\", \"David\");\n\t\tprimaryTechnicians.add(primaryTechnician);\n\t\tprimaryTechnician = new PrimaryTechnician(\"604\", \"Hardware\", \"David\");\n\t\tprimaryTechnicians.add(primaryTechnician);\n\t\tprimaryTechnician = new PrimaryTechnician(\"605\", \"Software\", \"David\");\n\t\tprimaryTechnicians.add(primaryTechnician);\n\t\treturn primaryTechnicians;\n\t}", "public ArrayList<String> getSchool() {\r\n\t\treturn school;\r\n\t}", "public ArrayList getSchools();", "public List<Student> search() {\n \tQuery query = em.createQuery(\"Select e FROM Student e WHERE e.grade > 50.00\");\r\n \tList<Student> result = query.getResultList();\r\n \t\r\n \t \r\n \t// Query for a List of data elements.\r\n// \tQuery query = em.createQuery(\"Select e.firstname FROM Student e\");\r\n// \tList<String> result = query.getResultList();\r\n \t \r\n \t// Query for a List of element arrays.\r\n// \tQuery query = em.createQuery(\"Select e.firstname, e.grade FROM Student e\");\r\n// \tList<Object[]> result = query.getResultList();\r\n \t\r\n\t\t// \tsetFirstResult()\r\n\t\t// \tsetMaxResults()\r\n \t\r\n \treturn result;\r\n }", "public List<Teacher> getTeachers() {\n\t\tList<Teacher> teachers = this.hibernateTemplate.loadAll(Teacher.class);\n\t\treturn teachers;\n\t}" ]
[ "0.79824996", "0.72064507", "0.67560667", "0.6407562", "0.6292695", "0.62751", "0.62473756", "0.6159804", "0.6105584", "0.6099174", "0.6083897", "0.6012647", "0.5967316", "0.5929308", "0.5829182", "0.5803508", "0.5768367", "0.5765594", "0.57011795", "0.5690267", "0.5658959", "0.5655594", "0.56544554", "0.56430393", "0.5617615", "0.5597717", "0.5562001", "0.5537842", "0.5515051", "0.54820013", "0.5458899", "0.54580206", "0.5445172", "0.5444151", "0.5383095", "0.5378338", "0.5369546", "0.5355832", "0.53455186", "0.5342671", "0.53383565", "0.53223306", "0.53203577", "0.5316366", "0.5294051", "0.52902037", "0.52852505", "0.5274481", "0.52728343", "0.5257785", "0.52556664", "0.5252727", "0.5248744", "0.524867", "0.5223885", "0.5218326", "0.52117616", "0.52115023", "0.5208529", "0.5203411", "0.5197056", "0.5191484", "0.5189614", "0.51835006", "0.5179168", "0.51754", "0.517457", "0.51712775", "0.5168444", "0.5166988", "0.5156174", "0.51550275", "0.5154212", "0.5152693", "0.5151164", "0.51399046", "0.513229", "0.51115865", "0.5110981", "0.5100202", "0.5095979", "0.50950557", "0.5089083", "0.50799376", "0.5078125", "0.5075684", "0.50742275", "0.5070943", "0.5063242", "0.50593704", "0.50546294", "0.5054017", "0.5044499", "0.5036769", "0.5036614", "0.5034126", "0.5029599", "0.5020125", "0.50172436", "0.50140244" ]
0.76104516
1
Returns the administratives in the school database
public HashMap<Integer, Administrative> getAdministratives() { return _administratives; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Administrator[] getAllAdmin() {\n\t\ttry {\n\t\t\tConnection conn = DbConnections.getConnection(DbConnections.ConnectionType.POSTGRESQL);\n\t\t\tPreparedStatement ps = conn.prepareStatement(\"select * from public.administrator\");\n\t\t\tResultSet rs = ps.executeQuery();\n\t\t\tList<Administrator> adminList = new ArrayList<Administrator>();\n\t\t\twhile (rs.next()) {\n\t\t\t\tint id = rs.getInt(\"id\");\n\t\t\t\tint idUser = rs.getInt(\"id_user\");\n\t\t\t\tString nume = rs.getString(\"nume\");\n\t\t\t\tString prenume = rs.getString(\"prenume\");\n\t\t\t\t\n\t\t\t\tadminList.add(new Administrator(id, idUser, nume, prenume));\n\t\t\t}\n\t\t\tDbConnections.closeConnection(conn);\n\t\t\treturn adminList.toArray(new Administrator[adminList.size()]);\n\t\t} catch (SQLException e) {\n\t\t\treturn null;\n\t\t}\n\n\t}", "@Override\n\tpublic List<Admin> getAdmins() {\n\t\treturn ar.findAll();\n\t}", "@Override\n\tpublic List<Administrateur> getList() {\n\t\topenCurrentSession();\n\t\t@SuppressWarnings(\"unchecked\")\n\t\tList<Administrateur> list = (List<Administrateur>)getCurrentSession().createQuery(\"FROM Administrateur\").list();\n\t\tcloseCurrentSession();\n\t\treturn list;\n\t}", "@Override\r\n\tpublic List<Admins> getQueryAdminAll() {\n\t\treturn adi.queryAdminAll();\r\n\t}", "public Administrator[] getAllAdmin()\n {\n return admin;\n }", "public Collection eleicoesAdmin(){\n return this.eleicaoDB.eleicoesAdmin();\n }", "@ManyToMany(mappedBy = \"administeredRooms\", cascade = CascadeType.ALL)\r\n\t@OrderBy(\"lastName\")\r\n\tpublic Set<User> getAdministrators() {\r\n\t\treturn administrators;\r\n\t}", "@Override\r\n\tpublic List<AdminAdministrator> selectAllAdList() {\n\t\treturn administratorDao.selectAll();\r\n\t}", "public static List<Admin> getAdmin() {\r\n\t\t//conn = DBConnection.getConnection();\r\n\t\t\r\n\r\n\t\tAdmin admin = null;\r\n\t\tList<Admin> listOfproducts = new ArrayList<Admin>();\r\n\r\n\t\ttry {\r\n\t\t\tStatement statement = conn.createStatement();\r\n\t\t\tResultSet resultSet = statement.executeQuery(getAllQuery);\r\n\t\t\twhile (resultSet.next()) {\r\n\t\t\t\t//User user = new User();\r\n\t\t\t\tint adminId = resultSet.getInt(1);\r\n\t\t\t\tString adminname = resultSet.getString(2);\r\n String adminpassword = resultSet.getString(3);\r\n\r\n\t\t\t\tadmin.setAdminid(adminId);\r\n\t\t\t\tadmin.setAdminname(adminname);\r\n\t\t\t\tadmin.setAdminpassword(adminpassword);\r\n\r\n\t\t\t\tlistOfproducts.add(admin);\r\n\t\t\t}\r\n\r\n\t\t} catch (SQLException e) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\r\n\t\treturn listOfproducts;\r\n\r\n\t}", "public List<User> getAdministrators() {\n \n QueryResult<User> admins = new AdminUsers(this, 1, \"asc\", null, 0, \n Integer.MAX_VALUE).executeQuery();\n \n return admins.getList();\n }", "@GetMapping\n\tpublic List<UniversityStaffMember> viewAllStaffs() {\n\t\tList<UniversityStaffMember> list = universityService.viewAllStaffs();\n\t\tif (list.size() == 0)\n\t\t\tthrow new EmptyDataException(\"No University Staff in Database.\");\n\t\treturn list;\n\t}", "@Override\r\n\tpublic List<Admin> getAdminDetails() {\n\t\tList<Admin> admin =dao.getAdminDetails();\r\n return admin;\r\n\t}", "List<Administrativo> findAll();", "@GET\n @Path(\"/at-school/{school : \\\\S+}\")\n @Produces({MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML})\n public Response getEducationsBySchool( @PathParam(\"school\") String school,\n @BeanParam PaginationBeanParam params ) throws ForbiddenException {\n\n RESTToolkit.authorizeAccessToWebService(params);\n logger.log(Level.INFO, \"returning educations for given school using EducationResource.getEducationsBySchool(school) method of REST API\");\n\n // find educations by given criteria\n ResourceList<Education> educations = new ResourceList<>( educationFacade.findBySchool(school, params.getOffset(), params.getLimit()) );\n\n // result resources need to be populated with hypermedia links to enable resource discovery\n EducationResource.populateWithHATEOASLinks(educations, params.getUriInfo(), params.getOffset(), params.getLimit());\n\n return Response.status(Status.OK).entity(educations).build();\n }", "@Test\n public void getAdminsTest() throws ApiException {\n String scope = null;\n AdminResponse response = api.getAdmins(scope);\n\n // TODO: test validations\n }", "Collection<Lesson> getActiveLessons() throws DataAccessException;", "private void getScholsFromDatabase() {\n schols = new Select().all().from(Scholarship.class).execute();\n }", "public ArrayList<String> getSchool() {\r\n\t\treturn school;\r\n\t}", "public List<Hospital> getHospitals() {\n HospitalDAO hospitalDAO = DAOFactory.getHospitalDAO();\n try {\n return hospitalDAO.getAll();\n } catch (SQLException e) {\n return new ArrayList<>();\n }\n }", "@Override\n\tpublic List<UsuariosEntity> findAdmin(){\n\t\treturn (List<UsuariosEntity>) iUsuarios.findAdmin();\n\t}", "@GetMapping(\"/schools\")\n public List<School> list() {\n List<School> schoolList = schoolRepository.findAll();\n return schoolList;\n }", "Collection<User> getStaffs() throws DataAccessException;", "public ArrayList<UserSavedSchool> viewSavedSchools() {\n\t\tthis.sfCon.viewSavedSchools();\n\t\tsuper.UFCon = UFCon;\n\t\treturn this.sfCon.viewSavedSchools();\n\t}", "List<UserDisplayDto> findeAdmins();", "public LoadTestAdministrationsImpl getLoadTestAdministrations() {\n return this.loadTestAdministrations;\n }", "public List<Usuario> getAdmins() {\n List<Usuario> lUsers = new ArrayList<>();\n try {\n\n if (em.isOpen()) {\n// lUsers = this.em.createNamedQuery(\"Usuario.findByTipoUsuario\")\n// .setParameter(\"tipoUsuario\", 1)\n// .setHint(QueryHints.CACHE_USAGE, CacheUsage.DoNotCheckCache)\n// .getResultList();\n\n Query query = this.em.createNamedQuery(\"Usuario.findByTipoUsuario\")\n .setParameter(\"tipoUsuario\", 1)\n .setHint(QueryHints.CACHE_USAGE, CacheUsage.DoNotCheckCache);\n\n lUsers = (List<Usuario>) query.getResultList();\n for (Usuario u : lUsers) {\n this.em.refresh(u);\n }\n }\n\n } catch (Exception e) {\n //e.printStackTrace();\n }\n\n return lUsers;\n }", "@Override\n\tpublic List<?> selectBoardAdminList() {\n\t\treturn eduBbsDAO.selectBoardAdminList();\n\t}", "public static EList<PertussisTreatmentGivenSubstanceAdministration> getPertussisTreatmentGivenSubstanceAdministrations(PertussisTherapeuticRegimenAct pertussisTherapeuticRegimenAct) {\r\n\t\tif (GET_PERTUSSIS_TREATMENT_GIVEN_SUBSTANCE_ADMINISTRATIONS__EOCL_QRY == null) {\r\n\t\t\tOCL.Helper helper = EOCL_ENV.createOCLHelper();\r\n\t\t\thelper.setOperationContext(PertussisPackage.Literals.PERTUSSIS_THERAPEUTIC_REGIMEN_ACT, PertussisPackage.Literals.PERTUSSIS_THERAPEUTIC_REGIMEN_ACT.getEAllOperations().get(63));\r\n\t\t\ttry {\r\n\t\t\t\tGET_PERTUSSIS_TREATMENT_GIVEN_SUBSTANCE_ADMINISTRATIONS__EOCL_QRY = helper.createQuery(GET_PERTUSSIS_TREATMENT_GIVEN_SUBSTANCE_ADMINISTRATIONS__EOCL_EXP);\r\n\t\t\t}\r\n\t\t\tcatch (ParserException pe) {\r\n\t\t\t\tthrow new UnsupportedOperationException(pe.getLocalizedMessage());\r\n\t\t\t}\r\n\t\t}\r\n\t\tOCL.Query query = EOCL_ENV.createQuery(GET_PERTUSSIS_TREATMENT_GIVEN_SUBSTANCE_ADMINISTRATIONS__EOCL_QRY);\r\n\t\t@SuppressWarnings(\"unchecked\")\r\n\t\tCollection<PertussisTreatmentGivenSubstanceAdministration> result = (Collection<PertussisTreatmentGivenSubstanceAdministration>) query.evaluate(pertussisTherapeuticRegimenAct);\r\n\t\treturn new BasicEList.UnmodifiableEList<PertussisTreatmentGivenSubstanceAdministration>(result.size(), result.toArray());\r\n\t}", "public static List<AdminDetails> list() {\n\t\treturn null;\r\n\t}", "@Override\n\tpublic Map<String, Object> getSchool() {\n\t\treturn getSession().selectOne(getNamespace() + \"getSchool\");\n\t}", "@Transactional\n\tpublic List<University> listAllUniversity() {\n\n\t\tCriteriaBuilder builder = getSession().getCriteriaBuilder();\n\t\tCriteriaQuery<University> criteriaQuery = builder.createQuery(University.class);\n\t\tRoot<University> root = criteriaQuery.from(University.class);\n\t\tcriteriaQuery.select(root);\n\t\tQuery<University> query = getSession().createQuery(criteriaQuery);\n\n\t\t// query.setFirstResult((page - 1) * 5);\n\t\t// query.setMaxResults(5);\n\t\treturn query.getResultList();\n\t}", "List<Reimbursement> adminGetReimbursements();", "@Override\n\tpublic List<UniversityDTO> getUniversities() throws DatabaseException {\n\t\t\n\t\t con =DbUtil.getConnection();\n\t\t\n\t\t srdao=new StudentRegistrationValidationDaoimpl();\n\t\t\n\t\tList<UniversityDTO> list=srdao.getUniversities(con);\n\t\treturn list;\n\t}", "@GetMapping(\"/administrators\")\n\tpublic ResponseEntity<Object> getAllAdministrators(HttpServletRequest request){\n\t\tString email = SessionManager.getInstance().getSessionEmail(request.getSession());\n\t\tif(service.findByEmail(email) == null) {\n\t\t\tSessionManager.getInstance().delete(request.getSession());\n\t\t\treturn new ResponseEntity<>(HttpStatus.UNAUTHORIZED); \n\t\t}else {\n\t\t\tList<Administrator> a = service.findAll();\n\t\t\tIterator<Administrator> i = a.iterator();\n\t\t\twhile (i.hasNext()) {\n\t\t\t Administrator adm = i.next();\n\t\t\t if(adm.getEmail().equals(email)) i.remove();\n\t\t\t}\n\t\t\tMappingJacksonValue mappedAdmin = new MappingJacksonValue(a);\n\t\t\tmappedAdmin.setFilters(new SimpleFilterProvider().addFilter(Administrator.FILTER, SimpleBeanPropertyFilter.filterOutAllExcept(\"id\", \"email\", \"name\")));\n\t\t\treturn new ResponseEntity<>(mappedAdmin, HttpStatus.OK);\n\t\t}\n\t}", "@Override\n\tpublic List<Basicunit> selectAllforadmin() {\n\t\treturn basicDAOManager.selectAllforadmin();\n\t}", "@Override\n\tpublic int countAdmins() {\n\t\treturn 0;\n\t}", "public static List<Administrador> listar( Conector conector ) throws ErrorConector\r\n {\r\n String consultaSQL = \"SELECT * FROM administrador ORDER BY id_administrador ASC\";\r\n ResultSet rs = conector.consultarEnBaseDatos(consultaSQL);\r\n List<Administrador> lista = new ArrayList<Administrador>();\r\n try {\r\n if(rs.first())\r\n\t\t\t{\r\n\t\t\t\tdo\r\n\t\t\t\t{\r\n\t\t\t\t\tAdministrador admin = new Administrador();\r\n\t \tadmin.setIdadmin( rs.getInt( \"id_administrador\" ) );\r\n\t \tadmin.setDocumentoidentidad( rs.getString( \"documento_identidad\" ) );\r\n\t \tadmin.setNombres( rs.getString( \"nombres\" ) );\r\n\t admin.setApellidos( rs.getString( \"apellidos\" ) );\r\n\t admin.setPassword( rs.getString( \"password\" ) );\r\n\t admin.setNumerotelefonico( rs.getString( \"numero_telefonico\" ) );\r\n\t admin.setCorreoelectronico( rs.getString( \"correo_electronico\" ) );\r\n\t lista.add(admin);\r\n\t\t\t\t} while(rs.next());\r\n\t\t\t}\r\n \r\n } catch (SQLException e) {\r\n e.printStackTrace();\r\n }\r\n return lista;\r\n }", "@Override\r\n\tpublic ArrayList<Activitat> getAllNoSenior() {\r\n\t\tint i = 0;\r\n\t\tqueryString = \"SELECT * FROM \" + ACTIVITATTABLENAME + \" WHERE SENIOR = FALSE\";\r\n\t\tArrayList<Activitat> llistaActivitats = null;\r\n\t\ttry {\r\n\t\t\ts = conexio.prepareStatement(queryString);\r\n\t\t\tResultSet rs = s.executeQuery();\r\n\t\t\tllistaActivitats = new ArrayList<Activitat>();\r\n\t\t\tActivitatFactory af = af = new ActivitatFactory();\r\n\t\t\twhile(rs.next()){\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\tCalendar cal = new GregorianCalendar();\r\n\t\t\t\tcal.setTime(rs.getDate(4));\r\n\t\t\t\t\r\n\t\t\t\tllistaActivitats.add(af.creaActivitat(rs.getString(2), rs.getString(3), cal, rs.getTimestamp(5),rs.getString(6),rs.getBoolean(7)));\r\n\t\t\r\n\t\t\t}\r\n\t\t} catch (SQLException e) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\treturn llistaActivitats;\r\n\t}", "public static ArrayList getSchoolList(Connection con) throws ServletException{\n try{\n PreparedStatement ps = con.prepareStatement(\"SELECT * FROM schools;\");\n ResultSet rs = ps.executeQuery();\n ArrayList<School> schoolList = new ArrayList();\n while (rs.next()){\n schoolList.add(new School(rs.getString(\"schoolname\")));\n }\n return schoolList;\n } catch (SQLException ex) {\n throw new ServletException(\"school list load problem\");\n } \n }", "public ArrayList getSchools();", "Collection<Lesson> getLessons() throws DataAccessException;", "List<Hospital> listall();", "public ObservableList<User> getAdminsList() {\n adminsList.addAll(userManager.getAdminsList());\n return adminsList;\n }", "public Administrator getAdmin(int index){\n return administratorMyArray.get(index);\n }", "private static void findAdministrators(Robot robot, JsonNode robotNode) {\n List<String> administrators = new ArrayList<String>();\n robot.getAdministrators().clear();\n for (JsonNode node : robotNode.get(\"administrators\")) {\n administrators.add(node.asText());\n }\n for (RosterEntry entry : robot.getRosters()) {\n if (administrators.contains(entry.getUser())) {\n robot.getAdministrators().add(entry);\n }\n }\n robot.setAdministratorIds(administrators);\n }", "public boolean populateAdmins(){\r\n\t\t\r\n\t\tboolean done=false;\r\n\t\ttry{\r\n\t\t\t\r\n\t\t\tConnection conn=Database.getConnection();\r\n\t\t\t\r\n\t\t\ttry{\r\n\t\t\t\tif(conn != null){\r\n\t\t\t\t\t\r\n\t\t\t\t\tArrayList<Department> getAllDepts=Department.getAllDepartments();\r\n\t\t\t\t\t//Retrieve the current semester ID\r\n\t\t\t\t\tString SemesterSelect = \"Select * FROM names3 order by rand() LIMIT 50\";\r\n\t\t\t\t\tPreparedStatement statement = conn.prepareStatement(SemesterSelect);\r\n\t\t\t\t\tResultSet rs = statement.executeQuery();\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\twhile(rs.next()){\r\n\t\t\t\t\t\tint size=getAllDepts.size();\r\n\t\t\t\t\t\tint rand=(int)(Math.random()*size);\r\n\t\t\t\t\t\tDepartment d=getAllDepts.get(rand);\r\n\t\t\t\t\t\tString name = rs.getString(1);\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\ttry{\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\tSystem.out.println(\"Adding new admin\");\r\n\t\t\t\t\t\t\t\tAdmin.addAdmin(name, d);\r\n\t\t\t\t\t\t\t\tSystem.out.println(d.getDepartmentName()+\"-------\"+name);\r\n\t\t\t\t\t\t\t\tThread.sleep(10);\r\n\t\t\t\t\t\t\t\tdone=true;\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\tcatch (InterruptedException e) {\r\n\t\t\t\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t\t\t} catch (People.loginDetailsnotAdded e) {\r\n\t\t\t\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tcatch(SQLException e){\r\n\t\t\t\tSystem.out.println(e.getMessage());\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t} \r\n\t\t\t\t\r\n\t\t\tfinally{\r\n\t\t\t\t//Database.commitTransaction(conn);\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tfinally{\r\n\t\t}\r\n\t\t\r\n\t\treturn done;\r\n\t}", "public static EList<PertussisTreatmentNotGivenSubstanceAdministration> getPertussisTreatmentNotGivenSubstanceAdministrations(PertussisTherapeuticRegimenAct pertussisTherapeuticRegimenAct) {\r\n\t\tif (GET_PERTUSSIS_TREATMENT_NOT_GIVEN_SUBSTANCE_ADMINISTRATIONS__EOCL_QRY == null) {\r\n\t\t\tOCL.Helper helper = EOCL_ENV.createOCLHelper();\r\n\t\t\thelper.setOperationContext(PertussisPackage.Literals.PERTUSSIS_THERAPEUTIC_REGIMEN_ACT, PertussisPackage.Literals.PERTUSSIS_THERAPEUTIC_REGIMEN_ACT.getEAllOperations().get(64));\r\n\t\t\ttry {\r\n\t\t\t\tGET_PERTUSSIS_TREATMENT_NOT_GIVEN_SUBSTANCE_ADMINISTRATIONS__EOCL_QRY = helper.createQuery(GET_PERTUSSIS_TREATMENT_NOT_GIVEN_SUBSTANCE_ADMINISTRATIONS__EOCL_EXP);\r\n\t\t\t}\r\n\t\t\tcatch (ParserException pe) {\r\n\t\t\t\tthrow new UnsupportedOperationException(pe.getLocalizedMessage());\r\n\t\t\t}\r\n\t\t}\r\n\t\tOCL.Query query = EOCL_ENV.createQuery(GET_PERTUSSIS_TREATMENT_NOT_GIVEN_SUBSTANCE_ADMINISTRATIONS__EOCL_QRY);\r\n\t\t@SuppressWarnings(\"unchecked\")\r\n\t\tCollection<PertussisTreatmentNotGivenSubstanceAdministration> result = (Collection<PertussisTreatmentNotGivenSubstanceAdministration>) query.evaluate(pertussisTherapeuticRegimenAct);\r\n\t\treturn new BasicEList.UnmodifiableEList<PertussisTreatmentNotGivenSubstanceAdministration>(result.size(), result.toArray());\r\n\t}", "java.lang.String getAdmin();", "private void loadSchoolInfo() {\r\n \r\n try {\r\n // Get fine ammount to be incurred by retrieving data from the database. \r\n String sql3 = \"SELECT * FROM schoolInfo \";\r\n pstmt = con.prepareStatement(sql3);\r\n\r\n ResultSet rs3=pstmt.executeQuery();\r\n if (rs3.next()) {\r\n schoolName = rs3.getString(\"name\");\r\n schoolContact = rs3.getString(\"contact\");\r\n schoolAddress = rs3.getString(\"address\");\r\n schoolRegion = rs3.getString(\"region\");\r\n schoolEmail = rs3.getString(\"email\");\r\n schoolWebsite = rs3.getString(\"website\");\r\n } \r\n \r\n pstmt.close();\r\n \r\n } catch (SQLException e) {\r\n }\r\n \r\n //////////////////////////////////// \r\n }", "public Result allSemesters(){\n\t\tUser user = Application.getLoggedUser();\n\t\tif (user == null || user.userType != UserType.ADMIN) {\n\t\t\treturn unauthorized(message.render(\"Please log in to the system as administrator\"));\n\t\t}\n\t\ttry{\n\t\t\tList<Semester> sems = SemesterDB.allSemesters();\n\t\t\t\n\t\t\treturn ok(viewSemesters.render(asScalaBuffer(sems)));\n\t\t\t\n\t\t}\tcatch (Exception e){\t\t\t\n\t\t\treturn internalServerError(message.render(\"Internal Server Error\"));\n\t\t}\n\t}", "List<Enrolment> getAll();", "public List<Admin> findAdmin(String identifier) {\n\t\treturn null;\r\n\t}", "public java.lang.String getAdministrator () {\n\t\treturn administrator;\n\t}", "@Override\n\tpublic List<?> selectBoardAdminListView() {\n\t\treturn eduBbsDAO.selectBoardAdminList();\n\t}", "@Override\r\n\tpublic List<ViewApplyUserAdmin> applyuseradminSelectAll() {\n\t\treturn applyseradminDao.applyuseradminSelectAll();\r\n\t}", "public List<Etudiant> getAllEtudiants() {\n\t\ttry \n\t\t{\n\t\t\tList<Etudiant> list =new ArrayList<Etudiant>();\n\t\t\tSession session = ConnexionBD.getConnexion().getFactory().openSession();\n\t\t\tsession.beginTransaction();\n\t\t\tlist= session.createQuery(\"from Etudiant\").list();\n\t\t\tsession.close();\n\t\t\treturn list;\n\t\t}\n\t\tcatch(HibernateException e)\n\t\t{\n\t\t\te.printStackTrace();\n\t\t\treturn null;\n\t\t}\n\t}", "@Override\n\tpublic List<BoardVO> admin_list() {\n\t\treturn dao.admin_listRow();\n\t}", "public String getNombreAdministrador() {\n return nombreAdministrador;\n }", "List<SchoolSubject> findSchoolSubjects() throws DaoException;", "public Administrator getAdmin(int index)\n {\n return admin[index];\n }", "private List<School> querySchools(final Connection connection) {\n List<Integer> schools = new ArrayList<>();\n try {\n Statement st = connection.createStatement();\n ResultSet rs = st.executeQuery(allSchoolsQuery);\n while (rs.next()) {\n schools.add(rs.getInt(1));\n }\n rs.close();\n st.close();\n } catch (Exception e) {\n e.printStackTrace();\n }\n\n List<School> result = new ArrayList<>();\n\n for (Integer schoolId : schools) {\n List<Integer> students = new ArrayList<>();\n String query = schoolsStudentsQuery.replace(SCHOOL_ID_SQL_TAG, schoolId.toString());\n\n try {\n Statement st = connection.createStatement();\n ResultSet rs = st.executeQuery(query);\n while (rs.next()) {\n students.add(rs.getInt(1));\n }\n rs.close();\n st.close();\n } catch (Exception e) {\n e.printStackTrace();\n continue;\n }\n\n result.add(new School(schoolId, students));\n }\n\n return result;\n }", "java.util.List<hr.domain.ResumeDBOuterClass.Education> \n getEducationsList();", "AdminKeys getAdminKeys();", "@Transactional\n\t@Override\n\tpublic List<ApplicantModel> viewAllApplicants() {\n\t\treturn applicantRepo.findAll().stream().map(course -> parser.parse(course))\n\t\t\t\t.collect(Collectors.toList());\n\t}", "public ArrayList<Booking> viewbookingsadmin() {\n\tStudentDAO studentDAO=new StudentDAO();\n\treturn studentDAO.viewbookingsadmin();\n\t\n\t\n}", "@GetMapping(path=\"/getall\")\r\n\tpublic @ResponseBody Iterable<MyClass> getAllAdmins() {\n\t\treturn classRepository.findAll();\r\n\t}", "@Transactional(readOnly = true) \n public Page<Administrator> findAll(Pageable pageable) {\n log.debug(\"Request to get all Administrators\");\n Page<Administrator> result = administratorRepository.findAll(pageable); \n return result;\n }", "public List<TbccUser> getSysAdmin() {\n\t\treturn userdao.getSysAdmin();\n\t}", "@GetMapping(\"/schooldistricts\")\n public List<SchoolDistrict> listDistricts() {\n List<SchoolDistrict> schoolDistrictList = schoolDistrictRepository.findAll();\n return schoolDistrictList;\n }", "public int numberOfAdmin(){\n return administratorMyArray.size();\n }", "public PanelAdminUsuarios getAdminUsuarios(){\n return adminUsuarios;\n }", "public ArrayList<Integer> getAdminIDs() {\n return adminIDs;\n }", "public List getTrainingInitialAdmin(int userId) {\n Session session = ConnectionFactory.getInstance().getSession();\n Query query;\n\n try {\n /*\n * Build HQL (Hibernate Query Language) query to retrieve a list\n * of all the items currently stored by Hibernate.\n */\n\n query = session.createQuery(\"select TrainingInitialAdmin from app.user.TrainingInitialAdmin TrainingInitialAdmin where \"\n + \" TrainingInitialAdmin.ID_User= \" + userId);\n return query.list();\n } catch (HibernateException e) {\n System.err.println(\"Hibernate Exception\" + e.getMessage());\n throw new RuntimeException(e);\n } /*\n * Regardless of whether the above processing resulted in an Exception\n * or proceeded normally, we want to close the Hibernate session. When\n * closing the session, we must allow for the possibility of a Hibernate\n * Exception.\n *\n */ finally {\n if (session != null) {\n try {\n session.close();\n } catch (HibernateException e) {\n System.err.println(\"Hibernate Exception\" + e.getMessage());\n throw new RuntimeException(e);\n }\n\n }\n }\n }", "private void displaySchalorship() {\n\n for (Scholarship scholarship : scholarshipDatabase) {\n\n stdOut.println(scholarship.toString() + \"\\n\");\n\n }\n }", "@Override\n\tpublic List<Historic_siteVO> MainEditer() throws Exception {\n\t\treturn dao.MainEditer();\n\t}", "@External(readonly = true)\n\tpublic List<Address> get_admin(){\n\t\t\n\t\tif (DEBUG) {\n\t\t\tContext.println( Context.getOrigin().toString() + \" is getting admin addresses.\" + TAG);\n\t\t}\n\t\tAddress[] admin_list = new Address[this.admin_list.size()];\n\t\tfor(int i= 0; i< this.admin_list.size(); i++) {\n\t\t\tadmin_list[i] = this.admin_list.get(i);\n\t\t}\n\t\treturn List.of(admin_list);\n\t}", "public ArrayList<String> viewSchoolDetails(String universityName) {\n\t\tthis.sfCon.viewSchoolDetails(universityName);\n\t\treturn this.sfCon.viewSchoolDetails(universityName);\n\t}", "@Override\r\n\tpublic List<Admin> viewlogs() {\n\t\treturn user.viewlogs();\r\n\t}", "@Override\n public Set<Map.Entry<String,Administrador>> entrySet() {\n //resultado\n Set<Map.Entry<String,Administrador>> r = new HashSet<>();\n \n Administrador a;\n \n try {\n conn = Connect.connect();// abrir uma conecção\n // querie que obtem os dados para poder\n PreparedStatement stm = conn.prepareStatement(\"SELECT username, password FROM Administrador WHERE visivel=TRUE;\");\n // agora executa a querie\n ResultSet rs = stm.executeQuery();\n //percorrer o resultado\n while (rs.next()) {\n a = new Administrador(rs.getString(\"username\"),rs.getString(\"password\"));\n r.add(new AbstractMap.SimpleEntry(a.getId(),a));\n }\n } catch (SQLException | ClassNotFoundException e) {\n e.printStackTrace();\n } finally {\n Connect.close(conn); \n }\n return r;\n }", "Collection<User> getInstructors() throws DataAccessException;", "public University getalluniversitybyId(int id) {\n\t\treturn universityrespo.getOne(id);\n\n}", "public CWE getAdministeredUnits() { \r\n\t\tCWE retVal = this.getTypedField(7, 0);\r\n\t\treturn retVal;\r\n }", "public List<Etudiant> afficher() {\n\t\treturn dao.afficher();\r\n\t}", "public List<Establishment> getEstablishments() {\n return Establishments;\n }", "public ArrayList<UserSavedSchool> saveSchool(String school) {\n\t\tthis.sfCon.setAccount(this.UFCon.getAccount());\n\t\tthis.sfCon.saveSchool(school);\n\t\treturn sfCon.viewSavedSchools();\n\t}", "@Override\n\tpublic List<Professor> getProfessors() {\n\t\tList<Professor> pros=null;\n\t\tProfessor pro=null;\n\t\t\n\t\ttry{\n\t\t\t\n\t\t\tstmt=conn.prepareStatement(\"SELECT ssn,name,department,password FROM Professor\");\n\t\t\t/*stmt.setString(1, admin.getCname());\n\t\t\tstmt.setString(2, admin.getCplace());*/\n\t\t\tResultSet rs=stmt.executeQuery();\n\t\t\tpros=new ArrayList<Professor>();\n\t\t\twhile(rs.next()){\n\t\t\t\tpro=new Professor(rs.getString(\"name\"),rs.getString(\"ssn\"),\"\", rs.getString(\"department\"));\n\t\t\t\t\n\t\t\t\tpros.add(pro);\n\t\t\t}\n\t\t\t}catch(SQLException e){\n\t\t\t\tex=e;\n\t\t\t}finally{\n\t\t\t\tif(conn!=null){\n\t\t\t\t\ttry{\n\t\t\t\t\t\tconn.close();\n\t\t\t\t\t}catch(SQLException e){\n\t\t\t\t\t\tif(ex==null){\n\t\t\t\t\t\t\tex=e;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\tif(ex!=null){\n\t\t\t\tthrow new RuntimeException(ex);\n\t\t\t}\n\t\t\t}\n\t\treturn pros;\n\t}", "List<Admin> selectByExample(AdminExample example);", "public University viewSchool(String school)\n {\n\t this.addBrowseHistory(school);\n\n\t return this.userCtrl.viewSchool(school);\n }", "@Override\r\n public List<String> getStudenti() {\r\n List<Studente> listaStudenti = studenteFacade.findAll();\r\n List<String> result = new ArrayList<>();\r\n\r\n for (Studente s : listaStudenti) {\r\n result.add(s.toString());\r\n }\r\n return result;\r\n }", "public ArrayList<String> viewSavedSchoolDetails(String school) {\n\t\tthis.sfCon.viewSavedSchoolDetails(school);\n\t\treturn this.sfCon.viewSavedSchoolDetails(school);\n\t}", "public void afficherAdministrateur() throws SQLException{\n this.administrateur.majAffichage();\n VBox fp = ((VBox) windows.getRoot());\n fp.getChildren().remove(1);\n fp.getChildren().add(administrateur);\n }", "boolean isAdminDirect() {\n return isAdministrator;\n }", "boolean isAdmin() {\n\n if (isAdminDirect()) {\n return true;\n }\n\n RoleManager rm = getRoleManager();\n Iterator it = getAllRoles().iterator();\n\n while (it.hasNext()) {\n try {\n if (((Grantee) rm.getGrantee(\n (String) it.next())).isAdminDirect()) {\n return true;\n }\n } catch (HsqlException he) {\n throw Trace.runtimeError(Trace.RETRIEVE_NEST_ROLE_FAIL,\n he.getMessage());\n }\n }\n\n return false;\n }", "public void listWashers() {\r\n\t\tSystem.out.println(store.listWashers());\r\n\t}", "public List<Yng_Security> findAll() {\n\t\treturn securityDao.findAll();\r\n\t}", "@Override\r\n\tpublic List<HashMap<String, String>> getGeunTaeAdminList(HashMap<String, String> params) {\n\t\treturn sqlsession.selectList(\"GeuntaeMgnt.getGeunTaeAdminList\",params);\r\n\t}", "public Long getSchoolId() {\n return schoolId;\n }", "public java.util.List<hr.domain.ResumeDBOuterClass.Education> getEducationsList() {\n if (educationsBuilder_ == null) {\n return java.util.Collections.unmodifiableList(educations_);\n } else {\n return educationsBuilder_.getMessageList();\n }\n }", "public int getIdAdministradorf() {\n return idAdministradorf;\n }", "public List<Utilizator> listUsers();" ]
[ "0.66345286", "0.6347857", "0.6268534", "0.6099846", "0.60676396", "0.6066665", "0.60214347", "0.59785414", "0.5943866", "0.58909243", "0.5884971", "0.5868474", "0.5844687", "0.58235407", "0.57888603", "0.5783816", "0.5764956", "0.5747656", "0.5731894", "0.5700441", "0.5699501", "0.5684733", "0.56467766", "0.5602055", "0.5575283", "0.5565695", "0.55520433", "0.5545103", "0.5534635", "0.5505327", "0.5502369", "0.5501478", "0.549141", "0.5489085", "0.5468609", "0.54362506", "0.5435699", "0.54339343", "0.54253364", "0.542287", "0.5417377", "0.5402991", "0.5402615", "0.5396725", "0.5378894", "0.53673744", "0.5362201", "0.53432983", "0.5341983", "0.5332441", "0.5329695", "0.53283316", "0.53229064", "0.5321309", "0.530097", "0.52741456", "0.5267382", "0.52642304", "0.5262349", "0.52586955", "0.5255763", "0.52428037", "0.52289003", "0.52257824", "0.5218345", "0.52180094", "0.52155834", "0.521476", "0.5214239", "0.5197946", "0.51903814", "0.5189355", "0.51867706", "0.51779485", "0.51774573", "0.5177035", "0.51686275", "0.5161166", "0.5160189", "0.5155457", "0.5152397", "0.5146924", "0.51422125", "0.5138356", "0.51134485", "0.5110468", "0.5108641", "0.51013595", "0.50979006", "0.50901914", "0.50775355", "0.5075412", "0.5072288", "0.5061361", "0.50574464", "0.5055717", "0.5050215", "0.5048123", "0.5038515", "0.5037676" ]
0.6474291
1
Checks if the person who tried to login is in the school database or not
public Person login(int id) throws NoSuchPersonIdException{ _person = getPersons().get(id); if(_person == null){ throw new NoSuchPersonIdException(id); } return _person; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public boolean checkDb() {\n\t\t\n\t\tint userId = Auth.getCurrentUser().getId();\n\t\tString sql = \"select id from PersonalDetails where id='\"+userId+\"'\";\n\t\tint gotId;\n\t\t//connectToDb();\n\t\t\n\t\ttry(Connection conn = myDb;\n\t\t\tStatement stmt = conn.createStatement();\n\t\t\tResultSet rs = stmt.executeQuery(sql)){\n\t\t\tgotId = rs.getInt(\"id\");\n\t\t}catch(SQLException e){\n\t\t\t\n\t\t\tmyDb = null;\n\t\t\t\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\tif(gotId == userId) {\n\t\t\treturn true;\n\t\t}else {\n\t\t\t//return false;\n\t\t\treturn false;\n\t\t}\n\n\t}", "public boolean checkLogin() {\r\n try {\r\n String select = \"SELECT * FROM LOGIN\";\r\n ResultSet rs = model.ConnectToSql.select(select);\r\n while (rs.next()) {\r\n if (this.username.equals(rs.getString(1)) && new MD5().md5(this.password).equals(rs.getString(2))) {\r\n this.fullname = rs.getString(4);\r\n this.codeID = rs.getString(3);\r\n model.ConnectToSql.con.close();\r\n return true;\r\n }\r\n }\r\n\r\n } catch (Exception e) {\r\n //e.printStackTrace();\r\n\r\n }\r\n return false;\r\n }", "private boolean checkLogin(String enterLogin) {\n JdbcConnection connection = JdbcConnection.getInstance();\n DaoFactory daoFactory = new RealDaoFactory(connection);\n List<User> users = daoFactory.createUserDao().findAll();\n for (User user : users) {\n if (user.getLogin().equals(enterLogin)) {\n return true;\n }\n }\n return false;\n }", "boolean hasLogin();", "boolean hasLogin();", "private void checkUser() {\n\t\tloginUser = mySessionInfo.getCurrentUser();\n\t}", "private boolean checkUser(String user_name, String passwordd) throws SQLException {\n boolean sucss = false;\n DBConnection db = new DBConnection();\n Connection connection = db.getConnection();\n String sql = \"SELECT * FROM USER WHERE NAME = ? AND PASSWORD = ?\";\n try (PreparedStatement preparedStatement = connection.prepareStatement(sql);) {\n preparedStatement.setString(1, user_name);\n preparedStatement.setString(2, passwordd);\n ResultSet rs = preparedStatement.executeQuery();\n if (rs.next()) {\n System.out.println(rs.getString(\"name\"));\n System.out.println(rs.getString(\"password\"));\n sucss = true;\n }\n } catch (SQLException e) {\n System.out.println(\"User Is Not Insert\" + e);\n } finally {\n connection.close();\n return sucss;\n }\n }", "boolean checkLoginDetails(String email,String password){\n boolean isValidUser = false;\n dbConnection();\n try{\n stmt = con.prepareStatement(\"SELECT * FROM users ORDER BY email\");\n rs = stmt.executeQuery();\n while(rs.next()){\n String checkEmail = rs.getString(\"email\");\n String checkpassword = rs.getString(\"password\");\n if(checkEmail.equals(email) && checkpassword.equals(password)){\n isValidUser = true;\n }\n }\n }\n catch(Exception e){\n e.printStackTrace();\n }\n return isValidUser;\n }", "public boolean validLogin(String username, String password) {\n\n String query = String.format(\"SELECT * FROM staff WHERE staff_password = '%s' and staff_id = '%s'\", password, username);\n try {\n preparedStatement = connection.prepareStatement(query);\n result = preparedStatement.executeQuery();\n if(result.next()){\n return true;\n }\n return false;\n }\n catch (SQLException e) {\n e.printStackTrace();\n }\n return false;\n }", "private boolean correctUser() {\n // TODO mirar si l'usuari es unic a la base de dades\n return true;\n }", "public boolean loginCheck() {\n\t\tif(allParametersGiven==true) {\n\t\t\treturn dtb.checkLoginDetais(username,password);\n\t\t}\n\t\treturn false;\n\t}", "public boolean login(){\r\n try{\r\n DbManager0 db = DbManager0.getInstance();\r\n Query q = db.createQuery(\"SELECT * FROM user WHERE username = '\"+this.login+\"' and password = '\"+this.pwd+\"';\");\r\n QueryResult rs = db.execute(q);\r\n rs.next();\r\n if(rs.wasNull()) return false;\r\n this.id = rs.getInt(\"id\")+\"\";\r\n return true;\r\n }\r\n catch(SQLException ex){\r\n throw new RuntimeException( ex.getMessage(), ex );\r\n }\r\n }", "private boolean checkUserame(String name) throws SQLException {\n\t\tcheckUserameStatement.clearParameters();\n\t\tcheckUserameStatement.setString(1, name);\n\t\tResultSet result = checkUserameStatement.executeQuery();\n\t\tresult.next();\n\t\tboolean out = result.getInt(1) == 1;\n\t\tif (DEBUG) {\n\t\t\tSystem.out.println(\"checkUserame: \"+result.getInt(1)+\"\\n\");\n\t\t}\n\t\tresult.close();\n\t\treturn out;\n\t}", "public boolean logincheck(String user, String pass) \r\n {\n \r\n try{\r\n Connection conn = DriverManager.getConnection(url, userName, password);\r\n String Sql = \"Select * from APP.MEMBER where email=? and password=?\";\r\n PreparedStatement pst = conn.prepareStatement(Sql);\r\n pst.setString(1,user);\r\n pst.setString(2,pass);\r\n ResultSet rs = pst.executeQuery();\r\n if (rs.next())\r\n {\r\n JOptionPane.showMessageDialog(null,\"Welcome user\");\r\n createEventsUI w = new createEventsUI();\r\n w.setVisible(true);\r\n }\r\n else\r\n {\r\n JOptionPane.showMessageDialog(null,\"Invalid username or password\", \"Access Denied\",JOptionPane.ERROR_MESSAGE);\r\n }\r\n }catch(Exception e) \r\n {\r\n JOptionPane.showMessageDialog(null, e);\r\n }\r\n return false;\r\n \r\n }", "private static boolean doesUserExist () {\n String sqlRetrieveAisId = \"SELECT ais_id FROM users WHERE user_id=?\";\n \n boolean valid = false;\n try (Connection conn = Database.getConnection();\n PreparedStatement pstmt = conn.prepareStatement(sqlRetrieveAisId)) {\n \n pstmt.setInt(1, userId);\n \n ResultSet rs = pstmt.executeQuery();\n \n valid = rs.next() != false;\n } catch (SQLException se) {\n JOptionPane.showMessageDialog(MainLayout.getJPanel(), Messages.getError(1), Messages.getHeaders(0), JOptionPane.ERROR_MESSAGE);\n } catch (IOException ioe) {\n JOptionPane.showMessageDialog(MainLayout.getJPanel(), Messages.getError(0), Messages.getHeaders(0), JOptionPane.ERROR_MESSAGE);\n } catch (Exception e) {\n JOptionPane.showMessageDialog(MainLayout.getJPanel(), Messages.getError(0), Messages.getHeaders(0), JOptionPane.ERROR_MESSAGE);\n }\n \n return valid;\n }", "private boolean login()\n {\n System.out.print(\"Enter your username: \");\n String userName = keyboard.nextLine().toLowerCase();\n currentUser = fs.getUser(userName);\n System.out.println();\n\n return currentUser != null;\n }", "public boolean isLoggedIn() {\n SQLiteDatabase db = this.getReadableDatabase();\n\n // Define a projection that specifies which columns from the database\n // you will actually use after this query.\n String[] projection = {\n SportPartnerDBContract.LoginDB.COLUMN_EMAIL_NAME\n };\n\n Cursor cursor = db.query(\n SportPartnerDBContract.LoginDB.TABLE_NAME,\n projection,\n null,\n null,\n null,\n null,\n null\n );\n\n boolean logedin = cursor.getCount() == 1;\n cursor.close();\n return logedin;\n }", "private boolean AlreadyLogin() {\n\t\tString usn = uPreferences.getString(\"username\", null);\n\t\tString pwd = uPreferences.getString(\"password\", null);\n\t\tif((usn == null) || ((pwd == null))){\n\t\t\treturn false;\n\t\t}\n\t\telse \n\t\t\treturn true;\n\t}", "@Override\n public boolean check() {\n return GlobalParams.isLogin();\n }", "public boolean checkStudentName(Student s) {\n\t\tboolean res = false;\n\t\tConnection conn = DBUtil.getConn();\n\t\tStatement stmt = DBUtil.createStmt(conn);\n\t\tString sql = \"select * from student where prenom='%s' and nom='%s'\";\n\t\tsql = String.format(sql, s.getPrenom(), s.getNom());\n\t\tSystem.out.println(sql);\n\t\tResultSet rst = DBUtil.getRs(stmt, sql);\n\t\ttry {\n\t\t\tif (rst.next()) {\n\t\t\t\tres = true;\n\t\t\t}\n\t\t} catch (SQLException e) {\n\t\t\tres = false;\n\t\t\te.printStackTrace();\n\t\t} finally {\n\t\t\tDBUtil.closeStmt(stmt);\n\t\t\tDBUtil.closeConn(conn);\n\t\t\tDBUtil.closeRs(rst);\n\t\t}\n\t\treturn res;\n\t}", "private boolean checkPass(String enterPass) {\n JdbcConnection connection = JdbcConnection.getInstance();\n DaoFactory daoFactory = new RealDaoFactory(connection);\n List<User> users = daoFactory.createUserDao().findAll();\n for (User user : users) {\n if (user.getPasswordHash() == enterPass.hashCode()) {\n return true;\n }\n }\n return false;\n }", "public boolean checkStudentID(Student s) {\n\t\tboolean res = false;\n\t\tConnection conn = DBUtil.getConn();\n\t\tStatement stmt = DBUtil.createStmt(conn);\n\t\tString sql = \"select * from student where stu_ID=%d\";\n\t\tsql = String.format(sql, s.getID());\n\t\tSystem.out.println(sql);\n\t\tResultSet rst = DBUtil.getRs(stmt, sql);\n\t\ttry {\n\t\t\tif (rst.next()) {\n\t\t\t\tres = true;\n\t\t\t}\n\t\t} catch (SQLException e) {\n\t\t\tres = false;\n\t\t\te.printStackTrace();\n\t\t} finally {\n\t\t\tDBUtil.closeStmt(stmt);\n\t\t\tDBUtil.closeConn(conn);\n\t\t\tDBUtil.closeRs(rst);\n\t\t}\n\t\treturn res;\n\t}", "@Override\r\n\tpublic boolean checkLogin() {\n\t\treturn false;\r\n\t}", "@Override\r\n\tpublic boolean checkLogin() {\n\t\treturn false;\r\n\t}", "private boolean checkAuthentication(String login, String passwd) {\n Connection connect;\n boolean result = false;\n try {\n // connect db\n Class.forName(DRIVER_NAME);\n connect = DriverManager.getConnection(SQLITE_DB);\n // looking for login && passwd in db\n Statement stmt = connect.createStatement();\n ResultSet rs = stmt.executeQuery(SQL_SELECT.replace(\"?\", login));\n while (rs.next())\n result = rs.getString(PASSWD_COL).equals(passwd);\n // close all\n rs.close();\n stmt.close();\n connect.close();\n } catch (Exception ex) {\n ex.printStackTrace();\n return false;\n }\n return result;\n }", "public static boolean logIn(LogIn log) throws Exception {\r\n PreparedStatement prepedSt = con.prepareStatement(\"Select username,\"\r\n + \"password from accounts where username=? And password=?\");\r\n prepedSt.setString(1,log.credent[0]);\r\n prepedSt.setString(2,log.credent[1]);\r\n ResultSet rs = prepedSt.executeQuery(); \r\n return rs.next() != false;\r\n }", "public boolean userNameExists(){\r\n boolean userNameExists = false;\r\n //reads username and password\r\n String user = signup.getUsername();\r\n String pass = signup.getFirstPassword();\r\n try{\r\n //creates statement\r\n //connects to database\r\n \r\n Connection myConn = DriverManager.getConnection(Main.URL); \r\n \r\n //creates statement\r\n Statement myStmt = myConn.createStatement();\r\n System.out.println(\"statement initiated\");\r\n //SQL query\r\n ResultSet myRs = myStmt.executeQuery(\"select * from LISTOFUSERS \");\r\n System.out.println(\"query initiated\");\r\n //process result set\r\n //checks to see if the username already exists in the database\r\n while (myRs.next()){\r\n System.out.println(\"check\");\r\n if(user.equals(myRs.getString(\"USERNAME\"))){\r\n \r\n userNameExists = true;\r\n break;\r\n }\r\n }\r\n myConn.close();\r\n \r\n \r\n \r\n } catch (Exception e) \r\n {\r\n System.err.println(e.getMessage());\r\n } \r\n return userNameExists; \r\n }", "private boolean checkLogin(String username, String passwordMD5) {\n try {\n Statement stmt = GUITracker.conn.createStatement();\n ResultSet rs = stmt.executeQuery(\"SELECT * from account where username='\" + username + \"' and password='\" + passwordMD5 + \"'\");\n if (rs.next()) {\n //iduser = rs.getInt(\"Id\");\n return true;\n } else {\n return false;\n } \n \n// if ((username.equals(usernamePeer)) && (passwordMD5.equals(passwordPeer))) {\n// return true;\n// } else {\n// return false;\n// }\n } catch (Exception e) {\n e.printStackTrace();\n return false;\n }\n }", "public static boolean checkUserLogin(String login)\n\t{\n\t\tSearchResponse response = client.prepareSearch(\"projektzespolowy\")\n\t\t\t\t.setTypes(\"user\")\n\t\t\t\t.setSearchType(SearchType.DFS_QUERY_THEN_FETCH)\n\t\t\t\t.setQuery(QueryBuilders.termQuery(\"LOGIN\", login))\n\t\t\t\t.setSize(0).setFrom(0)\n\t\t\t\t.execute()\n\t\t\t\t.actionGet();\n\t\t\n\t\t\n\t\tif(response.getHits().getTotalHits() > 0)\n\t\t\treturn false;\n\t\telse \n\t\t\treturn true;\n\t}", "boolean checkUserCorrispondenceLogin(String emailLogin, String passwordLogin);", "public boolean checkStudent(String name) {\n\n // array of columns to fetch\n String[] columns = {\n COLUMN_FIRSTNAME\n };\n SQLiteDatabase db = this.getReadableDatabase();\n\n // selection criteria\n String selection = COLUMN_FIRSTNAME + \" = ?\";\n\n // selection argument\n String[] selectionArgs = {name};\n\n // query user table with condition\n /**\n * Here query function is used to fetch records from user table this function works like we use sql query.\n * SQL query equivalent to this query function is\n * SELECT user_id FROM user WHERE user_email = '[email protected]';\n */\n Cursor cursor = db.query(TABLE_USERLIST, //Table to query\n columns, //columns to return\n selection, //columns for the WHERE clause\n selectionArgs, //The values for the WHERE clause\n null, //group the rows\n null, //filter by row groups\n null); //The sort order\n int cursorCount = cursor.getCount();\n cursor.close();\n db.close();\n\n if (cursorCount > 0) {\n return true;\n }\n\n return false;\n }", "private boolean checkLogin(String name, String password) throws SQLException {\n\t\tcheckLoginStatement.clearParameters();\n\t\tcheckLoginStatement.setString(1, name);\n\t\tcheckLoginStatement.setString(2, password);\n\t\tResultSet result = checkLoginStatement.executeQuery();\n\t\tresult.next();\n\t\tboolean out = result.getInt(1) == 1;\n\t\tif (DEBUG) {\n\t\t\tSystem.out.println(\"checkLogin:\"+result.getInt(1)+\"\\n\");\n\t\t}\n\t\tresult.close();\n\t\treturn out;\n\t}", "public boolean loginUser();", "@Override\n\tpublic boolean check() {\n\t\tSystem.out.println(\"\\n---------登陆---------\");\n\t\tSystem.out.println(\"请输入ID\");\n\t\tString ID_C=console.next();\n\t\tSystem.out.println(\"请输入密码\");\n\t\tString code_c=console.next();\n\t\t if (!Tool.confirm(ID_C, \"log\")) {\n\t System.out.println(\"[此ID不存在] 重新输入#返回\");\n\t if((ID = Tool.back()) == null)\n\t return false;\n\t }\n\t\t Statement sta;\n\t ResultSet rs;\n\t try {\n\t sta = conn.createStatement();\n\t rs = sta.executeQuery(\"SELECT code FROM log WHERE ID=\"+ID_C);\n\t rs.next();\n\t if (rs.getString(1).equals(code_c))\n\t return true;\n\t \n\t } catch (SQLException e) {\n\t e.printStackTrace();\n\t }\n\t\treturn false;\n\t}", "private static boolean verificaUser(String username) {\n String user = null;\r\n try {\r\n PreparedStatement stmt = c.prepareStatement(\"SELECT * FROM utilizador where nome=?;\");\r\n stmt.setString(1, username);\r\n ResultSet rs = stmt.executeQuery();\r\n rs.next();\r\n user = rs.getString(\"nome\");\r\n if (user.equals(username)) {\r\n return true;\r\n }\r\n } catch (SQLException e) {\r\n System.out.println(e);\r\n }\r\n return false;\r\n }", "public boolean login() {\n\n\t con = openDBConnection();\n\t try{\n\t pstmt= con.prepareStatement(\"SELECT ID FROM TEAM5.CUSTOMER WHERE USERNAME =? AND PASSWORD=?\");\n pstmt.clearParameters();\n pstmt.setString(1,this.username);\n pstmt.setString(2, this.password);\n\t result= pstmt.executeQuery();\n\t if(result.next()) {\n\t \t this.setId(result.getInt(\"id\")); \n\t \t this.loggedIn = true; \n\t }\n\t return this.loggedIn;\n\t }\n\t catch (Exception E) {\n\t E.printStackTrace();\n\t return false;\n\t }\n\t }", "@Override\n\tpublic Users isLogin(String uname, String password) {\n\t\treturn this.usersDao.selectByObject(uname, password);\n\t}", "public boolean checkUser(User userobj)\n\t\t{\n\t\t\tCursor c = getUser();\n\t\t\tif(c!=null){\n\t\t\t\tc.moveToFirst();\n\t\t\t\tdo{\n\t\t\t\tif(userobj.getUserName().equalsIgnoreCase(c.getString(1))&& userobj.getPassword().equalsIgnoreCase(c.getString(2)))\n\t\t\t\t{\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t\t}while(c.moveToNext());\n\t\t\t}\n\t\t\treturn false;\n\t\t}", "public boolean passwordCheck() {\n\t\tSystem.out.println(\"Password is: \"+LoggedUser.getPassword());\n\t\tMapSqlParameterSource params = new MapSqlParameterSource();\n\t\tparams.addValue(\"username\", LoggedUser.getUsername());\n\t\tparams.addValue(\"password\", LoggedUser.getPassword());\n\t\treturn jdbc.queryForObject(\"select count(*) from authors where username=:username and password=:password\", \n\t\t\t\tparams, Integer.class) > 0;\n\t}", "boolean verificarLogin(FichaDocente regDcnt);", "@Override\n\tpublic boolean isUserExist(StudentForm student) {\n\t\treturn false;\n\t}", "public boolean login_validater(String username, String pass, int role) throws SQLException{\r\n try {\r\n Class.forName(Constants.JDBC_DRIVER);\r\n Connection conn = DriverManager.getConnection(DB_URL, \"root\", \"\");\r\n try (PreparedStatement stmt = conn.prepareStatement(\"SELECT * FROM auth WHERE userId=? AND password=? AND role=?\")) {\r\n stmt.setString(1, username);\r\n stmt.setString(2, pass);\r\n stmt.setInt(3, role);\r\n ResultSet rs = stmt.executeQuery();\r\n \r\n if (rs.next())\r\n {\r\n System.out.format(\"Login Successfull\");\r\n return true;\r\n }\r\n }\r\n System.out.println(\"Login Failure\");\r\n //This catches exceptions, if any\r\n } catch (Exception ex) {\r\n Logger.getLogger(Auth.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n return false;\r\n }", "public boolean checkLoginCredential(GuruModel model) {\n\t\tquery = \"select id from guru where email=? and pwd=?\";\n\t\tList<GuruModel> list = this.jdbcTemplate.query(query,new Object[]{model.getEmail(),this.edutility.getSHA256(model.getPwd())},\n\t\t\t\tBeanPropertyRowMapper.newInstance(GuruModel.class));\n\t\t\n\t\tif(list.size() == 0)\n\t\t\t\treturn false;\n\t\telse\n\t\t\treturn true;\n\t}", "@Override\n\tpublic boolean mayILogin(Account account) {\n\t\tSession session = sf.openSession();\n\t\tQuery query = session.createQuery(\"from cn.edu.shou.staff.model.Account acc\" +\n\t\t\t\t\" where acc.uname=:u and acc.passwd=:v\");\n\t\tquery.setString(\"u\", account.getUname());\n\t\tquery.setString(\"v\", account.getPasswd());\n\t\tList list = query.list();\n\t\treturn list.size()>0;\n\t}", "@Override\r\n\tpublic boolean checkLogin(int accNo) throws EwalletException {\n\t\ttemp =dao.loginuser(accNo);\r\n\t\tif(temp!=null)\r\n\t\treturn true;\r\n\t\telse \r\n\t\t\treturn false;\r\n\t}", "public static boolean validate(String un, String pw) {\r\n\t\tboolean status=false;\r\n\t\t\r\n\t\t//Establish connection to MySQL\r\n\t\ttry{ \r\n\t\t\tClass.forName(\"com.mysql.jdbc.Driver\"); \r\n\t\t\tConnection con=DriverManager.getConnection( \r\n\t\t\t\t\t\"jdbc:mysql://localhost:3306/moviedb\",\"root\",\"\"); \r\n \r\n\t\t\tStatement stmt=con.createStatement();\r\n\t\t\t\r\n\t\t\t//execute query for password for given username\r\n\t\t\tResultSet rs=stmt.executeQuery(\"SELECT password FROM users WHERE username='\"+un+\"'\"); \r\n\t\t\t//After query pointer is set on record\r\n\t\t\t//moves pointer before record\r\n\t\t\trs.beforeFirst();\r\n\t\t\t\r\n\t\t\t//Checks that username exists based on if the pointer is before a record\r\n\t\t\tif(rs.isBeforeFirst()) {\r\n\t\t\t\t//Moves pointer back onto record so we can get string\r\n\t\t\t\trs.next();\r\n\t\t\t\t//if entered password matches password in database return true\r\n\t\t\t\tif(pw.equals(rs.getString(1))) {\r\n\t\t\t\t\tstatus = true;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\telse\r\n\t\t\t\tstatus=false;\r\n\t\t\t\r\n\t\t\t//close connection\r\n\t\t\tcon.close();\r\n\t\t} \r\n\r\n\t\tcatch(Exception e){ \r\n\t\t\tSystem.out.println(e);} \r\n\t\t\r\n\t\treturn status;\r\n\t}", "public boolean checkCredentials(String inputLogin, String inputPassword) {\n //creates boolean variable flag and defines it as True\n boolean flag = false;\n //defines Connection con as null\n Connection con = MainWindow.dbConnection();\n try {\n //tries to create a SQL statement to retrieve values of a User object from the database\n String query = \"SELECT * FROM User WHERE userID = '\" + inputLogin + \"' AND password = '\" + inputPassword + \"';\";\n Statement statement = con.createStatement();\n ResultSet result = statement.executeQuery(query);\n /*\n if statement compares data entered by user with data in the database. If there is such data in the database\n users credentials are put into MainWindow variables and defines flag variable as True\n */\n if(result.getString(\"userID\").equals(inputLogin) && result.getString(\"password\").equals(inputPassword)) {\n flag = true;\n MainWindow.userLastName = result.getString(\"lastName\");\n MainWindow.userFirstName = result.getString(\"firstName\");\n MainWindow.userID = inputLogin;\n MainWindow.userPassword = inputPassword;\n }//end if statement\n } catch (Exception e) {\n //catches exceptions and show message about them\n System.out.println(e.getMessage());\n }//end try/catch\n //checks if Connection con is equaled null or not and closes it.\n MainWindow.closeConnection(con);\n return flag;\n }", "public int validarUsuario(Login l){\n\t\tcx.con();\n\t\tString com = \"SELECT * FROM usuario \"+ \n\t\t\t\t\"WHERE usuario='\"+l.getUsuario()+\"' \"+\n\t\t\t\t\"AND password='\"+l.getPassword()+\"' \"+\n\t\t\t\t\"AND estado=true\";\n\t\tint res = cx.contarFilas(com);\n\t\tcx.desconectar();\n\t\treturn res;\n\t}", "public boolean ValidCredentials() { \n\t\tif(!isEmptyFieldData()){\n\t\t\tSystemUserQuery sq = new SystemUserQuery();\n\t\t\tUser user = sq.loginQuery(getUsername(), getPassword());\n\t\t\t\n\t\t\tif(user != null){\n\t\t\t\tMain.setCurrentUser(user);\n\t\t\t\treturn true;\n\t\t\t}\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t\treturn false;\n\t}", "public boolean isUser(String UID){\n\t\tPreparedStatement prepStmt = null;\n\t\ttry{\n\t\t\tString sql = \"SELECT * FROM Users WHERE UserName = ? \";\n\t\t\tprepStmt = conn.prepareStatement(sql);\n\t\t\tprepStmt.setString(1, UID);\n\t\t\t//Checks if the result Set has 1 \"next\" or a first object, hence whether its empty or not\n\t\t\tResultSet rs = prepStmt.executeQuery();\n\t\t\tif(rs.next()){\n\t\t\t\tString userN= rs.getString(\"userName\");\n\t\t\t\tCurrentUser.instance().loginAs(userN);\n\t\t\t\tSystem.out.println(userN + \"is logged in\");\n\t\t\t\treturn true;\n\t\t\t}else\n\t\t\t\treturn false;\n\t\t}catch(SQLException e){\n\t\t\tSystem.out.println(\"Det gick inte att kolla om användaren existerar:\" + \" \"); //English?\n\t\t\te.printStackTrace();\n\t\t\treturn false;\n\t\t}\n\t\t//If it is not possible to \"log in\" or find the user one should always close the statement\n\t\tfinally{\n\t\t\ttry{\n\t\t\t\tprepStmt.close();\n\t\t\t}catch(SQLException e){\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\t\t\n\t}", "public int verifyAuthentication(String uname,String pswd){\n\t\tStatement stmt = null;\n\t\tif(this.getConnHndlr() == null)\n\t\t\tthis.connHndlr = new ConnectionHandler();\n\t\tConnection conn = connHndlr.getConnection();\n\t\tuname = uname.toLowerCase();\n\t\tthis.setUsername(uname);\n\t\tString vfnQuery = \"select l.user_role from LoginDetails l where l.username = '\" + uname + \"' AND l.password = '\" + pswd + \"'\";\n\t\ttry{\n\t\t\tstmt = conn.createStatement();\n\t\t\tResultSet rs = stmt.executeQuery(vfnQuery);\n\t\t\tif(!rs.next()){\n\t\t\t\tSystem.out.println(\"User doesnt exist\");\n\t\t\t\tthis.setUserStatus(-1);\n\t\t\t}\n\t\t\telse{\n\t\t\t\tString userrole = rs.getString(1);\n\t\t\t\tif(userrole.equals(\"admin\")){\n\t\t\t\t\tthis.setUserStatus(0);\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\tthis.setUserStatus(1);\n\t\t\t\t}\n\t\t\t}\t\t\t\n\t\t}\n\t\tcatch(SQLException se){\n\t\t\tSystem.out.println(\"SQL Exception \" + se.getMessage());\n\t\t}\n\t\tcatch(Exception e){\n\t\t\tSystem.out.println(\"Exception \" + e.getMessage());\n\t\t}\n\t\tfinally{\n\t\t}\n\t\treturn this.getUserStatus(); \n\t}", "private boolean checkLogin() {\n firebaseAuth = FirebaseAuth.getInstance();\n currentUser = firebaseAuth.getCurrentUser();\n if(currentUser == null) {\n //show login activity\n Intent intent = new Intent(this, LoginActivity.class);\n startActivity(intent);\n return false;\n } else {\n verifyUserPII(currentUser);\n return true;\n }\n }", "private void checkIfLoggedIn() {\n LocalStorage localStorage = new LocalStorage(getApplicationContext());\n\n if(localStorage.checkIfAuthorityPresent()){\n Intent intent = new Intent(getApplicationContext(),AuthorityPrimaryActivity.class);\n startActivity(intent);\n } else if(localStorage.checkIfUserPresent()){\n Intent intent = new Intent(getApplicationContext(), UserPrimaryActivity.class);\n startActivity(intent);\n }\n }", "public boolean userExists(String user){\n boolean answer = false;\n //look into the database\n try{\n statement = connection.createStatement();\n //execute SQL query and get the data from the database\n ResultSet myResult = statement.executeQuery(\"SELECT name FROM members WHERE name = '\" + user +\"'\");\n while (myResult.next()) {\n if (myResult.getString(\"name\")!= null)\n //name exists so answer = true\n answer = true;\n }\n\n }catch (SQLException ex){ex.printStackTrace();}\n return answer;\n }", "@Override\r\n\tpublic boolean login(String email, String pw) {\n\t\treturn jdbcTemplate.query(\r\n\t\t\"select * from s_member where email=? and pw=?\", extractor,email,pw)!=null;\r\n\t}", "private void checkForUser(){\n if(mUserId != -1){\n return;\n }\n\n if(mPreferences == null) {\n getPrefs();\n }\n\n mUserId = mPreferences.getInt(USER_ID_KEY, -1);\n\n if(mUserId != -1){\n return;\n }\n\n //do we have any users at all?\n List<User> users = mUserDAO.getAllUsers();\n if(users.size() <= 0 ){\n User defaultUser = new User(\"din_djarin\",\"baby_yoda_ftw\");\n mUserDAO.insert(defaultUser);\n }\n }", "boolean loginUser(String email,String password){\n boolean checkUserDetails = checkLoginDetails(email,password);\n boolean userExists = false;\n if(checkUserDetails){\n try{\n userExists =true;\n stmt = con.prepareStatement(\"UPDATE users SET userStatus = ? WHERE email = ?\");\n stmt.setBoolean(1,true);\n stmt.setString(2,email);\n stmt.executeUpdate();\n }\n catch(Exception e){\n e.printStackTrace();\n }\n finally{\n closeConnection();\n }\n }\n return userExists;\n }", "@Override\n\tpublic boolean loginService(List<Object> paraments) {\n\t\t\n\t\t\n\t\tboolean flag = false;\n\t\t\n\t\tString sql = \"select * from user where user_id=? and password=?\";\n\t\ttry{\n\t\t\t\n\t\t\tmJdbcUtil.getConnetion();\n\t\t\tMap<String,Object> map= mJdbcUtil.findSimpleResult(sql, paraments);\n\t\t\tflag = map.isEmpty()?false:true;\n\t\t\tSystem.out.println(\"-flag-->>\" + flag);\n\t\t\t\n\t\t}catch(Exception e){\n\t\t\te.printStackTrace();\n\t\t}finally{\n\t\t\tmJdbcUtil.releaseConn();\n\t\t}\n\t\t\n\t\t\n\t\treturn flag;\n\t}", "public boolean checkRegister() {\n\n\t\tif (!email.getText().equals(\"\") && !username.getText().equals(\"\") && !psw.getText().equals(\"\")) {\n\t\t\tResultSet test = Database.getInstance().query(\"SELECT * FROM utilisateur\");\n\t\t\ttry {\n\t\t\t\twhile (test.next()) {\n\t\t\t\t\tif (test.getString(2).equals(username.getText()) && test.getString(4).equals(email.getText())\n\t\t\t\t\t\t\t&& test.getString(3).equals(psw.getText())) {\n\t\t\t\t\t\treturn true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\treturn false;\n\n\t\t\t} catch (SQLException e) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}", "boolean isLoginAvailable();", "private void verifyUser(){\n getValues();\n boolean validate;\n\n validate = db.authenticateUser(username, password);\n\n if (validate) {\n\n Cursor cursor = db.fetchData(username,password);\n cursor.moveToFirst();\n\n String contact = cursor.getString(3);\n\n session.createLoginSession(username, password, contact);\n\n Toast.makeText(this, \"[SYSTEM]: Login Successful! \", Toast.LENGTH_SHORT).show();\n\n Intent i = new Intent(this, MainActivity.class);\n startActivity(i);\n finish();\n } else {\n Toast.makeText(this, \"FAIL!\", Toast.LENGTH_SHORT).show();\n }\n }", "private boolean authenticate(String _uid, String _pwd) {\n\n Connection dbCon = null;\n ResultSet rs = null;\n try {\n dbCon = ds.getConnection();\n Statement s = dbCon.createStatement();\n rs = s.executeQuery(\"select * from user where id = '\"\n + _uid + \"' and pwd = '\" + _pwd + \"'\");\n return (rs.next());\n }\n catch (java.sql.SQLException e) {\n System.out.println(\"A problem occurred while accessing the database.\");\n System.out.println(e.toString());\n }\n finally {\n try {\n dbCon.close();\n }\n catch (SQLException e) {\n System.out.println(\"A problem occurred while closing the database.\");\n System.out.println(e.toString());\n }\n }\n \n return false;\n\n }", "public boolean checklogin() {\n\t\treturn (pref.getBoolean(\"isLog\", false));\n\t}", "private boolean processLogin(String StaffId, String pw)\n{\n\t\t\n\t\tfinal ArrayList<AdminLoginHolder> loginList = new ArrayList<AdminLoginHolder>();\n\t\tint staffId = Integer.parseInt(StaffId);\n\t\tString password = new String(pw);\n\t\t\n\t\t //sql statement to retrieve userName and password\n\t\tString sql = \"select staff_id, password, isLogedin from admin_login\";\n\t\ttry {\n\t\t\tResultSet result = db.ExecuteSql(sql);\n\t\t\t\n\t\t\twhile(result.next()){\n\t\t\t\tAdminLoginHolder holder = new AdminLoginHolder();\n\t\t\t\tholder.setStaff_Id(Integer.parseInt(result.getString(1)));\n\t\t\t\tholder.setPassword(result.getString(2));\n\t\t\t\tholder.setLogedin(result.getBoolean(3));\n\t\t\t\t\n\t\t\t\tloginList.add(holder);\t\n\t\t\t}\n\t\t\t\n\t\t\tAdminLoginHolder hold = new AdminLoginHolder();\n\t\t\tfor(int loop = 0; loop< loginList.size(); loop++)\n\t\t\t{\n\t\t\t\t\n\t\t\t\t\n\t\t\t\thold = loginList.get(loop);\n\t\t\t\t\n\t\t\t\tif(hold.getStaff_Id() == staffId && hold.getPassword().equals(password))\n\t\t\t\t{\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t}\n\t\t\t //check if userName is a number here\n\t\t} catch (SQLException e) {}\n\t\treturn false;\n\t\t\n\t}", "public static Boolean checkUser( String id ) {\r\n\t\tif( id == null ) return false;\r\n\t\t\r\n\t\tResultSet resultSet = DBConnector.getQueryResult( \"SELECT * FROM User WHERE userID='\"+id+\"'\" );\r\n\t\ttry {\r\n\t\t\tif( resultSet.next() ){\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\t\t\telse return false;\r\n\t\t} \r\n\t\tcatch (SQLException e) {\r\n\t\t\tSystem.out.println(\"DBUtilUser.loginUser() : Error getting user\");\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\tfinally{\r\n\t\t\tDBConnector.closeDBConnection();\r\n\t\t}\r\n\r\n\t\treturn false;\r\n\t}", "public static boolean login(String userName, String password){\n boolean found = false;\n Connection connection = SQLiteConnection.dbConnection();\n ResultSet rs = null;\n try {\n Statement stmt = connection.createStatement();\n rs = stmt.executeQuery(\"SELECT * FROM Users\");\n while (rs.next()) {\n if (rs.getString(\"UserName\").equals(userName) && rs.getString(\"Password\").equals(password)){\n Login.signIn(rs.getRow());\n found = true;\n break;\n }\n }\n stmt.close();\n rs.close();\n connection.close();\n }catch (Exception e){\n e.printStackTrace();\n }\n return found;\n\n }", "public boolean checkAdmin()\r\n\t{\r\n\t\tboolean admin=false;\r\n\t\tint length=user_records.size();\r\n\t\tfor(int i=0;i<length;i++)\r\n\t\t{\r\n\t\t\tif(((User)user_records.get(i)).get_username().equals(\"administrator\"))\r\n\t\t\t{\r\n\t\t\t\tadmin=true;\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn admin;\r\n\t}", "@Override\n public boolean checkLoginExist(String login) {\n logger.info(\"check if login exists\");\n if (userDao.get(login) != null) {\n logger.info(\"Such login does't existing\");\n }\n return userDao.get(login) != null;\n }", "public static boolean check(User user) {\n\t\tboolean flag = false; \n\t\tResultSet resultSet = null;\n\t\ttry {\n\t\t\t//Register the Driver class\n\t\t\tClass.forName(\"com.mysql.jdbc.Driver\");\n\t\t\t\n\t\t\t//Create connection\n\t\t\tConnection connection = DriverManager.getConnection(\"jdbc:mysql://localhost:3306/Login2\", \"root\", \"root\");\n\t\t\t\n\t\t\t//Create preparedStatement\n\t\t\tPreparedStatement preparedStatement = connection.prepareStatement(\"select * from user where username = ? && password = ?\");\n\t\t\tpreparedStatement.setString(1, user.getUserName());\n\t\t\tpreparedStatement.setString(2, user.getUserPassword());\n\t\t\t\n\t\t\t//Execute queries\n\t\t\tresultSet = preparedStatement.executeQuery();\n\t\t\tif(resultSet.next())\n\t\t\t\tflag = true;\n\t\t\telse\n\t\t\t\tflag = false;\n\t\t\t\n\t\t\t//Close connection\n\t\t\tpreparedStatement.close();\n\t\t\tconnection.close();\n\t\t} catch (ClassNotFoundException | SQLException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn flag;\n\t}", "public static boolean canRegister(School school){\n if(school.getCourses().size() == 0){\n System.out.println(\"Please register a course first.\");\n return false;\n }\n //Validate if there are students to register.\n if(school.getStudents().size() == 0){\n System.out.println(\"Please register a student first.\");\n return false;\n }\n\n return true;\n }", "Boolean isLogIn();", "public boolean hasLoginAdvice();", "public boolean isCorrectLoginDetails(String username, String password) {\n boolean isExistingLogin = false; \n \n //Retrieve all existing user objects from the db. \n List<User> retrievedUsersList = new LinkedList<User>(); \n retrievedUsersList = repo.returnAllUsers(); \n \n User aUser = null; \n //For each object in the array, check if there is a match for the user inputs and the object properties. \n for(var user : retrievedUsersList) {\n aUser = (User)user; \n \n if(aUser.username.equals(username) && aUser.password.equals(password)) {\n isExistingLogin = true; \n }\n }\n return isExistingLogin; \n }", "public int existLogin(Usuario login){\r\n\t \t\r\n\t int result=0;\r\n\t \ttry\r\n\t \t{\r\n\t \t\tConnection connection=DBConnectionManager.getConnection();\r\n\t\t\t\tLoginBD LoginBD= new LoginBD(connection);\r\n\t\t\t\tresult= LoginBD.existLogin(login);\r\n\t\t\t\tconnection.close();\r\n\t \t}\r\n\t \tcatch (SQLException e)\r\n\t \t{\r\n\t \t\te.printStackTrace();\r\n\t \t}\r\n\t \treturn result;\r\n\t}", "@Override\r\n\tpublic boolean loginCheck(String id, String pw) {\n\r\n\r\n\t\ttry {\r\n\t\t\tconn = DriverManager.getConnection(URL, USER, PASS);\r\n\t\t\tString sql = \"select * from member where id=? and pw=?\";\r\n\t\t\tps = conn.prepareStatement(sql);\r\n\t\t\tps.setString(1, id);\r\n\t\t\tps.setString(2, pw);\r\n\t\t\trs = ps.executeQuery();\r\n\r\n\t\t\twhile (!rs.next()) {\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t\trs.close();\r\n\t\t\tps.close();\r\n\t\t} catch (SQLException e) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te.printStackTrace();\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\t\treturn true;\r\n\t}", "@Override\n\tpublic boolean checkLoginNameExists(String loginName) {\n\n\t\tUser user = userDAO.getUserByName(loginName);\n\t\tif (null != user) {\n\t\t\treturn false;\n\t\t} else {\n\t\t\treturn true;\n\t\t}\n\t}", "public synchronized String checkOccupy(String sec_id) {\r\n if (sec_id==null) return null;\r\n\r\n try {\r\n return dao.getUserBySection(sec_id);\r\n } catch (DataAccessException e) {\r\n ExceptionBroadcast.print(e);\r\n return null;\r\n }\r\n }", "private boolean isUserExplicitlyLoggedIn() {\n // User is explicitly logged in, if his securityStatus is more than or equal to security status login.\n String securityStatusPropertyName = getStorePropertyManager().getSecurityStatusPropertyName();\n int securityStatus = ((Integer) getProfile().getPropertyValue(securityStatusPropertyName)).intValue();\n return securityStatus >= getStorePropertyManager().getSecurityStatusLogin();\n }", "private boolean checkUser(userr user, int ID) throws Exception {\n String query = \"Select * FROM userr WHERE userName ='\" + user.getName() + \"' AND password ='\" + user.getPass() + \"'\";\n try {\n Statement stmt = con.createStatement();\n ResultSet rs = stmt.executeQuery(query);\n if (rs.next()) {\n// ArrayList<userr> listU = new ArrayList<userr>();\n int id = rs.getInt(\"id\");\n// System.out.println(id);\n clients[findClient(ID)].user.setId(id);\n// String query2 = \"SELECT userr.id,userName,password FROM userr INNER JOIN friend WHERE friend.idFriend = userr.id and friend.idUser = '\" + id + \"'\";\n// Statement stmt2 = con.createStatement();\n// ResultSet rs2 = stmt2.executeQuery(query2);\n// while(rs2.next()){\n// userr friend = new userr(rs2.getInt(\"userr.id\"), rs2.getString(\"userName\"), rs2.getString(\"password\"));\n// listU.add(friend);\n// System.out.println(\"===================\");\n// System.out.println(friend.getId());\n// System.out.println(friend.getName());\n// System.out.println(friend.getPass());\n// System.out.println(\"===================\");\n// }\n// clients[findClient(ID)].user.setListFriend(listU);\n return true;\n }\n } catch (Exception e) {\n System.out.println(\"cccc\");\n throw e;\n }\n return false;\n }", "boolean hasLoginRequest();", "public boolean isUserLoggedIn(Context context){\n\t\tDatabaseHandler db = new DatabaseHandler(context);\n\t\tint count = db.getRowCount();\n\t\tif(count > 0){\n\t\t\t// user logged in\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}", "private Boolean findUser(String username){\n return usersDataBase.containsKey(username);\n }", "private boolean validateUsername() {\n // Get doctor's username\n EditText doctorUsername = (EditText) rootView.findViewById(R.id.doctorField);\n String doctorUsernameString = doctorUsername.getText().toString();\n // Query on server using that username\n try {\n String query = String.format(\"select `username` from `user` inner join `doctor` on user.id=doctor.userid where username='%s'\", doctorUsernameString); // query to check username existence\n Document document = Jsoup.connect(Constants.SERVER + query).get();\n String queryJson = document.body().html();\n if (queryJson.equals(\"0\")) { // Username not existed\n return false;\n }\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n // Get patient's username\n EditText patientUsername = (EditText) rootView.findViewById(R.id.patientField);\n String patientUsernameString = patientUsername.getText().toString();\n // Query on server using that username\n try {\n String query = String.format(\"select `username` from `user` inner join `patient` on user.id=patient.userid where username='%s'\", patientUsernameString); // query to check username existence\n Document document = Jsoup.connect(Constants.SERVER + query).get();\n String queryJson = document.body().html();\n if (queryJson.equals(\"0\")) { // Username not existed\n return false;\n }\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n return true;\n }", "boolean hasUser();", "boolean hasUser();", "boolean hasUser();", "boolean hasUser();", "boolean hasUser();", "boolean hasUser();", "boolean hasUser();", "@Override\n\tpublic boolean user_login(Map<String, Object> map) {\n\t\tString sql = \"select * from tp_users where userName=:userName and userPwd=:userPwd\";\n\t\tList<Map<String, Object>> user = joaSimpleDao.queryForList(sql, map);\n\t\tif(user.size() == 1) {\n\t\t\treturn true;\n\t\t}\n\t\telse {\n\t\t\treturn false;\n\t\t}\n\t}", "boolean checkUniqueUser(String login, Connection connection) throws DAOException;", "private boolean existsUser(Connection con) throws SQLException {\n\t\tlog.entry();\n\t\tboolean userExists = false;\n\t\tPreparedStatement ps = con.prepareStatement(\"SELECT COUNT(*) FROM Users \"\n\t\t + \"WHERE `id`=?;\");\n\t\ttry {\n\t\t\tps.setInt(1, id);\n\t\t\tResultSet rs = ps.executeQuery();\n\t\t\tif (rs.first() && rs.getInt(1) > 0) {\n\t\t\t\tuserExists = true;\n\t\t\t}\n\t\t} finally {\n\t\t\tcloseStatement(ps);\n\t\t}\n\t\tthrowSqlException();\n\t\tlog.exit();\n\t\treturn userExists;\n\t}", "boolean hasUserName();", "public ResultSet namevalidate(String uname) throws Exception{\n\t\trs=DbConnect.getStatement().executeQuery(\"select * from LOGIN where USERNAME='\"+uname+\"'\");\r\n\t\treturn rs;\r\n\t}", "private void checkUser() {\n\t\tlog.info(\"___________checkUser\");\n\t\tList<User> adminUser = userRepository.getByAuthority(AuthorityType.ROLE_ADMIN.toString());\n\t\tif (adminUser == null || adminUser.isEmpty()) {\n\t\t\tgenerateDefaultAdmin();\n\t\t}\n\t}", "@Override\n\tpublic boolean checkUserLogin(User user) {\n\t\tboolean b=false;\n\t\tString sql=\"select *from login where username=? and password=?\";\n\t\tString []parameters= {user.getUsername(),user.getPassword()};\n\t\tArrayList<User> allUsers=SQLHelper.executeQueryUser(sql,parameters);\n\t\tif(allUsers.size()>0)\n\t\t{\n\t\t\tb=true;\n\t\t}\n\t\treturn b;\n\t}", "private boolean hasRight(String introducedUsername, String introducedPaswword) {\n\n boolean hasRight = false;\n System.out.println(\"Hello from hasRight\");\n if(introducedUsername.equals(username) && introducedPaswword.equals(password)) {\n hasRight = true;\n }\n return hasRight;\n }", "@Override\r\n\tpublic boolean verifyLogin(String userId, String password) {\n\t\tif (conn == null) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\ttry {\r\n\t\t\tString sql = \"SELECT user_id FROM users WHERE user_id = ? AND password = ?\";\r\n\t\t\tPreparedStatement statement = conn.prepareStatement(sql);\r\n\t\t\tstatement.setString(1, userId);\r\n\t\t\tstatement.setString(2, password);\r\n\t\t\tResultSet rs = statement.executeQuery();\r\n\t\t\tif (rs.next()) {\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\t\t} catch (SQLException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\treturn false;\r\n\t}", "public static synchronized int checkVerification(String userName){\n\t\t\tConnection connection;\n\t\t \tint valid = 1;\n\t\t \tPreparedStatement statement=null;\n\t\t\tString preparedSQL = \"SELECT Validated FROM Credential WHERE Email = ?\";\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.setString(1, userName);\n\t\t\t\tResultSet rs = statement.executeQuery();\n\t\t\t\tif(rs.next()){\n\t\t\t\t\tvalid = rs.getInt(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}catch (SQLException ex){\n\t\t\t\t\tSystem.out.println(\"Error: \" + ex);\n\t\t\t\t\tSystem.out.println(\"Query: \" + statement.toString());\n\t\t\t\t\tvalid = 1;\n\t\t\t\t}\t\n\t\t\treturn valid;\n\t}", "private boolean isUserExist(String friendName)\r\n\t{\r\n\t\tlogger.debug(\"->->->->-> Inside isUserExist method ->->->->->\");\r\n\t\tif(userDAO.getParticularUserbyUserName(friendName)==null){\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\telse{\r\n\t\t\treturn true;\r\n\t\t}\r\n\t}" ]
[ "0.6660471", "0.6565207", "0.64242536", "0.6392101", "0.6392101", "0.6373798", "0.6314649", "0.6268589", "0.62261724", "0.6113907", "0.6089858", "0.6089192", "0.6080787", "0.6057837", "0.6049426", "0.6040646", "0.60365975", "0.60364765", "0.6022985", "0.6019772", "0.6017877", "0.60164726", "0.60147554", "0.60147554", "0.59968585", "0.59920466", "0.5968107", "0.59652114", "0.595151", "0.59477174", "0.59146535", "0.5911729", "0.5910439", "0.5901673", "0.5890603", "0.5890326", "0.5881711", "0.5877221", "0.5874177", "0.5873385", "0.58712274", "0.58627146", "0.58595294", "0.58558184", "0.58465064", "0.58373463", "0.5834593", "0.5828609", "0.58198696", "0.58022356", "0.5795161", "0.57912296", "0.5784292", "0.57820225", "0.5775995", "0.5768304", "0.57422245", "0.5739949", "0.5739758", "0.57335246", "0.57315975", "0.5725729", "0.5709613", "0.5707288", "0.5702069", "0.57012856", "0.570091", "0.57003033", "0.56976014", "0.569151", "0.56831896", "0.5681426", "0.56809735", "0.5674206", "0.566098", "0.5659723", "0.5653137", "0.56523025", "0.5651202", "0.56463754", "0.5645329", "0.5640947", "0.5640457", "0.5637265", "0.5637265", "0.5637265", "0.5637265", "0.5637265", "0.5637265", "0.5637265", "0.5634264", "0.56335264", "0.56335235", "0.5625695", "0.5620639", "0.5617565", "0.56062365", "0.560125", "0.55991036", "0.55971897", "0.55963784" ]
0.0
-1
/=============================PORTAL DA PESSOA=============================== Prints the information of the person who logged in
public String showPerson(){ return _person.toString(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void printUserInfo(){\n System.out.print(\"Username: \"+ getName() + \"\\n\" + \"Birthday: \"+getBirthday()+ \"\\n\"+ \"Hometown: \"+getHome()+ \"\\n\"+ \"About: \" +getAbout()+ \" \\n\"+ \"Subscribers: \" + getSubscriptions());\n\t}", "public void printUser() {\n\t\tSystem.out.println(\"First name: \" + this.firstname);\n\t\tSystem.out.println(\"Last name: \" + this.lastname);\n\t\tSystem.out.println(\"Age: \" + this.age);\n\t\tSystem.out.println(\"Email: \" + this.email);\n\t\tSystem.out.println(\"Gender: \" + this.gender);\n\t\tSystem.out.println(\"City: \" + this.city);\n\t\tSystem.out.println(\"State: \" + this.state + \"\\n\");\n\t}", "public void printUsers() {\n userAnya.printInfo();\n userRoma.printInfo();\n }", "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 displayDetails() {\r\n\t\tSystem.out.println(\"*******************Profile Details*********************\");\r\n\t\tSystem.out.println(\"\\tUsername :\\t\" + uName);\r\n\t\tSystem.out.println(\"\\tFull Name :\\t\" + fullName);\r\n\t\tSystem.out.println(\"\\tPhone :\\t\" + phone);\r\n\t\tSystem.out.println(\"\\tE-Mail :\\t\" + email);\r\n\t}", "public void printDetails()\n {\n System.out.println(\"Name: \" + foreName + \" \"\n + lastName + \"\\nEmail: \" + emailAddress);\n }", "private static void printDetail() {\n System.out.println(\"Welcome to LockedMe.com\");\n System.out.println(\"Version: 1.0\");\n System.out.println(\"Developer: Sherman Xu\");\n System.out.println(\"[email protected]\");\n }", "@Override\n public void showCustomerDetails() {\n System.out.println(customerLoggedIn);\n }", "private void getUserInfo() {\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 }", "public void displayUserInformations() {\n println(\"getLocation(): \"+user.getLocation());\n println(\"getFriendsCount(): \"+user.getFriendsCount());\n println(\"getFollowersCount(): \"+user.getFollowersCount());\n println(\"getDescription(): \"+user.getDescription());\n println(\"getCreatedAt() : \"+user.getCreatedAt() );\n println(\"getDescriptionURLEntities(): \"+user.getDescriptionURLEntities());\n println(\"getFavouritesCount() : \"+user.getFavouritesCount() );\n }", "void getInfo() {\n\tSystem.out.println(\"My name is \"+name+\" and I am going to \"+school+\" and my grade is \"+grade);\n\t}", "@Override\n public String toString() {\n return \"userName \" + this.userName + \", pasword \" + this.passWord + \"sex \" + userSex.name();\n }", "private static void print(SimpleUser su) {\n\t\tSystem.out.println(\"userId: \" + su.getUserId());\n\t\tSystem.out.println(\"username: \" + su.getUsername());\n\t\tSystem.out.println(\"password: \" + su.getPassword());\n\t\tSystem.out.println(\"nickname: \" + su.getNickname());\n\t\tSystem.out.println();\n\t}", "@Then(\"I want to login successfully\")\n\tpublic void output() {\n\t\tact.gethomepage().verifyLoggedUser();\n\n\t\t//String username = linkWelcome.getText();\n\t\t//String login = \"Welcome Admin\";\n\t\t//if (username.equals(login)) {\n\t\t\t//System.out.println(\"User name is correct\");\n\t\t//} else {\n\t\t\t//System.out.println(\"Username is not correct\");\n\n\t\t}", "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\n\tpublic String toString () {\n\t\tString pUser = \"User: \" + getID();\n\t\tString pPass = \"Pass: \" + getPass();\n\t\treturn pUser + \" \" + pPass;\n\t}", "public List<String> showPersonalDetails()\n {\n return userFan.showPersonalDetails();\n }", "private String getUserData() { \n\t\t \n\t\tString userName;\n\t\tObject principial = SecurityContextHolder.getContext().getAuthentication().getPrincipal();\t\n\t\tif(principial instanceof UserDetails) {\n\t\t\tuserName = ((UserDetails) principial).getUsername();\n\t\t} else {\n\t\t\tuserName = principial.toString(); \n\t\t}\n\t\treturn userName; \n\t}", "@Override\n public String toString() {\n String output = \"User Info for: \" + getId();\n output += \"\\n\\tName: \" + getFirstName() + \" \" + getLastName();\n output += \"\\n\\tCreated on: \" + DF.format(getEnrolDate());\n output += \"\\n\\tLast access: \" + DF.format(getLastAccess());\n \n return output;\n }", "private void mostrarInformacionP(){\n System.out.println(\"Nombre: \"+this.nombre);\n System.out.println(\"Sexo: \"+ this.sexo);\n System.out.println(\"Edad: \" + edad);\n\n }", "@Override\n\tpublic void output() {\n\t\tfor(User u :list) {\n\t\t\tif(list.size() > MIN_USER) {\n\t\t\t\tSystem.out.println(\"이름 : \"+u.getName());\n\t\t\t\tSystem.out.println(\"나이 : \"+u.getAge());\n\t\t\t\tSystem.out.println(\"주소 : \"+u.getAddr());\n\t\t\t\tSystem.out.println(\"=======================\");\n\t\t\t\t}\n\t\t\t}\n\t\t\tSystem.out.println(\"입력된 정보가 없습니다.\");\n\t\t}", "void printData()\n {\n System.out.println(\"Studentname=\" +name);\n System.out.println(\"Student city =\"+city);\n System.out.println(\"Student age = \"+age);\n }", "public void print() {\n System.out.println(\"Nome: \" + nome);\n System.out.println(\"Telefone: \" + telefone);\n }", "public String getCurrentLoggedUserinfo() {\n\n\t\tClient client = Client.create();\n\n\t\tWebResource webResource = client.resource(\"http://localhost:8083/UserAccounts/UserAccountService/User_logins\");\n\n\t\tClientResponse response = webResource.accept(\"application/json\").get(ClientResponse.class);\n\n\t\tString output = response.getEntity(String.class);\n\n\t\tSystem.out.println(output);\n\n\t\treturn output;\n\n\t}", "private void loggedInUser() {\n\t\t\n\t}", "public void print() {\n System.out.println(\"Person of name \" + name);\n }", "public String showUser(){\n String dataUser = \"\";\n for(int i = 0; i<MAX_USER; i++){\n if(user[i] != null){\n dataUser += user[i].showDataUser();\n }\n }\n return dataUser;\n }", "public void print() {\r\n Person tmp = saf.get(0);\r\n System.out.println(\"Person name : \" + tmp.getName() +\r\n \" Entering time : \" + tmp.getTime() +\r\n \" Waiting time : \" + tmp.getExitTime());\r\n }", "@GetMapping(\"/my-info\")\n\t@Secured({Roles.ADMIN, Roles.BOSS, Roles.WORKER})\n\tpublic ResponseEntity<EmployeeDto> getMyInfo() {\n\t\tLogStepIn();\n\n\t\t// Gets the currently logged in user's name\n\t\tString username = SecurityContextHolder.getContext().getAuthentication().getName();\n\n\t\tEmployee employee = userRepository.findByName(username).getEmployee();\n\t\treturn LogStepOut(ResponseEntity.ok(toDto(employee)));\n\t}", "public void getInfo(){\n System.out.println(\"Name: \" + name + \"\\n\" + \"Address: \" + address);\n }", "@Override\r\n\tpublic String currentUser() {\n\t\treturn temp.getCustomerName();\r\n\t}", "private String getLoggedUser() {\n\t\torg.springframework.security.core.userdetails.User user2 = \n\t\t\t\t(org.springframework.security.core.userdetails.User) \n\t\t\t\tSecurityContextHolder.getContext().getAuthentication().getPrincipal();\n\t\tString name = user2.getUsername();\n\t\treturn name;\n\t}", "@Override\n public String toString(){\n return String.format(\"ApplicationUser ehrId: '%s', shimmerId: '%s', shimKey: '%s', is logged in: '%s'\", applicationUserId.getEhrId(), shimmerId, getApplicationUserId().getShimKey());\n }", "public void printByUser() {\r\n TUseStatus useStatus;\r\n\t for (int a=0; a < m_current_resources_count; a++)\r\n\t for (int b=0; b < m_current_users_count; b++) {\r\n\t useStatus = m_associations[a][b];\r\n\t if (useStatus!=null) System.out.println(useStatus.toString()); \r\n\t } \r\n }", "public void printUserInfo(int index) {\n System.out.print(userInfo.get(index).getUserId() + \" -> \");\n System.out.print(userInfo.get(index).getUserRole() + \" \");\n System.out.print(userInfo.get(index).getFirstName() + \" \");\n System.out.print(userInfo.get(index).getLastName() + \" \");\n System.out.print(userInfo.get(index).getAddress() + \" \");\n System.out.print(userInfo.get(index).getCity() + \" \");\n System.out.print(userInfo.get(index).getBasicSalary() + \" \");\n System.out.println(userInfo.get(index).getMobileNumber() + \" \");\n\n }", "public String showDetails() {\n\t\treturn \"Person Name is : \" + name + \"\\n\" + \"Person Address is : \" + address;\n\t}", "public void printCustomerDetails()\r\n {\r\n System.out.println(title + \" \" + firstName + \" \" \r\n + lastName + \"\\n\" +getAddress() \r\n + \"\\nCard Number: \" + cardNumber \r\n + \"\\nPoints available: \" + points);\r\n }", "void printEmployeeDetail(){\n\t\tSystem.out.println(\"First name: \" + firstName);\n\t\tSystem.out.println(\"Last name: \" + lastName);\n\t\tSystem.out.println(\"Age: \" + age);\n\t\tSystem.out.println(\"Salary: \" + salary);\n\t\tSystem.out.println(firstName + \" has \" + car.color + \" \" + car.model + \" it's VIN is \" + car.VIN + \" and it is make year is \" + car.year );\n\t\t\n\t}", "@Override\n public String toString() {\n return \"--------------------------------------------\\n\"+\n \"username: \" + username + \"\\n\" + \n \"fullName: \" + lastName + \" \" + firstName + \"\\n\" + \n \"password: \" + password + \"\\n\" +\n \"phone: \" + phone + \"\\n\" + \n \"email: \" + email + \"\\n\";\n }", "public void printList(){\n\t\tfor(User u : userList){\r\n\t\t\tSystem.out.println(\"Username: \" + u.getUsername() + \" | User ID: \" + u.getUserID() + \" | Hashcode: \" + u.getHashcode() + \" | Salt: \" + u.getSalt());\r\n\t\t}\r\n\t}", "public String usuarioconectado() {\n\t\tString nome;\n\t\tObject principal = SecurityContextHolder.getContext().getAuthentication().getPrincipal();\n\n\t\tif (principal instanceof UserDetails) {\n\t\t\tnome = ((UserDetails) principal).getUsername();\n\t\t} else {\n\t\t\tnome = principal.toString();\n\t\t}\n\t\t// System.out.println(nome);\n\t\treturn nome;\n\t}", "public static void main(String[] args) {\n\t\tSystem.out.println(getRealisateur(\"Ed Wood\"));\n }", "public String toString() \r\n {\r\n\t\treturn getLoginID() + \" [Age=\" + getAge() + \", Income=\" + getIncome() + \", Gender=\" + getGender() + \"]\";\r\n\t\t\t\t\r\n\t}", "java.lang.String getUser();", "private static void printFirstOp(){\n\t\tSystem.out.println(\"Welcome to SimpleSocial!\\n\"\n\t\t\t\t+ \"Type:\\n\"\n\t\t\t\t+ \"- register\\n\"\n\t\t\t\t+ \"- login\\n\"\n\t\t\t\t+ \"- exit\");\n\t}", "void display()\n\t {\n\t\t System.out.println(\"Student ID: \"+id);\n\t\t System.out.println(\"Student Name: \"+name);\n\t\t System.out.println();\n\t }", "private void showUser() {\n\t\tCommonADO ado=CommonADO.getCommonADO();\r\n\t\tString sql=\"select * from Users\";\r\n\t\tResultSet rs=ado.executeSelect(sql);\r\n\t\tString str=\"\";\r\n\t\ttry {\r\n\t\t\twhile(rs.next()){\r\n\t\t\t\tString user=rs.getString(\"UserName\");\r\n\t\t\t\tString pass=rs.getString(\"Password\");\r\n\t\t\t\tString type=rs.getString(\"UserType\");\r\n\t\t\t\tif(type.equals(\"管理员\"))\r\n\t\t\t\t\tpass=\"******\";\r\n\t\t\t\tif(user.length()<12){\r\n\t\t\t\t\tfor(int i=user.length();i<=12;i++)\r\n\t\t\t\t\t\tuser+=\" \";\r\n\t\t\t\t}\r\n\t\t\t\tif(pass.length()<12){\r\n\t\t\t\t\tfor(int i=pass.length();i<=12;i++)\r\n\t\t\t\t\t\tpass+=\" \";\r\n\t\t\t\t}\r\n\t\t\t\tif(type.length()<12){\r\n\t\t\t\t\tfor(int i=type.length();i<=12;i++)\r\n\t\t\t\t\t\ttype+=\" \";\r\n\t\t\t\t}\r\n\t\t\t\tstr+=\"用户名:\"+user;\r\n\t\t\t\tstr+=\" 密码:\"+pass;\r\n\t\t\t\tstr+=\" 用户类型:\"+type+\"\\n\";\r\n\t\t\t}\r\n\t\t} catch (SQLException e) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\ttextAreaUser.setText(str);\r\n\t}", "private static String showDetails (String name){\n\t\t//We find the user\n\t\tint position = findContact(name);\n\t\t//If not found, we return null\n\t\tif (position==-1)\n\t\t\treturn null;\n\t\t//We return the details invoking the toString method\n\t\telse\n\t\t\treturn contacts[position].toString();\n\t}", "String getUser();", "String getUser();", "public String toString(){\r\n\t\treturn this.username+\"(\"+this.firstname+\" \"+this.lastname+\")\";\r\n\t}", "public void printBorrowerDetails()\r\n {\r\n System.out.println( firstName + \" \" + lastName \r\n + \"\\n\" + address.getFullAddress()\r\n + \"\\nLibrary Number: \" + libraryNumber\r\n + \"\\nNumber of loans: \" + noOfBooks);\r\n }", "private void populateUserInfo() {\n User user = Session.getInstance().getUser();\n labelDisplayFirstname.setText(user.getFirstname());\n labelDisplayLastname.setText(user.getLastname());\n lblEmail.setText(user.getEmail());\n lblUsername.setText(user.getUsername());\n }", "public void printModuleStudentInfo() {\t\r\n\tfor(int i =0; i<(StudentList.size()); i++) {\r\n\t\tStudent temp =StudentList.get(i);\r\n\t\tSystem.out.println(temp.getUserName());\r\n\t}\t\r\n}", "void printInfo() {\n\t\tdouble salary=120000;\n\t System.out.println(salary);\n\t\tSystem.out.println(name+\" \"+age);\n\t}", "public static void view() {\n\t\tUser user = UserService.getUserByUsername(session.get(\"username\"));\n\t\tUserProfile userprofile = null;\n\n\t\t// check if user object is null\n\t\tif (user != null)\n\t\t\tuserprofile = UserProfileService.getUserProfileByUserId(user.id);\n\n\t\trender(user, userprofile);\n\t}", "public void displayLable() {\n\t\tSystem.out.println(\"Name of Company :\"+name+ \" Address :\"+address);\r\n\t}", "public java.lang.String getUser(){\r\n return localUser;\r\n }", "public java.lang.String getUser(){\r\n return localUser;\r\n }", "public java.lang.String getUser(){\r\n return localUser;\r\n }", "public String userInfo(String name){\r\n\t\tString message=\"Este usuario NO existe \";\r\n\t\tint[] info = findUser(name);\r\n\t\tif(info[0]==1)\r\n\t\t\tmessage=user[info[1]].showInfo();\r\n\t\treturn message;\r\n\t}", "@Override\n public String toString() {\n \treturn \"lastname : \"+this.userLastname+\" firstname: \"+this.userFirstname+\" username: \"+this.userLogin+\" email: \"+this.userEmail+\" role: \"+this.roles;\n }", "@Override\n public String toString() {\n return \"Username: \" + this.username + \"\\n\";\n }", "public void viewUser() {\n\t\tsuper.viewUser();\n\t}", "@Override\n public void information() {\n System.out.println(\"\");\n System.out.println(\"Dog :\");\n System.out.println(\"Age : \" + getAge());\n System.out.println(\"Name : \" + getName());\n System.out.println(\"\");\n }", "public void displayData(View view){\n SharedPreferences sharedPref = getSharedPreferences(\"userInfo\", Context.MODE_PRIVATE); //This means the info is private and hence secured\n\n String name = sharedPref.getString(\"username\", \"\"); //The second parameter contains the value that we are going to get, so we leave it blank.\n String pw = sharedPref.getString(\"password\", \"\");\n yashwinText.setText(name + \"\" + pw);\n }", "People getUser();", "@Override\n public String toString() {\n return getUsername();\n }", "public String toString() {\n return (\"Principal's username: \" + name);\n }", "public void printMembers() {\n\t\tthis.getListUsers().printList();\n\t}", "void printUsers() {\n if (server.hasUsers()) {\n writer.println(\"Connected users: \" + server.getUserNames());\n } else {\n writer.println(\"No other users connected\");\n }\n }", "public String login() throws Exception {\n System.out.println(user);\n return \"toIndex\" ;\n }", "@Override\r\n\tpublic String toString() {\n\t\treturn this.id + \">>>>>>\" + this.name+\">>>>>>>\"+this.password;\r\n\t}", "void display() {\n System.out.println(id + \" \" + name + \" \" + age);\n }", "public String toString () {\n\t\treturn \"User, name = \" + this.getName() + \" id = \" + this.getId();\n \t}", "public void empdetails() {\r\n\t\tSystem.out.println(\"name : \"+ name);\r\n\t}", "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 static String toStringCurrentUser() {\n return new StringBuilder()\n .append(CURRENT_USER.getName())\n .append(\" - \")\n .append(CURRENT_USER.getEmployee().getName())\n .toString();\n }", "public void outputNames(){\n System.out.printf(\"\\n%9s%11s\\n\",\"Last Name\",\"First Name\");\n pw.printf(\"\\n%9s%11s\",\"Last Name\",\"First Name\");\n ObjectListNode p=payroll.getFirstNode();\n while(p!=null){\n ((Employee)p.getInfo()).displayName(pw);\n p=p.getNext();\n }\n System.out.print(\"\\nNumber of Employees: \"+payroll.size()+\"\\n\");\n pw.print(\"\\nNumber of Employees: \"+payroll.size()+\"\\n\");\n }", "@Override\n public java.lang.String getUserName() {\n return _partido.getUserName();\n }", "UserDisplayDto getUserInfo(String login);", "public void printTitleAndPrompt(){\n System.out.println(\"\\n\\nSimple Chat System (CLIENT)\");\n System.out.println(\"Programmed by Kelvin Watson, OSU ID 932540242, onid: watsokel)\");\n System.out.println(\"**************************************************************\");\n System.out.println(\"TCP Connection established. Welcome to Simple Chat.\");\n System.out.print(\"Enter a user name (max 10 characters): \");\n }", "public void getUserProfile() {\n\t\tkeypad.UserProfiles.click();\n\t}", "private void displayUserInfo(String name) {\n\t\tString username = null;\n\t\tPattern p = Pattern.compile(\"\\\\[(.*?)\\\\]\");\n\t\tMatcher m = p.matcher(name);\n\t\tif (m.find())\n\t\t{\n\t\t username = m.group(1);\n\t\t lastClickedUser = username;\n\t\t}\n\t\tUser u = jdbc.get_user(username);\n\t\ttextFirstName.setText(u.get_firstname());\n\t\ttextLastName.setText(u.get_lastname());\n\t\ttextUsername.setText(u.get_username());\n\t\tif (u.get_usertype() == 1) {\n\t\t\trdbtnAdminDetails.setSelected(true);\n\t\t} else if (u.get_usertype() == 2) {\n\t\t\trdbtnManagerDetails.setSelected(true);\n\t\t} else {\n\t\t\trdbtnWorkerDetails.setSelected(true);\n\t\t}\n\t\tif (u.get_email() != null) {textEmail.setText(u.get_email());} else {textEmail.setText(\"No Email Address in Database.\");}\n\t\tif (u.get_phone() != null) {textPhone.setText(u.get_phone());} else {textPhone.setText(\"No Phone Number in Database.\");}\t\t\t\t\n\t\tcreateQualLists(u.get_userID());\n\t}", "private String getLoggedInUser() {\r\n\t\tOptional<Authentication> authentication = Optional\r\n\t\t\t\t.ofNullable(SecurityContextHolder.getContext().getAuthentication());\r\n\t\treturn authentication.map(Authentication::getPrincipal).map(obj -> (UserDetails) obj)\r\n\t\t\t\t.map(UserDetails::getUsername).orElse(null);\r\n\t}", "private static void displayOwner() {\n // Clear the screen\n clearScreen();\n\n // Display UI\n System.out.println(\"Welcome, Owner.\\n\\n\"\n + \"Choose an option:\\n\"\n + \"- (O)ccupancy - View occupancy of rooms\\n\"\n + \"- (D)ata [(c)ounts|(d)ays|(r)evenue] - View data on \"\n + \"counts, days, or revenue of each room\\n\"\n + \"- (S)tays - Browse list of reservations\\n\"\n + \"- (R)ooms - View list of rooms\\n\"\n + \"- (B)ack - Goes back to main menu\\n\");\n }", "public void display () {\n super.display ();\n if (joined == true) {\n System.out.println(\"Staff name: \"+staffName+\n \"\\nSalary: \"+salary+\n \"\\nWorking hour: \"+workingHour+\n \"\\nJoining date: \"+joiningDate+\n \"\\nQualification: \"+qualification+\n \"\\nAppointed by: \"+appointedBy);\n }\n }", "public void getInfo() {\n\t\tSystem.out.println(\"My name is \"+ name+ \" and my last name is \"+ lastName);\n\t\t\n\t\tgetInfo1();// we can access static method within non static \n\t\t\n\t}", "private void ViewAccounts() {\n for (int k = 0; k < accountList.size(); k++) {\n\n System.out.print(k + \": \" + accountList.get(k) + \" || \");\n\n }\n }", "private void printCustomer(PrintStream ps){\n// ps.println(\"ID, FirstName, Last Name, Number of bank account\");\n for(Customer customer: customers){\n ps.println(customer.getId()+ \", \" + customer.getFirstName() + \" \" + customer.getLastName());\n for(String accountNumber: customer.getAccountNumbers()){\n ps.println(\"\\t\" + customer.getAccount(accountNumber));\n }\n }\n }", "public void logincredentials() {\n\t\tutil.entertext(prop.getValue(\"locators.text.uname\"), \"admin\");\n\t\tutil.entertext(prop.getValue(\"locators.text.password\"), \"Admin123\");\n\t\tutil.ClickElement(prop.getValue(\"locators.button.regdesk\"));\n\t\tutil.ClickElement(prop.getValue(\"locators.button.login\"));\n\t\tlogreport.info(\"logged into the application\");\n\n\t}", "@Override\n public void display(){\n System.out.println(\"Student id: \"+getStudentId()+\"\\nName is: \"+getName()+\"\\nAge :\"+getAge()+\"\\nAcademic year: \"+getSchoolYear()\n +\"\\nNationality :\"+getNationality());\n }", "@Override\n public String toString() {\n return \"ID: \" + userID + \" Name: \" + name;\n }", "public String printInfo() {\n\t\treturn \"\\n=====================================================================\"+\r\n\t\t\t\t\"\\n Gaming Center Information\"+\r\n\t\t\t\t\"\\n=====================================================================\"+\r\n\t\t\t\t\"\\n Gaming center Name \\t= \" + centerName +\r\n\t\t\t\t\"\\n Location \\t\\t= \" + location + \r\n\t\t\t\t\"\\n Contact Number \\t= \" + contact+\r\n\t\t\t\t\"\\n Operating hour \\t= \"+ operatingHour+\r\n\t\t\t\t\"\\n Number of Employee \\t= \"+ noOfEmployee+ \" pax\";\r\n\t}", "@Override\n\tpublic String getNaam(){\n\t\tString pName= ctx.getCallerPrincipal().getName();\n\t\tPerson p=userEJB.findPerson(pName);\n\t\tString w=p.getName();\n\t\treturn w;\n\t}", "private void printAllStudentInDB(){\n ArrayList studentInformation = AdminManager.loadDBStudentInformation();\n System.out.println(\"--------------------------------------------------------------------------------------\");\n System.out.println(\"USERNAME STUDENT NAME MATRIC NUMBER GENDER NATIONALITY\");\n System.out.println(\"--------------------------------------------------------------------------------------\");\n\n for(int i=0; i<studentInformation.size();i++){\n String st = (String)studentInformation.get(i);\n StringTokenizer star = new StringTokenizer(st, \",\");\n System.out.print(String.format(\"%7s \",star.nextToken().trim()));\n String printPassword = star.nextToken().trim();\n System.out.println(String.format(\"%20s %9s %6s %s\",star.nextToken().trim(),star.nextToken().trim(),star.nextToken().trim(),star.nextToken().trim()));\n }\n System.out.println(\"--------------------------------------------------------------------------------------\\n\");\n }", "private void getValues() {\n session = new UserSession(getApplicationContext());\n\n //validating session\n session.isLoggedIn();\n\n //get User details if logged in\n HashMap<String, String> user = session.getUserDetails();\n\n shopname = user.get(UserSession.KEY_NAME);\n shopemail = user.get(UserSession.KEY_EMAIL);\n shopmobile = user.get(UserSession.KEY_MOBiLE);\n System.out.println(\"nameemailmobile \" + shopname + shopemail + shopmobile);\n }", "public void DisplayEntry()\r\n {\r\n System.out.println(\"Username: \" + this.myUserName);\r\n System.out.println(\"Entry: \\n\" +\r\n this.myEntry);\r\n System.out.println(\"Date: \" + this.myDate);\r\n }", "@Override\n\tpublic void showProfile() {\n\t\t\n\t}" ]
[ "0.7663435", "0.72066504", "0.70923424", "0.68570447", "0.67870045", "0.6717056", "0.67124707", "0.6558077", "0.64820683", "0.6477801", "0.6461386", "0.6404629", "0.64038527", "0.6401553", "0.63990194", "0.63561106", "0.6354855", "0.6344759", "0.62974685", "0.62750524", "0.6268449", "0.62652504", "0.62532365", "0.6250664", "0.62269336", "0.62233984", "0.6216093", "0.6213913", "0.61912733", "0.6188237", "0.61641264", "0.615997", "0.6157356", "0.6154173", "0.61536026", "0.61475563", "0.6128604", "0.6127475", "0.6121988", "0.6114107", "0.61119586", "0.6110979", "0.61043453", "0.6088377", "0.6071115", "0.60662526", "0.6061716", "0.6056313", "0.60558367", "0.60427547", "0.60427547", "0.6036433", "0.60341525", "0.6033089", "0.6028882", "0.60261875", "0.60211414", "0.60091656", "0.60091656", "0.60091656", "0.60091656", "0.60042304", "0.6003482", "0.6002562", "0.5990271", "0.59830356", "0.5980799", "0.5978937", "0.5976989", "0.59761745", "0.5971317", "0.59682536", "0.5959452", "0.595886", "0.595766", "0.59534425", "0.5949667", "0.5948569", "0.5948246", "0.59478563", "0.5946888", "0.59368014", "0.5934666", "0.59283525", "0.5928042", "0.5922109", "0.5921969", "0.59198487", "0.59180355", "0.5909956", "0.5908942", "0.5903531", "0.59028774", "0.5901162", "0.58917713", "0.5887659", "0.58863723", "0.58840716", "0.58824694", "0.58754045" ]
0.61040425
43
Prints the information of all the persons in the database
public String showAllPersons() { String string = ""; for(Person person: getPersons().values()){ string += person.toString(); } return string; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private static void showStudentDB () {\n for (Student s : studentDB) {\n System.out.println(\"ID: \" + s.getID() + \"\\n\" + \"Student: \" + s.getName());\n }\n }", "public void printInfo() throws IOException {\n System.out.println();\n System.out.println(\"* Current books in the database.\\n\");\n for(Book book :bookdatabase){\n System.out.println(book.getTitle());\n }\n System.out.println();\n System.out.println(\"* Current students in the database.\\n\");\n for(Student student :studentdatabase){\n System.out.println(student.getUsername());\n }\n System.out.println();\n System.out.println(\"* Current librarians in the database.\\n\");\n for(Librarian l :lib_db){\n System.out.println(l.getUsername());\n }\n\n\n\n }", "public void show() {\r\n\t\tSystem.out.println(\"Id \\t Name \\t Address\");\r\n\t\t\r\n\t\tfor (int index = 0; index < emp.size(); index++) {\r\n\t\t\tSystem.out.println(emp.get(index).empId + \"\\t\" + emp.get(index).name +\"\\t\" + emp.get(index).adress);\r\n\t\t}\r\n\t}", "public static void showResultPerson( Result<Record> result){\n \t for (Record r : result) {\n// Integer id = r.getValue(PERSON.PERSO_ID);\n String firstName = r.getValue(PERSON.PERSO_FIRSTNAME);\n String lastName = r.getValue(PERSON.PERSO_LASTNAME);\n\n System.out.println(\"Name : \" + firstName + \" \" + lastName);\n }\n }", "private void printAllStudentInDB(){\n ArrayList studentInformation = AdminManager.loadDBStudentInformation();\n System.out.println(\"--------------------------------------------------------------------------------------\");\n System.out.println(\"USERNAME STUDENT NAME MATRIC NUMBER GENDER NATIONALITY\");\n System.out.println(\"--------------------------------------------------------------------------------------\");\n\n for(int i=0; i<studentInformation.size();i++){\n String st = (String)studentInformation.get(i);\n StringTokenizer star = new StringTokenizer(st, \",\");\n System.out.print(String.format(\"%7s \",star.nextToken().trim()));\n String printPassword = star.nextToken().trim();\n System.out.println(String.format(\"%20s %9s %6s %s\",star.nextToken().trim(),star.nextToken().trim(),star.nextToken().trim(),star.nextToken().trim()));\n }\n System.out.println(\"--------------------------------------------------------------------------------------\\n\");\n }", "public void listar()\n\t{\n\t\tdatabase.list().forEach(\n\t\t\t(entidade) -> { IO.println(entidade.print() + \"\\n\"); }\n\t\t);\n\t}", "private void displaySchalorship() {\n\n for (Scholarship scholarship : scholarshipDatabase) {\n\n stdOut.println(scholarship.toString() + \"\\n\");\n\n }\n }", "public void displayAllPatients() {\r\n\t\ttry {\r\n\t\t\tString query= \"SELECT * FROM patients\";\r\n\t\t\tStatement stm= super.getConnection().createStatement();\r\n\t\t\tResultSet results= stm.executeQuery(query);\r\n\t\t\twhile(results.next()) {\r\n\t\t\t\tString[] row= new String[7];\r\n\t\t\t\trow[0]= results.getInt(1)+\"\";\r\n\t\t\t\trow[1]= results.getString(2);\r\n\t\t\t\trow[2]= results.getString(3);\r\n\t\t\t\trow[3]= results.getString(4);\r\n\t\t\t\trow[4]= results.getString(5);\r\n\t\t\t\trow[5]= results.getInt(6)+\"\";\r\n\t\t\t\tmodelHostory.addRow(row);\r\n\t\t\t}\r\n\t\t} catch (Exception e) {\r\n\t\t\tSystem.out.println(e);\r\n\t\t}\r\n\t}", "public void print()\n {\n System.out.println(name + \"\\n\");\n for(int iterator = 0; iterator < bookList.size() ; iterator++)\n {\n System.out.println((iterator+1) +\". \" + bookList.get(iterator).getTitle()+\" by \" +bookList.get(iterator).getAuthor()); \n }\n }", "public void printUsers() {\n userAnya.printInfo();\n userRoma.printInfo();\n }", "public static void main(String[] args) {\n\n DAOManager m = new DAOManager();\n ArrayList<Person> pList = m.selectPerson1();\n\n\n\n for (Person person : pList) {\n System.out.println(person.toString());\n\n }\n }", "void display() {\n System.out.println(id + \" \" + name + \" \" + age);\n }", "public void personLookup() {\n\t\tSystem.out.print(\"Person: \");\n\t\tString entryName = getInputForName();\n\t\tphoneList\n\t\t\t.stream()\n\t\t\t.filter(n -> n.getName().equals(entryName))\n\t\t\t.forEach(n -> System.out.println(n));\n\t}", "public void outputNames(){\n System.out.printf(\"\\n%9s%11s\\n\",\"Last Name\",\"First Name\");\n pw.printf(\"\\n%9s%11s\",\"Last Name\",\"First Name\");\n ObjectListNode p=payroll.getFirstNode();\n while(p!=null){\n ((Employee)p.getInfo()).displayName(pw);\n p=p.getNext();\n }\n System.out.print(\"\\nNumber of Employees: \"+payroll.size()+\"\\n\");\n pw.print(\"\\nNumber of Employees: \"+payroll.size()+\"\\n\");\n }", "public void print() {\n System.out.println(\"Person of name \" + name);\n }", "public void displayRelation() {\n System.out.print(this.name + \"(\");\n for (int i = 0; i < attributes.size(); i++) {\n System.out.print(attributes.get(i) + \":\" + domains.get(i));\n // Don't add a comma on the last key, value pair\n if (i < attributes.size() - 1)\n System.out.print(\",\");\n\n }\n System.out.print(\")\");\n System.out.print(\"\\nNumber of Tuples: \" + table.size() + \"\\n\");\n for (Tuple t : table)\n System.out.println(t);\n\n }", "void printEmployeeDetail(){\n\t\tSystem.out.println(\"First name: \" + firstName);\n\t\tSystem.out.println(\"Last name: \" + lastName);\n\t\tSystem.out.println(\"Age: \" + age);\n\t\tSystem.out.println(\"Salary: \" + salary);\n\t\tSystem.out.println(firstName + \" has \" + car.color + \" \" + car.model + \" it's VIN is \" + car.VIN + \" and it is make year is \" + car.year );\n\t\t\n\t}", "public void printList() {\n System.out.println(\"Disciplina \" + horario);\n System.out.println(\"Professor: \" + professor + \" sala: \" + sala);\n System.out.println(\"Lista de Estudantes:\");\n Iterator i = estudantes.iterator();\n while(i.hasNext()) {\n Estudante student = (Estudante)i.next();\n student.print();\n }\n System.out.println(\"Número de estudantes: \" + numberOfStudents());\n }", "public void printContact(){\n for (int i = 0 ; i<contact.size() ; i++){\r\n System.out.print(contact.get(i).getFirstName());\r\n System.out.print(\"\\t\\t\"+contact.get(i).getLastName());\r\n System.out.print(\"\\t\\t\"+contact.get(i).getPhoneNumber());\r\n System.out.println(\"\\t\\t\"+contact.get(i).getAddress());\r\n }\r\n }", "public void printDetails()\n {\n System.out.println(\"Name: \" + foreName + \" \"\n + lastName + \"\\nEmail: \" + emailAddress);\n }", "void display()\n\t {\n\t\t System.out.println(\"Student ID: \"+id);\n\t\t System.out.println(\"Student Name: \"+name);\n\t\t System.out.println();\n\t }", "void display() {\n System.out.println(id + \" \" + name);\n }", "public static void printEmployees() {\n List<Employee> employees = null;\n try {\n employees = employeeRepository.getAll(dataSource);\n } catch (SQLException e) {\n LOGGER.error(e.getMessage());\n }\n if (employees.isEmpty()) {\n System.out.println(\"\\n\" + resourceBundle.getString(\"empty.list\") + \"\\n\");\n LOGGER.warn(\"The list of employees is empty\");\n return;\n }\n System.out.println();\n employees.forEach(System.out::println);\n }", "public void printBorrowerDetails()\r\n {\r\n System.out.println( firstName + \" \" + lastName \r\n + \"\\n\" + address.getFullAddress()\r\n + \"\\nLibrary Number: \" + libraryNumber\r\n + \"\\nNumber of loans: \" + noOfBooks);\r\n }", "@Override\n\tpublic void output() {\n\t\tfor(User u :list) {\n\t\t\tif(list.size() > MIN_USER) {\n\t\t\t\tSystem.out.println(\"이름 : \"+u.getName());\n\t\t\t\tSystem.out.println(\"나이 : \"+u.getAge());\n\t\t\t\tSystem.out.println(\"주소 : \"+u.getAddr());\n\t\t\t\tSystem.out.println(\"=======================\");\n\t\t\t\t}\n\t\t\t}\n\t\t\tSystem.out.println(\"입력된 정보가 없습니다.\");\n\t\t}", "private void displayStudentByName(String name) {\n\n int falg = 0;\n\n for (Student student : studentDatabase) {\n\n if (student.getName().equals(name)) {\n\n stdOut.println(student.toString());\n\n falg = 1;\n\n break;\n }\n }\n\n if (falg == 0) {\n\n stdOut.println(\"cannot find student\\n\");\n }\n }", "public void displayEmployees(){\n System.out.println(\"NAME --- SALARY --- AGE \");\n for (Employee employee : employees) {\n System.out.println(employee.getName() + \" \" + employee.getSalary() + \" \" + employee.getAge());\n }\n }", "public void display() {\r\n System.out.println(\"<<Person>>>\" + this); \r\n }", "private void viewAllStudents() {\n Iterable<Student> students = ctrl.getStudentRepo().findAll();\n students.forEach(System.out::println);\n }", "public static void displayStudentRecords() {\n\t\tSystem.out.println(\"Student records in the database are:\");\n\t\tSelectStudentRecords records = new SelectStudentRecords();\n\t\ttry {\n\t\t\tList<Student> studentList = records.selectStudentRecords();\n\t\t\tstudentList.forEach(System.out::println);\n\t\t} catch (Exception e) {\n\t\t\tSystem.out.println(e.getMessage());\n\t\t}\n\t}", "public static void display(){\n\n try {\n Connection myConnection = ConnectionFactory.getConnection();\n Statement stat = myConnection.createStatement();\n ResultSet rs = stat.executeQuery(\"SELECT * from product\");\n\n System.out.println(\"PRODUCT\");\n while(rs.next()){\n\n System.out.println(rs.getInt(\"id\") + \", \" + rs.getString(\"quantity\") + \", \" + rs.getString(\"productName\") + \", \" + rs.getDouble(\"price\")+ \", \" + rs.getString(\"deleted\"));\n }\n } catch (SQLException e) {\n e.printStackTrace();\n }\n System.out.println();\n\n }", "public void DisplayAllEmployees(){\r\n String format = \"%-20s %-20s %-9s\";\r\n System.out.println(\"\\n\");\r\n System.out.printf(format, \"|\"+\" Name \", \"|\"+\" Department \", \"|\"+\" phone number|\"+\"\\n\");\r\n System.out.println(\"----------------------------------------------------------\");\r\n for(Employee employee: listOfEmployees){\r\n System.out.format(format,\"|\"+employee.name,\"|\"+employee.departmentName,\"|\"+employee.contactNumber+\" |\"+ \"\\n\");\r\n }\r\n }", "void display() {\r\n\t\tSystem.out.println(id + \" \" + name);\r\n\t}", "public void list()\n {\n for(Personality objectHolder : pList)\n {\n String toPrint = objectHolder.getDetails();\n System.out.println(toPrint);\n }\n }", "public void viewList() {\n\t\tSystem.out.println(\"Your have \" + contacts.size() + \" contacts:\");\n\t\tfor (int i=0; i<contacts.size(); i++) {\n\t\t\tSystem.out.println((i+1) + \". \" \n\t\t\t\t\t+ contacts.get(i).getName() + \" number: \" \n\t\t\t\t\t+ contacts.get(i).getPhoneNum());\n\t\t}\n\t}", "public void displayRecords() {\n\t\tSystem.out.println(\"****Display Records****\");\n\t\tSystem.out.print(\"Firstname \\tLastname \\tAddress \\t\\tCity \\t\\tState \\t\\t\\tZIP \\t\\tPhone \\n\");\n\t\tfor (int i = 0; i < count; i++) {\n\t\t\tif (details[i] == null) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tSystem.out.println(details[i]);\n\t\t}\n\t\tSystem.out.println();\n\t}", "public void printPersonStats(String fullName)\n\t{\n\t\tSystem.out.println(\"\\n\"+fullName);\n\t\t\n\t\t//assuming person exists in graph\n\t\tfor(String relationship: personMap.get(fullName).inRelationships.keySet())\n\t\t\tSystem.out.println(\"-\"+relationship+\" to \"+personMap.get(fullName).inRelationships.get(relationship));\n\t\t\n\t\tfor(String relationship: personMap.get(fullName).outRelationships.keySet())\n\t\t\tSystem.out.println(\"-\"+personMap.get(fullName).outRelationships.get(relationship)+\" is the \"+relationship);\n\t}", "public void print() {\r\n Person tmp = saf.get(0);\r\n System.out.println(\"Person name : \" + tmp.getName() +\r\n \" Entering time : \" + tmp.getTime() +\r\n \" Waiting time : \" + tmp.getExitTime());\r\n }", "private static void LessonDAO() {\n PersonDAO personDAO = new PersonDAOImpl(); //amend in next lesson\n List<Person> personList = personDAO.getPersonList();\n\n System.out.println(\"===============================\");\n for(Person person: personList) {\n System.out.println(person.getPersonId() + \": \" + person.getFirstName() + \" \" + person.getLastName());\n }\n System.out.println(\"===============================\");\n //endregion\n\n //region Prompt User\n Scanner reader = new Scanner(System.in);\n System.out.println(\"Please Select a Person from the list: \");\n String personId = reader.nextLine();\n //endregion\n\n //region Get Person Details\n Person personDetail = personDAO.getPersonById(Integer.parseInt(personId));\n\n System.out.println(\"---Person Details---\");\n System.out.println(\"Full Name: \" + personDetail.GetFullName());\n //endregion\n }", "public void printUserInfo(){\n System.out.print(\"Username: \"+ getName() + \"\\n\" + \"Birthday: \"+getBirthday()+ \"\\n\"+ \"Hometown: \"+getHome()+ \"\\n\"+ \"About: \" +getAbout()+ \" \\n\"+ \"Subscribers: \" + getSubscriptions());\n\t}", "void printData()\n {\n System.out.println(\"Studentname=\" +name);\n System.out.println(\"Student city =\"+city);\n System.out.println(\"Student age = \"+age);\n }", "public void printByLastName() {\r\n\t\tif ( size == 0 ) {\r\n\t\t\tSystem.out.println(\"Database is empty.\");\r\n\t\t\treturn;\r\n\t\t}\r\n\t\t\r\n\t\tsortByLastName(); \r\n\t\tSystem.out.println(\"--Printing statements by last name--\");\r\n\t\tfor ( int i = 0; i < accounts.length; i++) {\r\n\t\t\tif ( accounts[i] != null ) {\r\n\t\t\t\tSystem.out.println();\r\n\t\t\t\tSystem.out.println(accounts[i].toString());\r\n\t\t\t\tSystem.out.println(\"-interest: $ \" + String.format(\"%.2f\", accounts[i].monthlyInterest()));\r\n\t\t\t\tSystem.out.println(\"-fee: $ \" + String.format(\"%.2f\", accounts[i].monthlyFee()));\r\n\t\t\t\tdouble totalBalance = (accounts[i].getBalance() + accounts[i].monthlyInterest()) - accounts[i].monthlyFee();\r\n\t\t\t\t\r\n\t\t\t\t//update the total balance\r\n\t\t\t\taccounts[i].setBalance(totalBalance);\r\n\t\t\t\tSystem.out.println(\"-new balance: $ \" + String.format(\"%.2f\", totalBalance));\r\n\t\t\t\tSystem.out.println();\r\n\t\t\t}\r\n\t\t}\r\n\t\tSystem.out.println(\"--end of printing--\");\r\n\t\tSystem.out.println();\r\n\t\treturn;\r\n\t}", "@GetMapping(path=\"/showData\")\n public List<Person> showData() {\n Iterable<Person> myPerson = personRepository.findAll();\n List<Person> listOfPersons = new ArrayList<>();\n myPerson.forEach((Person person) -> {\n listOfPersons.add(person);\n });\n return listOfPersons;\n }", "public void showHouses() {\n System.out.println(\"-----Houses List-----\");\n System.out.println(\"No\\tOwner\\tPhone\\t\\tAddress\\t\\t\\t\\tRent\\tState\");\n houseService.listHouse();\n System.out.println(\"------List Done------\");\n }", "@Override\n public void display(){\n System.out.println(\"Student id: \"+getStudentId()+\"\\nName is: \"+getName()+\"\\nAge :\"+getAge()+\"\\nAcademic year: \"+getSchoolYear()\n +\"\\nNationality :\"+getNationality());\n }", "protected void printAll() {\n\t\tSystem.out.println(\"Network maps\");\n\t\tSystem.out.println(\"\tAddresses\");\n\t\ttry {\n\t\t\tPreparedStatement pstmt = \n\t\t\t\t\tthis.agent.getDatabaseManager().getConnection().prepareStatement(\n\t\t\t\t\t\t\tthis.agent.getDatabaseManager().selectAll);\n\t ResultSet rs = pstmt.executeQuery();\n\t // loop through the result set\n while (rs.next()) {\n \t System.out.printf(\"%s -> %s\\n\", rs.getString(\"username\"), rs.getString(\"address\"));\n }\n\t\t} catch (Exception e) {\n\t\t\tAgent.errorMessage(\n\t\t\t\t\tString.format(\"ERROR when trying to get all the address of the table users in the database\\n\"), e);\n\t\t}\n\t\tSystem.out.println(\"\tmapSockets\");\n\t\tfor (String u: this.mapSockets.keySet()) {\n\t\t\tSystem.out.printf(\"%s -> %s\\n\", u, this.mapSockets.get(u));\n\t\t}\n\t}", "public static void display_student() {\n\t\t\n\n \n\t\n\ttry {\n\t\t//jdbc code\n\t\tConnection connection=Connection_Provider.creatC();\t\t\n\n\t\tString q=\"select * from students\";\n\t\t// Create Statement\n\t\tStatement stmt=connection.createStatement();\n\t\tResultSet result=stmt.executeQuery(q);\n\t\twhile (result.next()) {\n\t\t\tSystem.out.println(\"Student id \"+result.getInt(1));\n\t\t\tSystem.out.println(\"Student Name \"+result.getString(2));\n\t\t\tSystem.out.println(\"Student Phone No \"+result.getInt(3));\n\t\t\tSystem.out.println(\"Student City \"+result.getString(4));\n\t\t\tSystem.out.println(\"=========================================\");\n\t\t\t\n\t\t}\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t} catch (SQLException e) {\n\t\t// TODO Auto-generated catch block\n\t\te.printStackTrace();\n\t}\n\t\n\t\t\n\t}", "public String loopDBInfo(ResultSet rs){\n String p = \"\";\n try{\n while (rs.next()) {\n int id_col = rs.getInt(\"ID\");\n String first_name = rs.getString(\"NAME\");\n String phone = rs.getString(\"PHONE\");\n String status = rs.getString(\"STATUS\");\n String prob = rs.getString(\"PROBLEM\");\n \n \n p = p + (id_col + \" \" + first_name + \" \" + phone + \" \"+ status + \" \"+ prob + \"\\n\"); \n // System.out.println(p);\n }\n } catch (Exception e) {\n System.out.println(\"SQL problem \" + e);\n \n } return p;\n }", "private void view() {\n\n\t\ttry {\n\t\t\tString databaseUser = \"blairuser\";\n\t\t\tString databaseUserPass = \"password!\";\n\t\t\tClass.forName(\"org.postgresql.Driver\");\n\t\t\tConnection connection = null;\n\t\t\tString url = \"jdbc:postgresql://13.210.214.176/test\";\n\t\t\tconnection = DriverManager.getConnection(url, databaseUser, databaseUserPass);\n//\t\t\tStatement s = connection.createStatement();\n\t\t\ts = connection.createStatement();\n\t\t\tResultSet rs = s.executeQuery(\"select * from account;\");\n\t\t\t// while (rs.next()) {\n\t\t\tString someobject = rs.getString(\"name\") + \" \" + rs.getString(\"password\");\n\t\t\tSystem.out.println(someobject);\n\t\t\toutput.setText(someobject);\n\t\t\t// output.setText(rs);\n\t\t\t// System.out.println(rs.getString(\"name\")+\" \"+rs.getString(\"message\"));\n\t\t\t// rs.getStatement();\n\t\t\t// }\n\n\t\t} catch (Exception e) {\n\t\t\tSystem.err.println(e.getMessage());\n\t\t}\n\t\tPostgresJDBC();\n\t}", "public void printAccounts() { \r\n\t\tif ( size == 0 ) {\r\n\t\t\tSystem.out.println(\"Accounts is empty\");\r\n\t\t\treturn;\r\n\t\t}\r\n\t\t\r\n\t\tSystem.out.println(\"--Listing accounts in the database--\");\r\n\t\tfor(int i = 0; i < accounts.length; i++) {\r\n\t\t\tif ( accounts[i] != null ) {\r\n\t\t\t\tSystem.out.println(accounts[i].toString());\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t}\r\n\t\tSystem.out.println(\"--end of listing--\");\r\n\t\tSystem.out.println();\r\n\t\treturn;\r\n\t}", "public void displayAll() \n\t{\n\t\tSystem.out.printf(\"%n--[ My Contact List ]--%n\");\n\t\tSystem.out.printf(\"%n%-20s%-15s%-20s%-15s%n\", \"Name\", \"Phone\", \"Email\",\n\t\t\t\t\"Company\");\n\t\tSystem.out.printf(\"%n%-20s%-15s%-20s%-15s%n\", \"----\", \"-----\", \"-----\",\n\t\t\t\t\"-------\");\n\t\tfor (BusinessContact b : this.contacts) \n\t\t{\n\t\t\tSystem.out.printf(\"%n%-20s%-15s%-20s%-15s%n\", b.getLastName()\n\t\t\t\t\t+ \", \" + b.getFirstName(), b.getPhoneNumber(),\n\t\t\t\t\tb.getEmailAddress(), b.getCompany());\n\t\t}\n\t}", "public void mostrarPersona(){\r\n System.out.println(\"Nombre: \" + persona.getNombre());\r\n System.out.println(\"Cedula: \" + persona.getCedula());\r\n }", "private void seePerso() {\n\t\tfor (int i = 0; i < persoList.size(); i++) {\n\t\t\tPersonnage perso = persoList.get(i);\n\t\t\tSystem.out.println(\"id : \" + i);\n\t\t\tSystem.out.println(perso);\n\t\t}\n\n\t\tSystem.out.println(\"souhaitez vous modifier un personnage ? o/n\");\n\t\tif (sc.nextLine().toLowerCase().contentEquals(\"o\")) {\n\t\t\tSystem.out.println(\"Lequel ? id\");\n\t\t\tint id = sc.nextInt();\n\t\t\tsc.nextLine();\n\t\t\tchangePerso(id);\n\t\t}\n\t}", "public void printStudentList()\n {\n for(int i = 0; i < students.size(); i++)\n System.out.println( (i + 1) + \". \" + students.get(i).getName());\n }", "public static void outputRecord() {\r\n System.out.println(\"First Name: Len\");\r\n System.out.println(\"Last Name: Payne\");\r\n System.out.println(\"College: Lambton College\");\r\n }", "public void display () {\n System.out.println(rollNo + \" \" + name + \" \" + college );\n }", "public String showPerson(){\n return _person.toString();\n }", "public static void printLongestNamedPeople(){\n ArrayList<Person> longests = query.getLongestNamed();\n if (longests.size() == 1) {\n System.out.println(\"The person with the longest name is: \");\n } else {\n System.out.println(\"The people with the longest names are: \");\n }\n for (Person p : longests) {\n System.out.println(p);\n }\n }", "public void displayLable() {\n\t\tSystem.out.println(\"Name of Company :\"+name+ \" Address :\"+address);\r\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 }", "public String showDetails() {\n\t\treturn \"Person Name is : \" + name + \"\\n\" + \"Person Address is : \" + address;\n\t}", "private void viewTeachers() {\n Iterable<Teacher> teachers = ctrl.getTeacherRepo().findAll();\n teachers.forEach(System.out::println);\n }", "@Override\n public String toString() {\n return \"Person{\" + getId() + \" : \" + getUsername() + \" : \" + getJmeno() + \" \" + getPrijmeni() + '}';\n }", "public void printUser() {\n\t\tSystem.out.println(\"First name: \" + this.firstname);\n\t\tSystem.out.println(\"Last name: \" + this.lastname);\n\t\tSystem.out.println(\"Age: \" + this.age);\n\t\tSystem.out.println(\"Email: \" + this.email);\n\t\tSystem.out.println(\"Gender: \" + this.gender);\n\t\tSystem.out.println(\"City: \" + this.city);\n\t\tSystem.out.println(\"State: \" + this.state + \"\\n\");\n\t}", "public static void showPersonDetails (int customerId, Database db)\r\n\t{\r\n\t\twhile(true) {\r\n\t\t\ttry {\r\n\t\t\t\tCustomer details = db.getCustomer(customerId);\r\n\r\n\t\t\t\tSystem.out.println(\"Customer \" + details.customerId + \": \" + details.name + \", \" + details.address + \", \" + details.phone + \", \" + details.sex + \", \" + details.dob);\r\n\t\t\t\tif (!details.AccountList.isEmpty()) {\r\n\t\t\t\t\tfor (int account : details.AccountList) {\r\n\t\t\t\t\t\tSystem.out.printf(\"Account %d: %5.2f EUR.\\n\", account, Account.getBalance(account, db));\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tbreak;\r\n\t\t\t} catch (NullPointerException e) {\r\n\t\t\t\tSystem.out.println(\"Not a valid account.\");\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public void printOut(){\n\t\tSystem.out.println(\"iD: \" + this.getiD());\n\t\tSystem.out.println(\"Titel: \" + this.getTitel());\n\t\tSystem.out.println(\"Produktionsland: \" + this.getProduktionsLand());\n\t\tSystem.out.println(\"Filmlaenge: \" + this.getFilmLaenge());\n\t\tSystem.out.println(\"Originalsprache: \" + this.getOriginalSprache());\n\t\tSystem.out.println(\"Erscheinungsjahr: \" + this.getErscheinungsJahr());\n\t\tSystem.out.println(\"Altersfreigabe: \" + this.getAltersFreigabe());\n\t\tif(this.kameraHauptperson != null) {\n\t\t\tSystem.out.println( \"Kameraperson: \" + this.getKameraHauptperson().toString() );\n\t\t}\n\t\telse {\n\t\t\tSystem.out.println( \"Keine Kameraperson vorhanden \");\n\n\t\t}\n\t\tSystem.out.println(\"----------------------------\");\n\t\tif ( this.listFilmGenre != null) {\n\t\t\tfor( FilmGenre filmGenre: this.listFilmGenre ){\n\t\t\t\tSystem.out.println(\"Filmgenre: \" + filmGenre);\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(\"----------------------------\");\n\t\tfor( Person darsteller: this.listDarsteller ){\n\t\t\tSystem.out.println(\"Darsteller: \" + darsteller);\n\t\t}\n\t\tSystem.out.println(\"----------------------------\");\n\t\tfor( Person synchronSpr: this.listSynchronsprecher ){\n\t\t\tSystem.out.println(\"synchro: \" + synchronSpr);\n\t\t}\n\t\tSystem.out.println(\"----------------------------\");\n\t\tfor( Person regi: this.listRegisseure ){\n\t\t\tSystem.out.println(\"regi: \" + regi);\n\t\t}\n\t\tSystem.out.println(\"----------------------------\");\n\t\tfor( Musikstueck mstk: this.listMusickstuecke ){\n\t\t\tSystem.out.println(\"Musikstueck: \" + mstk);\n\t\t}\n\t\tSystem.out.println(\"----------------------------\");\n\t\tSystem.out.println(\"Datentraeger: \" + this.getDatentraeger());\n\t\tSystem.out.println(\"----------------------------\");\n\t}", "private void listAll() throws SQLException { \n\t\t List<SearchList> bookList = searchListDao.listAll();\n\t\t System.out.printf(\"%-5s %-35s %-30s %-30s \\n\",\"Id#\", \"Title\", \"Author\", \"Series\"); \n\t\t for (SearchList book : bookList) { \n\t\t\t System.out.printf(\"%-5s %-35s %-30s %-30s \\n\", book.getBookIdNum(), book.getTitle(), book.getAuthor(), book.getSeries());\n\t\t }\n\t }", "public void outputInfo(){\n outputHeader();\n ObjectListNode p=payroll.getFirstNode();\n while(p!=null){\n ((Employee)p.getInfo()).displayInfo(pw);\n p=p.getNext();\n }\n System.out.print(\"\\nNumber of Employees: \"+payroll.size()+\"\\n\");\n pw.print(\"\\nNumber of Employees: \"+payroll.size()+\"\\n\");\n }", "public void print() {\n System.out.println(\"Nome: \" + nome);\n System.out.println(\"Telefone: \" + telefone);\n }", "void printBook()\r\n\t{\r\n\t\tfor(int i = 0; i < this.size(); i++)\r\n\t\t{\r\n\t\t\tthis.get(i).printContact();\r\n\t\t}\r\n\t}", "@Override\n\tpublic String toString() {\n\t\treturn id + \" \" + name + \" \" + surname;\n\t}", "public String printByLastName() { \n\t\t\n\t\tStringBuilder output = new StringBuilder(\"\");\n\t\t\n\t\tif(size > 0) {\n\t\t\t\n\t\t\tsortByLastName();\n\t\t\t\n\t\t\toutput.append(\"\\n\");\n\t\t\toutput.append(\"--Printing statements by last name--\\n\");\n\t\t\t//System.out.println();\n\t\t\t//System.out.println(\"--Printing statements by last name--\");\n\t\t\t\n\t\t\tfor (int i = 0; i < size; i++) {\n\t\t\t\t\n\t\t\t\toutput.append(\"\\n\");\n\t\t\t\toutput.append(accounts[i].toString());\n\t\t\t\toutput.append(\"\\n\");\n\t\t\t\taccounts[i].setBalance(accounts[i].monthlyInterest(), accounts[i].monthlyFee());\n\t\t\t\toutput.append(\"-interest: $ \" + String.format(\"%.2f\", accounts[i].monthlyInterest()));\n\t\t\t\toutput.append(\"\\n\");\n\t\t\t\toutput.append(\"-fee: $ \" + String.format(\"%.2f\", accounts[i].monthlyFee()));\n\t\t\t\toutput.append(\"\\n\");\n\t\t\t\toutput.append(\"-new balance: $ \" + (String.format(\"%.2f\", accounts[i].getBalance())));\n\t\t\t\toutput.append(\"\\n\");\n\t\t\t\t\n\t\t\t\t/*System.out.println();\n\t\t\t\tSystem.out.println(accounts[i].toString());\n\t\t\t\taccounts[i].setBalance(accounts[i].monthlyInterest(), accounts[i].monthlyFee());\n\t\t\t\tSystem.out.println(\"-interest: $ \" + String.format(\"%.2f\", accounts[i].monthlyInterest()));\n\t\t\t\tSystem.out.println(\"-fee: $ \" + String.format(\"%.2f\", accounts[i].monthlyFee()));\n\t\t\t\tSystem.out.println(\"-new balance: $ \" + (String.format(\"%.2f\", accounts[i].getBalance())));*/\n\t\t\t}\n\t\t\t\n\t\t\toutput.append(\"--end of printing--\\n\");\t\n\t\t\t\n\t\t}\n\t\t\n\t\telse {\n\t\t\toutput.append(\"Database is empty.\\n\");\n\t\t}\n\t\t\n\t\treturn output.toString();\n\n\t}", "public void listEmployees()\n\t{\n\t\tString str = \"Name\\tSurname\\tMail\\tPassword\\tBranchId\\tId\\n\";\n\t\t\n\t\tList<Employee> employees = this.company.getEmployees();\n\n\t\tfor(int i=0; i<employees.length(); i++)\n\t\t{\n\t\t\tstr += employees.get(i).getName() + \"\\t\" + employees.get(i).getSurname() + \"\\t\" + employees.get(i).getMail() + \"\\t\" + employees.get(i).getPassword() + \"\\t\\t\" + employees.get(i).getBranchId() + \"\\t\\t\" + employees.get(i).getId() + \"\\n\";\n\t\t}\n\n\t\tSystem.out.println(str);\n\n\t}", "private void printCustomer(PrintStream ps){\n// ps.println(\"ID, FirstName, Last Name, Number of bank account\");\n for(Customer customer: customers){\n ps.println(customer.getId()+ \", \" + customer.getFirstName() + \" \" + customer.getLastName());\n for(String accountNumber: customer.getAccountNumbers()){\n ps.println(\"\\t\" + customer.getAccount(accountNumber));\n }\n }\n }", "public void printMembers() {\n\t\tthis.getListUsers().printList();\n\t}", "public void printModuleStudentInfo() {\t\r\n\tfor(int i =0; i<(StudentList.size()); i++) {\r\n\t\tStudent temp =StudentList.get(i);\r\n\t\tSystem.out.println(temp.getUserName());\r\n\t}\t\r\n}", "public void parseAndPrintRecords() {\n ArrayList<Employee> employees;\n\n employees = parseData(data);\n\n System.out.printf(\"%10s%10s%10s\\n\", \"Last\", \"First\", \"Salary\");\n for(Employee employee : employees) {\n System.out.printf(\"%10s%10s%10d\\n\", employee.lName, employee.fName, employee.salary);\n }\n\n }", "public void print() {\n\t\tSystem.out.println(\"ONOMA IDIOKTITH: \" + fname);\n\t\tSystem.out.println(\"EPWNYMO IDIOKTITH: \" + lname);\n\t\tSystem.out.println(\"DIEUTHINSH FARMAKEIOU: \" + address);\n\t\tSystem.out.println(\"THLEFWNO FARMAKEIOU: \" + telephone);\n\t\tSystem.out.println();\n\t}", "public void listBooks() {\n String sql = \"SELECT ISBN, BookName, AuthorName, Price FROM books\";\n\n try (Connection conn = this.connect();\n Statement stmt = conn.createStatement();\n ResultSet rs = stmt.executeQuery(sql)) {\n\n // Print results\n while(rs.next()) {\n System.out.println(rs.getInt(\"ISBN\") + \"\\t\" +\n rs.getString(\"BookName\") + \"\\t\" +\n rs.getString(\"AuthorName\") + \"\\t\" +\n rs.getInt(\"Price\"));\n }\n } catch (SQLException e) {\n System.out.println(e.getMessage());\n }\n }", "public void display()\n {\n System.out.println(name);\n System.out.println(status);\n if (friendslist.size ==0){\n System.out.println(\"User has no friends :(\");\n for(String i: friendslist.size){\n System.out.println(friendslist.get(i));\n }\n }\n }", "public String printAccounts() {\n StringBuilder result;\n result = new StringBuilder((\"--Listing accounts in the database--\\n\"));\n for (int i = 0; i < size; i++) {\n result.append(accounts[i].toString()).append(\"\\n\");\n }\n result.append(\"--end of listing--\");\n return result.toString();\n }", "public void printList(){\n\t\tfor(User u : userList){\r\n\t\t\tSystem.out.println(\"Username: \" + u.getUsername() + \" | User ID: \" + u.getUserID() + \" | Hashcode: \" + u.getHashcode() + \" | Salt: \" + u.getSalt());\r\n\t\t}\r\n\t}", "public void print(){\n\t\tif(isEmpty()){\n\t\t\tSystem.out.printf(\"Empty %s\\n\", name);\n\t\t\treturn;\n\t\t}//end if\n\n\t\tSystem.out.printf(\"The %s is: \", name);\n\t\tListNode current = firstNode;\n\n\t\t//while not at end of list, output current node's data\n\t\twhile(current != null){\n\t\t\tSystem.out.printf(\"%s \", current.data);\n\t\t\tcurrent = current.nextNode;\n\t\t}//end while\n\n\t\tSystem.out.println(\"\\n\");\n\t}", "public void getInfo(){\n System.out.println(\"Name: \" + name + \"\\n\" + \"Address: \" + address);\n }", "public void printStatistics() throws SQLException {\n\t\t\temployeeDAO.printStatistics();\n\t\t\t\n\t\t}", "private void printSchema() {\n ArrayList<String> schema = sqlMngr.getSchema();\n\n System.out.println(\"\");\n System.out.println(\"------------\");\n System.out.println(\"Total number of tables: \" + schema.size());\n for (int i = 0; i < schema.size(); i++) {\n System.out.println(\"Table: \" + schema.get(i));\n }\n System.out.println(\"------------\");\n System.out.println(\"\");\n }", "private void displayScholarshipByName(String name) {\n\n int falg = 0;\n\n stdOut.println(name + \"\\n\");\n\n for (Scholarship scholarship : scholarshipDatabase) {\n\n stdOut.println(scholarship.getName() + \"\\n\");\n\n if (scholarship.getName().equals(name)) {\n\n stdOut.println(scholarship.toString());\n\n falg = 1;\n\n break;\n }\n }\n\n if (falg == 0) {\n\n stdOut.println(\"cannot find scholarship\\n\");\n\n }\n }", "public void showInfo() {\n\t\tfor (String key : list.keySet()) {\n\t\t\tSystem.out.println(\"\\tID: \" + key + list.get(key).toString());\n\t\t}\n\t}", "public static void printOldestPeople(){\n // Get the oldest people\n ArrayList<Person> oldests = query.getOldest();\n if (oldests.size() == 1) {\n System.out.println(\"The oldest person in the database is:\");\n } else {\n System.out.println(\"The oldest people in the database are:\");\n }\n for (Person old : oldests) {\n System.out.println(old);\n }\n }", "private void showContentAccountTable() throws SQLException {\r\n\t\tConnection connection = dbAdministration.getConnection();\r\n\t\tStatement statement = connection.createStatement();\r\n\t\tString sql = \"SELECT * FROM account\";\r\n\t\tResultSet resultSet = statement.executeQuery(sql);\r\n\t\tlogger.info(\"SQL-Statement ausgeführt: \" + sql);\r\n\t\tSystem.out.println(\"Table account:\");\r\n\t\twhile (resultSet.next()) {\r\n\t\t\tint id = resultSet.getInt(1);\r\n\t\t\tString owner = resultSet.getString(2);\r\n\t\t\tString number = resultSet.getString(3);\r\n\r\n\t\t\tSystem.out.println(id + \" | \" + owner + \" | \" + number);\r\n\t\t}\r\n\t\tresultSet.close();\r\n\t\tstatement.close();\r\n\t\tconnection.close();\r\n\t}", "public void print() {\r\n System.out.print( getPlayer1Id() + \", \" );\r\n System.out.print( getPlayer2Id() + \", \");\r\n System.out.print(getDateYear() + \"-\" + getDateMonth() + \"-\" + getDateDay() + \", \");\r\n System.out.print( getTournament() + \", \");\r\n System.out.print(score + \", \");\r\n System.out.print(\"Winner: \" + winner);\r\n System.out.println();\r\n }", "public static void printMemberTable() throws MemberException {\n\n Connection conn = null;\n PreparedStatement stmt = null;\n ResultSet rs = null;\n try {\n conn = DBConfiguration.getConnection();\n stmt = conn.prepareStatement(\n Configuration.SQL_06,\n ResultSet.TYPE_FORWARD_ONLY,\n ResultSet.CONCUR_READ_ONLY);\n rs = stmt.executeQuery();\n String current_account = null;\n while ( rs.next() ) {\n current_account = printRow(current_account,System.out,rs);\n }\n System.out.println();\n }\n catch(SQLException x) {\n String msg = \"SQLException: \" + x.getMessage();\n throw new MemberException( msg );\n }\n finally {\n DBConfiguration.closeSQLResultSet( rs );\n DBConfiguration.closeSQLStatement( stmt );\n DBConfiguration.closeSQLConnection( conn );\n }\n conn = null;\n stmt = null;\n rs = null;\n\n return;\n }", "private void printInfo() {\n System.out.println(\"\\nThis program reads the file lab4.dat and \" +\n \"inserts the elements into a linked list in non descending \"\n + \"order.\\n\" + \"The contents of the linked list are then \" +\n \"displayed to the user in column form.\\n\");\n }", "@Override\r\n\tpublic void viewAllUsers() {\n\t\tList<User> allUsers = new ArrayList<User>();\r\n\t\tallUsers = udao.getAllUsers();\r\n\t\t\r\n\t\tSystem.out.println(\"ALL USERS:\");\r\n\t\tSystem.out.println(\"ID\\tUsername\\tName\");\r\n\t\t\r\n\t\tfor(int i = 0; i < allUsers.size(); i++) {\r\n\t\t\tUser tempUser = allUsers.get(i);\r\n\t\t\tSystem.out.println(tempUser.getUserID() + \"\\t\" + tempUser.getUsername() + \"\\t\"\r\n\t\t\t\t\t+ tempUser.getFirstName() + \" \" + tempUser.getLastName());\r\n\t\t}\r\n\r\n\t}", "void display()\r\n\t{\r\n\t\tSystem.out.println(\"bikeid=\"+bikeid+\" bike name==\"+bikename);\r\n\t}", "public static void print_all() {\n for (int i = 0; i < roster.size(); i++)\n System.out.println(roster.get(i).print());\n\n System.out.println();\n }", "public void print() {\n System.out.println(\"**List of books in the library.\");\n for (Book b : books){\n if(b != null) {\n System.out.println(b);\n }\n }\n System.out.println(\"**End of list\");\n }", "@Override\n\tpublic void displayTheDatabase() {\n\t\t\n\t}", "public String printAccounts() { \n\t\t\n\t\tStringBuilder output = new StringBuilder(\"\");\n\t\t\n\t\tif(size > 0) {\n\t\t\t\n\t\t\toutput.append(\"--Listing accounts in the database--\\n\");\n\t\t\t//System.out.println(\"--Listing accounts in the database--\");\n\n\t\t\tfor (int i = 0; i < size; i++) {\n\t\t\t\toutput.append(accounts[i].toString());\n\t\t\t\toutput.append(\"\\n\");\n\t\t\t\t//System.out.println(accounts[i].toString());\n\t\t\t}\n\t\t\t\n\t\t\toutput.append(\"--end of listing--\\n\");\n\t\t\t//System.out.println(\"--end of listing--\");\t\n\t\t\t\n\t\t}\n\n\t\telse {\n\t\t\toutput.append(\"Database is empty.\\n\");\n\t\t\t//System.out.println(\"Database is empty.\");\n\t\t}\n\t\t\n\t\treturn output.toString();\n\t}", "public static void userDisplay() {\n\n String nameList = \" | \";\n for (String username : students.keySet()) {\n nameList += \" \" + username + \" | \";\n\n\n }\n System.out.println(nameList);\n// System.out.println(students.get(nameList).getGrades());\n\n }" ]
[ "0.74529827", "0.7137839", "0.69478947", "0.69386786", "0.6933284", "0.690188", "0.6795211", "0.6791674", "0.67825603", "0.6743708", "0.67315483", "0.6715956", "0.66368604", "0.66314536", "0.6627346", "0.66200525", "0.6606059", "0.65810937", "0.65679467", "0.6553109", "0.6527479", "0.6524588", "0.6523193", "0.6522412", "0.6520673", "0.65028685", "0.6502702", "0.6434995", "0.64214677", "0.6417242", "0.64085287", "0.6406185", "0.6385727", "0.6367639", "0.63674337", "0.63670015", "0.63608986", "0.63473386", "0.6338228", "0.6337099", "0.63306797", "0.6329983", "0.6326805", "0.63230115", "0.6323", "0.6322097", "0.6305697", "0.6299711", "0.6298254", "0.6294731", "0.6294723", "0.62946326", "0.62938154", "0.6291228", "0.62882143", "0.6275239", "0.6258314", "0.62561196", "0.6236105", "0.62343395", "0.62210613", "0.6210142", "0.62092674", "0.6206191", "0.62011516", "0.62004244", "0.61998665", "0.6188228", "0.61866105", "0.61811537", "0.6179541", "0.6171117", "0.6170975", "0.61697793", "0.6167743", "0.6158216", "0.6157653", "0.6155645", "0.61435544", "0.6121027", "0.61091447", "0.6107955", "0.60931015", "0.60921055", "0.6086097", "0.6084939", "0.60820323", "0.60759944", "0.60718524", "0.6070482", "0.6070359", "0.60674006", "0.60662746", "0.6057049", "0.605207", "0.60447377", "0.60383135", "0.6035775", "0.6022815", "0.60195005" ]
0.7041062
2